/* ============================================
   Dakzhou Theme - Single Product
   产品详情页样式
   ============================================ */

/* ===== 页面基础 ===== */
.single-product .section{
  padding:32px 0;
}
.product-section{
  padding:40px 0;
}

/* ===== 产品布局 ===== */
/* 图片栏加宽 / 信息栏收窄 —— 分级策略：
     ≥1200px : 1.45fr : 1fr  ≈ 58 : 42  → 图片栏约 734px
     1025–1199px : 保持 1fr : 1fr 对半，避免右侧 CTA 行被迫换行
     ≤1024px : 单栏（见下方响应式段落）
   注意：style.css 末尾有同名 !important 规则，必须与其保持同步。 */
.product-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
}

/* 大屏：图片栏加宽到约 58% */
@media (min-width:1240px){
  .product-layout{
    grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);
  }
}

/* ===== 图片画廊 ===== */
/* 用 aspect-ratio 取代固定高度：图片随栏宽等比放大，不再被锁在 450px */
.gallery-main{
  width:100%;
  height:auto;
  aspect-ratio:1 / 1;
  max-height:760px;
  background:var(--bg-tint);
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  margin-bottom:12px;
  position:relative;
  overflow:hidden;
  cursor:zoom-in;
}
.gallery-main img{
  width:100%;
  height:100%;
  object-fit:contain;
}
/* 图层叠加切换（js/theme.js initGallery）：
   每张主图各是一个绝对定位图层，叠在 #galleryMain 之上，切换只切
   .is-active —— 无网络请求、无重新解码、无白闪，按下缩略图即换。
   z-index:1 低于 .gallery-badge / .gallery-arrow 的 2，不会挡住角标与箭头；
   pointer-events:none 让点击穿透到 #galleryMain，放大镜逻辑不受影响。 */
.gallery-main .gallery-main-layer{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  opacity:0;
  z-index:1;
  pointer-events:none;
  transition:opacity .12s ease-out;
}
.gallery-main .gallery-main-layer.is-active{
  opacity:1;
}
.gallery-badge{
  position:absolute;
  top:14px;
  left:14px;
  background:var(--orange);
  color:#fff;
  font-size:.75rem;
  font-weight:700;
  padding:5px 12px;
  border-radius:4px;
  z-index:2;
}

/* 画廊箭头 */
.gallery-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.5);
  background:rgba(0,0,0,.32);
  color:#fff;
  font-size:1.3rem;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:.2s;
  z-index:2;
}
.gallery-main:hover .gallery-arrow,
.gallery-arrow:focus{
  opacity:1;
}
.gallery-arrow.prev{left:12px;}
.gallery-arrow.next{right:12px;}

/* 缩放提示 */
.gallery-zoom-hint{
  position:absolute;
  right:12px;
  top:12px;
  width:40px;
  height:40px;
  border:none;
  border-radius:50%;
  background:rgba(15,23,42,.6);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:zoom-in;
  transition:.2s;
  pointer-events:none;
}
.gallery-zoom-hint:hover{background:var(--emerald);}
.gallery-zoom-hint svg{width:20px;height:20px;}

/* 缩略图：auto-fit 自适应列数，6 张图同排铺满、不再单独掉到第二行。
   轨宽用 1fr（不要写死 max，否则 Blink 会按 max 计算列数，反而只排得下 4 列），
   单张再用 max-width 收顶，避免图片数量少的商品缩略图被拉得过大。 */
.gallery-thumbs{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(64px,1fr));
  justify-items:center;
  gap:10px;
}
.gallery-thumb{
  width:100%;
  max-width:150px;
  aspect-ratio:1 / 1;
  height:auto;
  background:var(--bg-tint);
  border-radius:6px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.7rem;
  color:var(--muted);
  border:2px solid transparent;
  transition:.2s;
  overflow:hidden;
}
.gallery-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.gallery-thumb.active,
.gallery-thumb:hover{
  border-color:var(--emerald);
}

/* ===== WooCommerce 产品详情 ===== */
.single-product .product_title{
  font-size:1.6rem;
  font-weight:800;
  letter-spacing:-.02em;
  margin-bottom:12px;
  color:var(--ink);
}
.single-product .price{
  font-size:1.4rem;
  font-weight:700;
  color:var(--emerald);
  margin-bottom:16px;
}
.single-product .price del{
  color:var(--muted-2);
  font-weight:400;
  font-size:1rem;
  margin-right:8px;
}
.single-product .woocommerce-product-details__short-description{
  margin-bottom:20px;
  line-height:1.7;
  color:var(--slate);
}

/* 数量选择器 */
.single-product .quantity{
  display:inline-flex;
  align-items:center;
  margin-right:12px;
}
.single-product .quantity input{
  width:70px;
  padding:10px;
  border-radius:8px;
  border:1.5px solid var(--border-2);
  text-align:center;
  font-size:1rem;
  font-weight:600;
}
.single-product .quantity input:focus{
  outline:none;
  border-color:var(--emerald);
  box-shadow:0 0 0 3px rgba(4,120,87,.12);
}

