/* ==========================================================================
   GLASS HEADER (FLOATING BAR)
   ========================================================================== */

:root {
    --jei-safe-area-top: env(safe-area-inset-top, 0px);
    --jei-safe-area-right: env(safe-area-inset-right, 0px);
    --jei-safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --jei-safe-area-left: env(safe-area-inset-left, 0px);
    --jei-header-height-desktop: 80px;
    --jei-header-height-mobile: 70px;
    --jei-header-top-gap-desktop: 20px;
    --jei-header-top-gap-mobile: 15px;
    --jei-header-top-offset: var(--jei-header-top-gap-desktop);
    --jei-header-height-current: var(--jei-header-height-desktop);
    --jei-header-frame-bottom: calc(var(--jei-header-top-offset) + var(--jei-header-height-current));
    --jei-mobile-content-offset: calc(var(--jei-header-frame-bottom) + 10px);
}

.site-header {
    position: fixed !important;
    top: var(--jei-header-top-offset) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 95% !important;
    max-width: 1600px !important;
    box-sizing: border-box !important;
    height: var(--jei-header-height-current) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 40px !important;
    border-radius: 50px !important;
}

.site-branding {
    flex: 0 0 auto !important;
}

.site-branding a {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--color-brown) !important;
    text-decoration: none !important;
    font-family: 'Sora', sans-serif !important;
    letter-spacing: 1px !important;
    transition: all 0.5s ease-in-out !important;
    display: inline-block !important;
    /* Ensure transform works correctly */
    will-change: transform, color, text-shadow;
    transform: translateZ(0);
    /* Promote to layer */
}

.site-branding a:hover {
    color: var(--color-teal) !important;
    transform: scale(1.05) !important;
}

.site-branding img,
.custom-logo {
    display: none !important;
}

/* Add icon next to JEIDRIPS title */
.site-branding a::before {
    content: '' !important;
    display: inline-block !important;
    width: 50px !important;
    height: 50px !important;
    /*background-image: url('jeidrips-header-icon.png') !important;*/
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin-right: 12px !important;
    vertical-align: middle !important;
    /* Apply brown color filter to match text */
    filter: brightness(0) saturate(100%) invert(18%) sepia(14%) saturate(769%) hue-rotate(259deg) brightness(95%) contrast(88%) !important;
}

.site-navigation {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    /*justify-content: right !important;*/
    gap: 5px !important;
}

.site-navigation a {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--color-brown) !important;
    padding: 12px 24px !important;
    border-radius: 25px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.site-navigation a:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow:
        0 8px 32px rgba(67, 53, 67, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* Water droplet glass effect - subtle refraction */
.site-navigation a::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 25px !important;
    padding: 1px !important;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
    opacity: 0.6 !important;
    transition: opacity 0.3s ease !important;
}

.site-navigation a:hover::before {
    opacity: 1 !important;
}

.header-links {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.header-links a {
    font-size: 14px !important;
    color: var(--color-brown) !important;
    transition: color 0.3s ease !important;
}

.header-links a:hover {
    color: var(--color-teal) !important;
}

/* Adjusted top padding to clear floating header */
body {
    padding-top: 140px !important;
    padding-bottom: 0 !important;
}

html {
    scroll-behavior: smooth !important;
}

.woocommerce-products-header,
.woocommerce-products-header__title {
    display: none !important;
}

/* ==========================================================================
   LAYOUT & ALIGNMENT
   ========================================================================== */

/* Reset body padding but KEEP top padding for header */
body.woocommerce,
body.post-type-archive-product,
body.tax-product_cat {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 140px !important;
}

/* Mobile/tablet: add overflow-x: hidden (sidebar is slide-in overlay, sticky not needed) */
@media (max-width: 1279px) {

    :root {
        --jei-header-top-offset: calc(var(--jei-safe-area-top) + var(--jei-header-top-gap-desktop));
        --jei-header-height-current: var(--jei-header-height-desktop);
    }

    body {
        padding-bottom: var(--jei-safe-area-bottom) !important;
    }

    body.woocommerce,
    body.post-type-archive-product,
    body.tax-product_cat {
        overflow-x: hidden !important;
        padding-bottom: var(--jei-safe-area-bottom) !important;
    }
}

/* =========================================================================
   FINDS INLINE SIDEBAR SHELL (>= 950px)
   Sidebar stays inline through the 3-product band, then hands off to overlay.
   ========================================================================= */
@media (min-width: 950px) {
    body.post-type-archive-product,
    body.tax-product_cat {
        --jei-finds-sidebar-width: 280px;
        --jei-finds-inline-gap: 32px;
        --jei-finds-shell-gap: 40px;
        --jei-finds-header-gap: 28px;
        --jei-finds-header-inset: calc((var(--jei-finds-sidebar-width) + var(--jei-finds-inline-gap)) * 0.58);
        --jei-finds-lane-width: 1040px;
        --jei-finds-top-shell-width: min(
            calc(100vw - 40px),
            calc(var(--jei-finds-sidebar-width) + var(--jei-finds-inline-gap) + var(--jei-finds-lane-width))
        );
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.post-type-archive-product .container.section-padding,
    body.tax-product_cat .container.section-padding {
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }

    body.post-type-archive-product .site-header,
    body.tax-product_cat .site-header {
        width: var(--jei-finds-top-shell-width) !important;
        max-width: none !important;
    }

    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        width: var(--jei-finds-top-shell-width) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, var(--jei-finds-right-col-width)) !important;
        column-gap: var(--jei-finds-header-gap) !important;
        align-items: start !important;
    }

    body.post-type-archive-product .finds-desktop-promo-shell,
    body.tax-product_cat .finds-desktop-promo-shell,
    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        width: var(--jei-finds-top-shell-width) !important;
        max-width: none !important;
        margin: 0 auto !important;
        margin-top: 0 !important;
        box-sizing: border-box !important;
    }

    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        display: grid !important;
        grid-template-columns: var(--jei-finds-sidebar-width) minmax(0, 1fr) !important;
        column-gap: var(--jei-finds-inline-gap) !important;
        align-items: start !important;
        position: relative !important;
        overflow: visible !important;
        min-height: 1px !important;
    }

    body.post-type-archive-product #shop-sidebar-overlay,
    body.post-type-archive-product .shop-sidebar-overlay,
    body.tax-product_cat #shop-sidebar-overlay,
    body.tax-product_cat .shop-sidebar-overlay {
        display: none !important;
    }

    body.post-type-archive-product .shop-sidebar,
    body.tax-product_cat .shop-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        position: sticky !important;
        top: var(--jei-finds-sticky-top, 120px) !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        align-self: start !important;
        z-index: 90 !important;
        padding: 0 20px 20px !important;
        height: auto !important;
        max-height: var(--jei-finds-sticky-max-height, calc(100vh - 140px)) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin-top: 0 !important;
    }

    body.post-type-archive-product .shop-grid,
    body.tax-product_cat .shop-grid {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

@media (min-width: 950px) and (max-width: 1279px) {
    body.post-type-archive-product,
    body.tax-product_cat {
        --jei-finds-sidebar-width: 248px;
        --jei-finds-inline-gap: 28px;
        --jei-finds-shell-gap: 32px;
        --jei-finds-header-gap: 24px;
        --jei-finds-top-shell-width: min(calc(100vw - 32px), 1500px);
    }
}

button#dark-mode-toggle:focus-visible,
body.post-type-archive-product .woocommerce-product-search button[type="submit"]:focus-visible,
body.tax-product_cat .woocommerce-product-search button[type="submit"]:focus-visible,
body.post-type-archive-product .custom-sort-trigger:focus-visible,
body.tax-product_cat .custom-sort-trigger:focus-visible,
body.post-type-archive-product .currency-switcher-btn:focus-visible,
body.tax-product_cat .currency-switcher-btn:focus-visible {
    outline: none !important;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.92),
        0 0 0 6px rgba(79, 64, 95, 0.35) !important;
}

