/*
 * Mr B's Extracts — Product Experience Polish 1.0.0
 * Front-end presentation only. No SEO/product/database mutations.
 */

:root {
    --mrbs-pe-black: #0b0a08;
    --mrbs-pe-black-soft: #14110d;
    --mrbs-pe-black-lift: #1b1711;
    --mrbs-pe-amber: #dd9a22;
    --mrbs-pe-amber-soft: #efb94f;
    --mrbs-pe-cream: #f4efe4;
    --mrbs-pe-cream-2: #e9dfcf;
    --mrbs-pe-muted: #ad9e8b;
    --mrbs-pe-line: rgba(239, 185, 79, .26);
    --mrbs-pe-radius: 16px;
}

/* ---------- Single product: stronger information hierarchy ---------- */
body.single-product .product-main {
    background:
        radial-gradient(circle at 74% 4%, rgba(221,154,34,.065), transparent 32%),
        var(--mrbs-pe-black) !important;
}

body.single-product .product-main .product-gallery,
body.single-product .product-main .product-info {
    align-self: flex-start;
}

body.single-product .product-main .product-gallery .product-images,
body.single-product .product-main .product-gallery .woocommerce-product-gallery,
body.single-product .product-main .product-info {
    border-radius: var(--mrbs-pe-radius);
}

body.single-product .product-main .product-gallery .woocommerce-product-gallery,
body.single-product .product-main .product-gallery .product-images {
    overflow: hidden;
}

body.single-product .product-main .product-info {
    padding-top: 8px;
}

body.single-product .product-info .price,
body.single-product .product-info .price-wrapper .price {
    color: var(--mrbs-pe-amber-soft) !important;
    font-weight: 800 !important;
    letter-spacing: -.015em;
}

body.single-product .product-info .product-short-description,
body.single-product .product-info .woocommerce-product-details__short-description {
    color: rgba(244,239,228,.82) !important;
    font-size: 15px;
    line-height: 1.65;
    max-width: 58ch;
}

/* ---------- Native variation block: visible even before JS enhancement ---------- */
body.single-product form.variations_form,
body.single-product form.cart.variations_form {
    margin-top: 22px !important;
    padding: 16px !important;
    background: linear-gradient(180deg, rgba(27,23,17,.96), rgba(15,13,10,.96)) !important;
    border: 1px solid var(--mrbs-pe-line) !important;
    border-radius: var(--mrbs-pe-radius) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.20) !important;
}

body.single-product table.variations,
body.single-product table.variations tbody,
body.single-product table.variations tr,
body.single-product table.variations th,
body.single-product table.variations td {
    display: block !important;
    width: 100% !important;
}

body.single-product table.variations {
    margin: 0 !important;
    border: 0 !important;
}

body.single-product table.variations tr {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
}

body.single-product table.variations .label,
body.single-product table.variations th.label {
    padding: 0 0 8px !important;
    color: var(--mrbs-pe-cream) !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

body.single-product table.variations .value,
body.single-product table.variations td.value {
    padding: 0 !important;
}

body.single-product table.variations select {
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 44px 0 14px !important;
    color: var(--mrbs-pe-cream) !important;
    background-color: #17130e !important;
    border: 1px solid rgba(239,185,79,.52) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.015) !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

body.single-product table.variations select:focus {
    border-color: var(--mrbs-pe-amber-soft) !important;
    outline: 2px solid rgba(239,185,79,.20) !important;
    outline-offset: 2px !important;
}

body.single-product table.variations .reset_variations {
    display: inline-flex !important;
    align-items: center;
    margin-top: 9px !important;
    color: var(--mrbs-pe-muted) !important;
    font-size: 12px !important;
    text-decoration: none !important;
}

/* ---------- Visual flavor/strain chooser (mirrors native WooCommerce select) ---------- */
.mrbs-pe-choice-panel {
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid rgba(239,185,79,.26);
    border-radius: 14px;
    background: rgba(7,6,5,.42);
}

.mrbs-pe-choice-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.mrbs-pe-choice-kicker {
    color: var(--mrbs-pe-amber-soft);
    font-size: 10px;
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.mrbs-pe-choice-title {
    margin-top: 3px;
    color: var(--mrbs-pe-cream);
    font-size: 17px;
    line-height: 1.15;
    font-weight: 820;
    letter-spacing: -.01em;
}

.mrbs-pe-choice-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 9px;
    color: var(--mrbs-pe-black);
    background: var(--mrbs-pe-amber-soft);
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
}

.mrbs-pe-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
}

.mrbs-pe-choice {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 9px 11px;
    text-align: left;
    color: rgba(244,239,228,.91);
    background: #15120e;
    border: 1px solid rgba(244,239,228,.13);
    border-radius: 11px;
    box-shadow: none;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease, color .16s ease;
}

.mrbs-pe-choice:hover,
.mrbs-pe-choice:focus-visible {
    color: #fff;
    background: #1c1812;
    border-color: rgba(239,185,79,.64);
    outline: none;
}

.mrbs-pe-choice:focus-visible {
    box-shadow: 0 0 0 2px rgba(239,185,79,.22);
}