/* 隐藏 number 输入框的默认上下箭头 */
.single-product .quantity input::-webkit-outer-spin-button,
.single-product .quantity input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.single-product .quantity input[type=number]{
  -moz-appearance:textfield;
}

/* 自定义数量选择器隐藏箭头 */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.qty-input[type=number]{
  -moz-appearance:textfield;
}

/* 加入购物车按钮 */
.single-product .single_add_to_cart_button{
  background:linear-gradient(135deg,var(--orange) 0%,var(--orange-deep) 100%);
  color:#fff;
  border:none;
  border-radius:10px;
  padding:12px 28px;
  font-weight:700;
  font-size:1rem;
  cursor:pointer;
  transition:transform .15s,box-shadow .2s;
  box-shadow:0 4px 12px rgba(249,115,22,.25);
}
.single-product .single_add_to_cart_button:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(249,115,22,.35);
}

/* 自定义数量选择器 */
.qty-selector{
  display:flex;
  align-items:center;
  border:1.5px solid var(--border);
  border-radius:4px;
  overflow:hidden;
}
.qty-btn{
  width:38px;
  height:42px;
  background:#fff;
  border:none;
  border-radius:0;
  font-size:1.1rem;
  cursor:pointer;
  transition:.2s;
  display:flex;
  align-items:center;
  justify-content:center;
}
.qty-btn:hover{background:#f8fafc;color:var(--emerald);}
.qty-input{
  width:50px;
  height:42px;
  text-align:center;
  border:none;
  border-radius:0;
  font-size:1rem;
  font-weight:600;
  outline:none;
  padding:0;
  margin:0;
  box-sizing:border-box;
  background:#fff;
  border-left:1px solid var(--border);
  border-right:1px solid var(--border);
  -moz-appearance:textfield;
}

/* 产品操作按钮组 */
.product-actions{
  display:flex;
  gap:12px;
  align-items:center;
  margin:20px 0;
  flex-wrap:wrap;
}

/* 信任标识 */
.product-trust{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--border);
}
.trust-mini{
  text-align:center;
  font-size:.78rem;
  color:var(--muted);
}
.trust-mini .icon{
  font-size:1.3rem;
  display:block;
  margin-bottom:4px;
}