html.dark-mode button#dark-mode-toggle:focus-visible,
html.dark-mode body.post-type-archive-product .woocommerce-product-search button[type="submit"]:focus-visible,
html.dark-mode body.tax-product_cat .woocommerce-product-search button[type="submit"]:focus-visible,
html.dark-mode body.post-type-archive-product .custom-sort-trigger:focus-visible,
html.dark-mode body.tax-product_cat .custom-sort-trigger:focus-visible,
html.dark-mode body.post-type-archive-product .currency-switcher-btn:focus-visible,
html.dark-mode body.tax-product_cat .currency-switcher-btn:focus-visible {
    box-shadow:
        0 0 0 3px rgba(10, 10, 10, 0.95),
        0 0 0 6px rgba(82, 39, 255, 0.42) !important;
}

@media (min-width: 1550px) {
    body.post-type-archive-product,
    body.tax-product_cat {
        --jei-finds-lane-width: 1400px;
        --jei-finds-shell-gap: 38px;
    }
}

/* Category Navigation - Centered */
.category-navigation {
    width: 100% !important;
    max-width: 1800px !important;
    margin: 0 auto 10px auto !important;
    padding-left: 0 !important;
}

body.post-type-archive-product,
body.tax-product_cat {
    --jei-finds-control-bg: rgba(255, 255, 255, 0.78);
    --jei-finds-control-border: rgba(79, 64, 95, 0.18);
    --jei-finds-control-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    --jei-finds-control-text: var(--color-brown);
    --jei-finds-control-hover-border: #fec5e5;
    --jei-finds-right-col-width: clamp(212px, 48vw, 240px);
    --jei-finds-right-col-width-compact: clamp(158px, 49vw, 188px);
    --jei-finds-row-currency-width: 84px;
    --jei-finds-row-currency-width-compact: 72px;
}

body.post-type-archive-product .jei-category-picker,
body.tax-product_cat .jei-category-picker {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
}

body.post-type-archive-product .jei-category-picker__shell,
body.tax-product_cat .jei-category-picker__shell {
    display: inline-flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: fit-content !important;
    max-width: 100% !important;
    padding: 8px !important;
    border-radius: 28px !important;
    background: var(--jei-finds-control-bg) !important;
    border: 1px solid var(--jei-finds-control-border) !important;
    box-shadow: var(--jei-finds-control-shadow) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    overflow: visible !important;
}

body.post-type-archive-product .jei-category-picker__shell.is-expanded,
body.tax-product_cat .jei-category-picker__shell.is-expanded {
    gap: 10px !important;
    border-radius: 28px !important;
}

body.post-type-archive-product .jei-category-picker__children-slot,
body.tax-product_cat .jei-category-picker__children-slot {
    position: relative !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(79, 64, 95, 0.12) !important;
    animation: jei-category-picker-expand 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.post-type-archive-product .jei-category-picker__rail-wrap,
body.tax-product_cat .jei-category-picker__rail-wrap {
    position: relative !important;
    padding: 3px !important;
    border-radius: 999px !important;
    width: fit-content !important;
    max-width: 100% !important;
    overflow: visible !important;
}

body.post-type-archive-product .jei-category-picker__rail,
body.tax-product_cat .jei-category-picker__rail {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: relative !important;
    isolation: isolate !important;
    width: fit-content !important;
    max-width: 100% !important;
    --jei-pill-highlight-bg: var(--color-brown);
    --jei-pill-highlight-border: var(--color-brown);
    --jei-pill-highlight-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.post-type-archive-product .jei-category-picker__rail::before,
body.tax-product_cat .jei-category-picker__rail::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-radius: 999px;
    background: var(--jei-pill-highlight-bg);
    border: 1px solid var(--jei-pill-highlight-border);
    box-shadow: var(--jei-pill-highlight-shadow);
    opacity: 0;
    transform: translate3d(var(--jei-pill-highlight-x, 0px), var(--jei-pill-highlight-y, 0px), 0);
    transition:
        transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
        width 240ms cubic-bezier(0.22, 1, 0.36, 1),
        height 240ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 160ms ease;
    pointer-events: none;
    z-index: 0;
}

body.post-type-archive-product .jei-category-picker__rail.has-pill-highlight::before,
body.tax-product_cat .jei-category-picker__rail.has-pill-highlight::before {
    width: var(--jei-pill-highlight-width, 0px);
    height: var(--jei-pill-highlight-height, 0px);
    opacity: 1;
}

body.post-type-archive-product .jei-category-picker__rail > li,
body.tax-product_cat .jei-category-picker__rail > li {
    margin: 0 !important;
}

body.post-type-archive-product .all-cat-item,
body.tax-product_cat .all-cat-item {
    position: relative !important;
    margin-right: 12px !important;
    padding-right: 16px !important;
    border-right: 0 !important;
}

body.post-type-archive-product .all-cat-item::after,
body.tax-product_cat .all-cat-item::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    right: 0 !important;
    width: 1px !important;
    height: 26px !important;
    background: var(--jei-finds-control-border) !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
}

body.post-type-archive-product .accessories-cat-item,
body.tax-product_cat .accessories-cat-item {
    margin-right: 0 !important;
    padding-right: 0 !important;
    border-right: 0 !important;
}

body.post-type-archive-product .cat-pill,
body.tax-product_cat .cat-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 0 20px !important;
    margin: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--jei-finds-control-text) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 1 !important;
    transition: color 160ms ease !important;
}

