/*
Theme Name: Astra Child
Template: astra
Description: My private child theme for SnipSavers
Author: SnipSavers
Version: 1.0.0
*/

/* ==========================================
   1. 全局样式 (PC & 移动端通用)
   ========================================== */
   
   


/* 优惠券卡片整体 */
.wpcd-coupon.wpcd-coupon-default {
  background: #ffffff !important;
  border: 1px solid #ede8f8 !important;
  border-radius: 12px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 2px 10px rgba(108, 35, 192, 0.07) !important;
}

/* 折扣色块：品牌黄 */
.wpcd-coupon-discount-text {
  background-color: #f5c518 !important;
  color: #3a0a7a !important;
  font-weight: 800 !important;
}

/* 按钮颜色：品牌紫 */
.coupon-type, .wpcd-coupon-code-btn {
  background-color: #6c23c0 !important;
  color: #ffffff !important;
}

/*调整移动端主页hero高度 */
@media (max-width: 768px) {
  #Home figure.wp-block-image {
    max-height: 250px;
    overflow: hidden;
  }
  
  #Home figure.wp-block-image img {
    max-height: 250px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
  }
}

/* ── 分类页网格卡片样式 ── */
.wpcd-coupon-grid .wpcd-coupon,
.wpcd-coupons-grid .wpcd-coupon {
  background: #ffffff !important;
  border: 1px solid #ede8f8 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 10px rgba(108, 35, 192, 0.07) !important;
  transition: all 0.2s ease !important;
}

.wpcd-coupon-grid .wpcd-coupon:hover,
.wpcd-coupons-grid .wpcd-coupon:hover {
  box-shadow: 0 6px 20px rgba(108, 35, 192, 0.15) !important;
  transform: translateY(-2px) !important;
  border-color: #c4a8f0 !important;
}

/* ── 网格卡片折扣色块改黄色 ── */
.wpcd-coupon-grid .wpcd-coupon-discount-text,
.wpcd-coupons-grid .wpcd-coupon-discount-text {
  background-color: #f5c518 !important;
  color: #3a0a7a !important;
  font-weight: 800 !important;
}

/* ── 网格卡片 Coupon 按钮 ── */
.wpcd-coupon-grid .coupon-type,
.wpcd-coupons-grid .coupon-type {
  background-color: #6c23c0 !important;
  color: #ffffff !important;
  border-radius: 6px !important;
}

/* ── 网格卡片标题颜色 ── */
.wpcd-coupon-grid .wpcd-coupon-title a,
.wpcd-coupons-grid .wpcd-coupon-title a {
  color: #2d0a63 !important;
}

/* ── 网格卡片社交图标 ── */
.wpcd-coupon-grid .wpcd-btn-social.wpcd-btn-xs,
.wpcd-coupons-grid .wpcd-btn-social.wpcd-btn-xs {
  background-color: #6c23c0 !important;
  border-color: #6c23c0 !important;
  color: #ffffff !important;
}

/* ── 网格卡片过期日期 ── */
.wpcd-coupon-grid .wpcd-coupon-expire,
.wpcd-coupons-grid .wpcd-coupon-expire {
  color: #6c23c0 !important;
}


/* ── 分类页网格卡片 ── */
.wpcd-custom-grid .seo-card-container .wpcd-coupon {
  background: #ffffff !important;
  border: 1px solid #ede8f8 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 10px rgba(108, 35, 192, 0.07) !important;
  transition: all 0.2s ease !important;
}

.wpcd-custom-grid .seo-card-container .wpcd-coupon:hover {
  box-shadow: 0 6px 20px rgba(108, 35, 192, 0.15) !important;
  transform: translateY(-2px) !important;
  border-color: #c4a8f0 !important;
}

/* ── 折扣色块改黄色 ── */
.wpcd-custom-grid .wpcd-coupon-discount-text {
  background-color: #f5c518 !important;
  color: #3a0a7a !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

/* ── Coupon 按钮 ── */
.wpcd-custom-grid .coupon-type {
  background-color: #6c23c0 !important;
  color: #ffffff !important;
  border-radius: 6px !important;
}

/* ── 标题颜色 ── */
.wpcd-custom-grid .wpcd-coupon-title a,
.wpcd-custom-grid .wpcd-coupon-title {
  color: #2d0a63 !important;
}

/* ── 社交图标 ── */
.wpcd-custom-grid .wpcd-btn-social.wpcd-btn-xs {
  background-color: #6c23c0 !important;
  border-color: #6c23c0 !important;
  color: #ffffff !important;
}

/* ── 过期日期 ── */
.wpcd-custom-grid .wpcd-coupon-expire {
  color: #6c23c0 !important;
}


/* ── 分类页优惠码标签改浅紫 ── */
.wpcd-custom-grid .wpcd-coupon-code-btn,
.wpcd-custom-grid .wpcd-c-code-container {
  background-color: #ede8f8 !important;
  color: #6c23c0 !important;
  border: 1px solid #c4a8f0 !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

/* ── 分类页标题深紫色 ── */
.wpcd-custom-grid .wpcd-coupon-title,
.wpcd-custom-grid .wpcd-coupon-title a {
  color: #2d0a63 !important;
}

@media (max-width: 768px) {
    /* 强制文字不折行并增加水平间距 */
    .wp-block-categories-list li, 
    .widget_categories li, 
    .coupon-categories li {
        list-style-type: none !important; /* 去掉错位的圆点 */
        display: inline-block;
        margin-right: 15px;
        white-space: nowrap; /* 防止单词内部断行 */
    }

    /* 修复 Brands 字母排列 */
    .brands-list-item {
        width: 100% !important;
        display: block !important;
        margin-bottom: 10px;
    }
}

/* 仅针对手机端（屏幕宽度小于 768px）进行优化 */
@media (max-width: 767px) {
    
    /* 1. 强制容器和列表项占满全宽，消除重叠 */
    .category-dir, .brand-dir,
    .category-dir ul, .brand-dir ul,
    .category-dir li, .brand-dir li {
        width: 100% !important;
        float: none !important; /* 清除可能的浮动布局 */
        display: block !important;
        box-sizing: border-box;
    }

    /* 2. 修复文字换行和对齐问题 */
    .category-dir li, .brand-dir li {
        padding: 8px 0 !important;
        margin: 0 !important;
        text-align: left !important;
        list-style: none !important; /* 隐藏错位的圆点 */
    }

    /* 3. 针对品牌目录中的 A-Z 索引字母进行加固 */
    .brand-dir h3, .brand-dir .letter-section {
        margin-top: 20px !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
    }

    /* 4. 如果你的文字还是太挤，可以给包裹容器增加一点内边距 */
    .category-dir, .brand-dir {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}


/* 侧边栏列表美化 */
.sidebar-recent-list a:hover {
    color: #f5c518 !important; /* 悬停时变成品牌黄 */
    padding-left: 5px;
    transition: all 0.2s ease;
}

.widget-title {
    border-bottom: 2px solid #6c23c0;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #3a0a7a;
}

