
/* ==========================================================================
   DS Product UI —— 商品列表 / 商品详情 细节优化
   ========================================================================== */

/* ---------- A. 手机端：底部 tabbar 与购买条真正吸底（原来 bottom 被吃掉，条子停在页尾） ---------- */
@media (max-width:921px){
  html body .ds-mtab:not(#dsPUIx){
    position:fixed!important;left:10px!important;right:10px!important;
    top:auto!important;bottom:10px!important;z-index:9990!important;
    padding:6px 8px!important;border-radius:22px!important;
    background:rgba(255,255,255,.94)!important;
    border:1px solid rgba(17,17,17,.06)!important;
    box-shadow:0 14px 38px rgba(17,17,17,.18)!important;
    -webkit-backdrop-filter:saturate(180%) blur(14px)!important;
    backdrop-filter:saturate(180%) blur(14px)!important;
  }
  html body .ds-mtab .ds-mtab-i:not(#dsPUIx){border-radius:16px!important}
  html body .ds-buybar:not(#dsPUIx){
    position:fixed!important;left:0!important;right:0!important;
    top:auto!important;bottom:82px!important;z-index:9985!important;
    padding:10px 14px!important;background:rgba(255,255,255,.96)!important;
    border-top:1px solid rgba(17,17,17,.06)!important;
    border-radius:16px 16px 0 0!important;
    box-shadow:0 -12px 30px -18px rgba(17,17,17,.35)!important;
    -webkit-backdrop-filter:saturate(180%) blur(14px)!important;
    backdrop-filter:saturate(180%) blur(14px)!important;
  }
  html body .ds-buybar:not(#dsPUIx) .ds-buybar-price:not(#dsPUIx){font-size:22px!important;font-weight:700!important}
  html body.single-product #content:not(#dsPUIx){padding-bottom:214px!important}
}

/* ---------- B. 商品详情：布局与容器（去掉 604px 固定列造成的横向溢出） ---------- */
html body .ds-pdp:not(#dsPUIx){width:100%!important;max-width:100%!important;min-width:0!important}
html body .ds-pdp-top:not(#dsPUIx){
  grid-template-columns:minmax(0,1fr)!important;
  gap:22px!important;width:100%!important;max-width:100%!important;min-width:0!important;
}
html body .ds-pdp-main:not(#dsPUIx){
  width:100%!important;max-width:100%!important;min-width:0!important;
  display:block!important;overflow:hidden!important;
  background:#f4f5f7!important;border-radius:18px!important;
}
html body .ds-pdp-media:not(#dsPUIx){width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important}
html body .ds-pdp-main-img:not(#dsPUIx){
  width:100%!important;height:auto!important;aspect-ratio:1/1!important;
  object-fit:contain!important;display:block!important;margin:0!important;
}
html body .ds-pdp-thumbs:not(#dsPUIx){
  width:100%!important;max-width:100%!important;min-width:0!important;
  display:flex!important;flex-wrap:nowrap!important;gap:8px!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  padding:10px 0 4px!important;scroll-snap-type:x proximity!important;
  scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important;
}
html body .ds-pdp-thumbs:not(#dsPUIx)::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
html body .ds-pdp-buy:not(#dsPUIx),
html body .ds-pdp-eyebrow:not(#dsPUIx),
html body .ds-pdp-title:not(#dsPUIx),
html body .ds-pdp-sub:not(#dsPUIx),
html body .ds-pdp-price:not(#dsPUIx),
html body .ds-pdp-price-note:not(#dsPUIx),
html body .ds-pdp-keys:not(#dsPUIx){
  width:100%!important;max-width:100%!important;min-width:0!important;
}

/* ---------- C. 商品详情：排版与质感（通用） ---------- */
html body .ds-pdp-title:not(#dsPUIx){
  letter-spacing:-.02em!important;word-break:break-word!important;text-wrap:balance!important;
}
html body .ds-pdp-sub:not(#dsPUIx){color:#4b5158!important;text-wrap:pretty!important}
html body .ds-pdp-price:not(#dsPUIx){letter-spacing:-.02em!important;font-variant-numeric:tabular-nums!important}
html body .ds-pdp-keys li:not(#dsPUIx){
  border:1px solid #eef0f3!important;background:#fbfcfd!important;border-radius:12px!important;
  transition:border-color .2s ease,background .2s ease!important;
}
html body .ds-pdp-keys li:hover:not(#dsPUIx){border-color:#e2e5ea!important;background:#fff!important}
html body .ds-pdp-prose:not(#dsPUIx){max-width:840px!important}
html body .ds-pdp-prose img:not(#dsPUIx){
  max-width:100%!important;height:auto!important;display:block!important;
  margin:14px auto!important;border-radius:14px!important;
}
html body .ds-pdp-prose p:not(#dsPUIx){word-break:break-word!important}
html body .ds-pdp-sec:not(#dsPUIx){margin-top:26px!important;padding-top:52px!important;scroll-margin-top:70px!important}
html body .ds-pdp-sec:not(#dsPUIx) > header:not(#dsPUIx){margin-bottom:14px!important}
html body .ds-pdp-prose div[style*="background:#14100d"]:not(#dsPUIx){display:none!important}
html body .ds-pdp-prose > div[style*="padding:56px"]:not(#dsPUIx){padding-top:6px!important}
html body .ds-pdp-prose p:empty:not(#dsPUIx){display:none!important}
html body .ds-buybar:not(#dsPUIx){transition:opacity .28s ease,transform .28s ease!important}
html body .ds-buybar.ds-pui-hidden:not(#dsPUIx){opacity:0!important;transform:translateY(16px)!important;pointer-events:none!important}
html body .ds-pdp-prose section[style*="padding:64px"]:not(#dsPUIx){padding-top:30px!important}
html body .ds-pdp-sec > header:not(#dsPUIx){margin-top:6px!important}
html body .ds-pdp-prose > div[style*="padding:"]:not(#dsPUIx){padding-top:14px!important}
html body .ds-pdp-prose div[style*="margin-bottom:80px"]:not(#dsPUIx){margin-bottom:12px!important}
html body .ds-buybar:not(#dsPUIx){transition:opacity .25s ease,transform .25s ease!important}
html body .ds-pdp-related .ds-pcard:not(#dsPUIx){
  border-radius:16px!important;transition:transform .22s ease,box-shadow .22s ease!important;
}
html body .ds-pdp-related .ds-pcard img:not(#dsPUIx){
  aspect-ratio:1/1!important;object-fit:cover!important;background:#f6f7f9!important;
}

/* ---------- D. 商品详情：手机端专项 ---------- */
@media (max-width:921px){
  html body .ds-pdp-main:not(#dsPUIx){border-radius:16px!important;margin:0!important}
  html body .ds-pdp-top:not(#dsPUIx){gap:14px!important;padding:0!important}
  html body .ds-pdp-sec:not(#dsPUIx){padding-top:30px!important;margin-top:14px!important}
  html body .ds-pdp-prose section[style*="padding:64px"]:not(#dsPUIx){padding-top:24px!important}
  html body .ds-pdp-prose > div[style*="padding:"]:not(#dsPUIx){padding-top:6px!important}
  html body .ds-pdp-title:not(#dsPUIx){font-size:23px!important;line-height:1.32!important}
  html body .ds-pdp-eyebrow:not(#dsPUIx){font-size:11px!important;letter-spacing:.14em!important;opacity:.6!important}
  html body .ds-pdp-sub:not(#dsPUIx){font-size:13px!important;line-height:1.85!important;margin-top:12px!important}
  html body .ds-pdp-price:not(#dsPUIx){font-size:29px!important;line-height:1.2!important}
  html body .ds-pdp-price-note:not(#dsPUIx){font-size:12px!important;line-height:1.7!important;color:#7b8189!important}
  html body .ds-pdp-thumb:not(#dsPUIx){
    flex:0 0 64px!important;width:64px!important;height:64px!important;
    padding:0!important;border-radius:12px!important;overflow:hidden!important;
    border:1.5px solid #e9ecf0!important;background:#fff!important;
  }
  html body .ds-pdp-thumb.is-on:not(#dsPUIx),
  html body .ds-pdp-thumb[aria-current="true"]:not(#dsPUIx){border-color:#17181a!important}
  html body .ds-pdp-thumb img:not(#dsPUIx){
    width:100%!important;height:100%!important;object-fit:contain!important;border-radius:0!important;
  }
  html body .ds-pdp-zoom:not(#dsPUIx){
    right:10px!important;bottom:10px!important;font-size:11px!important;
    padding:7px 12px!important;border-radius:999px!important;opacity:.92!important;
  }
  html body .ds-pdp-buy:not(#dsPUIx){padding-top:4px!important}
  html body .ds-pdp-keys:not(#dsPUIx){margin-top:16px!important}
  html body .ds-pdp-keys li:not(#dsPUIx){padding:11px 12px!important;min-width:0!important}
  html body .ds-pdp-keys li span:not(#dsPUIx){font-size:12px!important;line-height:1.6!important}
  html body .ds-pdp-assure:not(#dsPUIx){gap:10px 12px!important;margin-top:18px!important}
  html body .ds-pdp-assure li:not(#dsPUIx){font-size:12.5px!important;line-height:1.7!important}
  html body .ds-pdp-spec:not(#dsPUIx){border-radius:14px!important;border:1px solid #eef0f3!important;background:#fff!important;padding:4px 14px!important}
  html body .ds-pdp-prose img:not(#dsPUIx){margin:10px auto!important;border-radius:12px!important}
  html body .ds-pdp-related .ds-pcard:not(#dsPUIx){border-radius:14px!important}
  /* 吸顶锚点导航：单行横滑，去掉被压住的「购物」块 */
  html body .ds-pdp-nav:not(#dsPUIx){
    position:sticky!important;top:56px!important;z-index:30!important;
    margin:18px -12px 0!important;padding:8px 12px!important;
    height:auto!important;min-height:0!important;gap:0!important;
    background:rgba(255,255,255,.97)!important;
    border-top:1px solid rgba(17,17,17,.05)!important;
    border-bottom:1px solid rgba(17,17,17,.06)!important;
    -webkit-backdrop-filter:saturate(180%) blur(12px)!important;
    backdrop-filter:saturate(180%) blur(12px)!important;
  }
  html body .ds-pdp-nav-links:not(#dsPUIx){
    display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
    gap:7px!important;width:100%!important;height:auto!important;
    overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;
  }
  html body .ds-pdp-nav-links:not(#dsPUIx)::-webkit-scrollbar{display:none!important}
  html body .ds-pdp-nav-links a:not(#dsPUIx){
    flex:0 0 auto!important;white-space:nowrap!important;font-size:12.5px!important;
    line-height:1!important;padding:9px 13px!important;border-radius:999px!important;
    border:1px solid #e9ebef!important;background:#fff!important;color:#3c4249!important;
    text-decoration:none!important;transition:all .18s ease!important;
  }
  html body .ds-pdp-nav-links a.is-on:not(#dsPUIx){
    background:#111214!important;border-color:#111214!important;color:#fff!important;font-weight:600!important;
  }
  html body .ds-pdp-nav-buy:not(#dsPUIx){display:none!important}
  html body .ds-pdp-nav-buy .ds-pdp-nav-price:not(#dsPUIx){display:none!important}
}

/* ---------- E. 商品详情：桌面端专项 ---------- */
@media (min-width:922px){
  html body .ds-pdp-top:not(#dsPUIx){
    grid-template-columns:minmax(0,604px) minmax(0,1fr)!important;
    gap:46px!important;align-items:start!important;
  }
  html body .ds-pdp-main:not(#dsPUIx){border-radius:20px!important;background:#f4f5f7!important}
  html body .ds-pdp-thumb:not(#dsPUIx){
    width:68px!important;height:68px!important;padding:0!important;
    border-radius:12px!important;overflow:hidden!important;border:1.5px solid #e9ecf0!important;
    transition:border-color .18s ease,transform .18s ease!important;
  }
  html body .ds-pdp-thumb:hover:not(#dsPUIx){border-color:#c9ced6!important;transform:translateY(-1px)!important}
  html body .ds-pdp-thumb img:not(#dsPUIx){width:100%!important;height:100%!important;object-fit:contain!important}
  html body .ds-pdp-title:not(#dsPUIx){font-size:33px!important;line-height:1.26!important}
  html body .ds-pdp-sub:not(#dsPUIx){font-size:14px!important;line-height:1.9!important;color:#4b5158!important}
  html body .ds-pdp-price:not(#dsPUIx){font-size:38px!important;line-height:1.2!important}
  html body .ds-pdp-keys:not(#dsPUIx){gap:10px!important}
  html body .ds-pdp-nav:not(#dsPUIx){padding:10px 0!important}
  html body .ds-pdp-prose > div[style*="padding:56px"]:not(#dsPUIx){padding-top:10px!important}
  html body .ds-pdp-related .ds-pcard:hover:not(#dsPUIx){
    transform:translateY(-4px)!important;box-shadow:0 24px 46px -28px rgba(17,17,17,.32)!important;
  }
}

/* ---------- F. 商品列表：卡片与工具条 ---------- */
html body ul.products li.product:not(#dsPUIx){
  border-radius:16px!important;background:#fff!important;
  border:1px solid rgba(17,17,17,.06)!important;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease!important;
}
html body ul.products li.product .astra-shop-thumbnail-wrap:not(#dsPUIx){
  border-radius:14px!important;overflow:hidden!important;background:#f6f7f9!important;
}
html body ul.products li.product .woocommerce-loop-product__title:not(#dsPUIx){
  font-size:13.5px!important;line-height:1.45!important;font-weight:600!important;
  display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;
  overflow:hidden!important;min-height:39px!important;margin-top:2px!important;
}
html body ul.products li.product .price:not(#dsPUIx){
  font-size:16.5px!important;font-weight:700!important;letter-spacing:-.01em!important;
}
html body .woocommerce-ordering:not(#dsPUIx) select.orderby:not(#dsPUIx){
  min-height:40px!important;border-radius:12px!important;border:1px solid #e6e8ec!important;
  background-color:#fff!important;font-size:13px!important;padding:0 34px 0 12px!important;
  color:#2b3038!important;
}
html body .woocommerce-result-count:not(#dsPUIx){font-size:12.5px!important;color:#7b8189!important}
html body ul.products li.product a.button:not(#dsPUIx){
  border-radius:10px!important;height:42px!important;line-height:42px!important;
  font-size:12.5px!important;font-weight:600!important;letter-spacing:.02em!important;
  box-shadow:none!important;transition:background .18s ease,color .18s ease,border-color .18s ease!important;
}
html body #content ul.products li.product .button:not(.add_to_cart_button):not(#dsPUIx){
  background:#fff!important;color:#17181a!important;
  border:1px solid #dfe3e8!important;box-shadow:none!important;
}
html body #content ul.products li.product .button:not(.add_to_cart_button):not(#dsPUIx):hover{
  border-color:#17181a!important;background:#17181a!important;color:#fff!important;
}
html body #content ul.products li.product .button.add_to_cart_button:not(#dsPUIx){background:#111214!important;color:#fff!important;border:1px solid #111214!important}
html body #content ul.products li.product .button.add_to_cart_button:not(#dsPUIx):hover{background:#e11d2e!important;border-color:#e11d2e!important}

@media (max-width:921px){
  html body ul.products li.product:not(#dsPUIx){border-radius:14px!important}
  html body ul.products:not(#dsPUIx){gap:12px!important}
  html body ul.products li.product .woocommerce-loop-product__title:not(#dsPUIx){
    font-size:13px!important;line-height:1.42!important;min-height:37px!important;
  }
html body ul.products li.product .price:not(#dsPUIx){font-size:15.5px!important;min-height:26px!important}
  html body ul.products li.product a.button:not(#dsPUIx){height:38px!important;line-height:38px!important;font-size:12px!important}
  html body .woocommerce-ordering:not(#dsPUIx){margin:0!important}
  html body .woocommerce-ordering:not(#dsPUIx) select.orderby:not(#dsPUIx){
    min-height:38px!important;font-size:12.5px!important;padding:0 30px 0 11px!important;
  }
  html body .woocommerce-result-count:not(#dsPUIx){float:none!important;margin:0!important}
  html body ul.woocommerce-result-count-notice:not(#dsPUIx){display:none!important}
  html body ul.products li.product .ast-on-card-button:not(#dsPUIx){display:none!important}
}

@media (min-width:922px){
  html body ul.products li.product:not(#dsPUIx){padding:10px!important;overflow:hidden!important}
  html body ul.products li.product .astra-shop-summary-wrap:not(#dsPUIx){padding:12px 6px 2px!important}
  html body ul.products li.product:hover:not(#dsPUIx){
    transform:translateY(-4px)!important;
    box-shadow:0 26px 50px -30px rgba(17,17,17,.34)!important;
    border-color:rgba(17,17,17,.12)!important;
  }
  html body ul.products li.product .woocommerce-loop-product__title:not(#dsPUIx){font-size:14.5px!important;min-height:42px!important}
  html body ul.products li.product .price:not(#dsPUIx){font-size:18px!important}
}