body.post-type-archive-product .jei-category-picker__rail--children .cat-pill,
body.tax-product_cat .jei-category-picker__rail--children .cat-pill {
    min-height: 36px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

body.post-type-archive-product .jei-category-picker__rail.has-pill-animation .cat-pill.active,
body.post-type-archive-product .jei-category-picker__rail.has-pill-animation .cat-pill:hover,
body.post-type-archive-product .jei-category-picker__rail.has-pill-animation .cat-pill:focus-visible,
body.post-type-archive-product .jei-category-picker__rail.has-pill-animation a.cat-pill.active,
body.post-type-archive-product .jei-category-picker__rail.has-pill-animation a.cat-pill:hover,
body.post-type-archive-product .jei-category-picker__rail.has-pill-animation a.cat-pill:focus-visible,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation .cat-pill.active,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation .cat-pill:hover,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation .cat-pill:focus-visible,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation a.cat-pill.active,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation a.cat-pill:hover,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation a.cat-pill:focus-visible {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body.post-type-archive-product .jei-category-picker__rail.has-pill-animation .cat-pill.is-highlight-target,
body.post-type-archive-product .jei-category-picker__rail.has-pill-animation a.cat-pill.is-highlight-target,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation .cat-pill.is-highlight-target,
body.tax-product_cat .jei-category-picker__rail.has-pill-animation a.cat-pill.is-highlight-target {
    color: #ffffff !important;
}

html:not(.dark-mode) body.post-type-archive-product .jei-category-picker__rail.has-pill-animation .cat-pill.active:not(.is-highlight-target),
html:not(.dark-mode) body.post-type-archive-product .jei-category-picker__rail.has-pill-animation a.cat-pill.active:not(.is-highlight-target),
html:not(.dark-mode) body.tax-product_cat .jei-category-picker__rail.has-pill-animation .cat-pill.active:not(.is-highlight-target),
html:not(.dark-mode) body.tax-product_cat .jei-category-picker__rail.has-pill-animation a.cat-pill.active:not(.is-highlight-target) {
    color: var(--jei-finds-control-text) !important;
}

@keyframes jei-category-picker-expand {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.post-type-archive-product .jei-category-picker__rail::before,
    body.tax-product_cat .jei-category-picker__rail::before {
        transition: opacity 120ms ease !important;
    }

    body.post-type-archive-product .jei-category-picker__children-slot,
    body.tax-product_cat .jei-category-picker__children-slot {
        animation: none !important;
    }
}

/* Header Right Column - fluid width across Finds breakpoints */
body.post-type-archive-product .header-right-column,
body.tax-product_cat .header-right-column {
    flex: 0 1 var(--jei-finds-right-col-width) !important;
    width: min(100%, var(--jei-finds-right-col-width)) !important;
    max-width: min(100%, var(--jei-finds-right-col-width)) !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
}

body.post-type-archive-product .finds-mobile-action-bar,
body.tax-product_cat .finds-mobile-action-bar {
    display: none !important;
}

/* Search Bar - fluid width to match dropdowns */
body.post-type-archive-product .shop-search,
body.tax-product_cat .shop-search {
    width: min(100%, var(--jei-finds-right-col-width)) !important;
    max-width: min(100%, var(--jei-finds-right-col-width)) !important;
    margin-left: 0 !important;
}

body.post-type-archive-product .woocommerce-product-search,
body.tax-product_cat .woocommerce-product-search {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border: 1px solid var(--color-tan-medium) !important;
    border-radius: 50px !important;
    padding: 5px 5px 5px 12px !important;
    width: min(100%, var(--jei-finds-right-col-width)) !important;
    max-width: min(100%, var(--jei-finds-right-col-width)) !important;
    margin: 0 !important;
    transition: border-color 0.3s ease !important;
}

body.post-type-archive-product .woocommerce-product-search,
body.tax-product_cat .woocommerce-product-search {
    background: var(--jei-finds-control-bg) !important;
    border-color: var(--jei-finds-control-border) !important;
    box-shadow: var(--jei-finds-control-shadow) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
}

.woocommerce-product-search:hover,
.woocommerce-product-search:focus-within {
    border-color: #fec5e5 !important;
}

body.post-type-archive-product .woocommerce-product-search:hover,
body.post-type-archive-product .woocommerce-product-search:focus-within,
body.tax-product_cat .woocommerce-product-search:hover,
body.tax-product_cat .woocommerce-product-search:focus-within {
    border-color: var(--jei-finds-control-hover-border) !important;
}

html:not(.dark-mode) body.post-type-archive-product .woocommerce-product-search:hover,
html:not(.dark-mode) body.post-type-archive-product .woocommerce-product-search:focus-within,
html:not(.dark-mode) body.tax-product_cat .woocommerce-product-search:hover,
html:not(.dark-mode) body.tax-product_cat .woocommerce-product-search:focus-within {
    border-color: var(--jei-finds-control-border) !important;
}

/* Dark mode search bar hover border */
html.dark-mode .woocommerce-product-search:hover,
html.dark-mode .woocommerce-product-search:focus-within {
    border-color: #5227ff !important;
}

.woocommerce-product-search label {
    display: none !important;
}

.woocommerce-product-search input[type="search"] {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 14px !important;
    width: 100% !important;
    outline: none !important;
    color: var(--color-brown) !important;
}

body.post-type-archive-product .woocommerce-product-search input[type="search"],
body.tax-product_cat .woocommerce-product-search input[type="search"] {
    color: var(--jei-finds-control-text) !important;
}

/* Style the clear/X button in search input */
.woocommerce-product-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23584943' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
    cursor: pointer;
}

/* Dark mode clear button - white */
html.dark-mode .woocommerce-product-search input[type="search"]::-webkit-search-cancel-button {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
}

.woocommerce-product-search button[type="submit"] {
    background: var(--color-brown) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") center/18px no-repeat !important;
    color: transparent !important;
    border: none !important;
    border-radius: 50px !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    font-size: 0 !important;
    cursor: pointer !important;
    transition: all 0.5s ease-in-out !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html.dark-mode .woocommerce-product-search button[type="submit"] {
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f0f12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") center/18px no-repeat !important;
}

.woocommerce-product-search button[type="submit"]:hover,
.woocommerce-product-search button[type="submit"]:active {
    background: #fec5e5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23584943' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") center/18px no-repeat !important;
    color: transparent !important;
}

html:not(.dark-mode) .woocommerce-product-search button[type="submit"]:hover,
html:not(.dark-mode) .woocommerce-product-search button[type="submit"]:active,
html:not(.dark-mode) .woocommerce-product-search button[type="submit"]:focus-visible {
    background: var(--color-brown) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") center/18px no-repeat !important;
    color: transparent !important;
}

/* Dark mode search button hover/active */
html.dark-mode .woocommerce-product-search button[type="submit"]:hover,
html.dark-mode .woocommerce-product-search button[type="submit"]:active {
    background: #5227ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") center/18px no-repeat !important;
    color: transparent !important;
}

/* Dropdowns Row - Currency + Sorting shares the same fluid width as search */
body.post-type-archive-product .dropdowns-row,
body.tax-product_cat .dropdowns-row {
    width: min(100%, var(--jei-finds-right-col-width)) !important;
    max-width: min(100%, var(--jei-finds-right-col-width)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, var(--jei-finds-row-currency-width)) minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 6px !important;
    justify-content: stretch !important;
}

/* Sorting Container */
.custom-sorting-container {
    flex: 0 0 auto !important;
    display: flex !important;
    justify-content: flex-start !important;
    margin-bottom: 0 !important;
}

/* Currency Switcher */
.currency-switcher {
    flex: 0 0 auto !important;
}

body.post-type-archive-product .currency-switcher,
body.post-type-archive-product .custom-sorting-container,
body.post-type-archive-product .custom-sort-dropdown,
body.post-type-archive-product .wpc-sorting-form,
body.tax-product_cat .currency-switcher,
body.tax-product_cat .custom-sorting-container,
body.tax-product_cat .custom-sort-dropdown,
body.tax-product_cat .wpc-sorting-form {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

body.post-type-archive-product .currency-switcher-btn,
body.post-type-archive-product .custom-sort-trigger,
body.tax-product_cat .currency-switcher-btn,
body.tax-product_cat .custom-sort-trigger {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Dividing line - Centered */
hr {
    width: 95% !important;
    max-width: 1800px !important;
    box-sizing: border-box !important;
    margin: 5px auto 20px auto !important;
    /* Center it */
    border: 0 !important;
    border-top: 1px solid #eee !important;
}

/* Finds desktop shell alignment */
@media (min-width: 1280px) {
    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        padding-bottom: 10px !important;
        padding-left: var(--jei-finds-header-inset) !important;
        padding-right: var(--jei-finds-header-inset) !important;
        border-bottom: 1px solid rgba(67, 53, 67, 0.18) !important;
    }

    body.post-type-archive-product .category-navigation,
    body.tax-product_cat .category-navigation {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        align-self: start !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        justify-self: end !important;
        align-self: start !important;
    }

    html.dark-mode body.post-type-archive-product .shop-header,
    html.dark-mode body.tax-product_cat .shop-header {
        border-bottom-color: rgba(255, 255, 255, 0.22) !important;
    }

    body.post-type-archive-product .finds-desktop-promo-shell,
    body.tax-product_cat .finds-desktop-promo-shell {
        display: block !important;
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.post-type-archive-product .finds-desktop-promo-shell .finds-promo-container,
    body.tax-product_cat .finds-desktop-promo-shell .finds-promo-container {
        width: 100% !important;
        margin: 0 !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
    }

    body.post-type-archive-product .finds-mobile-promo,
    body.tax-product_cat .finds-mobile-promo {
        display: none !important;
    }
}

/* ==========================================================================
   PRODUCT GRID - DESKTOP ONLY
   ========================================================================== */

/* DESKTOP: 4 columns with sidebar (1280px - 1549px) */
@media (min-width: 1280px) and (max-width: 1549px) {

    /* Grid - Fills the flex item */
    body.woocommerce ul.products,
    body.woocommerce-page ul.products,
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 25px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-top: 0 !important;
    }
}

/* DESKTOP: 5 columns with sidebar (>= 1550px) */
@media (min-width: 1550px) {

    /* Grid - Fills the flex item */
    body.woocommerce ul.products,
    body.woocommerce-page ul.products,
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 25px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-top: 0 !important;
    }
}

/* Product Box Styling */
body.woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    padding: 15px !important;
    min-height: 350px !important;
    width: 100% !important;
    /* Reverted text alignment to left */
    text-align: left !important;
    align-items: flex-start !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.post-type-archive-product .shop-grid,
body.tax-product_cat .shop-grid,
body.post-type-archive-product .shop-grid ul.products,
body.tax-product_cat .shop-grid ul.products {
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.woocommerce ul.products li.product img,
body.woocommerce-page ul.products li.product img,
body.post-type-archive-product ul.products li.product img,
body.tax-product_cat ul.products li.product img {
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    background: transparent !important;
    margin-bottom: 10px !important;
    /* Removed width: 100% to prevent shrinking */
}

/* Product title - fixed 3-line height for uniform cards */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 5px 0 2px !important;
    width: 100% !important;
    /* 3-line clamp with ellipsis */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    /* Fixed height: 15px * 1.3 * 3 lines = ~59px */
    height: 59px !important;
}

/* Price */
.woocommerce ul.products li.product .price {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 2px 0 5px !important;
    color: var(--color-brown) !important;
    width: 100% !important;
}

/* Center Price if Desc is Empty (JS adds class) */
.woocommerce ul.products li.product.has-empty-desc .price {
    margin: auto 0 15px !important;
}

.woocommerce ul.products li.product.has-empty-desc .button {
    margin-top: 0 !important;
}

/* Short description - fixed 2-line height for uniform cards */
.woocommerce ul.products li.product .woocommerce-product-details__short-description,
.woocommerce ul.products li.product p {
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #777 !important;
    margin: 0 0 5px !important;
    width: 100% !important;
    /* 2-line clamp with ellipsis */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    /* Fixed height: 12px * 1.3 * 2 lines = ~31px */
    height: 31px !important;
}

/* Collapse description when empty */
.woocommerce ul.products li.product .woocommerce-product-details__short-description:empty,
.woocommerce ul.products li.product p:empty {
    height: 0 !important;
    margin: 0 !important;
}



/* Button - Fatter, Centered, Big Animation */
.woocommerce ul.products li.product .button {
    margin-top: auto !important;
    background-color: var(--color-brown) !important;
    padding: 15px 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #ffffff !important;
    /* Ensure text is white */
    text-decoration: none !important;
    /* Remove underline */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    border-radius: 30px !important;
    /* Big expansion */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;

    /* Fluid spring/bounce transition */
    transform: scale(1) !important;
    will-change: transform, background-color !important;
    backface-visibility: hidden !important;
    -webkit-font-smoothing: subpixel-antialiased !important;
    background-image: none !important;
    /* Ensure no gradient */
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s ease, background-color 0.3s ease !important;
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--color-teal) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 10px 25px rgba(255, 40, 64, 0.4) !important;
    color: white !important;
    background-image: none !important;
    animation: none !important;
    /* Fix: Disable style.css 'pop' animation to allow smooth transition */
}

/* Shared KakoBuy loop button styling for finds and homepage carousel */
:is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button) {
    --jei-kakobuy-label-color: var(--color-brown, #584943);
    --jei-kakobuy-brand-color: #ff2840;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    max-height: 44px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.16) !important;
    color: var(--color-brown, #584943) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 10px 24px rgba(79, 64, 95, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
    transform: scale(1) !important;
    will-change: transform, box-shadow, background-color, color !important;
    backface-visibility: hidden !important;
    -webkit-font-smoothing: subpixel-antialiased !important;
    transition:
        transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.6s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease !important;
}

html:not(.dark-mode) :is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button):not(:hover):not(:focus-visible):not(:active) {
    border-color: var(--color-brown, #584943) !important;
}

:is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button)::before {
    content: "" !important;
    position: absolute !important;
    inset: -1px !important;
    border-radius: inherit !important;
    padding: 1px !important;
    background: linear-gradient(120deg,
        rgba(255, 255, 255, 0.76) 0%,
        rgba(255, 255, 255, 0.18) 18%,
        rgba(168, 151, 133, 0.34) 36%,
        rgba(255, 40, 64, 0.24) 54%,
        rgba(255, 255, 255, 0.12) 72%,
        rgba(255, 255, 255, 0.64) 100%) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    mask-composite: exclude !important;
    opacity: 0.9 !important;
    pointer-events: none !important;
}

.jei-finds-kakobuy-button .jei-finds-kakobuy-button__label,
.jei-finds-kakobuy-button .jei-finds-kakobuy-button__brand {
    position: relative !important;
    z-index: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    transition: color 0.3s ease !important;
}

.jei-finds-kakobuy-button .jei-finds-kakobuy-button__label {
    color: var(--jei-kakobuy-label-color) !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.jei-finds-kakobuy-button .jei-finds-kakobuy-button__brand {
    gap: 0 !important;
    font-weight: 700 !important;
    color: var(--jei-kakobuy-brand-color) !important;
    display: inline-flex !important;
    align-items: center !important;
    transform: translateY(1px) !important; /* Calculated from SVG viewBox: text center is ~1px above box center */
}

.jei-finds-kakobuy-button .jei-finds-kakobuy-button__brand svg {
    width: 72px !important;
    height: auto !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    fill: currentColor !important;
    transition: color 0.3s ease !important;
    display: block !important;
}

.jei-finds-kakobuy-button .jei-finds-kakobuy-button__brand-name {
    color: inherit !important;
    font-family: var(--font-main, inherit) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.header-link-kakobuy {
    color: #ff2840 !important;
}

.header-link-kakobuy .header-link-logo-text {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 70px !important;
    height: 18px !important;
    flex: 0 0 70px !important;
    color: currentColor !important;
}

.header-link-kakobuy .header-link-logo-text svg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    fill: currentColor !important;
}

/* Match Discord label text to KakoBuy SVG effective text size (~13px) */
.header-link-discord .header-link-label {
    font-size: 13px !important;
}

.header-links a::after,
.header-links a[href*="kakobuy"]::after,
.header-links a[href*="discord"]::after,
html.dark-mode .header-links a[href*="kakobuy"]::after,
html.dark-mode .header-links a[href*="discord"]::after {
    background: currentColor !important;
    background-image: none !important;
    -webkit-mask: url('/images/site/home/p/arrow-right.png') center / contain no-repeat !important;
    mask: url('/images/site/home/p/arrow-right.png') center / contain no-repeat !important;
    filter: none !important;
}

:is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button):is(:hover, :focus-visible, :active) {
    --jei-kakobuy-label-color: #ffffff;
    --jei-kakobuy-brand-color: #ffffff;
    background: #ff2840 !important;
    border-color: rgba(255, 40, 64, 0.92) !important;
    color: #ffffff !important;
    transform: scale(1.1) !important;
    box-shadow: 0 10px 25px rgba(255, 40, 64, 0.4) !important;
    background-image: none !important;
    animation: none !important;
}

.jei-finds-kakobuy-button:hover .jei-finds-kakobuy-button__brand,
.jei-finds-kakobuy-button:focus-visible .jei-finds-kakobuy-button__brand,
.jei-finds-kakobuy-button:active .jei-finds-kakobuy-button__brand {
    color: var(--jei-kakobuy-brand-color) !important;
}

html.dark-mode :is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button) {
    --jei-kakobuy-label-color: #ffffff;
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

html.dark-mode :is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button)::before {
    background: linear-gradient(120deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.08) 18%,
        rgba(168, 151, 133, 0.18) 36%,
        rgba(255, 40, 64, 0.24) 54%,
        rgba(255, 255, 255, 0.04) 72%,
        rgba(255, 255, 255, 0.3) 100%) !important;
}

