/* ============================================================
   忻意礼商城 · 视觉优化 v1（独立覆盖层，可整层回滚）
   原则：只提升可读性与层级，不改变品牌调性
   建立：2026-11-17
   ============================================================ */

/* ---------- 1. 字号层级：正文从 11.5px 提到可读区间 ---------- */
#product-grid .yz-card-line {
  font-size: 13px !important;
  line-height: 1.6 !important;
  letter-spacing: .01em;
  color: #5a4a38 !important;
}
@media (min-width: 768px) {
  #product-grid .yz-card-line { font-size: 13.5px !important; }
}

/* 商品名：拉开与正文的层级差 */
#product-grid .glass-card h4,
#product-grid .glass-card .product-name,
#product-grid .glass-card h3 {
  font-size: 15.5px !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
}

/* ---------- 2. 价格：数字放大加粗，货币符号弱化 ---------- */
.yz-card-price {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0 !important;
}
.yz-card-price .font-elegant,
.yz-card-price strong,
.yz-card-price b {
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: -.01em !important;
}
@media (max-width: 767.98px) {
  .yz-card-price .font-elegant,
  .yz-card-price strong,
  .yz-card-price b { font-size: 17px !important; }
}

/* ---------- 3. 导航：从"装饰字"变成"可点击" ---------- */
header nav a,
header .nav-link,
header nav > a {
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: .02em !important;
}

/* ---------- 4. 手机端首屏：压缩冗余，让商品进入第一屏 ---------- */
@media (max-width: 767.98px) {
  #hero {
    min-height: auto !important;
    padding-bottom: 20px !important;
  }
  /* 隐藏纯装饰元素，把空间让给商品 */
  #hero .seal-circle { display: none !important; }
  #hero .hero-tagline { display: none !important; }
  #hero .max-w-7xl {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  #hero .hero-subtitle {
    font-size: .95rem !important;
    letter-spacing: .28em !important;
    margin-bottom: 10px !important;
  }
  #hero .hero-title {
    font-size: 2.35rem !important;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
  }
  #hero .trust-strip {
    margin-bottom: 12px !important;
    gap: 6px !important;
    font-size: 12px !important;
  }
  #hero .hero-bigcard {
    margin-bottom: 12px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
  #hero .hero-entry-row { margin-bottom: 4px !important; }
  #hero .landmark-card { padding: 8px 10px !important; }
  #hero .landmark-icon-wrap { width: 34px !important; height: 34px !important; }
}

/* ---------- 5. 首屏硬卖点行（新增元素样式） ---------- */
.hero-sellpoints {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 4px auto 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #4a3423;
}
.hero-sellpoints span {
  padding: 0 14px;
  position: relative;
  white-space: nowrap;
}
.hero-sellpoints span + span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background: rgba(163, 47, 38, .28);
}
@media (max-width: 767.98px) {
  .hero-sellpoints { font-size: 12.5px; margin-bottom: 12px; }
  .hero-sellpoints span { padding: 0 9px; }
}

/* ---------- 6. 区块呼吸：连续堆叠的段落之间留出气口 ---------- */
@media (min-width: 768px) {
  section + section { margin-top: 0; }
  .section-divider-soft {
    height: 1px;
    margin: 56px auto;
    max-width: 120px;
    background: linear-gradient(90deg, transparent, rgba(184,148,90,.45), transparent);
  }
}
/* ---------- 7. 手机端：压缩 #special，让商品更早露出 ---------- */
@media (max-width: 767.98px) {
  #special { padding-top: 28px !important; padding-bottom: 28px !important; }
  #special .max-w-7xl { padding-left: 12px !important; padding-right: 12px !important; }
  /* 节日卡片改横滑，不换行占高度 */
  #hero .hero-entry-row {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  #hero .hero-entry-row::-webkit-scrollbar { display: none; }
  #hero .landmark-card { flex: 0 0 auto !important; }
  /* 卖点行更紧凑，防 375px 换行 */
  .hero-sellpoints { font-size: 11.5px !important; }
  .hero-sellpoints span { padding: 0 7px !important; }
  /* 商品区块提前 */
  #products { padding-top: 20px !important; }
}

/* ---------- 8. 手机端终极压缩：把商品推进首屏 ---------- */
@media (max-width: 767.98px) {
  #hero { padding-top: 76px !important; }
  #hero .max-w-7xl { padding-top: 0 !important; padding-bottom: 0 !important; }
  #hero .hero-subtitle { font-size: .85rem !important; margin-bottom: 6px !important; letter-spacing: .22em !important; }
  #hero .hero-title { font-size: 2.1rem !important; margin-bottom: 8px !important; }
  .hero-sellpoints { font-size: 11px !important; margin-bottom: 10px !important; }
  .hero-sellpoints span { padding: 0 6px !important; }
  #hero .trust-strip { margin-bottom: 10px !important; font-size: 11px !important; gap: 4px !important; }
  #hero .hero-bigcard { margin-bottom: 10px !important; padding: 10px 12px !important; min-height: 0 !important; }
  #hero .hero-bigcard-title { font-size: 1.05rem !important; }
  #hero .hero-bigcard-sub { font-size: 10.5px !important; }
  #hero .hero-bigcard-icon { width: 32px !important; height: 32px !important; }
  /* 节日卡片：单行横滑 + 隐藏标题行省高度 */
  #hero .hero-entry-row {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    padding-bottom: 2px !important;
    -webkit-overflow-scrolling: touch;
  }
  #hero .hero-entry-row::-webkit-scrollbar { display: none !important; }
  #hero .hero-entry-row .landmark-card { flex: 0 0 auto !important; }
  #special { padding-top: 18px !important; }
  #products { padding-top: 12px !important; }
}

/* ---------- 9. 防标题竖排保护（2026-11-17） ---------- */
/* 任何商品卡标题都禁止按单字断行，杜绝窄屏下出现竖排 */
.hot-card .line-clamp-2,
.hot-card h4,
.hot-card h3,
#product-grid .line-clamp-2,
#product-grid h4,
#product-grid h3,
.special-card .line-clamp-2,
.special-card h4 {
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  min-width: 0 !important;
  line-height: 1.4 !important;
}
/* 横滑卡最小宽度，保证标题有足够横向空间 */
.hot-track .hot-card {
  min-width: 148px !important;
}
/* 底部悬浮栏不遮挡最后一行商品 */
@media (max-width: 767.98px) {
  .max-w-7xl.mx-auto.px-4 { padding-bottom: 8px; }
  body.home-portal { padding-bottom: 76px !important; }
}

/* ---------- 10. 手机端商品列表恢复单列（2026-11-17 用户要求） ---------- */
@media (max-width: 767.98px) {
  /* 商品列表：双列把文字挤成竖排 → 恢复一行一个 */
  #product-grid,
  #product-grid.yz-cols-2,
  #product-grid.yz-cols-3,
  #product-grid.yz-cols-4,
  #product-grid.yz-cols-5,
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-4.gap-6,
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-4.gap-4 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  /* 单列后卡片横向铺满，标题一行放得下 */
  #product-grid > *,
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-4 > * {
    min-width: 0 !important;
    width: 100% !important;
  }
  /* 单列时标题不再需要 2 行占位，收紧 */
  #product-grid .line-clamp-2,
  #product-grid h4 {
    min-height: 0 !important;
    -webkit-line-clamp: 2 !important;
  }
}
