.code-apparel-stage,
.code-apparel-catalog {
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #202225;
    border-radius: 12px;
}
.code-apparel-stage[hidden] { display: none; }
.code-apparel-stage > img.code-apparel-photo,
.code-apparel-catalog > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 4 / 5;
    object-fit: contain !important;
    object-position: center;
    margin: 0 !important;
}
.code-apparel-single { min-width: 0; }
.woocommerce div.product:has(> .code-apparel-single) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: clamp(24px, 4vw, 56px) !important;
    align-items: start;
}
.woocommerce div.product:has(> .code-apparel-single)::before,
.woocommerce div.product:has(> .code-apparel-single)::after { content: none !important; }
.woocommerce div.product .code-apparel-single,
.woocommerce div.product:has(> .code-apparel-single) > .summary {
    width: 100% !important; max-width: none !important; min-width: 0; float: none !important;
}
.woocommerce div.product:has(> .code-apparel-single) > .woocommerce-tabs,
.woocommerce div.product:has(> .code-apparel-single) > .related,
.woocommerce div.product:has(> .code-apparel-single) > .upsells { grid-column: 1 / -1; }
.code-apparel-single .code-apparel-details { clear: both; margin-top: 1.5rem; }
.code-apparel-single .code-apparel-details .woocommerce-product-gallery,
.code-apparel-single .code-apparel-details .woo-variation-product-gallery { width: 100% !important; max-width: 100% !important; float: none !important; }
.code-apparel-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.code-apparel-swatches button {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
    padding: .5rem .75rem; border: 2px solid #73777b; border-radius: 6px;
    background: #181a1c; color: #fff; cursor: pointer; font: inherit;
}
.code-apparel-swatches button[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #181a1c, 0 0 0 4px #fff; }
.woocommerce .code-apparel-swatches button:hover,
.woocommerce .code-apparel-swatches button:focus,
.woocommerce .code-apparel-swatches button[aria-pressed="true"] {
    background: #192c25 !important; color: #edf3f3 !important; border-color: #8ae8c2 !important;
}
.code-apparel-swatches button:focus-visible { outline: 3px solid #7fffd4; outline-offset: 4px; }
.code-apparel-swatches button:disabled { opacity: .55; cursor: not-allowed; }
.code-apparel-chip { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid #92979c; flex-shrink: 0; }
.code-apparel-chip--black { background: #08090a; }
.code-apparel-chip--white { background: #fff; }
.code-apparel-chip--ghost-gray { background: #b9bdc3; }
.code-apparel-chip--blue { background: #24364b; }
.code-apparel-preview p { font-size: .875rem; line-height: 1.5; }
.code-apparel-status { min-height: 3em; }
.mpd-products-archive__item:has(.code-apparel-catalog) {
    background: #101618 !important; color: #edf3f3 !important;
    border: 1px solid #35413d !important; border-radius: 12px !important;
    overflow: hidden;
}
.mpd-products-archive__item:has(.code-apparel-catalog) :is(h2,h3,a,.price) { color: #edf3f3 !important; }
.mpd-products-archive__item:has(.code-apparel-catalog) .button {
    background: #8ae8c2 !important; color: #080b0c !important; border-radius: 999px;
}
body:is(.term-mens-apparel,.term-womens-apparel,.term-essentials) :is(.mpd-advanced-filter__body,.mpd-advanced-filter__content,.mpd-advanced-filter__header,.mpd-advanced-filter__form,.mpd-advanced-filter__desktop,.mpd-ordering__select) {
    background: #101618 !important; color: #edf3f3 !important; border-color: #35413d !important;
}
body:is(.term-mens-apparel,.term-womens-apparel,.term-essentials) .mpd-advanced-filter :is(a,label,h2,h3,h4,span,p) { color: #edf3f3 !important; }
body:is(.term-mens-apparel,.term-womens-apparel,.term-essentials) :is(.mpd-advanced-filter__toggle,.mpd-advanced-filter__button) {
    background: #101618 !important; color: #8ae8c2 !important; border-color: #8ae8c2 !important;
}
body:is(.term-mens-apparel,.term-womens-apparel,.term-essentials) .price_slider :is(.ui-slider-range,.ui-slider-handle) { background: #8ae8c2 !important; }
@media (max-width: 768px) {
    .woocommerce div.product:has(> .code-apparel-single) { grid-template-columns: minmax(0, 1fr) !important; }
    .woocommerce div.product .code-apparel-single { width: 100% !important; float: none; }
}

/* Apparel typography and controls only; unrelated cards and site navigation inherit the theme. */
:is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static),
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > :is(.summary,.code-apparel-single,.woocommerce-tabs) {
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 16px;
    line-height: 1.6;
}
:is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static) :is(h2,h3,.woocommerce-loop-product__title) {
    font-family: inherit !important; font-size: 18px !important; font-weight: 600 !important;
    line-height: 1.3 !important; letter-spacing: 0 !important; text-transform: none !important;
}
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary .product_title {
    font-family: inherit !important; font-size: clamp(26px,3vw,36px) !important;
    font-weight: 600 !important; line-height: 1.2 !important; letter-spacing: 0 !important;
    text-transform: none !important;
}
:is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static) .price,
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary .price {
    font-family: inherit !important; font-size: 18px !important; font-weight: 600 !important; line-height: 1.5 !important;
}
:is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static) .button,
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary :is(.button,select,input),
.code-apparel-swatches button {
    box-sizing: border-box; font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 14px !important; font-weight: 600 !important; line-height: 1.4 !important;
    letter-spacing: 0 !important; text-transform: none !important; min-height: 44px;
    max-width: 100%;
}
:is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static) .button,
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary .button {
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
    white-space: normal; padding: 12px 20px !important; border: 1px solid #8ae8c2 !important;
    border-radius: 999px !important; background: #8ae8c2 !important; color: #080b0c !important;
    text-decoration: none !important; box-shadow: none !important;
}
:is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static) .button:hover,
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary .button:hover {
    background: #b4f2d9 !important; color: #080b0c !important;
}
:is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static) .button:focus-visible,
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary :is(.button,select,input):focus-visible {
    outline: 3px solid #7fffd4 !important; outline-offset: 3px;
}
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary .button:is(:disabled,.disabled) {
    opacity: .55 !important; cursor: not-allowed;
}

/* Native-photo additions have no four-color manifest or preview panel. */
.woocommerce div.product.code-apparel-native :is(.woocommerce-product-gallery__image,.woo-variation-gallery-slider .wvg-gallery-image) {
    aspect-ratio: 4 / 5; background: #202225; overflow: hidden;
}
.woocommerce div.product.code-apparel-native :is(.woocommerce-product-gallery__image,.woo-variation-gallery-slider .wvg-gallery-image) img {
    width: 100% !important; height: 100% !important; aspect-ratio: 4 / 5;
    object-fit: contain !important; object-position: center;
}
.woocommerce div.product.code-apparel-native {
    display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
    gap: clamp(24px,4vw,56px) !important; align-items: start;
}
.woocommerce div.product.code-apparel-native::before,
.woocommerce div.product.code-apparel-native::after { content: none !important; }
.woocommerce div.product.code-apparel-native > :is(.woocommerce-product-gallery,.woo-variation-product-gallery,.summary) {
    width: 100% !important; max-width: none !important; min-width: 0; float: none !important;
}
.woocommerce div.product.code-apparel-native > :is(.woocommerce-tabs,.related,.upsells) { grid-column: 1 / -1; }
@media (max-width: 768px) {
    .woocommerce div.product.code-apparel-native { grid-template-columns: minmax(0,1fr) !important; }
}

/* Override storefront widget v0.1.62 without changing unrelated product cards. */
body.code-experience-storefront :is(.woocommerce ul.products,ul.products) li.product:is(:has(.code-apparel-catalog),.code-apparel-static,.code-apparel-native) .woocommerce-loop-product__title {
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 18px !important; line-height: 1.3 !important; font-weight: 600 !important;
    letter-spacing: 0 !important; text-transform: none !important;
}
body.code-experience-storefront :is(.woocommerce ul.products,ul.products) li.product:is(:has(.code-apparel-catalog),.code-apparel-static,.code-apparel-native) a.button {
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 14px !important; line-height: 1.4 !important; font-weight: 600 !important;
    min-height: 44px !important; letter-spacing: 0 !important; text-transform: none !important;
    border-radius: 999px !important;
}
body.code-experience-storefront :is(.woocommerce ul.products,ul.products) li.product:is(:has(.code-apparel-catalog),.code-apparel-static,.code-apparel-native) .price {
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 18px !important; line-height: 1.5 !important;
}

/* Native selectors/quantity remain readable on apparel's dark detail panels. */
.woocommerce div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary :is(select,option,input.qty) {
    color: #edf3f3 !important; background-color: #101618 !important;
    border-color: #73777b !important; color-scheme: dark;
}

/* Apparel detail polish: keep Woo's commerce markup, remove its light-theme presentation. */
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary .price,
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary .price :is(span,bdi,ins,del) {
    color: #8ae8c2 !important;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary input.qty {
    color: #edf3f3 !important; background: #101618 !important;
    border: 1px solid #73777b !important; border-radius: 6px; min-height: 44px;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important;
    margin: 0 0 24px !important; border: 0 !important; overflow: visible;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs::before,
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs::after,
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs li::before,
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs li::after {
    content: none !important; display: none !important;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs li {
    background: #101618 !important; border: 1px solid #35413d !important;
    border-radius: 999px !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs li a {
    display: flex; align-items: center; min-height: 44px; padding: 10px 16px !important;
    color: #edf3f3 !important; font: 600 14px/1.4 Inter, Arial, Helvetica, sans-serif !important;
    text-decoration: none !important; box-sizing: border-box;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs li.active {
    background: #192c25 !important; border-color: #8ae8c2 !important;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .woocommerce-tabs ul.tabs li a:focus-visible {
    outline: 3px solid #7fffd4; outline-offset: 3px; border-radius: 999px;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > :is(.related,.upsells) ul.products {
    display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    gap: 20px !important; margin: 0 !important; padding: 0 !important; width: 100% !important;
}
/* Woo clearfix pseudo-elements otherwise become empty first/last grid cells. */
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > :is(.related,.upsells) ul.products::before,
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > :is(.related,.upsells) ul.products::after {
    content: none !important; display: none !important;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > :is(.related,.upsells) ul.products > li.product {
    float: none !important; clear: none !important; width: auto !important; min-width: 0;
    max-width: none !important; margin: 0 !important; grid-column: auto !important;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    :is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > :is(.related,.upsells) ul.products {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important;
    }
}
/* Match the archive widget's own price specificity on targeted apparel only. */
body.code-experience-storefront .mpd-products-archive__item:has(.code-apparel-catalog) :is(.price,.mpd-products-archive__price),
body.code-experience-storefront .mpd-products-archive__item:has(.code-apparel-catalog) :is(.price,.mpd-products-archive__price) :is(span,bdi,ins,del) {
    font-size: 18px !important; line-height: 1.5 !important;
}
/* Leave room for native number-input spinners as well as the quantity digits. */
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary input.qty {
    width: 80px !important; min-width: 80px !important; max-width: 100%;
    padding: 8px 6px !important; box-sizing: border-box; text-align: center;
    font: 600 14px/1.4 Inter, Arial, Helvetica, sans-serif !important;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary :is(.reset_variations,.product_meta a) {
    color: #8ae8c2 !important;
}
:is(body.code-experience-storefront.woocommerce,body.code-experience-storefront .woocommerce) div.product:is(:has(> .code-apparel-single),.code-apparel-native) > .summary :is(.reset_variations,.product_meta a):hover {
    color: #b4f2d9 !important;
}

/* Native/mapped catalog price text must contrast with the charcoal cards. */
body.code-experience-storefront :is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static,.code-apparel-native) :is(.price,.mpd-products-archive__price),
body.code-experience-storefront :is(li.product,.mpd-products-archive__item):is(:has(.code-apparel-catalog),.code-apparel-static,.code-apparel-native) :is(.price,.mpd-products-archive__price) :is(span,bdi,ins,del) {
    color: #8ae8c2 !important;
}
@media (max-width: 768px) {
    /* The actual Essentials Elementor tree nests several padded toolbar containers. */
    body.code-experience-storefront.term-essentials .elementor .e-con-inner:has(:is(.elementor-widget-mpd-archive-title,.elementor-widget-mpd-result-count,.elementor-widget-mpd-ordering,.elementor-widget-mpd-advanced-filter)) {
        padding-top: 0 !important; padding-bottom: 0 !important;
        row-gap: 12px !important; min-height: 0 !important;
    }
    body.code-experience-storefront.term-essentials .elementor .e-con.e-parent:has(.mpd-products-archive) > .e-con-inner {
        padding-top: 16px !important;
    }
    body.code-experience-storefront.term-essentials :is(.mpd-result-count,.mpd-ordering,.mpd-ordering__form) {
        margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;
        float: none !important;
    }
    body.code-experience-storefront.term-essentials .mpd-result-count { line-height: 1.5 !important; }
    body.code-experience-storefront.term-essentials .mpd-ordering { justify-content: flex-start !important; }
    body.code-experience-storefront.term-essentials :is(.mpd-ordering__select,.mpd-advanced-filter__toggle) { min-height: 44px; }
    body.code-experience-storefront.term-essentials .mpd-archive-title__heading { margin-top: 0 !important; margin-bottom: 12px !important; }
}
