/* product-redesign.css
 * Single-product page visual restyle for the DongFeng B2B site.
 * Goal: align the product page with the category landing pages (black accent,
 * Archivo + Inter, industrial B2B feel) WITHOUT touching the block
 * template — so product custom attributes (product-details), the variation
 * swatch mode (woo-variation-swatches / add-to-cart-form) and the
 * header/footer template parts stay 100% intact.
 * Only loaded on is_product() via thryve_biz_product_redesign().
 */

/* ---- Self-hosted fonts (same files as the category pages) ---- */



/* ---- Base typography on the product page ---- */
body.single-product{
  font-family:'Inter', system-ui, sans-serif;
}
body.single-product .wp-block-post-title,
body.single-product h1,
body.single-product h2,
body.single-product h3,
body.single-product .product_title,
body.single-product .woocommerce-products-header__title{
  font-family:'Archivo', system-ui, sans-serif;
}

/* ---- Product summary column ---- */
body.single-product .wp-block-columns.alignwide{
  gap:60px;
  align-items:flex-start;
}
body.single-product .wp-block-column:last-child{
  max-width:620px;
}
/* Title */
body.single-product .wp-block-post-title{
  font-size:2.4rem;
  font-weight:700;
  line-height:1.1;
  color:#0a0a0a;
  letter-spacing:-.01em;
}
/* Price */
body.single-product .wp-block-woocommerce-product-price{
  font-family:'Archivo', sans-serif;
  font-size:1.7rem;
  color:#0a0a0a;
  margin:10px 0 4px;
}
/* Short description */
body.single-product .wp-block-post-excerpt{
  color:#444;
  font-size:1rem;
  line-height:1.6;
}
/* Add-to-cart / Request Quote / Select Options button */
body.single-product .wp-block-button__link,
body.single-product .wc-block-components-product-button__button{
  background:#0a0a0a;
  color:#fff;
  border-radius:6px;
  padding:14px 28px;
  font-family:'Archivo', sans-serif;
  font-weight:600;
  font-size:.95rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  transition:transform .2s ease, background .2s ease;
}
body.single-product .wp-block-button__link:hover,
body.single-product .wc-block-components-product-button__button:hover{
  background:#262626;
  transform:translateY(-2px);
}
/* Main "Request Quote" add-to-cart submit button — force black industrial style
   (overrides WooCommerce default blue .button.alt) */
body.single-product .single_add_to_cart_button{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:center !important;
  box-sizing:border-box !important;
  height:50px !important;
  background:#0a0a0a !important;
  color:#fff !important;
  border:1px solid #0a0a0a !important;
  border-radius:6px !important;
  padding:0 28px !important;
  font-family:'Archivo', sans-serif !important;
  font-weight:600 !important;
  font-size:.95rem !important;
  letter-spacing:.04em !important;
  text-transform:uppercase !important;
  cursor:pointer;
  transition:transform .2s ease, background .2s ease;
}
body.single-product .single_add_to_cart_button:hover{
  background:#262626 !important;
  border-color:#262626 !important;
  transform:translateY(-2px);
}

/* Quantity selector: remove duplicate legacy +/- buttons and style the
   WooCommerce Blocks stepper in black industrial style */
body.single-product .quantity .minus,
body.single-product .quantity .plus{
  display:none !important;
}
body.single-product .wc-block-components-quantity-selector{
  display:inline-flex;
  box-sizing:border-box !important;
  align-items:stretch;
  border:1px solid #e5e5e5;
  border-radius:6px;
  background:#fff;
  overflow:hidden;
}
body.single-product .wc-block-components-quantity-selector__button{
  min-width:46px;
  box-sizing:border-box !important;
  display:flex;
  align-items:center;
  justify-content:center;
  height:50px !important;
  background:#0a0a0a;
  color:#fff;
  border:0;
  font-family:'Archivo', sans-serif;
  font-size:1.2rem;
  line-height:1;
  cursor:pointer;
  transition:background .2s ease, transform .2s ease;
}
body.single-product .wc-block-components-quantity-selector__button:hover{
  background:#262626;
}
body.single-product .wc-block-components-quantity-selector__input{
  box-sizing:border-box !important;
  height:50px !important;
  width:60px;
  padding:0 8px !important;
  margin:0;
  border:0;
  font-family:'Archivo', sans-serif;
  font-size:.95rem;
  text-align:center;
  color:#0a0a0a;
  -moz-appearance:textfield;
}
body.single-product .wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
body.single-product .wc-block-components-quantity-selector__input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