.mrbs-pe-choice[aria-pressed="true"] {
    color: var(--mrbs-pe-black);
    background: linear-gradient(180deg, #f1bd58, #d9951e);
    border-color: #f5c76c;
    font-weight: 850;
}

.mrbs-pe-choice:disabled,
.mrbs-pe-choice.is-disabled {
    opacity: .35;
    cursor: not-allowed;
}

.mrbs-pe-choice-main {
    display: block;
    font-size: 12.5px;
    line-height: 1.3;
    font-weight: 760;
    overflow-wrap: anywhere;
}

.mrbs-pe-choice-pair {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: center;
    gap: 5px;
    width: 100%;
}

.mrbs-pe-choice-pair > span:not(.mrbs-pe-choice-x) {
    font-size: 11.5px;
    line-height: 1.25;
    font-weight: 760;
    overflow-wrap: anywhere;
}

.mrbs-pe-choice-x {
    color: currentColor;
    opacity: .65;
    font-size: 10px;
    font-weight: 900;
}

.mrbs-pe-native-fallback {
    margin-top: 9px;
}

.mrbs-pe-native-fallback > summary {
    list-style: none;
    cursor: pointer;
    color: var(--mrbs-pe-muted);
    font-size: 11px;
    line-height: 1.2;
}

.mrbs-pe-native-fallback > summary::-webkit-details-marker { display: none; }
.mrbs-pe-native-fallback > summary::before { content: '+ '; color: var(--mrbs-pe-amber-soft); }
.mrbs-pe-native-fallback[open] > summary::before { content: '− '; }
.mrbs-pe-native-fallback .mrbs-pe-native-slot { margin-top: 8px; }

/* Keep the original label row from looking duplicated once mirrored. */
tr.mrbs-pe-enhanced-row > .label { display: none !important; }
tr.mrbs-pe-enhanced-row > .value { padding: 0 !important; }

/* Variation result area */
body.single-product .single_variation_wrap {
    padding-top: 3px;
}

body.single-product .woocommerce-variation-description {
    color: rgba(244,239,228,.76) !important;
    font-size: 13px;
    line-height: 1.5;
}

body.single-product .woocommerce-variation-price .price {
    color: var(--mrbs-pe-amber-soft) !important;
    font-size: 20px !important;
}

/* Product meta becomes quieter so options remain the focus. */
body.single-product .product_meta {
    margin-top: 18px !important;
    padding-top: 14px !important;
    border-top: 1px solid rgba(244,239,228,.10) !important;
    color: var(--mrbs-pe-muted) !important;
    font-size: 11px !important;
}

body.single-product .product_meta a { color: var(--mrbs-pe-cream-2) !important; }

/* Tabs/detail area: branded rather than default white-line WooCommerce */
body.single-product .product-footer .woocommerce-tabs,
body.single-product .woocommerce-tabs {
    margin-top: 28px;
}

body.single-product .woocommerce-tabs .nav-line-bottom > li > a,
body.single-product .woocommerce-tabs .tabs > li > a {
    font-weight: 800 !important;
    letter-spacing: .035em;
}

body.single-product .woocommerce-tabs .panel,
body.single-product .woocommerce-Tabs-panel {
    line-height: 1.72;
}

/* ---------- Desktop archives: extend the accepted Mr B's card language ---------- */
@media screen and (min-width: 850px) {
    body.post-type-archive-product .products .product-small .col-inner,
    body.tax-product_cat .products .product-small .col-inner,
    body.woocommerce-shop .products .product-small .col-inner {
        height: 100%;
        overflow: hidden;
        background: #f4efe4;
        border: 1px solid rgba(221,154,34,.18);
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,.16);
        transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    }

    body.post-type-archive-product .products .product-small .col-inner:hover,
    body.tax-product_cat .products .product-small .col-inner:hover,
    body.woocommerce-shop .products .product-small .col-inner:hover {
        transform: translateY(-3px);
        border-color: rgba(221,154,34,.38);
        box-shadow: 0 16px 36px rgba(0,0,0,.22);
    }

    body.post-type-archive-product .products .product-small .box-image,
    body.tax-product_cat .products .product-small .box-image,
    body.woocommerce-shop .products .product-small .box-image {
        aspect-ratio: 1/1;
        overflow: hidden;
        background: #ece3d3;
    }

    body.post-type-archive-product .products .product-small .box-image img,
    body.tax-product_cat .products .product-small .box-image img,
    body.woocommerce-shop .products .product-small .box-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    body.post-type-archive-product .products .product-small .box-text,
    body.tax-product_cat .products .product-small .box-text,
    body.woocommerce-shop .products .product-small .box-text {
        padding: 14px 14px 16px;
        color: #171109;
        background: #f4efe4;
    }

    body.post-type-archive-product .products .product-small .product-title a,
    body.post-type-archive-product .products .product-small .name a,
    body.tax-product_cat .products .product-small .product-title a,
    body.tax-product_cat .products .product-small .name a,
    body.woocommerce-shop .products .product-small .product-title a,
    body.woocommerce-shop .products .product-small .name a {
        color: #171109 !important;
        font-weight: 800;
    }

    body.post-type-archive-product .products .product-small .category,
    body.tax-product_cat .products .product-small .category,
    body.woocommerce-shop .products .product-small .category {
        color: #876f50 !important;
        font-weight: 700;
        letter-spacing: .07em;
    }

    body.post-type-archive-product .products .product-small .price,
    body.tax-product_cat .products .product-small .price,
    body.woocommerce-shop .products .product-small .price {
        color: #171109 !important;
        font-weight: 850;
    }
}

/* ---------- Mobile refinement ---------- */
@media screen and (max-width: 849px) {
    body.single-product form.variations_form,
    body.single-product form.cart.variations_form {
        padding: 13px !important;
        border-radius: 14px !important;
    }

    .mrbs-pe-choice-panel {
        padding: 12px;
    }

    .mrbs-pe-choice-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .mrbs-pe-choice {
        min-height: 46px;
    }

    body.single-product .product-info .product-short-description,
    body.single-product .product-info .woocommerce-product-details__short-description {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mrbs-pe-choice,
    body.post-type-archive-product .products .product-small .col-inner,
    body.tax-product_cat .products .product-small .col-inner,
    body.woocommerce-shop .products .product-small .col-inner {
        transition: none !important;
    }
}
