/* GEX product page on phones (up to 799px), modelled on dacby.com:
   full-width photo with floating back and cart buttons, a rounded white sheet with the details,
   grey bands between sections, and a sticky bottom bar (Add to cart / Buy now) with rounded top corners. */
.gex-pdp-top { display: none; }
/* Description and Reviews are always open, one under the other (no tab buttons). */
body.gex-pdp .woocommerce-tabs ul.tabs { display: none !important; }
body.gex-pdp .woocommerce-tabs .woocommerce-Tabs-panel { display: block !important; }
/* Stock badge: green when in stock, red when out. */
html:root body.gex-pdp p.stock.in-stock { background: #e3f5ea; color: #13703a; }
html:root body.gex-pdp p.stock.out-of-stock { background: #fdeaea; color: #b3261e; }
html:root body.gex-pdp p.stock.available-on-backorder { background: #fff3e0; color: #a05a00; }
@media (max-width: 799px) {
    /* Site header, strip and breadcrumb give way to the floating buttons. */
    html:root body.gex-pdp .gexc-strip,
    html:root body.gex-pdp .gexc-header,
    html:root body.gex-pdp .woocommerce-breadcrumb { display: none !important; }
    html:root body.gex-pdp { background: #f3f4f7; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
    html:root body.gex-pdp main.site-main { padding: 0 !important; }

    .gex-pdp-top {
        position: fixed;
        top: calc(12px + env(safe-area-inset-top, 0px));
        left: 12px;
        right: 12px;
        z-index: 250;
        display: flex;
        justify-content: space-between;
        pointer-events: none;
    }
    .gex-pdp-btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #fff;
        color: #111 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }
    .gex-pdp-btn svg { display: block; }
    .gex-pdp-count {
        position: absolute;
        top: -3px;
        right: -3px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        box-sizing: border-box;
        border-radius: 9px;
        background: var(--gexc-orange, #FF6A00);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 17px;
        text-align: center;
    }
    .gex-pdp-count[hidden] { display: none; }

    /* Photo */
    html:root body.gex-pdp .woocommerce-product-gallery {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 66px 16px 40px;
        box-sizing: border-box;
        border: 0;
        border-radius: 0;
        background: #f3f4f7;
        box-shadow: none;
    }
    body.gex-pdp .woocommerce-product-gallery img { mix-blend-mode: multiply; }
    html:root body.gex-pdp .woocommerce-product-gallery__trigger { top: auto !important; bottom: 48px; right: 16px; }

    /* Details sheet */
    html:root body.gex-pdp div.product div.summary {
        position: relative;
        float: none !important;
        width: 100% !important;
        margin: -24px 0 0 !important;
        padding: 26px 16px 8px;
        box-sizing: border-box;
        border-radius: 22px 22px 0 0;
        background: #fff;
    }
    body.gex-pdp div.product div.summary::before {
        content: "";
        position: absolute;
        top: 9px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 2px;
        background: #d9d9d9;
    }
    body.gex-pdp .gexc-pdp-eyebrow { margin: 0 0 6px; font-size: 11px; color: #757575; }
    body.gex-pdp .gexc-pdp-eyebrow a { color: #757575 !important; }
    html:root body.gex-pdp h1.product_title { margin: 0 0 12px; color: #111; font-size: 17px; font-weight: 400; line-height: 1.4; letter-spacing: 0; text-transform: none; }
    html:root body.gex-pdp p.price {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        margin: 14px 0 6px;
        color: #111;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.2;
    }
    html:root body.gex-pdp p.price ins { order: 1; background: none; text-decoration: none; color: #111; font-weight: 700; }
    html:root body.gex-pdp p.price del { order: 2; color: #6b6b6b; font-size: 13px; font-weight: 400; opacity: 1; }
    html:root body.gex-pdp p.price .woocommerce-Price-amount { color: #111; }
    html:root body.gex-pdp p.price del .woocommerce-Price-amount { color: #6b6b6b; }
    body.gex-pdp p.price del::before { content: "MRP: "; }
    /* The discount tag on the photo is gone (the You save badge says it), and the badge sits clear of the MRP line. */
    html:root body.gex-pdp div.product > .onsale { display: none !important; }
    html:root body.gex-pdp p.gexc-pdp-save { margin: 8px 0 0 !important; }
    body.gex-pdp .woocommerce-product-details__short-description { margin: 10px 0; color: #444; font-size: 14px; line-height: 1.5; }
    html:root body.gex-pdp p.stock { margin: 10px 0 14px; font-size: 13px; font-weight: 500; }
    body.gex-pdp p.stock::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }

    /* Sections after the price: white blocks separated by grey bands */
    html:root body.gex-pdp .gexc-pdp-delivery,
    html:root body.gex-pdp .gexc-pdp-trust,
    html:root body.gex-pdp .gexc-pdp-pay,
    html:root body.gex-pdp .product_meta {
        margin: 0 -16px;
        padding: 16px;
        border: 0;
        border-top: 8px solid #f3f4f7;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
    }
    html:root body.gex-pdp .gexc-pdp-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    body.gex-pdp .gexc-pdp-trust-item { padding: 12px; gap: 10px; }
    body.gex-pdp .gexc-pdp-trust-item small, body.gex-pdp .gexc-pdp-trust-item div > span:last-child { font-size: 11px; }
    html:root body.gex-pdp section.related {
        margin: 8px 0 0;
        padding: 16px;
        box-sizing: border-box;
        background: #fff;
    }
    /* Description and Reviews: white blocks with even inner padding */
    html:root body.gex-pdp .woocommerce-tabs { margin: 8px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
    html:root body.gex-pdp .woocommerce-tabs .woocommerce-Tabs-panel {
        margin: 0 0 8px;
        padding: 16px;
        box-sizing: border-box;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
    }
    html:root body.gex-pdp .woocommerce-Tabs-panel h2,
    html:root body.gex-pdp .woocommerce-Reviews-title { margin: 0 0 10px; padding: 0; color: #111; font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; }
    html:root body.gex-pdp .woocommerce-Tabs-panel > h2 { display: block !important; }
    html:root body.gex-pdp .woocommerce-Tabs-panel p { margin: 0 0 10px; color: #444; font-size: 14px; line-height: 1.55; }
    html:root body.gex-pdp #reviews,
    html:root body.gex-pdp #comments,
    html:root body.gex-pdp #review_form_wrapper,
    html:root body.gex-pdp #review_form,
    html:root body.gex-pdp #respond {
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
    }
    html:root body.gex-pdp #review_form_wrapper { margin-top: 16px; padding-top: 16px; border-top: 1px solid #ececec; }
    html:root body.gex-pdp .woocommerce-noreviews,
    html:root body.gex-pdp .woocommerce-verification-required { margin: 0; padding: 12px 14px; border-radius: 10px; background: #f6f6f7; color: #555; font-size: 14px; }
    html:root body.gex-pdp #reply-title { display: block; margin: 0 0 8px; color: #111; font-size: 15px; font-weight: 600; }
    html:root body.gex-pdp .comment-notes { margin: 0 0 14px; color: #666; font-size: 13px; }
    html:root body.gex-pdp #commentform label { display: block; margin: 0 0 6px; color: #111; font-size: 12px; font-weight: 600; letter-spacing: .03em; }
    html:root body.gex-pdp #commentform p { margin: 0 0 14px; }
    html:root body.gex-pdp #commentform textarea,
    html:root body.gex-pdp #commentform input[type="text"],
    html:root body.gex-pdp #commentform input[type="email"] { display: block; width: 100%; box-sizing: border-box; margin: 0; }
    html:root body.gex-pdp #commentform .form-submit input[type="submit"] { width: 100%; min-height: 48px; border-radius: 10px; }
    html:root body.gex-pdp section.related ul.products { margin-left: 0; margin-right: 0; }

    /* Sticky bottom bar: Add to cart (outlined) and Buy now (filled) */
    html:root body.gex-pdp form.cart:not(.variations_form) {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 240;
        display: flex;
        gap: 12px;
        margin: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        background: #fff;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 14px rgba(0, 0, 0, .08);
    }
    html:root body.gex-pdp form.cart:not(.variations_form) .quantity { display: none !important; }
    /* Both buttons: same pill shape, same size, text centred. */
    html:root body.gex-pdp form.cart:not(.variations_form) .single_add_to_cart_button,
    html:root body.gex-pdp form.cart:not(.variations_form) .gex-buynow {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: 1 1 0;
        min-width: 0;
        height: 48px;
        margin: 0;
        padding: 0 12px !important;
        box-sizing: border-box;
        border-radius: 999px !important;
        font: inherit;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0;
        line-height: 1 !important;
        text-align: center;
        text-transform: none;
        cursor: pointer;
    }
    html:root body.gex-pdp form.cart:not(.variations_form) .single_add_to_cart_button {
        background: #fff !important;
        color: var(--gexc-purple, #6C2EB5) !important;
        border: 1.5px solid var(--gexc-purple, #6C2EB5) !important;
        box-shadow: none;
    }
    body.gex-pdp .gex-buynow { border: 0; background: var(--gexc-purple, #6C2EB5); color: #fff; }
}