html.dark-mode :is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button):is(:hover, :focus-visible, :active) {
    background: #ff2840 !important;
    border-color: rgba(255, 40, 64, 0.92) !important;
    color: #ffffff !important;
}



/* JeiDrips logo hover - tan with glow (light mode) */
.site-branding a:hover {
    color: var(--color-tan-dark) !important;
    transform: scale(1.05) !important;
    /* Softened glow as requested */
    text-shadow: 0 0 15px rgba(90, 73, 88, 0.4), 0 0 20px rgba(90, 73, 88, 0.2) !important;
}

/* ==========================================================================
   HEADER RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* iPad Landscape (1024-1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .site-header {
        width: 96% !important;
        max-width: none !important;
        padding: 0 30px !important;
    }
}

/* 1080p/1440p: Keep default floating header style */

/* iPad Portrait (768-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --jei-header-height-current: var(--jei-header-height-mobile);
    }

    .site-header {
        width: 97% !important;
        max-width: none !important;
        padding: 0 20px !important;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    :root {
        --jei-header-top-offset: calc(var(--jei-safe-area-top) + var(--jei-header-top-gap-mobile));
        --jei-header-height-current: var(--jei-header-height-mobile);
        --jei-mobile-content-offset: calc(var(--jei-header-frame-bottom) + 4px);
    }

    body {
        padding-top: var(--jei-mobile-content-offset) !important;
    }

    .site-header {
        width: 98% !important;
        max-width: none !important;
        padding: 0 15px !important;
        border-radius: 35px !important;
    }

    /* Mobile product text - fixed heights for uniform cards */
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
        /* Fixed height: 14px * 1.3 * 3 lines = ~55px */
        height: 55px !important;
    }

    .woocommerce ul.products li.product .woocommerce-product-details__short-description,
    .woocommerce ul.products li.product p {
        font-size: 11px !important;
        /* Fixed height: 11px * 1.3 * 2 lines = ~29px */
        height: 29px !important;
    }
}