/* Variation swatches keep their own plugin styling — only tidy spacing */
body.single-product table.variations{
  margin-bottom:18px;
}
body.single-product table.variations th,
body.single-product table.variations td{
  font-family:'Inter', sans-serif;
}
/* Gallery frame — subtle, does not touch swatch behaviour */
body.single-product .wp-block-woocommerce-product-image-gallery{
  border:1px solid #ececec;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  padding:10px;
}
body.single-product .woo-variation-product-gallery img{
  border-radius:8px;
}
/* product-details / attributes block — left visually aligned, behaviour intact */
body.single-product .wp-block-woocommerce-product-details{
  font-family:'Inter', sans-serif;
  border-top:1px solid #eee;
  margin-top:8px;
  padding-top:24px;
}
body.single-product .wp-block-woocommerce-product-details h2{
  font-family:'Archivo', sans-serif;
  color:#0a0a0a;
}

/* =========================================================
   Related Products → cool horizontal swipe carousel
   ========================================================= */
body.single-product .wp-block-woocommerce-product-collection.alignwide{
  position:relative;
  margin-top:24px;
}
body.single-product .wp-block-woocommerce-product-collection.alignwide > .wp-block-heading{
  font-family:'Archivo', sans-serif;
  font-size:1.7rem;
  font-weight:700;
  color:#0a0a0a;
  padding-right:120px; /* leave room for arrows */
}
/* The product list becomes a horizontal scroller with snap */
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product-template{
  display:flex !important;
  flex-flow:row nowrap;
  gap:22px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  padding:6px 2px 18px;
  scrollbar-width:none;        /* Firefox */
  -ms-overflow-style:none;     /* IE/Edge */
}
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product-template::-webkit-scrollbar{
  display:none;                /* Chrome/Safari */
}
/* Each card */
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product{
  scroll-snap-align:start;
  flex:0 0 272px;
  max-width:272px;
  background:#fff;
  border:1px solid #ececec;
  border-radius:12px;
  padding:14px;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product:hover{
  transform:translateY(-6px);
  box-shadow:0 16px 34px rgba(10,10,10,.14);
  border-color:#0a0a0a;
}
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:8px;
}
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product .wp-block-post-title{
  font-size:1.05rem;
}
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product .wp-block-post-title a{
  color:#0a0a0a;
}
/* Related Products block-collection CTA — dark B2B style.
   NOTE: dropped the `.alignwide` dependency so this also catches collections
   rendered without the alignwide class (e.g. some DZQ redesign templates),
   where the variable-product "Select options" button would otherwise fall back
   to WooCommerce default light style. */
body.single-product .wp-block-woocommerce-product-collection .wc-block-product .wp-block-button__link,
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product .wp-block-button__link{
  display:inline-block !important;
  margin-top:8px;
  font-size:.78rem;
  font-weight:600;
  padding:10px 18px;
  border-radius:6px;
  border:1.5px solid #0a0a0a !important;
  background:#0a0a0a !important;
  color:#fff !important;
  text-decoration:none;
  transition:background .25s, transform .25s;
}
body.single-product .wp-block-woocommerce-product-collection .wc-block-product .wp-block-button__link:hover,
body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product .wp-block-button__link:hover{
  background:#262626 !important;
  transform:translateY(-2px);
}

/* Arrow nav buttons (injected by product-redesign.js) */
body.single-product .related-nav{
  position:absolute;
  top:0;
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid #0a0a0a;
  background:#0a0a0a;
  color:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s ease, color .2s ease, transform .2s ease;
  z-index:3;
}
body.single-product .related-nav:hover{
  background:#fff;
  color:#0a0a0a;
  transform:scale(1.06);
}
body.single-product .related-nav.prev{ right:54px; }
body.single-product .related-nav.next{ right:0; }
body.single-product .related-nav:disabled{
  opacity:.28;
  cursor:default;
  transform:none;
}

/* Mobile: narrower cards, still swipeable */
@media (max-width:600px){
  body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product{
    flex-basis:200px;
    max-width:200px;
  }
  body.single-product .wp-block-post-title{ font-size:2rem; }
}

@media (prefers-reduced-motion:reduce){
  body.single-product .wp-block-woocommerce-product-collection.alignwide .wc-block-product,
  body.single-product .related-nav,
  body.single-product .wp-block-button__link{ transition:none; }
}

/* WhatsApp button beside the "Request Quote" add-to-cart button — matches its style */
.df-buybox-row{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    margin:0;
}
.df-buybox-row > *{
    flex:0 1 auto !important;
    width:auto !important;
    max-width:100%;
    margin:0 !important;
}
.df-whatsapp-quote-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    box-sizing:border-box;
    height:50px;
    background:#0a0a0a;
    color:#fff;
    border:1px solid #0a0a0a;
    border-radius:6px;
    padding:0 28px;
    font-family:'Archivo', sans-serif;
    font-weight:600;
    font-size:.95rem;
    letter-spacing:.04em;
    text-transform:uppercase;
    text-decoration:none;
    cursor:pointer;
    transition:transform .2s ease, background .2s ease;
}
.df-whatsapp-quote-btn:hover{
    background:#262626;
    border-color:#262626;
    transform:translateY(-2px);
    color:#fff;
}
.df-whatsapp-quote-btn__icon{
    display:inline-flex;
    flex:0 0 auto;
    width:20px;
    height:20px;
}
.df-whatsapp-quote-btn__icon svg{
    display:block;
    width:20px;
    height:20px;
    fill:currentColor;
}

