/*
 * Phase 9B-R1 — Native Bupiz product-page desktop conversion layout.
 * Presentation only. WooCommerce, Bupiz Core and Bupiz Marketplace continue
 * to own pricing, stock, gallery, variations, wishlist, reviews and checkout.
 */
:root{
    --bupiz-p9b-page:#f6f7fa;
    --bupiz-p9b-card:#ffffff;
    --bupiz-p9b-ink:#142038;
    --bupiz-p9b-muted:#667085;
    --bupiz-p9b-border:#e4e8ef;
    --bupiz-p9b-border-strong:#d7dde6;
    --bupiz-p9b-pink:#e83e8c;
    --bupiz-p9b-pink-soft:#fff4f9;
    --bupiz-p9b-orange:#ff8400;
    --bupiz-p9b-orange-dark:#e96f00;
    --bupiz-p9b-yellow:#ffd814;
    --bupiz-p9b-green:#168352;
    --bupiz-p9b-shadow:0 20px 55px rgba(15,23,42,.09);
    --bupiz-p9b-sticky-top:112px;
}

body.bupiz-p9b-native-product-page{
    background:var(--bupiz-p9b-page) !important;
}

.bupiz-p9b-product-page{
    min-height:70vh;
    padding:16px 0 58px;
    background:
        radial-gradient(circle at 7% 4%,rgba(232,62,140,.065),transparent 26%),
        linear-gradient(180deg,#ffffff 0,#f7f8fb 470px);
}

/* The root MUST remain a div.product so existing Bupiz/WooCommerce selectors and
   JavaScript can find it. These rules are tag-independent as a second guard. */
.bupiz-p9b-product-shell,
body.single-product div.product.bupiz-p9b-product-shell{
    width:min(1420px,calc(100% - 38px)) !important;
    max-width:1420px !important;
    min-width:0 !important;
    margin:0 auto !important;
    padding:0 !important;
    float:none !important;
    clear:both !important;
    overflow:visible !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}

.bupiz-p9b-container{
    width:100%;
    max-width:1420px;
    margin-left:auto;
    margin-right:auto;
}

.bupiz-p9b-product-context{margin-bottom:12px;}

.bupiz-p9b-breadcrumb{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:7px;
    margin:0 0 8px !important;
    color:#8a94a6;
    font-size:12px;
    line-height:1.4;
}
.bupiz-p9b-breadcrumb a{color:#566176;text-decoration:none;font-weight:650;}
.bupiz-p9b-breadcrumb a:hover{color:var(--bupiz-p9b-orange);}
.bupiz-p9b-breadcrumb > span{color:#b2bac6;}

.bupiz-p9b-context-line{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    min-height:40px;
    padding:8px 14px;
    border:1px solid rgba(228,232,239,.96);
    border-radius:13px;
    background:rgba(255,255,255,.92);
    box-shadow:0 8px 24px rgba(17,24,39,.04);
    backdrop-filter:blur(10px);
}
.bupiz-p9b-context-line > div{display:flex;align-items:center;gap:8px;min-width:0;}
.bupiz-p9b-context-line span{
    color:var(--bupiz-p9b-pink);
    font-size:10px;
    font-weight:900;
    letter-spacing:.1em;
    text-transform:uppercase;
}
.bupiz-p9b-context-line strong{
    color:var(--bupiz-p9b-ink);
    font-size:12px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.bupiz-p9b-context-line > a{
    color:#4a5568;
    font-size:12px;
    font-weight:800;
    text-decoration:none;
    white-space:nowrap;
}
.bupiz-p9b-context-line > a:hover{color:var(--bupiz-p9b-orange);}

/* --------------------------------------------------------------------------
   Desktop conversion layout: gallery LEFT, complete buy box RIGHT.
   Explicit display:grid is intentional and does not rely on legacy CSS.
---------------------------------------------------------------------------- */
@media (min-width:992px){
    body.single-product .bupiz-p9b-product-shell .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-product-head-sticky-frame{
        position:relative !important;
        display:grid !important;
        grid-template-columns:minmax(500px,620px) minmax(420px,1fr) !important;
        grid-auto-flow:row !important;
        align-items:start !important;
        gap:30px !important;
        width:100% !important;
        max-width:1420px !important;
        min-height:0 !important;
        margin:0 auto 26px !important;
        padding:24px !important;
        overflow:visible !important;
        border:1px solid var(--bupiz-p9b-border) !important;
        border-radius:24px !important;
        background:var(--bupiz-p9b-card) !important;
        box-shadow:var(--bupiz-p9b-shadow) !important;
        isolation:isolate;
    }

    /* Gallery must be the first column regardless of WooCommerce float rules. */
    body.single-product .bupiz-p9b-product-head > .images,
    body.single-product .bupiz-p9b-product-head > div.images,
    body.single-product .bupiz-p9b-product-head > .woocommerce-product-gallery{
        grid-column:1 !important;
        grid-row:1 !important;
        position:sticky !important;
        top:var(--bupiz-p9b-sticky-top) !important;
        align-self:start !important;
        width:100% !important;
        max-width:620px !important;
        min-width:0 !important;
        height:max-content !important;
        min-height:0 !important;
        margin:0 !important;
        padding:0 !important;
        float:none !important;
        clear:none !important;
        overflow:visible !important;
        z-index:3 !important;
    }

    /* Summary must be the second column and never fall below the gallery. */
    body.single-product .bupiz-p9b-product-head > .summary,
    body.single-product .bupiz-p9b-product-head > div.summary,
    body.single-product .bupiz-p9b-product-head > .summary.entry-summary,
    body.single-product .bupiz-p9b-summary{
        grid-column:2 !important;
        grid-row:1 !important;
        align-self:start !important;
        width:100% !important;
        max-width:none !important;
        min-width:0 !important;
        min-height:0 !important;
        margin:0 !important;
        padding:22px 24px 20px !important;
        float:none !important;
        clear:none !important;
        overflow:visible !important;
        border:1px solid #edf0f4 !important;
        border-radius:21px !important;
        background:
            linear-gradient(180deg,rgba(255,244,249,.88),rgba(255,255,255,0) 155px),
            #ffffff !important;
        box-shadow:0 14px 36px rgba(15,23,42,.065) !important;
        z-index:2 !important;
    }

    body.single-product .bupiz-p9b-product-head > .onsale{
        position:absolute !important;
        z-index:8 !important;
        top:36px !important;
        left:112px !important;
        min-width:auto !important;
        min-height:auto !important;
        margin:0 !important;
        padding:7px 12px !important;
        border-radius:999px !important;
        background:#17243b !important;
        color:#fff !important;
        font-size:11px !important;
        font-weight:850 !important;
        line-height:1 !important;
        letter-spacing:.04em !important;
    }
}

/* Gallery finishing — do not replace the existing controlled-gallery engine. */
body.single-product .bupiz-p9b-product-head .woocommerce-product-gallery{
    border-radius:18px;
}
body.single-product .bupiz-p9b-product-head .bupiz-controlled-wrapper,
body.single-product .bupiz-p9b-product-head .flex-viewport{
    border:1px solid #edf0f4 !important;
    border-radius:17px !important;
    background:#fbfbfc !important;
    box-shadow:0 10px 28px rgba(15,23,42,.05);
}
body.single-product .bupiz-p9b-product-head .bupiz-controlled-dot,
body.single-product .bupiz-p9b-product-head .flex-control-thumbs li{
    border-radius:10px !important;
    background:#fff !important;
}

/* Summary hierarchy and conversion styling. */
.bupiz-p9b-summary-eyebrow{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:0 0 9px;
}
.bupiz-p9b-summary-eyebrow a,
.bupiz-p9b-summary-eyebrow > span{
    color:var(--bupiz-p9b-pink);
    font-size:11px;
    font-weight:900;
    letter-spacing:.09em;
    text-decoration:none;
    text-transform:uppercase;
}
.bupiz-p9b-summary-eyebrow small{
    padding:5px 9px;
    border-radius:999px;
    background:#f4f5f7;
    color:#667085;
    font-size:10px;
    font-weight:750;
}

body.single-product .bupiz-p9b-summary .product_title,
body.single-product div.product .bupiz-p9b-summary .product_title{
    margin:0 0 8px !important;
    color:var(--bupiz-p9b-ink) !important;
    font-size:clamp(27px,2.15vw,35px) !important;
    font-weight:820 !important;
    line-height:1.13 !important;
    letter-spacing:-.035em !important;
}

body.single-product .bupiz-p9b-summary .bupiz-single-rating-row,
body.single-product .bupiz-p9b-summary .woocommerce-product-rating{
    margin:0 0 12px !important;
}

body.single-product .bupiz-p9b-summary p.price,
body.single-product .bupiz-p9b-summary .price{
    display:flex !important;
    flex-wrap:wrap;
    align-items:baseline;
    gap:7px;
    margin:0 0 13px !important;
    color:#111827 !important;
}
body.single-product .bupiz-p9b-summary .price ins,
body.single-product .bupiz-p9b-summary p.price ins{text-decoration:none !important;}
body.single-product .bupiz-p9b-summary .price ins .woocommerce-Price-amount,
body.single-product .bupiz-p9b-summary p.price ins .woocommerce-Price-amount,
body.single-product .bupiz-p9b-summary .price > .woocommerce-Price-amount{
    color:#111827 !important;
    font-size:28px !important;
    font-weight:850 !important;
    line-height:1 !important;
}
body.single-product .bupiz-p9b-summary .price del,
body.single-product .bupiz-p9b-summary p.price del{
    color:#8a94a6 !important;
    font-size:13px !important;
    opacity:1 !important;
}

body.single-product .bupiz-p9b-summary .bupiz-great-offers-box{
    margin:12px 0 15px !important;
    padding:14px 16px !important;
    border:1px solid #f5d9a7 !important;
    border-left:4px solid var(--bupiz-p9b-orange) !important;
    border-radius:14px !important;
    background:linear-gradient(135deg,#fffaf0,#fffdf7) !important;
    box-shadow:none !important;
}
body.single-product .bupiz-p9b-summary .bupiz-great-offers-box h3{
    margin:0 0 7px !important;
    color:#1f2937 !important;
    font-size:14px !important;
    font-weight:850 !important;
}
body.single-product .bupiz-p9b-summary .bupiz-great-offers-box ul{margin:0 !important;padding:0 0 0 18px !important;}
body.single-product .bupiz-p9b-summary .bupiz-great-offers-box li{
    margin:4px 0 !important;
    color:#475467 !important;
    font-size:12px !important;
    line-height:1.45 !important;
}

body.single-product .bupiz-p9b-summary .woocommerce-product-details__short-description{
    margin:12px 0 15px !important;
    padding:14px 16px !important;
    border:1px solid #e7ebf0 !important;
    border-radius:14px !important;
    background:#fbfcfe !important;
    color:#475467 !important;
    font-size:12px !important;
    line-height:1.6 !important;
}
body.single-product .bupiz-p9b-summary .woocommerce-product-details__short-description ul{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px 20px;
    margin:0 !important;
    padding-left:18px !important;
}

body.single-product .bupiz-p9b-summary form.cart{
    margin:14px 0 0 !important;
    padding:15px !important;
    border:1px solid #e8ebf0 !important;
    border-radius:16px !important;
    background:#fff !important;
    box-shadow:0 8px 24px rgba(15,23,42,.045);
}

body.single-product .bupiz-p9b-summary table.variations{
    width:100% !important;
    margin:0 0 10px !important;
    border:0 !important;
}
body.single-product .bupiz-p9b-summary table.variations tr{
    display:block;
    margin:0 0 12px;
}
body.single-product .bupiz-p9b-summary table.variations th,
body.single-product .bupiz-p9b-summary table.variations td{
    display:block;
    width:100% !important;
    padding:0 !important;
    border:0 !important;
    text-align:left !important;
}
body.single-product .bupiz-p9b-summary table.variations th label,
body.single-product .bupiz-p9b-summary table.variations td label{
    display:block;
    margin:0 0 8px !important;
    color:#172033 !important;
    font-size:14px !important;
    font-weight:850 !important;
}

body.single-product .bupiz-p9b-summary .single_variation_wrap{margin-top:8px;}
body.single-product .bupiz-p9b-summary .woocommerce-variation-price{margin:0 0 8px;}

body.single-product .bupiz-p9b-summary .woocommerce-variation-add-to-cart,
body.single-product .bupiz-p9b-summary .cart:not(.variations_form){
    display:grid !important;
    grid-template-columns:72px minmax(150px,1fr) minmax(150px,1fr) !important;
    gap:10px !important;
    align-items:stretch !important;
}
body.single-product .bupiz-p9b-summary .quantity{
    width:72px !important;
    min-width:72px !important;
    margin:0 !important;
}
body.single-product .bupiz-p9b-summary .quantity .qty{
    width:100% !important;
    min-height:48px !important;
    border:1px solid #d9dfe7 !important;
    border-radius:12px !important;
    background:#fff !important;
}
body.single-product .bupiz-p9b-summary .single_add_to_cart_button,
body.single-product .bupiz-p9b-summary .bupiz-buy-now{
    width:100% !important;
    min-height:48px !important;
    margin:0 !important;
    padding:11px 15px !important;
    border-radius:12px !important;
    box-shadow:none !important;
    font-size:14px !important;
    font-weight:850 !important;
}
body.single-product .bupiz-p9b-summary .single_add_to_cart_button{
    background:var(--bupiz-p9b-yellow) !important;
    color:#111827 !important;
}
body.single-product .bupiz-p9b-summary .bupiz-buy-now{
    background:linear-gradient(135deg,#ff9a1f,var(--bupiz-p9b-orange)) !important;
    color:#fff !important;
}
body.single-product .bupiz-p9b-summary .single_add_to_cart_button:hover,
body.single-product .bupiz-p9b-summary .bupiz-buy-now:hover{
    transform:translateY(-1px) !important;
    box-shadow:0 10px 22px rgba(255,132,0,.18) !important;
}

body.single-product .bupiz-p9b-summary .bupiz-quick-delivery-note{
    margin:12px 0 8px !important;
    padding:10px 12px !important;
    border-radius:12px !important;
    background:#f5f8ff !important;
    color:#475467 !important;
    font-size:11px !important;
    line-height:1.45 !important;
}
body.single-product .bupiz-p9b-summary .bupiz-single-delivery-card{
    margin:10px 0 !important;
    padding:13px 14px !important;
    border:1px solid #e5e9ef !important;
    border-radius:14px !important;
    background:#fff !important;
}
body.single-product .bupiz-p9b-summary .bupiz-single-delivery-heading,
body.single-product .bupiz-p9b-summary .bupiz-mobile-trust-heading{
    margin:0 0 9px !important;
    color:#172033 !important;
    font-size:13px !important;
    font-weight:850 !important;
}
body.single-product .bupiz-p9b-summary .bupiz-mobile-trust-wrap{
    margin:10px 0 0 !important;
    padding:12px !important;
    border:1px solid #ece4f8 !important;
    border-radius:14px !important;
    background:linear-gradient(135deg,#fdfaff,#fff) !important;
}
body.single-product .bupiz-p9b-summary .bupiz-mobile-trust-strip{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:7px !important;
}
body.single-product .bupiz-p9b-summary .bupiz-mobile-trust-item{
    min-width:0 !important;
    padding:9px 5px !important;
    border:1px solid #eceff3 !important;
    border-radius:11px !important;
    background:#fff !important;
}
body.single-product .bupiz-p9b-summary .bupiz-mobile-trust-title{
    font-size:9px !important;
    line-height:1.25 !important;
}

body.single-product .bupiz-p9b-summary .product_meta{
    margin:13px 0 0 !important;
    padding:12px 0 0 !important;
    border-top:1px dashed #dfe4ea !important;
    color:#7a8494 !important;
    font-size:11px !important;
    line-height:1.55 !important;
}
body.single-product .bupiz-p9b-summary .product_meta > span{display:block;margin:2px 0;}

.bupiz-p9b-summary-note{
    display:flex;
    flex-wrap:wrap;
    gap:7px 14px;
    margin:13px 0 0;
    padding:12px 0 0;
    border-top:1px dashed #e1e6ed;
}
.bupiz-p9b-summary-note span{
    position:relative;
    padding-left:16px;
    color:#667085;
    font-size:11px;
    font-weight:650;
}
.bupiz-p9b-summary-note span::before{
    content:'✓';
    position:absolute;
    left:0;
    color:#14945e;
    font-weight:900;
}

/* Lower information/review/product recommendation area. */
.bupiz-p9b-lower-content{
    width:100%;
    max-width:1420px;
    margin:0 auto;
}
.bupiz-p9b-lower-content > .bupiz-reviews-block,
.bupiz-p9b-lower-content > .bupiz-description-info-split,
.bupiz-p9b-lower-content > .related,
.bupiz-p9b-lower-content > .upsells,
.bupiz-p9b-lower-content > .bupiz-hot-deals-slider,
.bupiz-p9b-lower-content > section{
    margin-bottom:20px;
    border:1px solid var(--bupiz-p9b-border);
    border-radius:22px;
    background:#fff;
    box-shadow:0 14px 38px rgba(15,23,42,.06);
}
.bupiz-p9b-lower-content .related,
.bupiz-p9b-lower-content .upsells{padding:24px 20px 20px;}
.bupiz-p9b-lower-content .related > h2,
.bupiz-p9b-lower-content .upsells > h2{
    color:var(--bupiz-p9b-ink);
    font-size:clamp(22px,2vw,30px);
    letter-spacing:-.025em;
}
.bupiz-p9b-lower-content .bupiz-reviews-block,
.bupiz-p9b-lower-content .bupiz-reviews-section,
.bupiz-p9b-lower-content #reviews{scroll-margin-top:118px;}

/* Laptop refinement. */
@media (min-width:992px) and (max-width:1240px){
    body.single-product .bupiz-p9b-product-shell .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-p9b-product-head{
        grid-template-columns:minmax(440px,52%) minmax(390px,48%) !important;
        gap:20px !important;
        padding:18px !important;
    }
    body.single-product .bupiz-p9b-product-head > .summary,
    body.single-product .bupiz-p9b-summary{padding:18px 18px 16px !important;}
    body.single-product .bupiz-p9b-summary .woocommerce-product-details__short-description ul{
        grid-template-columns:1fr;
    }
}

/* Tablet/mobile preserves the existing Bupiz conversion interface. */
@media (max-width:991px){
    .bupiz-p9b-product-page{padding-top:8px;}
    .bupiz-p9b-product-shell,
    body.single-product div.product.bupiz-p9b-product-shell{
        width:min(100% - 22px,760px) !important;
    }
    body.single-product .bupiz-p9b-product-shell .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-p9b-product-head{
        display:flex !important;
        flex-direction:column !important;
        gap:12px !important;
        width:100% !important;
        margin:0 auto 18px !important;
        padding:11px !important;
        border:1px solid var(--bupiz-p9b-border) !important;
        border-radius:18px !important;
        background:#fff !important;
        box-shadow:0 12px 34px rgba(15,23,42,.07) !important;
    }
    body.single-product .bupiz-p9b-product-head > .images,
    body.single-product .bupiz-p9b-product-head > div.images,
    body.single-product .bupiz-p9b-product-head > .woocommerce-product-gallery{
        position:relative !important;
        top:auto !important;
        width:100% !important;
        max-width:none !important;
        margin:0 !important;
        float:none !important;
    }
    body.single-product .bupiz-p9b-product-head > .summary,
    body.single-product .bupiz-p9b-summary{
        width:100% !important;
        max-width:none !important;
        margin:0 !important;
        padding:14px 12px 10px !important;
        float:none !important;
        border:1px solid #edf0f4 !important;
        border-radius:16px !important;
        background:#fff !important;
        box-shadow:none !important;
    }
    body.single-product .bupiz-p9b-product-head > .onsale{
        position:absolute !important;
        top:22px !important;
        left:22px !important;
        z-index:8 !important;
    }
    .bupiz-p9b-lower-content{width:100%;}
}

@media (max-width:767px){
    .bupiz-p9b-product-context{margin-bottom:7px;}
    .bupiz-p9b-breadcrumb{font-size:10px;margin-bottom:6px !important;}
    .bupiz-p9b-context-line{min-height:34px;padding:7px 10px;border-radius:11px;}
    .bupiz-p9b-context-line strong{font-size:11px;}
    .bupiz-p9b-context-line > a{font-size:10px;}
    .bupiz-p9b-summary-eyebrow{margin-bottom:7px;}
    body.single-product .bupiz-p9b-summary .product_title{font-size:21px !important;}
    body.single-product .bupiz-p9b-summary .woocommerce-product-details__short-description ul{grid-template-columns:1fr;}
    body.single-product .bupiz-p9b-summary .woocommerce-variation-add-to-cart,
    body.single-product .bupiz-p9b-summary .cart:not(.variations_form){
        grid-template-columns:58px minmax(0,1fr) minmax(0,1fr) !important;
        gap:7px !important;
    }
    body.single-product .bupiz-p9b-summary .bupiz-mobile-trust-strip{
        grid-template-columns:repeat(4,minmax(64px,1fr)) !important;
        overflow-x:auto;
    }
    .bupiz-p9b-summary-note{gap:6px 11px;}
    .bupiz-p9b-summary-note span{font-size:10px;}
    .bupiz-p9b-lower-content > *{border-radius:16px !important;}
}

/* ============================================================
   Phase 13J-R1 — desktop PDP breathing room.
   Presentation only: no gallery, variation, price or purchase logic changes.
============================================================ */
@media (min-width:1241px){
    .bupiz-p9b-product-shell,
    body.single-product div.product.bupiz-p9b-product-shell{
        width:min(1360px,calc(100% - 72px))!important;
        max-width:1360px!important;
    }
    .bupiz-p9b-container{max-width:1360px!important;}

    body.single-product .bupiz-p9b-product-shell .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-product-head-sticky-frame{
        grid-template-columns:minmax(500px,600px) minmax(420px,1fr)!important;
        gap:26px!important;
        max-width:1360px!important;
        padding:22px!important;
        border-radius:22px!important;
    }

    body.single-product .bupiz-p9b-product-head > .images,
    body.single-product .bupiz-p9b-product-head > div.images,
    body.single-product .bupiz-p9b-product-head > .woocommerce-product-gallery{
        max-width:600px!important;
    }

    body.single-product .bupiz-p9b-product-head > .summary,
    body.single-product .bupiz-p9b-product-head > div.summary,
    body.single-product .bupiz-p9b-product-head > .summary.entry-summary,
    body.single-product .bupiz-p9b-summary{
        padding:20px 22px 19px!important;
    }
}

/* ============================================================
   Phase 13K — spacing-only PDP refinement
   No gallery, variation, price, CTA or product behaviour changes.
============================================================ */
.bupiz-p9b-product-page{padding-bottom:40px;}
.bupiz-p9b-product-context{margin-bottom:8px;}
.bupiz-p9b-breadcrumb{margin-bottom:6px!important;}
@media (min-width:992px){
    body.single-product .bupiz-p9b-product-shell .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-product-head-sticky-frame{
        gap:22px!important;
        margin-bottom:18px!important;
        padding:18px!important;
    }
    body.single-product .bupiz-p9b-product-head > .summary,
    body.single-product .bupiz-p9b-product-head > div.summary,
    body.single-product .bupiz-p9b-product-head > .summary.entry-summary,
    body.single-product .bupiz-p9b-summary{padding:16px 18px!important;}
}
body.single-product .bupiz-p9b-summary .product_title,
body.single-product div.product .bupiz-p9b-summary .product_title{margin-bottom:6px!important;}
body.single-product .bupiz-p9b-summary .bupiz-single-rating-row,
body.single-product .bupiz-p9b-summary .woocommerce-product-rating{margin-bottom:8px!important;}
body.single-product .bupiz-p9b-summary p.price,
body.single-product .bupiz-p9b-summary .price{margin-bottom:9px!important;}
body.single-product .bupiz-p9b-summary .bupiz-great-offers-box{margin:9px 0 11px!important;padding:11px 13px!important;}
body.single-product .bupiz-p9b-summary .woocommerce-product-details__short-description{margin:9px 0 11px!important;padding:11px 13px!important;}
body.single-product .bupiz-p9b-summary form.cart{margin-top:10px!important;padding:12px!important;}
body.single-product .bupiz-p9b-summary table.variations{margin-bottom:7px!important;}
body.single-product .bupiz-p9b-summary table.variations tr{margin-bottom:9px;}
body.single-product .bupiz-p9b-summary table.variations th label,
body.single-product .bupiz-p9b-summary table.variations td label{margin-bottom:6px!important;}
body.single-product .bupiz-p9b-summary .single_variation_wrap{margin-top:6px;}
body.single-product .bupiz-p9b-summary .bupiz-quick-delivery-note{margin:8px 0 6px!important;padding:8px 10px!important;}
body.single-product .bupiz-p9b-summary .bupiz-single-delivery-card{margin:8px 0!important;padding:11px 12px!important;}
body.single-product .bupiz-p9b-summary .bupiz-mobile-trust-wrap{margin-top:8px!important;padding:10px!important;}
body.single-product .bupiz-p9b-summary .product_meta{margin-top:10px!important;padding-top:8px!important;}
.bupiz-p9b-summary-note{margin-top:10px;padding-top:8px;}
.bupiz-p9b-lower-content > .bupiz-reviews-block,
.bupiz-p9b-lower-content > .bupiz-description-info-split,
.bupiz-p9b-lower-content > .related,
.bupiz-p9b-lower-content > .upsells,
.bupiz-p9b-lower-content > .bupiz-hot-deals-slider,
.bupiz-p9b-lower-content > section{margin-bottom:14px;}
.bupiz-p9b-lower-content .related,.bupiz-p9b-lower-content .upsells{padding:18px 16px 16px;}
@media (max-width:991px){
    .bupiz-p9b-product-page{padding-top:6px;padding-bottom:30px;}
    body.single-product .bupiz-p9b-product-shell .bupiz-p9b-product-head,
    body.single-product div.product.bupiz-p9b-product-shell > .bupiz-p9b-product-head{gap:10px!important;margin-bottom:12px!important;padding:9px!important;}
    body.single-product .bupiz-p9b-product-head > .summary,
    body.single-product .bupiz-p9b-summary{padding:11px 10px 8px!important;}
}

/* ============================================================
   Phase 13K-R2 — conditional PDP empty-space cleanup
   Spacing only. Existing gallery, variation controls, price and CTA stay intact.
============================================================ */
/* The existing theme hides WooCommerce attribute selects after Bupiz controls
   are used. If a colour attribute genuinely has no non-empty option, collapse
   only that unusable row. Real colour rows remain untouched while JS builds
   their existing thumbnail controls. */
body.single-product form.variations_form table.variations tr:has(select[name*="color" i]):not(:has(select[name*="color" i] option:not([value=""]))),
body.single-product form.variations_form table.variations tr:has(select[name*="colour" i]):not(:has(select[name*="colour" i] option:not([value=""]))){
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    gap:0 !important;
    overflow:hidden !important;
}
/* If an enhancement wrapper is present but contains no choices, it must not
   reserve a visual row. */
body.single-product .bupiz-mobile-color-thumbs:empty,
body.single-product .bupiz-mobile-size-buttons:empty{
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
}
/* WooCommerce creates variation output containers before a selection is made.
   Empty containers should occupy zero space; populated price/availability stays
   exactly as before. */
body.single-product .bupiz-p9b-summary .woocommerce-variation:empty,
body.single-product .bupiz-p9b-summary .woocommerce-variation-description:empty,
body.single-product .bupiz-p9b-summary .woocommerce-variation-price:empty,
body.single-product .bupiz-p9b-summary .woocommerce-variation-availability:empty{
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
}

/* ============================================================
   Phase 13K-R3 — PDP conditional row cleanup
   Spacing only. No variation, gallery, pricing or purchase behaviour changes.
============================================================ */
/* Related/upsell product cards on a PDP do not load the catalogue override
   layer. Match its content-height behaviour here: one-line titles take one
   line and a no-review placeholder takes no space. */
body.single-product .related.products ul.products li.product .woocommerce-loop-product__title,
body.single-product .upsells.products ul.products li.product .woocommerce-loop-product__title,
body.single-product .bupiz-hot-deals-slider ul.products li.product .woocommerce-loop-product__title{
    height:auto !important;
    min-height:0 !important;
    max-height:2.64em !important;
}
body.single-product .related.products .bupiz-card-rating--empty,
body.single-product .upsells.products .bupiz-card-rating--empty,
body.single-product .bupiz-hot-deals-slider .bupiz-card-rating--empty,
body.single-product .bupiz-card-rating--empty{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    gap:0 !important;
    overflow:hidden !important;
}

/* The Bupiz variation enhancer marks each form as processed. Only after that
   point, collapse a colour/size attribute row if no visual controls were built.
   A valid colour/size row remains exactly as before. */
body.single-product form.variations_form[data-bupiz-color-thumbs-ready="1"] table.variations tr:has(select[name*="color" i]):not(.bupiz-mobile-color-row-ready):not(:has(.bupiz-mobile-color-thumbs)),
body.single-product form.variations_form[data-bupiz-color-thumbs-ready="1"] table.variations tr:has(select[name*="colour" i]):not(.bupiz-mobile-color-row-ready):not(:has(.bupiz-mobile-color-thumbs)),
body.single-product form.variations_form[data-bupiz-color-thumbs-ready="1"] table.variations tr:has(select[name*="shade" i]):not(.bupiz-mobile-color-row-ready):not(:has(.bupiz-mobile-color-thumbs)),
body.single-product form.variations_form[data-bupiz-color-thumbs-ready="1"] table.variations tr:has(select[name*="rang" i]):not(.bupiz-mobile-color-row-ready):not(:has(.bupiz-mobile-color-thumbs)){
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    gap:0 !important;
    overflow:hidden !important;
}
body.single-product form.variations_form[data-bupiz-size-buttons-ready="1"] table.variations tr:has(select[name*="size" i]):not(.bupiz-mobile-size-row-ready):not(:has(.bupiz-mobile-size-buttons)){
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    gap:0 !important;
    overflow:hidden !important;
}

/* If the variations table has no surviving visible attribute controls after
   enhancement, it should not retain its own bottom spacing. */
body.single-product form.variations_form[data-bupiz-color-thumbs-ready="1"][data-bupiz-size-buttons-ready="1"] table.variations:not(:has(.bupiz-mobile-color-thumbs, .bupiz-mobile-size-buttons)){
    margin:0 !important;
    min-height:0 !important;
}

/* WooCommerce keeps the reset/Clear link in the document with visibility:hidden
   until an option has been selected. Remove its layout footprint while hidden,
   but restore the existing link unchanged when WooCommerce makes it visible. */
body.single-product form.variations_form .reset_variations:not([style*="visibility: visible"]){
    display:none !important;
    width:0 !important;
    height:0 !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
}
body.single-product form.variations_form .reset_variations[style*="visibility: visible"]{
    display:inline-flex !important;
}

/* ============================================================
   Simple product governed-size row — grid containment fix
   Scope: only the Bupiz simple-product size picker on the PDP.
   The simple cart is a 3-column purchase grid; without an explicit
   grid span this fieldset is auto-placed into one CTA column.
============================================================ */
body.single-product .bupiz-p9b-summary form.cart:not(.variations_form):not(.grouped_form) > .bupiz-simple-size-picker,
body.single-product div.product form.cart:not(.variations_form):not(.grouped_form) > .bupiz-simple-size-picker{
    grid-column:1 / -1 !important;
    width:100% !important;
    min-width:0 !important;
    min-inline-size:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    justify-self:stretch !important;
    box-sizing:border-box !important;
}

body.single-product .bupiz-p9b-summary form.cart:not(.variations_form):not(.grouped_form) > .bupiz-simple-size-picker .bupiz-simple-size-options,
body.single-product div.product form.cart:not(.variations_form):not(.grouped_form) > .bupiz-simple-size-picker .bupiz-simple-size-options{
    display:flex !important;
    flex-flow:row wrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
}