/* ===== 产品标签页 ===== */
.product-tabs{
  margin-top:50px;
}
.tab-nav{
  display:flex;
  gap:2px;
  border-bottom:1px solid var(--border);
  margin-bottom:26px;
  flex-wrap:wrap;
}
.tab-btn{
  padding:14px 24px;
  background:none;
  border:none;
  font-size:.95rem;
  font-weight:600;
  color:var(--muted);
  cursor:pointer;
  transition:color .2s, background .2s, border-color .2s;
  border-bottom:3px solid transparent;
  margin-bottom:-1px;
  border-radius:8px 8px 0 0;
  letter-spacing:.01em;
  white-space:nowrap;
}
.tab-btn:hover{
  color:var(--emerald);
  background:var(--mint,#ecfdf5);
}
.tab-btn.active{
  color:var(--emerald);
  border-bottom-color:var(--orange);
  font-weight:700;
}
.tab-content{
  display:none;
  padding:4px 0 6px;
  line-height:1.75;
  color:var(--ink-2);
  font-size:.94rem;
}
.tab-content.active{
  display:block;
}
.tab-content h3{
  font-size:1.15rem;
  margin:22px 0 12px;
  color:var(--ink);
  font-weight:700;
  letter-spacing:-.01em;
}
.tab-content h3:first-child{
  margin-top:0;
}
.tab-content ul{
  margin:10px 0;
}
.tab-content ul li{
  padding:6px 0 6px 22px;
  position:relative;
}
.tab-content ul li::before{
  content:"✓";
  position:absolute;
  left:0;
  color:var(--emerald);
  font-weight:700;
}
/* 正文行宽收敛（与 style.css 同步）：标签页已包进 .container，
   再把正文压到约 80 字符一行，避免 1440/1920 下铺满整屏难以阅读。 */
.product-tabs .tab-content{
  max-width:900px;
}
.product-tabs .tab-content > :first-child{
  margin-top:0;
}
.product-tabs .tab-content p{
  margin:0 0 12px;
}
.product-tabs .tab-content ul{
  margin:0 0 20px;
}
.product-tabs .spec-table{
  max-width:640px;
}
/* 宽屏下正文分两栏：单栏 900px 仍有约 120 字符/行且右侧空掉一大块，
   分成两栏后每栏约 45 字符，行短、又不浪费宽度。
   窄屏（≤1099px）保持单栏。 */
@media (min-width:1100px){
  .product-tabs .tab-content{
    max-width:none;
  }
  .product-tabs .dz-tab-body,
  .product-tabs .tab-content > ul{
    max-width:1240px;
    column-count:2;
    column-gap:64px;
  }
  /* 未分栏的散块（Installation 的 <p>、Reviews 的 .review-item）单独限宽，
     否则上面的 max-width:none 会让它们铺满整屏。 */
  .product-tabs .tab-content > p,
  .product-tabs .tab-content > .review-item{
    max-width:820px;
  }
  /* 只让叶子节点（p / li）不跨栏：若把 break-inside:avoid 加在 <ul> 上，
     而整篇描述恰好只有一个 <ul>，它会整体被塞进第一栏、等于没有分栏。 */
  .product-tabs .tab-content p,
  .product-tabs .tab-content li{
    break-inside:avoid;
  }
  .product-tabs .spec-table{
    max-width:760px;
  }
}

/* Reviews 空状态：之前只有一行 "Be the first to review this product!"，
   面板看上去像没加载完。给一个完整的空状态卡，视觉重量与其他标签页匹配。
   选择器带 .product-tabs 前缀是为了压过后面的
   `.product-tabs .tab-content p{margin:0 0 12px}`（特异性高于 `.dz-reviews-empty p`）。 */
.product-tabs .dz-reviews-empty{
  border:1px dashed var(--border);
  border-radius:12px;
  background:var(--bg-soft);
  padding:32px 28px;
  text-align:center;
  max-width:560px;
}
.product-tabs .dz-reviews-empty-stars{
  color:#f59e0b;
  font-size:1rem;
  letter-spacing:4px;
  margin-bottom:10px;
  line-height:1;
}
.product-tabs .dz-reviews-empty h4{
  margin:0 0 8px;
  font-size:1.05rem;
  font-weight:700;
  color:var(--ink);
}
.product-tabs .dz-reviews-empty p{
  margin:0;
  color:var(--muted);
  font-size:.9rem;
  line-height:1.7;
}

/* ===== 相关产品 ===== */
.related-products{
  margin-top:60px;
}
.related-products h2{
  font-size:1.5rem;
  font-weight:800;
  color:var(--ink);
  margin-bottom:24px;
}

/* ===== WooCommerce 产品元信息 ===== */
.single-product .product_meta{
  margin-top:20px;
  padding-top:20px;
  border-top:1px solid var(--border);
  font-size:.88rem;
  color:var(--muted);
}
.single-product .product_meta span{
  display:block;
  margin-bottom:6px;
}
.single-product .product_meta a{
  color:var(--emerald);
  text-decoration:none;
}
.single-product .product_meta a:hover{
  text-decoration:underline;
}

/* ===== 响应式 ===== */
@media (max-width:1024px){
  .product-layout{
    grid-template-columns:1fr !important;
    gap:30px !important;
  }
  .gallery-main{
    max-height:none;
  }
}

/* 桌面端：画廊随视口高度自适应，保证「主图 + 缩略图」一屏可见，同时不把图压小。
   .product-gallery 是 sticky（top:20px），总高超过视口时缩略图条会被裁在屏幕外。
   主图是 1:1 方形，所以用 max-width 间接控制高度。
   同步位置：style.css 的「桌面端：画廊随视口高度自适应（同时保证…）」段落
   （那边带 !important，优先级更高，实际生效的是那一条；这里保持一致以免
   将来去掉 !important 时行为突变）。 */
@media (min-width:1025px){
  .product-gallery{
    max-width:min(100%, clamp(520px, calc(87vh - 60px), 660px));
    margin-inline:auto;
  }
  .gallery-main{
    max-height:none;
  }
}
@media (max-width:768px){
  .single-product .product_title{
    font-size:1.3rem;
  }
  .single-product .price{
    font-size:1.2rem;
  }
  .gallery-main{
    max-height:none;
  }
  .gallery-thumbs{
    grid-template-columns:repeat(3,1fr);
    gap:8px;
  }
  .product-trust{
    grid-template-columns:1fr;
    gap:12px;
  }
}


/* ============================================
   配件推荐 (Accessories)
   ============================================ */

.acc-section{
  margin-top:20px;
}
.acc-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-bottom:12px;
}
.acc-head h3{
  font-size:1rem;
  font-weight:800;
  color:var(--ink);
}
.acc-head .acc-off{
  color:#dc2626;
  font-weight:600;
  font-size:.85rem;
}
.acc-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:10px 12px;
  margin-bottom:8px;
  display:flex;
  gap:10px;
  align-items:center;
}
.acc-card img{
  width:56px;
  height:56px;
  object-fit:contain;
  border-radius:8px;
  background:#f8fafc;
  flex-shrink:0;
}
.acc-info{
  flex:1;
  min-width:0;
}
.acc-name{
  font-weight:700;
  font-size:.82rem;
  margin-bottom:2px;
  color:var(--ink);
  line-height:1.3;
}
.acc-row{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:4px;
}

