/* Promotional prices only: original data and native controls remain intact. */
body#product .product-prices > .has-discount,
.quickview .product-prices > .has-discount {
 display:grid!important;
 grid-template-columns:max-content max-content;
 grid-template-rows:auto auto;
 align-items:center!important;
 justify-content:start!important;
 column-gap:10px;
 row-gap:3px;
}
body#product .product-prices > .has-discount > .product-discount,
.quickview .product-prices > .has-discount > .product-discount {
 grid-column:1 / -1;grid-row:1;align-self:center!important;margin:0!important;padding:0!important;line-height:1.2;
}
body#product .product-prices > .has-discount > .current-price,
.quickview .product-prices > .has-discount > .current-price {
 grid-column:1;grid-row:2;margin:0!important;line-height:1.1;
}
body#product .product-prices > .has-discount > .discount,
.quickview .product-prices > .has-discount > .discount {
 grid-column:2;grid-row:2;align-self:center!important;
 background:#ff8000!important;color:#fff!important;
 border-color:#ff8000!important;padding:4px 6px!important;
 margin:0!important;line-height:1.1!important;white-space:nowrap;
}

body#product .product-prices > .has-discount > .product-discount .regular-price,
.quickview .product-prices > .has-discount > .product-discount .regular-price {padding:0!important;margin:0!important;}

/* Only promotional blocks that actually include a countdown. */
body#product .product-prices:has(> .price-countdown-wrapper) > .has-discount,
.quickview .product-prices:has(> .price-countdown-wrapper) > .has-discount {
 padding-bottom:0!important;
}
body#product .product-prices > .has-discount ~ .price-countdown-wrapper,
.quickview .product-prices > .has-discount ~ .price-countdown-wrapper {
 margin-top:10px!important;
}
body#product .product-prices > .has-discount ~ .price-countdown-wrapper .price-countdown,
.quickview .product-prices > .has-discount ~ .price-countdown-wrapper .price-countdown {
 margin-top:0!important;
}

/* Compact title-to-price spacing and optical centering, discounted products only. */
body#product .product-prices > .has-discount,
.quickview .product-prices > .has-discount {padding-top:0!important;}
body#product .product-prices > .has-discount > .discount,
.quickview .product-prices > .has-discount > .discount {
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 text-align:center!important;box-sizing:border-box!important;
 padding:4px 7px!important;font-size:clamp(14px,1.4vw,20px)!important;min-height:0!important;
}

/* Respect Fitit's native availability signal; never expose unavailable size actions.
   Scoped to the PDP, all viewport sizes. The provider removes ft-hidden when ready. */
body#product #main-product-wrapper:has(#fitit-button.ft-hidden, #fitit-size-table-button.ft-hidden) #fitit-button,
body#product #main-product-wrapper:has(#fitit-button.ft-hidden, #fitit-size-table-button.ft-hidden) #fitit-size-table-button {
  display: none !important;
}

/* Mobile placement spacing only; leave desktop Doofinder styling untouched. */
@media (max-width:767px) {
 body#product .product-add-to-cart > .bh-mobile-similar-after-paypal {
  margin-top:10px!important;padding-top:0!important;clear:both;
 }
 body#product .product-add-to-cart > .bh-mobile-similar-after-paypal .dfwidget-title {
  margin-top:0!important;
 }
}

/* Complete only the native mobile PDP quantity control borders. */
@media (max-width:767px) {
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) {border:1px solid #e3e3e3!important;box-sizing:border-box!important;}
 body#product .product-add-to-cart #quantity_wanted {border:0!important;box-shadow:none!important;}
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) .input-group-btn-vertical {border-left:1px solid #e3e3e3!important;box-sizing:border-box!important;}
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) .btn-touchspin {border:0!important;box-sizing:border-box!important;}
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) .bootstrap-touchspin-up {border-bottom:1px solid #e3e3e3!important;}
}

/* Draw the mobile quantity frame above its white input and arrow surfaces. */
@media (max-width:1199px) {
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) {position:relative!important;border:0!important;}
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted)::after {content:"";position:absolute;inset:0;z-index:3;border:1px solid #e3e3e3;box-sizing:border-box;pointer-events:none;}
 body#product .product-add-to-cart #quantity_wanted {border:1px solid #e3e3e3!important;border-right:0!important;box-shadow:none!important;box-sizing:border-box!important;}
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) .input-group-btn-vertical {border-left:1px solid #e3e3e3!important;box-sizing:border-box!important;}
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) .bootstrap-touchspin-up {border-bottom:1px solid #e3e3e3!important;}
}

/* Keep quantity dividers above native button backgrounds on mobile. */
@media (max-width:1199px) {
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) .input-group-btn-vertical::before {content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background:#e3e3e3;z-index:4;pointer-events:none;}
 body#product .product-add-to-cart .bootstrap-touchspin:has(#quantity_wanted) .input-group-btn-vertical::after {content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:#e3e3e3;z-index:4;pointer-events:none;}
}