/* WhatsApp button placed beside the Request Quote submit button (injected by JS) */
.df-quote-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    margin-top:12px;
}

/* Align variation attribute labels to the top of swatch buttons */
.woocommerce div.product form.cart table.variations th,
.woocommerce div.product form.cart table.variations td{
    vertical-align: top;
    padding-bottom: 8px;
}

/* 2026-07-22 移动端：Request Quote 与 WhatsApp 按钮并排等宽对齐（覆盖源规则的 !important） */
@media (max-width: 600px) {
  .df-quote-actions { flex-wrap: nowrap; }
  .df-quote-actions .single_add_to_cart_button.button.alt.wp-element-button,
  .df-quote-actions .df-whatsapp-quote-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 0 14px !important;
    font-size: 14px !important;
  }
}

/* === 统一替换产品变体属性标签为 Model === */
body.single-product table.variations th.label label {
  font-size: 0;
  line-height: normal;
}
body.single-product table.variations th.label label::before {
  content: "Model";
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
  color: #0a0a0a;
}


/* =========================================================
   Related Products (classic ul.products) -> swipe carousel
   Added 2026-08-21 for Plan C (product-collection block replaced
   by [related_products] shortcode). Matches the dark B2B card
   design used by the previous block-based carousel.
   ========================================================= */
body.single-product section.related.products{
  position:relative;
  margin-top:24px;
}
body.single-product section.related.products > h2{
  font-family:'Archivo', sans-serif;
  font-size:1.7rem;
  font-weight:700;
  color:#0a0a0a;
  padding-right:120px;
}
body.single-product section.related.products ul.products{
  display:flex !important;
  flex-flow:row nowrap;
  gap:22px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  padding:6px 2px 18px;
  margin:0;
  list-style:none;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
body.single-product section.related.products ul.products::-webkit-scrollbar{ display:none; }
body.single-product section.related.products ul.products li.product{
  scroll-snap-align:start;
  flex:0 0 272px;
  max-width:272px;
  width:272px;
  box-sizing:border-box;
  margin:0;
  padding:14px;
  text-align:center;
  background:#fff;
  border:1px solid #ececec;
  border-radius:12px;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
body.single-product section.related.products ul.products li.product:hover{
  transform:translateY(-6px);
  box-shadow:0 16px 34px rgba(10,10,10,.14);
  border-color:#0a0a0a;
}
body.single-product section.related.products ul.products li.product a.woocommerce-LoopProduct-link{
  display:block;
  text-decoration:none;
}
body.single-product section.related.products ul.products li.product img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:8px;
  margin:0 0 8px;
}
body.single-product section.related.products ul.products li.product h2.woocommerce-loop-product__title{
  font-family:'Archivo', sans-serif;
  font-size:1.05rem;
  font-weight:600;
  line-height:1.4;
  color:#0a0a0a;
  padding:0;
  margin:6px 0 0;
}
body.single-product section.related.products ul.products li.product h2.woocommerce-loop-product__title a{
  color:#0a0a0a;
  text-decoration:none;
}
body.single-product section.related.products ul.products li.product .star-rating,
body.single-product section.related.products ul.products li.product .price{
  display:none;
}
body.single-product section.related.products ul.products li.product a.button,
body.single-product section.related.products ul.products li.product .button{
  display:inline-block;
  margin-top:8px;
  padding:10px 18px;
  font-size:.78rem;
  font-weight:600;
  border-radius:6px;
  background:#0a0a0a !important;
  color:#fff !important;
  text-decoration:none;
}
body.single-product section.related.products ul.products li.product a.button:hover,
body.single-product section.related.products ul.products li.product .button:hover{
  background:#262626 !important;
  transform:translateY(-2px);
}

/* 产品页左侧图片列冻结（sticky）：右列参数多时左侧不空白，客户一直看到产品，
   直到滚动到两栏容器底部（即 Description/tabs 区域）自然停住。
   仅桌面两栏不堆叠时生效；移动端两栏竖排不启用 sticky。
   依赖 .wp-block-columns 作为 sticky 边界——左列相对它停止，正好在 #tab-description 起点。
   注意：不能用 :has()，WPFC 的 CSS minifier 会丢弃 :has() 导致规则失效；
   产品页图片列恒为 .wp-block-columns 的第一个子列，直接用 :first-child 即可。 */
@media (min-width:782px){
  body.single-product .wp-block-columns > .wp-block-column:first-child{
    position:sticky;
    top:calc(var(--hdr-h, 74px) + 20px);
    align-self:flex-start;
    z-index:5;
  }
}