/* 配件数量选择器 */
.acc-qty{
  display:inline-flex;
  align-items:center;
  border:1.5px solid var(--border);
  border-radius:4px;
  overflow:hidden;
}
.acc-qty button{
  width:30px;
  height:32px;
  background:#fff;
  border:none;
  border-radius:0;
  font-size:.95rem;
  cursor:pointer;
  transition:.2s;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--ink-2);
}
.acc-qty button:hover{
  background:#f8fafc;
  color:var(--emerald);
}
.acc-qty .acc-qty-input{
  width:38px;
  height:32px;
  text-align:center;
  border:none;
  border-radius:0;
  font-size:.85rem;
  font-weight:600;
  color:var(--ink);
  background:#fff;
  outline:none;
  padding:0;
  border-left:1px solid var(--border);
  border-right:1px solid var(--border);
  -moz-appearance:textfield;
}
.acc-qty .acc-qty-input::-webkit-outer-spin-button,
.acc-qty .acc-qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.acc-qty .acc-qty-input:focus{
  border-color:var(--emerald);
  box-shadow:0 0 0 3px rgba(4,120,87,.12);
}
.acc-add{
  height:32px;
  padding:0 12px;
  background:#0f766e;
  color:#fff;
  border:none;
  border-radius:6px;
  font-weight:600;
  font-size:.78rem;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  transition:.2s;
  white-space:nowrap;
}
.acc-add:hover{
  background:#0d5d57;
}
.acc-price{
  font-weight:700;
  font-size:.85rem;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  align-items:flex-end;
  gap:2px;
}
.acc-price-sale{
  color:#0f766e;
}
.acc-price-orig{
  color:#94a3b8;
  text-decoration:line-through;
  font-size:.78rem;
  font-weight:400;
}
.acc-bundle-total{
  margin-top:16px;
  padding:16px 20px;
  background:linear-gradient(135deg,#f0fdf4 0%,#dcfce7 100%);
  border:1.5px solid #86efac;
  border-radius:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-shadow:0 2px 8px rgba(4,120,87,.08);
}
.acc-bundle-label{
  font-size:.95rem;
  color:#065f46;
  font-weight:600;
}
.acc-bundle-price{
  font-size:1.3rem;
  font-weight:800;
  color:#047857;
}

/* 配件多列布局 */
.acc-section .acc-grid{
  display:grid;
  gap:10px;
}
.acc-section.acc-cols-1 .acc-grid{
  grid-template-columns:1fr;
}
.acc-section.acc-cols-2 .acc-grid{
  grid-template-columns:repeat(2,1fr);
}
.acc-section.acc-cols-3 .acc-grid{
  grid-template-columns:repeat(3,1fr);
}
.acc-section.acc-cols-2 .acc-card,
.acc-section.acc-cols-3 .acc-card{
  flex-direction:column;
  align-items:flex-start;
  text-align:center;
}
.acc-section.acc-cols-2 .acc-card img,
.acc-section.acc-cols-3 .acc-card img{
  width:100%;
  height:100px;
  margin:0 auto;
}
.acc-section.acc-cols-2 .acc-info,
.acc-section.acc-cols-3 .acc-info{
  width:100%;
}
.acc-section.acc-cols-2 .acc-row,
.acc-section.acc-cols-3 .acc-row{
  justify-content:center;
}
.acc-section.acc-cols-2 .acc-price,
.acc-section.acc-cols-3 .acc-price{
  width:100%;
  text-align:center;
  margin-top:6px;
  align-items:center;
}

@media(max-width:600px){
  .acc-card{
    flex-wrap:wrap;
  }
  .acc-price{
    width:100%;
    text-align:right;
  }
  .acc-section.acc-cols-2 .acc-grid,
  .acc-section.acc-cols-3 .acc-grid{
    grid-template-columns:1fr;
  }
  .acc-section.acc-cols-2 .acc-card,
  .acc-section.acc-cols-3 .acc-card{
    flex-direction:row;
    align-items:center;
    text-align:left;
  }
  .acc-section.acc-cols-2 .acc-card img,
  .acc-section.acc-cols-3 .acc-card img{
    width:72px;
    height:72px;
    margin:0;
  }
  .acc-section.acc-cols-2 .acc-price,
  .acc-section.acc-cols-3 .acc-price{
    width:auto;
    text-align:right;
    align-items:flex-end;
  }
}


/* ============================================
   从自定义CSS迁移的产品详情页样式（已去除!important）
   ============================================ */
/* ===== Product detail: compact layout, Accessories next to Add to Cart ===== */

/* Compact price area */
.product-price-box{
  padding:12px 16px;
  margin-bottom:12px;
}
.price-now{
  font-size:1.5rem;
}
.price-row{
  margin-bottom:4px;
  gap:8px;
}
.price-note{
  font-size:.78rem;
}

/* Compact product title and meta */
.product-info h1{
  font-size:1.3rem;
  margin-bottom:6px;
}
.product-meta{
  margin-bottom:10px;
  gap:10px;
  font-size:.8rem;
}

/* Compact stock status */
.product-stock{
  margin-bottom:10px;
  font-size:.82rem;
}

/* Compact tiered pricing table */
.bundle-compact{
  margin-top:8px;
  padding:10px;
}
.bundle-compact-items{
  gap:6px;
}
.bundle-compact-item{
  padding:8px;
  font-size:.8rem;
}
.bundle-compact-item .price{
  font-size:.95rem;
}
.bundle-compact-item .save{
  font-size:.7rem;
}

/* Compact Add to Cart button area */
.qty-cart-row{
  margin-bottom:12px;
  gap:8px;
}

/* CTA 行宽度收敛：信息栏加宽策略下最窄约 449px，
   本行固定占用 = 数量选择器 129 + 间距 24 + 收藏按钮 48 = 201px，
   因此把两个按钮的最小宽度从 160/140 收到 118，保证四个控件始终同一行。
   （用 .single-product 提高优先级，覆盖 style.css 中的 .btn-add-cart-big / .btn-buy-now） */
.single-product .qty-cart-row .btn-add-cart-big,
.single-product .qty-cart-row .btn-buy-now{
  min-width:118px;
  padding-left:12px;
  padding-right:12px;
}
/* 重复样式已清理，统一使用第226行的定义 */
.btn-add-cart-big{
  padding:10px 18px;
  font-size:.9rem;
}
.btn-buy-now{
  padding:10px 18px;
  font-size:.9rem;
}
.btn-wishlist-big{
  width:42px;
  height:42px;
  font-size:1rem;
}

/* Compact Accessories section spacing */

/* Mobile further compact */
@media (max-width:768px){
  .product-price-box{
    padding:10px 14px;
  }
  .price-now{
    font-size:1.3rem;
  }
  .acc-card img{
    width:48px;
    height:48px;
  }
}

/* ===== Product detail: two-column layout optimization ===== */

/* Ensure two-column: image left, info right */
.product-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:start;
}