/* ==========================================================================
   FINDS RESPONSIVE BREAKPOINT CONTRACT
   Compact mobile: <=479 | Mobile: 480-767 | Compact tablet: 768-949
   Early desktop: 950-1023 | Tablet landscape: 1024-1279 | Desktop: >=1280
   ========================================================================== */

@media (max-width: 767px) {
    body.post-type-archive-product .category-navigation,
    body.tax-product_cat .category-navigation {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    body.post-type-archive-product,
    body.tax-product_cat {
        --jei-finds-right-col-width: 248px;
    }

    body.post-type-archive-product .category-navigation,
    body.tax-product_cat .category-navigation {
        display: block !important;
        width: auto !important;
        max-width: min(100%, calc(100% - var(--jei-finds-right-col-width) - var(--jei-finds-header-gap))) !important;
        min-width: 0 !important;
        margin: 0 !important;
        align-self: start !important;
    }

    body.post-type-archive-product .jei-category-picker__shell,
    body.tax-product_cat .jei-category-picker__shell {
        padding: 8px 10px !important;
    }

    body.post-type-archive-product .jei-category-picker__rail-wrap,
    body.tax-product_cat .jei-category-picker__rail-wrap {
        max-width: 100% !important;
        padding: 2px 0 !important;
        overflow: visible !important;
    }

    body.post-type-archive-product .jei-category-picker__rail,
    body.tax-product_cat .jei-category-picker__rail {
        gap: 4px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scrollbar-width: none !important;
        padding: 1px 0 !important;
    }

    body.post-type-archive-product .jei-category-picker__rail::-webkit-scrollbar,
    body.tax-product_cat .jei-category-picker__rail::-webkit-scrollbar {
        display: none !important;
    }

    body.post-type-archive-product .cat-pill,
    body.tax-product_cat .cat-pill {
        min-height: 40px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
    }

    body.post-type-archive-product .all-cat-item,
    body.tax-product_cat .all-cat-item {
        margin-right: 12px !important;
        padding-right: 14px !important;
    }

    body.post-type-archive-product .all-cat-item::after,
    body.tax-product_cat .all-cat-item::after {
        height: 22px !important;
    }
}

@media (min-width: 1280px) {
    body.post-type-archive-product,
    body.tax-product_cat {
        --jei-finds-right-col-width: clamp(248px, 21vw, 300px);
    }
}

@media (max-width: 767px) {
    body.post-type-archive-product,
    body.tax-product_cat {
        --jei-finds-right-col-width: clamp(240px, 62vw, 308px);
        --jei-finds-mobile-utility-width: clamp(132px, 39vw, 156px);
    }

    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        width: 100% !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: -12px !important;
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
        gap: 0 !important;
    }

    body.post-type-archive-product .utility-buttons-mobile,
    body.tax-product_cat .utility-buttons-mobile {
        display: none !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        align-self: start !important;
        justify-self: auto !important;
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        align-items: flex-start !important;
    }

    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        margin-top: 8px !important;
    }

    body.post-type-archive-product .finds-desktop-promo-shell,
    body.tax-product_cat .finds-desktop-promo-shell,
    body.post-type-archive-product .finds-mobile-promo,
    body.tax-product_cat .finds-mobile-promo {
        display: none !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions,
    body.tax-product_cat .finds-sidebar-mobile-actions {
        display: block !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar,
    body.tax-product_cat .finds-mobile-action-bar {
        display: block !important;
        margin: 0 0 8px 0 !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar__inner,
    body.tax-product_cat .finds-mobile-action-bar__inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        align-items: stretch !important;
        gap: 0 !important;
        border: 1px solid var(--jei-finds-control-border) !important;
        border-radius: 14px !important;
        background: var(--jei-finds-control-bg) !important;
        box-shadow: var(--jei-finds-control-shadow) !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
        overflow: hidden !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar__item,
    body.post-type-archive-product .finds-mobile-action-bar__item:visited,
    body.tax-product_cat .finds-mobile-action-bar__item,
    body.tax-product_cat .finds-mobile-action-bar__item:visited {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        min-width: 0 !important;
        min-height: 38px !important;
        padding: 8px 12px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: var(--jei-finds-control-text) !important;
        text-decoration: none !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        cursor: pointer !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar__item + .finds-mobile-action-bar__item,
    body.tax-product_cat .finds-mobile-action-bar__item + .finds-mobile-action-bar__item {
        border-left: 1px solid var(--jei-finds-control-border) !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar__text,
    body.tax-product_cat .finds-mobile-action-bar__text {
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar__item .pill-icon,
    body.tax-product_cat .finds-mobile-action-bar__item .pill-icon {
        width: 13px !important;
        height: 13px !important;
        margin-left: 0 !important;
        flex-shrink: 0 !important;
    }

    html.dark-mode body.post-type-archive-product .finds-mobile-action-bar__item .pill-icon,
    html.dark-mode body.tax-product_cat .finds-mobile-action-bar__item .pill-icon {
        filter: brightness(0) invert(1) !important;
        opacity: 0.96 !important;
    }

    body.post-type-archive-product .utility-buttons-mobile .btn-text-full,
    body.tax-product_cat .utility-buttons-mobile .btn-text-full {
        display: none !important;
    }

    body.post-type-archive-product .utility-buttons-mobile .btn-text-short,
    body.tax-product_cat .utility-buttons-mobile .btn-text-short {
        display: inline !important;
    }
}

@media (max-width: 479px) {
    body.post-type-archive-product,
    body.tax-product_cat {
        --jei-finds-right-col-width: clamp(220px, 66vw, 286px);
        --jei-finds-mobile-utility-width: clamp(120px, 38vw, 142px);
    }

    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        margin-top: -14px !important;
        margin-bottom: 6px !important;
        padding-bottom: 4px !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        gap: 5px !important;
    }

    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        margin-top: 6px !important;
    }

    body.post-type-archive-product .dropdowns-row,
    body.tax-product_cat .dropdowns-row {
        gap: 6px !important;
        grid-template-columns: minmax(0, var(--jei-finds-row-currency-width-compact)) minmax(0, 1fr) 42px !important;
        justify-content: stretch !important;
        width: 100% !important;
        max-width: none !important;
        align-items: stretch !important;
    }

    body.post-type-archive-product .currency-switcher,
    body.post-type-archive-product .custom-sorting-container,
    body.post-type-archive-product .custom-sort-dropdown,
    body.post-type-archive-product .wpc-sorting-form,
    body.tax-product_cat .currency-switcher,
    body.tax-product_cat .custom-sorting-container,
    body.tax-product_cat .custom-sort-dropdown,
    body.tax-product_cat .wpc-sorting-form {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body.post-type-archive-product .currency-switcher-btn,
    body.post-type-archive-product .custom-sort-trigger,
    body.tax-product_cat .currency-switcher-btn,
    body.tax-product_cat .custom-sort-trigger {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;
        font-size: 13px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.post-type-archive-product .woocommerce-product-search,
    body.tax-product_cat .woocommerce-product-search {
        padding: 4px 4px 4px 10px !important;
    }

    body.post-type-archive-product .woocommerce-product-search input[type="search"],
    body.tax-product_cat .woocommerce-product-search input[type="search"] {
        font-size: 13px !important;
    }

    body.post-type-archive-product .utility-buttons-mobile .glass-pill,
    body.post-type-archive-product .utility-buttons-mobile .utility-link-mobile,
    body.tax-product_cat .utility-buttons-mobile .glass-pill,
    body.tax-product_cat .utility-buttons-mobile .utility-link-mobile {
        padding: 6px 7px !important;
        font-size: 12px !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar,
    body.tax-product_cat .finds-mobile-action-bar {
        margin-bottom: 6px !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar__item,
    body.post-type-archive-product .finds-mobile-action-bar__item:visited,
    body.tax-product_cat .finds-mobile-action-bar__item,
    body.tax-product_cat .finds-mobile-action-bar__item:visited {
        min-height: 36px !important;
        padding: 7px 10px !important;
        font-size: 12px !important;
        gap: 6px !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar__item .pill-icon,
    body.tax-product_cat .finds-mobile-action-bar__item .pill-icon {
        width: 12px !important;
        height: 12px !important;
    }

    html.dark-mode body.post-type-archive-product .finds-mobile-action-bar__item .pill-icon,
    html.dark-mode body.tax-product_cat .finds-mobile-action-bar__item .pill-icon {
        filter: brightness(0) invert(1) !important;
        opacity: 0.96 !important;
    }
}

@media (max-width: 949px) {
    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        align-items: flex-start !important;
        justify-self: start !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    body.post-type-archive-product .shop-search,
    body.tax-product_cat .shop-search,
    body.post-type-archive-product .dropdowns-row,
    body.tax-product_cat .dropdowns-row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        align-self: flex-start !important;
        justify-self: flex-start !important;
    }

    body.post-type-archive-product .dropdowns-row > *,
    body.tax-product_cat .dropdowns-row > * {
        min-width: 0 !important;
    }

    body.post-type-archive-product .currency-switcher,
    body.post-type-archive-product .custom-sorting-container,
    body.post-type-archive-product .custom-sort-dropdown,
    body.post-type-archive-product .wpc-sorting-form,
    body.tax-product_cat .currency-switcher,
    body.tax-product_cat .custom-sorting-container,
    body.tax-product_cat .custom-sort-dropdown,
    body.tax-product_cat .wpc-sorting-form {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body.post-type-archive-product .dropdowns-row,
    body.tax-product_cat .dropdowns-row {
        width: 100% !important;
        max-width: none !important;
        grid-template-columns: minmax(0, var(--jei-finds-row-currency-width)) minmax(0, 1fr) 44px !important;
        justify-content: stretch !important;
        align-items: center !important;
        gap: 8px !important;
    }

    body.post-type-archive-product .currency-switcher,
    body.tax-product_cat .currency-switcher {
        width: var(--jei-finds-row-currency-width) !important;
    }

    body.post-type-archive-product .currency-switcher-btn,
    body.post-type-archive-product .custom-sort-trigger,
    body.tax-product_cat .currency-switcher-btn,
    body.tax-product_cat .custom-sort-trigger {
        min-width: 0 !important;
        width: 100% !important;
        min-height: 44px !important;
        font-size: 14px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions,
    body.tax-product_cat .finds-sidebar-mobile-actions {
        display: block !important;
        margin: 16px 0 0 !important;
        text-align: center !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions__stack,
    body.tax-product_cat .finds-sidebar-mobile-actions__stack {
        display: grid !important;
        gap: 8px !important;
        justify-items: center !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions .glass-pill,
    body.tax-product_cat .finds-sidebar-mobile-actions .glass-pill {
        width: min(100%, 340px) !important;
        max-width: min(100%, 340px) !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions .btn-text-full,
    body.tax-product_cat .finds-sidebar-mobile-actions .btn-text-full {
        display: inline !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions .btn-text-short,
    body.tax-product_cat .finds-sidebar-mobile-actions .btn-text-short {
        display: none !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions button .btn-text-short,
    body.post-type-archive-product .finds-sidebar-mobile-actions a .btn-text-short,
    body.tax-product_cat .finds-sidebar-mobile-actions button .btn-text-short,
    body.tax-product_cat .finds-sidebar-mobile-actions a .btn-text-short {
        display: none !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions .pill-icon,
    body.tax-product_cat .finds-sidebar-mobile-actions .pill-icon {
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions__code,
    body.tax-product_cat .finds-sidebar-mobile-actions__code {
        display: block !important;
        text-align: left !important;
        white-space: normal !important;
        line-height: 1.35 !important;
        padding: 10px 14px !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions__code .glowing-text,
    body.tax-product_cat .finds-sidebar-mobile-actions__code .glowing-text {
        display: inline !important;
        margin: 0 2px !important;
    }
}

@media (max-width: 479px) {
    body.post-type-archive-product .dropdowns-row,
    body.tax-product_cat .dropdowns-row {
        grid-template-columns: minmax(0, var(--jei-finds-row-currency-width-compact)) minmax(0, 1fr) !important;
    }

    body.post-type-archive-product .currency-switcher,
    body.tax-product_cat .currency-switcher {
        width: var(--jei-finds-row-currency-width-compact) !important;
    }
}

@media (min-width: 768px) and (max-width: 949px) {
    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header,
    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        width: 100% !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, var(--jei-finds-right-col-width)) !important;
        column-gap: var(--jei-finds-header-gap) !important;
        align-items: flex-start !important;
        gap: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.post-type-archive-product .category-navigation,
    body.tax-product_cat .category-navigation {
        justify-self: start !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        justify-self: end !important;
        align-self: flex-start !important;
        margin-left: 0 !important;
    }

    body.post-type-archive-product .utility-buttons-mobile,
    body.tax-product_cat .utility-buttons-mobile,
    body.post-type-archive-product .finds-sidebar-mobile-actions,
    body.tax-product_cat .finds-sidebar-mobile-actions,
    body.post-type-archive-product .finds-mobile-promo,
    body.tax-product_cat .finds-mobile-promo {
        display: none !important;
    }

    body.post-type-archive-product .finds-desktop-promo-shell,
    body.tax-product_cat .finds-desktop-promo-shell {
        display: block !important;
    }
}

@media (min-width: 768px) {
    body.post-type-archive-product .shop-header > .utility-buttons-mobile,
    body.tax-product_cat .shop-header > .utility-buttons-mobile,
    body.post-type-archive-product .finds-sidebar-mobile-actions,
    body.tax-product_cat .finds-sidebar-mobile-actions {
        display: none !important;
    }

    body.post-type-archive-product .btn-text-short,
    body.tax-product_cat .btn-text-short {
        display: none !important;
    }
}

@media (min-width: 950px) and (max-width: 1279px) {
    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header,
    body.post-type-archive-product .finds-desktop-promo-shell,
    body.tax-product_cat .finds-desktop-promo-shell,
    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        width: var(--jei-finds-top-shell-width) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, var(--jei-finds-right-col-width)) !important;
        column-gap: var(--jei-finds-header-gap) !important;
        align-items: start !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid rgba(67, 53, 67, 0.18) !important;
    }

    html.dark-mode body.post-type-archive-product .shop-header,
    html.dark-mode body.tax-product_cat .shop-header {
        border-bottom-color: rgba(255, 255, 255, 0.22) !important;
    }

    body.post-type-archive-product .category-navigation,
    body.tax-product_cat .category-navigation {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        align-self: start !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        justify-self: end !important;
        align-self: start !important;
        margin-left: 0 !important;
    }

    body.post-type-archive-product .finds-desktop-promo-shell,
    body.tax-product_cat .finds-desktop-promo-shell {
        display: block !important;
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.post-type-archive-product .finds-mobile-promo,
    body.tax-product_cat .finds-mobile-promo,
    body.post-type-archive-product .utility-buttons-mobile,
    body.tax-product_cat .utility-buttons-mobile,
    body.post-type-archive-product .finds-sidebar-mobile-actions,
    body.tax-product_cat .finds-sidebar-mobile-actions {
        display: none !important;
    }

    body.post-type-archive-product .finds-sidebar-mobile-actions .glass-pill,
    body.tax-product_cat .finds-sidebar-mobile-actions .glass-pill {
        width: min(100%, 300px) !important;
        max-width: min(100%, 300px) !important;
    }
}

/* ==========================================================================
   FINDS MOBILE/TABLET CONTROL STACK LOCK
   Force the search/sort/grid stack to align from the left edge of its lane on
   narrow layouts and keep the second row on a single line.
   ========================================================================== */

@media (max-width: 949px) {
    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column,
    body.post-type-archive-product .shop-search,
    body.tax-product_cat .shop-search,
    body.post-type-archive-product .dropdowns-row,
    body.tax-product_cat .dropdowns-row {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-self: start !important;
        align-self: flex-start !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        flex: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    body.post-type-archive-product .dropdowns-row,
    body.tax-product_cat .dropdowns-row {
        grid-template-columns: minmax(0, 96px) minmax(0, 1fr) !important;
        gap: 8px !important;
    }

    body.post-type-archive-product .currency-switcher,
    body.tax-product_cat .currency-switcher {
        width: 96px !important;
    }

    body.post-type-archive-product .currency-switcher-btn,
    body.post-type-archive-product .custom-sort-trigger,
    body.tax-product_cat .currency-switcher-btn,
    body.tax-product_cat .custom-sort-trigger {
        min-height: 44px !important;
        font-size: 14px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

@media (max-width: 599px) {
    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        margin-bottom: 2px !important;
        padding-bottom: 6px !important;
        border-bottom: 1px solid rgba(67, 53, 67, 0.18) !important;
    }

    html.dark-mode body.post-type-archive-product .shop-header,
    html.dark-mode body.tax-product_cat .shop-header {
        border-bottom-color: rgba(255, 255, 255, 0.18) !important;
    }

    body.post-type-archive-product .header-right-column,
    body.tax-product_cat .header-right-column {
        gap: 6px !important;
    }

    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        margin-top: 0 !important;
    }

    body.post-type-archive-product .finds-mobile-action-bar,
    body.tax-product_cat .finds-mobile-action-bar {
        margin-top: 2px !important;
        margin-bottom: 6px !important;
    }
}

@media (max-width: 479px) {
    body.post-type-archive-product .shop-header,
    body.tax-product_cat .shop-header {
        margin-bottom: 0 !important;
        padding-bottom: 6px !important;
    }

    body.post-type-archive-product .shop-layout,
    body.tax-product_cat .shop-layout {
        margin-top: 0 !important;
    }

    body.post-type-archive-product .dropdowns-row,
    body.tax-product_cat .dropdowns-row {
        width: max-content !important;
        max-width: 100% !important;
        grid-template-columns: 84px max-content 42px !important;
        gap: 6px !important;
    }

    body.post-type-archive-product .custom-sorting-container,
    body.post-type-archive-product .custom-sort-dropdown,
    body.post-type-archive-product .wpc-sorting-form,
    body.tax-product_cat .custom-sorting-container,
    body.tax-product_cat .custom-sort-dropdown,
    body.tax-product_cat .wpc-sorting-form {
        width: auto !important;
        max-width: none !important;
    }

    body.post-type-archive-product .currency-switcher,
    body.tax-product_cat .currency-switcher {
        width: 84px !important;
    }

    body.post-type-archive-product .currency-switcher-btn,
    body.post-type-archive-product .custom-sort-trigger,
    body.tax-product_cat .currency-switcher-btn,
    body.tax-product_cat .custom-sort-trigger {
        min-height: 42px !important;
        font-size: 13px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* --- KakoBuy Mobile Button Alignment & Sizing Enforcements --- */
@media (max-width: 480px) {
    :is(.woocommerce ul.products li.product, ul.products li.product, .swiper-slide .product) :is(.button.jei-finds-kakobuy-button, a.button.jei-finds-kakobuy-button, .add_to_cart_button.jei-finds-kakobuy-button) {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 4px 8px !important;
        min-height: 44px !important;
        height: 44px !important;
        max-height: 44px !important;
    }

    .jei-finds-kakobuy-button .jei-finds-kakobuy-button__label,
    .jei-finds-kakobuy-button .jei-finds-kakobuy-button__brand {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .jei-finds-kakobuy-button .jei-finds-kakobuy-button__label {
        font-size: 11.5px !important;
    }

    .jei-finds-kakobuy-button .jei-finds-kakobuy-button__brand {
        transform: translateY(1px) !important;
    }

    .jei-finds-kakobuy-button .jei-finds-kakobuy-button__brand svg {
        width: 55px !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
    }
}

/* =============================================================================
   INTERACTIVE COPY CODE PILL
   ============================================================================= */
.copy-code-pill {
    position: relative;
    border: 1px solid rgba(79, 64, 95, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 13.5px !important;
}

.copy-code-pill strong {
    font-weight: 700;
}

.copy-code-pill:not(.copied):hover {
    border-color: rgba(79, 64, 95, 0.35) !important;
    background: rgba(255, 255, 255, 0.85) !important;
}


.copy-code-pill .copy-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.copy-code-pill:not(.copied):hover .copy-icon.svg-copy {
    transform: scale(1.15);
}

/* Copied state - Light Mode (Purple background with white text) */
.copy-code-pill.copied {
    border-color: rgba(79, 64, 95, 0.92) !important;
    background: rgba(79, 64, 95, 0.88) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 64, 95, 0.25) !important;
}

.copy-code-pill.copied strong {
    color: #ffffff !important;
}

.copy-code-pill.copied .svg-copy {
    display: none !important;
}

.copy-code-pill.copied .svg-check {
    display: inline-block !important;
    color: #ffffff !important;
    animation: popIn 0.2s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Copied state - Dark Mode (White background with purple text) */
html.dark-mode .copy-code-pill.copied {
    border-color: rgba(255, 255, 255, 0.92) !important;
    background: rgba(255, 255, 255, 0.88) !important;
    color: #4f405f !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2) !important;
}

html.dark-mode .copy-code-pill.copied strong {
    color: #4f405f !important;
}

html.dark-mode .copy-code-pill.copied .svg-check {
    color: #4f405f !important;
}

/* Dark mode hover guard — .copied state overrides all hover effects */
html.dark-mode .copy-code-pill.copied:hover {
    border-color: rgba(255, 255, 255, 0.92) !important;
    background: rgba(255, 255, 255, 0.88) !important;
    color: #4f405f !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2) !important;
}

/* Light mode hover guard — .copied state overrides all hover effects */
.copy-code-pill.copied:hover {
    border-color: rgba(79, 64, 95, 0.92) !important;
    background: rgba(79, 64, 95, 0.88) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 64, 95, 0.25) !important;
}

/* Dark mode normal (non-copied) hover for the coupon pill */
html.dark-mode .copy-code-pill:not(.copied):hover {
    background: rgba(30, 30, 30, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* =============================================================================
   ADMIN EDIT PENCIL — Cherry Dark Purple Override
   Overrides inline <style id="jqp-admin-pencil-css"> from jeidrips-quick-product
   Uses body prefix for higher specificity to beat inline <style> cascade order.
   ============================================================================= */

/* Light mode: cherry dark purple background, white SVG */
body .jqp-edit-pencil {
    background: rgba(79, 64, 95, 0.95) !important;
    box-shadow: 0 2px 8px rgba(79, 64, 95, 0.25) !important;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
}

body .jqp-edit-pencil svg {
    stroke: #ffffff !important;
}

body .jqp-edit-pencil:hover {
    background: rgba(79, 64, 95, 1) !important;
    box-shadow: 0 4px 12px rgba(79, 64, 95, 0.35) !important;
    transform: scale(1.1) !important;
}

/* Dark mode: white background, cherry dark purple SVG */
html.dark-mode body .jqp-edit-pencil {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

html.dark-mode body .jqp-edit-pencil svg {
    stroke: #4f405f !important;
}

html.dark-mode body .jqp-edit-pencil:hover {
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}