/* 大屏：图片栏加宽到约 58% */
@media (min-width:1240px){
  .product-layout{
    grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);
  }
}

/* Left column image area */
.product-gallery{
  position:sticky;
  top:20px;
}

/* Right column product info area */
.product-info{
  display:flex;
  flex-direction:column;
  gap:0;
}

/* Simplified price area */
.product-price-box{
  margin-bottom:12px;
}

/* Wholesale tiered pricing style */
.wholesale-section{
  margin:16px 0;
}

/* Mobile: single column layout */
@media (max-width:768px){
  .product-layout{
    grid-template-columns:1fr;
    gap:20px;
  }
  .product-gallery{
    position:static;
  }
}

/* ===== Product detail: compact tiered pricing table ===== */

.wholesale-section .dz-tiers{
  padding:12px;
  border-radius:8px;
  background:var(--bg-soft);
}

.dz-tiers-head{
  margin-bottom:8px;
  font-size:.88rem;
}

.dz-tiers-hint{
  font-size:.75rem;
  margin-left:8px;
}

.dz-tier-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(90px, 1fr));
  gap:6px;
}

.dz-tier{
  padding:8px 6px;
  border-radius:6px;
  font-size:.78rem;
  line-height:1.3;
}

.dz-tier-qty{
  font-size:.78rem;
  font-weight:600;
}

.dz-tier-price{
  font-size:.95rem;
  font-weight:700;
  margin:2px 0;
}

.dz-tier-save{
  font-size:.7rem;
}

/* Accessories cards also compact */




/* ===== Product detail: further reduce tiered pricing height ===== */

.wholesale-section{
  margin:10px 0;
}

.wholesale-section .dz-tiers{
  padding:8px;
}

.dz-tiers-head{
  margin-bottom:6px;
  font-size:.82rem;
}

.dz-tiers-hint{
  display:none;
}

.dz-tier-list{
  gap:4px;
}

.dz-tier{
  padding:5px 4px;
  border-radius:5px;
}

.dz-tier-qty{
  font-size:.72rem;
  display:block;
}

.dz-tier-price{
  font-size:.88rem;
  margin:1px 0;
  display:block;
}

.dz-tier-save{
  font-size:.65rem;
  display:block;
}

/* Further compact Accessories */












/* ===== Product detail: price area single line ===== */

.product-price-box{
  padding:8px 12px;
  margin-bottom:8px;
}

.price-row{
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:0;
  align-items:center;
}

.price-now{
  font-size:1.3rem;
}

.price-note{
  font-size:.72rem;
  margin-left:auto;
}

/* Price discount label also smaller */
.price-discount{
  font-size:.72rem;
  padding:2px 6px;
}

.price-old{
  font-size:.9rem;
}

/* ===== Fix: price area truly single line ===== */

.product-price-box{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  margin-bottom:8px;
}

.price-row{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin-bottom:0;
  flex-wrap:nowrap;
}

.price-now{
  font-size:1.3rem;
}

.price-note{
  font-size:.72rem;
  margin-left:auto;
  white-space:nowrap;
}

/* Shrink discount badge */
.price-discount{
  font-size:.72rem;
  padding:2px 6px;
}

.price-old{
  font-size:.9rem;
}

/* Mobile: allow wrap if too crowded */
@media (max-width:600px){
  .product-price-box{
    flex-wrap:wrap;
  }
  .price-note{
    margin-left:0;
    width:100%;
  }
}



/* ===== 高优先级优化：库存紧急提示 ===== */
.stock-urgent{
  color:#dc2626;
  font-size:.82rem;
  font-weight:600;
  background:#fef2f2;
  padding:2px 8px;
  border-radius:4px;
  margin-left:8px;
}

/* ===== 高优先级优化：信任徽章 ===== */
.trust-badges{
  display:flex;
  gap:16px;
  margin:12px 0 16px;
  padding:12px 0;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}
.trust-badge{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:.78rem;
  color:var(--muted);
  font-weight:500;
}
.trust-badge svg{
  width:18px;
  height:18px;
  color:var(--emerald);
  flex-shrink:0;
}

/* ===== 高优先级优化：批量定价响应式 ===== */
@media (max-width:1024px){
  .dz-tier-list{
    grid-template-columns:repeat(2, 1fr) !important;
  }
}
@media (max-width:480px){
  .dz-tier-list{
    grid-template-columns:repeat(2, 1fr) !important;
  }
  .dz-tier{
    padding:8px 6px !important;
  }
}

/* ===== 高优先级优化：标签页响应式 ===== */
@media (max-width:768px){
  .tab-nav{
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .tab-nav::-webkit-scrollbar{
    display:none;
  }
  .tab-btn{
    white-space:nowrap;
    padding:10px 16px;
    font-size:.85rem;
  }
}

/* ===== 高优先级优化：信任徽章响应式 ===== */
@media (max-width:480px){
  .trust-badges{
    flex-wrap:wrap;
    gap:10px;
  }
  .trust-badge{
    font-size:.72rem;
  }
}


/* ===== 中优先级优化11：价格更突出 ===== */
.single-product .price-now{
  font-size:2rem !important;
  font-weight:800 !important;
  color:var(--ink) !important;
}

/* ===== 中优先级优化12：库存状态视觉化 ===== */
.single-product .stock-in{
  color:#059669 !important;
  font-weight:600 !important;
}

/* ===== 中优先级优化13-15：价格提示优化 ===== */
.single-product .price-note{
  font-size:.82rem !important;
  color:var(--muted) !important;
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
}

/* ===== 中优先级优化16：数量选择器提示 ===== */
.single-product .qty-selector::after{
  content:"Min 1";
  font-size:.7rem;
  color:var(--muted);
  position:absolute;
  bottom:-18px;
  left:0;
}
.single-product .qty-selector{
  position:relative !important;
}

/* ===== 中优先级优化17：Add to Cart加载状态 ===== */
.single-product .btn-add-cart-big.loading{
  opacity:.7;
  pointer-events:none;
}
.single-product .btn-add-cart-big.loading::after{
  content:"...";
}

/* ===== 中优先级优化18：Buy Now更醒目 ===== */
.single-product .btn-buy-now{
  background:var(--orange) !important;
  color:#fff !important;
  font-weight:700 !important;
}
.single-product .btn-buy-now:hover{
  background:#ea580c !important;
}

/* ===== 中优先级优化19：Wishlist按钮提示 ===== */
.single-product .btn-wishlist-big{
  position:relative !important;
}
.single-product .btn-wishlist-big:hover::after{
  content:"Add to Wishlist";
  position:absolute;
  bottom:-30px;
  left:50%;
  transform:translateX(-50%);
  background:var(--ink);
  color:#fff;
  padding:4px 8px;
  border-radius:4px;
  font-size:.7rem;
  white-space:nowrap;
  z-index:10;
}

/* ===== 中优先级优化20：批量定价选中状态更明显 ===== */
.single-product .dz-tier.active{
  background:var(--emerald) !important;
  color:#fff !important;
  border-color:var(--emerald) !important;
}
.single-product .dz-tier.active .dz-tier-save{
  color:rgba(255,255,255,.9) !important;
}

/* ===== 中优先级优化21：配件折扣提示更醒目 ===== */
.single-product .acc-off{
  background:#fef3c7 !important;
  color:#92400e !important;
  padding:4px 10px !important;
  border-radius:20px !important;
  font-size:.78rem !important;
  font-weight:600 !important;
}

/* ===== 中优先级优化22：Bundle total更突出 ===== */
.single-product .acc-bundle-total{
  background:linear-gradient(135deg, #f0fdf4, #ecfdf5) !important;
  border:2px solid var(--emerald) !important;
  border-radius:10px !important;
  padding:14px 16px !important;
  margin-top:12px !important;
}
.single-product .acc-bundle-price{
  font-size:1.5rem !important;
  font-weight:800 !important;
  color:var(--emerald) !important;
}

/* ===== 中优先级优化23：标签页切换动画 ===== */
.single-product .tab-content{
  animation:fadeIn .3s ease !important;
}
@keyframes fadeIn{
  from{opacity:0;transform:translateY(8px);}
  to{opacity:1;transform:translateY(0);}
}

/* ===== 中优先级优化24：配件Add to Cart全宽 ===== */
.single-product .acc-add{
  flex:1 !important;
  text-align:center !important;
  justify-content:center !important;
}

/* ===== 中优先级优化25：产品标题和价格间距优化 ===== */
.single-product h1{
  margin-bottom:8px !important;
}
.single-product .product-meta{
  margin-bottom:12px !important;
}
.single-product .product-price-box{
  margin-bottom:10px !important;
}


/* ===== 移动端优化46-50 ===== */
@media (max-width:768px){
  /* 46. 批量定价2列 */
  .single-product .dz-tier-list{
    grid-template-columns:repeat(2, 1fr) !important;
    gap:8px !important;
  }
  
  /* 48. 相关产品2列 */
  .single-product .prod-grid{
    grid-template-columns:repeat(2, 1fr) !important;
    gap:12px !important;
  }
  
  /* 49. Add to Cart固定底部 */
  .single-product .qty-cart-row{
    position:fixed !important;
    bottom:0 !important;
    left:0 !important;
    right:0 !important;
    background:#fff !important;
    padding:12px 16px !important;
    box-shadow:0 -2px 10px rgba(0,0,0,.1) !important;
    z-index:100 !important;
    display:flex !important;
    gap:8px !important;
    align-items:center !important;
  }
  .single-product .qty-selector{
    flex-shrink:0 !important;
  }
  .single-product .btn-add-cart-big{
    flex:1 !important;
    height:44px !important;
  }
  .single-product .btn-buy-now{
    display:none !important;
  }
  .single-product .btn-wishlist-big{
    width:44px !important;
    height:44px !important;
    flex-shrink:0 !important;
  }
  
  /* 50. 浮动按钮调整位置，避免遮挡底部CTA */
  .single-product .dz-float-stack{
    bottom:80px !important;
  }
  
  /* 移动端产品布局 */
  .single-product .product-layout{
    grid-template-columns:1fr !important;
    gap:20px !important;
  }
  
  /* 移动端图片画廊：面板铺满内容列，高度随宽度等比（aspect-ratio:1/1）。
     注意这里的选择器是 .single-product .gallery-main（特异性 0,2,0），
     比 style.css 里的 .gallery-main 高，任何高度上限写在这里都会覆盖
     别处的 max-height:none，所以上限必须在这里就解除。 */
  .single-product .gallery-main{
    max-height:none !important;
  }
  
  /* 移动端信任徽章 */
  .single-product .trust-badges{
    flex-wrap:wrap !important;
    gap:8px !important;
  }
  
  /* 移动端配件卡片 */
  .single-product .acc-card{
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:8px !important;
  }
  .single-product .acc-card img{
    width:100% !important;
    height:120px !important;
    object-fit:contain !important;
  }
  .single-product .acc-info{
    width:100% !important;
  }
  .single-product .acc-price{
    width:100% !important;
    justify-content:space-between !important;
    flex-direction:row !important;
  }
  
  /* 移动端标签页 */
  .single-product .tab-nav{
    margin:0 -16px !important;
    padding:0 16px !important;
  }
  
  /* 移动端页面底部留白，避免被固定CTA遮挡 */
  .single-product .product-section{
    padding-bottom:80px !important;
  }
}

@media (max-width:480px){
  /* 小屏批量定价2列 */
  .single-product .dz-tier-list{
    grid-template-columns:repeat(2, 1fr) !important;
  }
  
  /* 小屏相关产品2列 */
  .single-product .prod-grid{
    grid-template-columns:repeat(2, 1fr) !important;
  }
  
  /* 小屏价格 */
  .single-product .price-now{
    font-size:1.6rem !important;
  }
}


/* ===== 低优先级优化26-35 ===== */

/* 26. 面包屑样式优化 */
.single-product .breadcrumb{
  font-size:.82rem !important;
  color:var(--muted) !important;
  margin-bottom:16px !important;
}
.single-product .breadcrumb a{
  color:var(--muted) !important;
  text-decoration:none !important;
}
.single-product .breadcrumb a:hover{
  color:var(--emerald) !important;
}

/* 27. SKU显示更低调 */
.single-product .product-sku{
  font-size:.78rem !important;
  color:var(--muted) !important;
  opacity:.8 !important;
}

/* 28. 分类链接优化 */
.single-product .product-cat a{
  color:var(--emerald) !important;
  text-decoration:none !important;
  font-weight:500 !important;
}
.single-product .product-cat a:hover{
  text-decoration:underline !important;
}

/* 29. 服务保障区域更紧凑 */
.single-product .service-guarantees{
  gap:16px !important;
  padding:12px 0 !important;
}
.single-product .service-item{
  font-size:.8rem !important;
  gap:6px !important;
}
.single-product .service-item svg{
  width:16px !important;
  height:16px !important;
}

/* 30. 图标风格统一 - 所有SVG图标统一stroke-width */
.single-product svg{
  stroke-width:2 !important;
}

/* 32. 浮动按钮间距优化 */
.single-product .dz-float-stack{
  gap:8px !important;
}

/* 33. 聊天气泡未读提示 */
.single-product .dz-chat-float .unread-badge{
  position:absolute;
  top:-2px;
  right:-2px;
  background:#ef4444;
  color:#fff;
  font-size:.65rem;
  font-weight:700;
  min-width:18px;
  height:18px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 5px;
  border:2px solid #fff;
}

/* 34. 页面底部留白优化 */
.single-product .product-section{
  padding-bottom:40px !important;
}

/* 35. 相关产品标题优化 */
.single-product .related-title{
  font-size:1.4rem !important;
  font-weight:700 !important;
  margin-bottom:20px !important;
  padding-bottom:12px !important;
  border-bottom:2px solid var(--border) !important;
}

/* 配件卡片紧凑布局 */
.single-product .acc-card{
  padding:8px 10px !important;
  margin-bottom:6px !important;
  gap:8px !important;
}
.single-product .acc-card img{
  width:48px !important;
  height:48px !important;
}
.single-product .acc-name{
  font-size:.78rem !important;
  line-height:1.3 !important;
}
/* 重复样式已清理，统一使用第468行的定义 */
.single-product .acc-add{
  height:28px !important;
  padding:0 10px !important;
  font-size:.72rem !important;
}


/* ===== 代码质量优化：主图片样式（从内联CSS移到外部） ===== */
.single-product #galleryMain{
  width:100% !important;
  height:100% !important;
  border-radius:var(--radius) !important;
  cursor:zoom-in !important;
}

/* ===== 代码质量优化：图片懒加载占位 ===== */
.single-product img[loading="lazy"]{
  background:#f8fafc;
}


/* ===== SKU小字样式（标题下方） ===== */
.single-product .product-sku-small{
  font-size:.78rem !important;
  color:var(--muted) !important;
  margin-bottom:8px !important;
  font-weight:400 !important;
  letter-spacing:.3px !important;
}

/* ============================================================
   Round 14：型号选择器（按钮色板）+ 价格展示统一
   1) 原生 select 换成按钮色板（select 仍保留为数据源，仅隐藏）
   2) 价格只保留一处（隐藏 WooCommerce 原生变体价格）
   3) 阶梯价选中卡片的价格改成可读的白色
   ============================================================ */

/* --- 1. 变体表单：select → 按钮色板 --- */
.single-product form.variations_form select.dz-native-select{
  display:none !important;
}

/* 变体表格改成块级布局：标签在上、色板在下，避免窄容器里标签被裁切 */
.single-product table.variations{
  display:block;
  width:100%;
  overflow:visible;
  margin:0 0 10px;
  border:0;
}
.single-product table.variations tbody,
.single-product table.variations tr{
  display:block;
  width:100%;
}
.single-product table.variations th.label{
  display:block;
  width:auto;
  padding:0 0 7px;
  text-align:left;
  font-size:.85rem;
  font-weight:700;
  color:var(--ink);
  white-space:normal;
}
.single-product table.variations th.label label{
  font-weight:700;
  margin:0;
}
.single-product table.variations td.value{
  display:block;
  width:auto;
  padding:0;
}

/* 标签右侧的已选值：Model: C */
.dz-attr-value{
  color:var(--emerald);
  font-weight:700;
}

/* 色板本体 */
.dz-swatches{
  list-style:none;
  margin:0 0 8px;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.dz-swatch{
  min-width:46px;
  padding:7px 15px;
  border:1px solid #d7dee7;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  font-size:.86rem;
  font-weight:600;
  line-height:1.2;
  text-align:center;
  cursor:pointer;
  -webkit-user-select:none;
  user-select:none;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.dz-swatch:hover{
  border-color:var(--emerald);
  color:var(--emerald-deep);
}
.dz-swatch.is-selected{
  background:var(--emerald);
  border-color:var(--emerald);
  color:#fff;
  box-shadow:0 1px 3px rgba(4,120,87,.28);
}
.dz-swatch.is-selected:hover{
  color:#fff;
}
.dz-swatch.is-disabled{
  background:#f8fafc;
  border-color:#e5e9f0;
  color:var(--muted-2);
  text-decoration:line-through;
  opacity:.6;
  cursor:not-allowed;
}
.dz-swatch:focus-visible{
  outline:2px solid var(--emerald);
  outline-offset:2px;
}

/* Clear 链接 */
.single-product form.variations_form .reset_variations{
  display:inline-block;
  font-size:.8rem;
  color:var(--muted);
  text-decoration:underline;
}
.single-product form.variations_form .reset_variations:hover{
  color:var(--emerald-deep);
}

/* --- 2. 价格只保留一处：隐藏 WooCommerce 原生变体价格 --- */
.single-product .single_variation .woocommerce-variation-price{
  display:none !important;
}
.single-product .single_variation{
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  background:transparent !important;
}
/* 价格区间（未选型号时） */
.price-range .price-range-sep{
  margin:0 6px;
  color:var(--muted);
  font-weight:600;
  font-size:.8em;
}

/* --- 3. 阶梯价选中卡片：价格原来是与卡片同色的深绿，等于看不见 --- */
.single-product .dz-tier.active .dz-tier-price,
.single-product .dz-tier.active .dz-tier-price .woocommerce-Price-amount,
.single-product .dz-tier.active .dz-tier-price .woocommerce-Price-currencySymbol{
  color:#fff !important;
}
