/**
 * evov-sub — Native <select> styled to match WoodMart's Select2 appearance v1.3.34
 *
 * Piggybacks on the same --wd-form-* CSS custom properties that WoodMart's own
 * woo-lib-select2 stylesheet uses, so border-width, border-radius, height, color,
 * background and the chevron arrow all automatically follow whatever form style is
 * set in WoodMart theme options (pill/sharp, underline, bordered/borderless, etc.)
 *
 * What WooCommerce already provides (no need to duplicate here):
 *   • .select2-container--default styles → woo-lib-select2.min.css
 *   • Checkout country/state/variation dropdowns → WooCommerce's own select2 init
 *
 * Exclusions:
 *   • select.select2-hidden-accessible  — Select2 JS has already replaced these
 *     with its own widget; the original <select> is visually hidden by WC/WM.
 *   • body.wp-admin                     — WordPress admin has its own form styles.
 *
 * WoodMart's own "Icon on mobile" shop-sort option (.wd-ordering-mb-icon,
 * style.css, scoped to its own max-width:1024px block) positions the native
 * select absolutely over an icon glyph and relies on color:transparent to
 * hide its own text — but that class sits on the wrapper regardless of
 * viewport, so simply excluding `.wd-ordering-mb-icon select` here outright
 * would ALSO strip our reskin on desktop widths where WoodMart's own rule
 * never even applies. Instead the reskin applies everywhere as normal, and a
 * dedicated override at the bottom of this file re-asserts WoodMart's exact
 * icon-mode declarations inside that same max-width:1024px range, at higher
 * specificity than our base rule — so icon mode is only restored precisely
 * where WoodMart itself activates it.
 */

/* ── Reset + base ─────────────────────────────────────────────────────── */

body:not(.wp-admin) select:not(.select2-hidden-accessible) {
    /* Remove the OS-native dropdown arrow so our custom one takes over */
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;

    /* Dimensions — mirrors .select2-selection--single */
    height:      var(--wd-form-height, 42px);
    min-height:  var(--wd-form-height, 42px);
    padding:     0 42px 0 15px; /* right padding = arrow zone (same as Select2) */
    box-sizing:  border-box;

    /* Border — mirrors .select2-selection */
    border:        var(--wd-form-brd-width, 1px) solid var(--wd-form-brd-color, rgba(0, 0, 0, 0.1));
    border-radius: var(--wd-form-brd-radius, 4px);

    /* Background + custom chevron arrow — same values as .select2-selection__arrow */
    background-color:    var(--wd-form-bg, transparent);
    background-image:    var(--wd-form-chevron);
    background-repeat:   no-repeat;
    background-position: right 12px center;
    background-size:     auto 18px;

    /* Typography — mirrors .select2-selection--single .select2-selection__rendered */
    color:       var(--wd-form-color, inherit);
    font-size:   14px;
    line-height: 1;
    font-family: inherit;

    /* Behaviour */
    cursor:     pointer;
    outline:    none;
    transition: border-color 0.4s ease;
    vertical-align: middle;
}

/* ── Focus state ──────────────────────────────────────────────────────── */

body:not(.wp-admin) select:not(.select2-hidden-accessible):focus {
    border-color: var(--wd-form-brd-color-focus, rgba(0, 0, 0, 0.15));
    outline:      none;
}

/* ── Dropdown list item padding ──────────────────────────────────────── */
/*
 * Uses .select2-dropdown as an extra ancestor to reach specificity (0,0,3,1),
 * which beats WoodMart's (0,0,2,1) rule regardless of stylesheet load order.
 * (On checkout WoodMart's woo-lib-select2.min.css loads AFTER us; equal-
 * specificity rules would let it override our 5px with its 10px shorthand.)
 * .select2-dropdown is always a direct ancestor of .select2-results__option
 * in Select2's DOM, so this selector is both accurate and broadly applicable:
 * shop sort, reviews sort, WooCommerce checkout/cart/account fields, etc.
 * WoodMart default: padding 10px 18px — reduced vertical by 5px each side.
 */

body .select2-container--default .select2-dropdown .select2-results__option {
    padding-top:    5px;
    padding-bottom: 5px;
}


/* ── Underline form-style variant ─────────────────────────────────────── */
/*
 * WoodMart theme option "Form style: Underlined" adds .form-style-underlined
 * to <body>. WoodMart's own Select2 override removes the side/top borders and
 * tightens padding; we mirror exactly the same rules for native selects.
 */

.form-style-underlined body:not(.wp-admin) select:not(.select2-hidden-accessible),
body:not(.wp-admin) .form-style-underlined select:not(.select2-hidden-accessible) {
    padding-inline-start: 2px;
    padding-inline-end:   15px;
    border-top-style:     none;
    border-right-style:   none;
    border-left-style:    none;
    border-radius:        0;
}


/* ── Linked-variations Region dropdown — chevron flip ─────────────────── */
/*
 * pjax-nav.js wraps the linked-variations Region <select> with SelectWoo and
 * tags the generated container .evov-region-select2. Flip the chevron up while
 * the dropdown is open and ease it back down on close. Scoped to this container
 * so other Select2 dropdowns keep their default arrow behaviour.
 */
.evov-region-select2 .select2-selection__arrow {
    transition: transform 0.25s ease;
    /* Keep the chevron above the inline search overlay so it stays visible
       (the overlay otherwise covers it) instead of WoodMart's search icon. */
    z-index:    2;
}

.evov-region-select2.select2-container--open .select2-selection__arrow {
    transform: rotate(180deg);
}


/* ── Linked-variations Region dropdown — inline search ───────────────── */
/*
 * pjax-nav.js moves SelectWoo's dropdown search field into the selection box so
 * the box itself acts as the search bar (no separate search row, no search
 * icon). It's hidden until the dropdown opens; while open, the selected-value
 * text is hidden and the search field fills the box — just a blinking cursor.
 */
.evov-region-select2 .select2-selection {
    position: relative;
}

.evov-region-select2 .select2-selection .select2-search--dropdown {
    display: none;
}

.evov-region-select2.select2-container--open .select2-selection .select2-search--dropdown {
    display:     flex;
    align-items: center;
    position:    absolute;
    inset:       0;
    margin:      0;
    padding:     0 40px 0 15px; /* leave room for the chevron on the right */
    /* Transparent so the .select2-selection behind it shows through — same bg as
       the results list, so the open dropdown reads as one panel and the rounded
       top corners are visible (an opaque fill matching the page bg looked square). */
    background:  transparent;
}

/* WoodMart's Select2 draws a magnifying-glass icon via this pseudo-element,
   which would sit over the chevron. Hide it — the chevron is the only affordance
   we want, and typing is indicated by the blinking caret. */
.evov-region-select2.select2-container--open .select2-selection .select2-search--dropdown::after {
    display: none !important;
}

.evov-region-select2.select2-container--open .select2-selection .select2-search__field {
    width:      100%;
    height:     100%;
    margin:     0;
    padding:    0;
    border:     none;
    background: transparent;
    color:      inherit;
    outline:    none;
    box-shadow: none;
    font-size:  14px;
}

.evov-region-select2.select2-container--open .select2-selection__rendered {
    visibility: hidden;
}

/* Custom 2px "ready to type" blinking caret. The native text caret can't be
   sized, so it's hidden and pjax-nav.js draws this one, positioning it at the
   typed-text cursor and toggling .is-active while the field is focused. */
.evov-region-select2.select2-container--open .select2-selection .select2-search__field {
    caret-color: transparent;
}

.evov-region-caret {
    position:         absolute;
    top:              50%;
    transform:        translateY(-50%);
    width:            2px;
    height:           1.1em;
    background-color: currentColor;
    border-radius:    1px;
    display:          none;
    pointer-events:   none;
    /* Gentle ease-in-out fade rather than a hard on/off blink. */
    animation:        evovRegionCaretBlink 1.15s ease-in-out infinite;
}

.evov-region-select2.select2-container--open .evov-region-caret.is-active {
    display: block;
}

@keyframes evovRegionCaretBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}


/* ── Linked-variations Region dropdown — rounded corners ─────────────── */
/*
 * Match WoodMart's border radius: round the top of the search box and the
 * bottom of the (always-below) results list, so the open dropdown reads as one
 * rounded panel. The dropdown carries .evov-region-dropdown (dropdownCssClass).
 * !important to beat WoodMart's own .select2-dropdown radius rule.
 */
.evov-region-select2.select2-container--open .select2-selection,
.evov-region-select2.select2-container--open .select2-selection .select2-search--dropdown {
    border-radius: var(--wd-brd-radius, 8px) var(--wd-brd-radius, 8px) 0 0 !important;
}

.select2-dropdown.evov-region-dropdown {
    border-radius: 0 0 var(--wd-brd-radius, 8px) var(--wd-brd-radius, 8px) !important;
    overflow:      hidden;
    /* Sit below WoodMart's fixed sticky-header clone (.whb-clone, z-index 391) so
       the header stays on top when the page is scrolled with the dropdown open.
       SelectWoo's default panel z-index (1500) otherwise covers the header. The
       body-appended container is z-index:auto (no stacking context), so this
       value is compared directly against the header in the root context.
       !important to beat WoodMart's `body .select2-container--default
       .select2-dropdown { z-index:1500 }` (higher specificity). */
    z-index:       390 !important;
}


/* ── Linked-variations Region dropdown — carousel-style scrollbar ─────── */
/*
 * Style the results-list scrollbar like WoodMart's carousel scrollbar (the
 * .wd-nav-scroll drag bar configured under Theme Settings → Carousel → Carousel
 * scrollbar). pjax-nav.js copies the live --wd-nscroll-* values off a
 * .wd-nav-scroll element onto the dropdown so the *configured* track/thumb
 * colours and thickness are honoured; the fallbacks below mirror WoodMart's own
 * carousel-scrollbar defaults for when nothing is customised.
 */
/*
 * WebKit/Blink (Chrome, Safari): a classic, fixed-width scrollbar that does NOT
 * overlay or zoom on hover. -webkit-appearance:none forces the non-overlay
 * (gutter-reserving) scrollbar so it stays a constant width.
 *
 * Important: do NOT set the standard `scrollbar-color`/`scrollbar-width` on this
 * element for Chrome. When either is present, Blink switches to the *standard*
 * scrollbar renderer, ignores these ::-webkit-scrollbar rules entirely, and
 * draws the macOS overlay scrollbar — which auto-hides and enlarges on hover.
 * Those standard properties are therefore scoped to Firefox below.
 */
.select2-dropdown.evov-region-dropdown .select2-results__options::-webkit-scrollbar {
    -webkit-appearance: none;
    width:              var(--wd-nscroll-height, 5px);
}

.select2-dropdown.evov-region-dropdown .select2-results__options::-webkit-scrollbar-track {
    background:    var(--wd-nscroll-bg, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.07));
    border-radius: var(--wd-brd-radius, 8px);
}

.select2-dropdown.evov-region-dropdown .select2-results__options::-webkit-scrollbar-thumb {
    background:    var(--wd-nscroll-drag-bg, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.2));
    border-radius: var(--wd-brd-radius, 8px);
}

.select2-dropdown.evov-region-dropdown .select2-results__options::-webkit-scrollbar-thumb:hover {
    background: var(--wd-nscroll-drag-bg-hover, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.3));
}

/* Firefox (no ::-webkit-scrollbar support): standard thin themed scrollbar. */
@supports not selector(::-webkit-scrollbar) {
    .select2-dropdown.evov-region-dropdown .select2-results__options {
        scrollbar-width: thin;
        scrollbar-color: var(--wd-nscroll-drag-bg, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.2))
                         var(--wd-nscroll-bg,      rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.07));
    }
}


/* ── Linked-variations Region dropdown — graceful entry ──────────────── */
/*
 * SelectWoo re-appends the dropdown to <body> each time it opens, so this
 * animation replays on every open. The list panel eases down from just under
 * the search box and settles — a soft fade + slide + slight vertical expand,
 * anchored at the top so it grows out of the search box. The transform is on the
 * .select2-dropdown only (not the JS-positioned container), so it never fights
 * the force-below positioning.
 */
@keyframes evovRegionDropIn {
    from { opacity: 0; transform: translateY(-8px) scaleY(0.96); }
    to   { opacity: 1; transform: translateY(0)     scaleY(1);    }
}

.select2-dropdown.evov-region-dropdown {
    transform-origin: top center;
    animation:        evovRegionDropIn 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/*
 * Exit: the reverse of the entry — the panel eases back up into the search box
 * and fades out. SelectWoo detaches the dropdown synchronously on close, so
 * pjax-nav.js adds .evov-region-leaving and defers the actual detach until this
 * animation finishes (see evovGracefulRegionClose). pointer-events:none so the
 * fading panel can't be clicked. Higher specificity (extra class) overrides the
 * entry animation on the same element.
 */
@keyframes evovRegionDropOut {
    from { opacity: 1; transform: translateY(0)     scaleY(1);    }
    to   { opacity: 0; transform: translateY(-8px)  scaleY(0.96); }
}

.select2-dropdown.evov-region-dropdown.evov-region-leaving {
    animation:      evovRegionDropOut 0.18s ease-in forwards;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .select2-dropdown.evov-region-dropdown,
    .select2-dropdown.evov-region-dropdown.evov-region-leaving {
        animation: none;
    }
}


/* ── Linked-variations Region dropdown — smooth open scroll ──────────── */
/*
 * While the region dropdown is open, pjax-nav.js adds this class to <html>.
 * When the field sits near the bottom and the always-below dropdown can't fit,
 * the browser scrolls the focused search field into view — by default an
 * instant snap. scroll-behavior:smooth turns that reveal into a smooth glide.
 * It only affects programmatic scrolls (the focus reveal), never the user's own
 * wheel/touch scrolling, and the class is removed on close. Honour reduced
 * motion by leaving the scroll instant.
 */
@media (prefers-reduced-motion: no-preference) {
    html.evov-region-smoothscroll {
        scroll-behavior: smooth;
    }
}


/* ── Shop sort-by ("Order by") — [evov] Region-styled Select2 ─────────────
 * pjax-nav.js's evovSyncOrderingSelect2() wraps the shop sort-by select
 * with SelectWoo above WoodMart's own "Icon on mobile" breakpoint
 * (768.98px) and tags the generated container .evov-ordering-select2 /
 * dropdown .evov-ordering-dropdown — the exact same visual treatment as
 * the [evov] Region dropdown above (chevron flip, rounded panel, entry/exit
 * animation, matching carousel scrollbar), minus Region's inline search box
 * and flag icons (short, known-option list — same reasoning select2-init.js
 * already uses for every other select this theme wraps).
 */

/* Chevron flip on open/close — identical to Region's. */
.evov-ordering-select2 .select2-selection__arrow {
    transition: transform 0.25s ease;
}

.evov-ordering-select2.select2-container--open .select2-selection__arrow {
    transform: rotate(180deg);
}

/* Rounded corners — top of the closed/open selection box, bottom of the
   always-below dropdown, so the open state reads as one rounded panel. */
.evov-ordering-select2.select2-container--open .select2-selection {
    border-radius: var(--wd-brd-radius, 8px) var(--wd-brd-radius, 8px) 0 0 !important;
}

.select2-dropdown.evov-ordering-dropdown {
    border-radius: 0 0 var(--wd-brd-radius, 8px) var(--wd-brd-radius, 8px) !important;
    overflow:      hidden;
    /* Same header-stacking reasoning as the Region dropdown above. */
    z-index:       390 !important;
}

/* Carousel-style scrollbar — same source (.wd-nav-scroll) and fallbacks as
   the Region dropdown; evovApplyCarouselScrollbarVars() copies the live
   --wd-nscroll-* values onto this dropdown too. */
.select2-dropdown.evov-ordering-dropdown .select2-results__options::-webkit-scrollbar {
    -webkit-appearance: none;
    width:              var(--wd-nscroll-height, 5px);
}

.select2-dropdown.evov-ordering-dropdown .select2-results__options::-webkit-scrollbar-track {
    background:    var(--wd-nscroll-bg, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.07));
    border-radius: var(--wd-brd-radius, 8px);
}

.select2-dropdown.evov-ordering-dropdown .select2-results__options::-webkit-scrollbar-thumb {
    background:    var(--wd-nscroll-drag-bg, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.2));
    border-radius: var(--wd-brd-radius, 8px);
}

.select2-dropdown.evov-ordering-dropdown .select2-results__options::-webkit-scrollbar-thumb:hover {
    background: var(--wd-nscroll-drag-bg-hover, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.3));
}

@supports not selector(::-webkit-scrollbar) {
    .select2-dropdown.evov-ordering-dropdown .select2-results__options {
        scrollbar-width: thin;
        scrollbar-color: var(--wd-nscroll-drag-bg, rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.2))
                         var(--wd-nscroll-bg,      rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.07));
    }
}

/* Entry/exit animation — reuses the exact evovRegionDropIn/DropOut keyframes
   defined above for the Region dropdown; identical motion, shared rather
   than duplicated. evovGracefulSelect2Close() (pjax-nav.js) adds/removes
   .evov-ordering-leaving the same way it does .evov-region-leaving. */
.select2-dropdown.evov-ordering-dropdown {
    transform-origin: top center;
    animation:        evovRegionDropIn 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.select2-dropdown.evov-ordering-dropdown.evov-ordering-leaving {
    animation:      evovRegionDropOut 0.18s ease-in forwards;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .select2-dropdown.evov-ordering-dropdown,
    .select2-dropdown.evov-ordering-dropdown.evov-ordering-leaving {
        animation: none;
    }
}


/* ── Linked-variations Region dropdown — country flag icons ──────────── */
/*
 * pjax-nav.js renders each region as <span class="evov-region-opt"> with an
 * optional <img class="evov-region-flag"> (the pa_region term image, resolved
 * server-side by evov_region_flag_url()). Used for both the result rows and the
 * selected value. The flag is cropped to a circle to match the platform icons.
 */
.evov-region-opt {
    display:     flex;
    align-items: center;
    gap:         12px;
    min-width:   0;
}

/*
 * Scoped to both contexts on purpose. The selected value lives inside the
 * Elementor widget, where `.elementor img { height:auto; border-radius:0 }`
 * (specificity 0,1,1) would override a bare `.evov-region-flag` (0,1,0) and
 * render the flag as an un-rounded rectangle — while the dropdown list (appended
 * to <body>, outside .elementor) stayed round. These two-class selectors (0,2,0)
 * outrank `.elementor img`, so the flag is a 16px circle in BOTH places.
 */
.evov-region-select2 .evov-region-flag,
.select2-dropdown.evov-region-dropdown .evov-region-flag {
    flex:             0 0 auto;
    width:            16px;
    height:           16px;
    border-radius:    50%;
    object-fit:       cover;
    /* background-color (not the `background` shorthand) so it doesn't reset the
       fallback globe's background-image, which is set on the same element. */
    background-color: rgba(var(--bgcolor-black-rgb, 0, 0, 0), 0.06);
}

/* Fallback for terms with no Term image (e.g. "Global"): a neutral globe glyph
   on a subtle disc, sized to match the real flag icons. Scoped to match the
   flag rule's specificity (0,2,0) so it sits after it and keeps its globe. */
.evov-region-select2 .evov-region-flag--fallback,
.select2-dropdown.evov-region-dropdown .evov-region-flag--fallback {
    background-color:    rgba(255, 255, 255, 0.08);
    background-repeat:   no-repeat;
    background-position: center;
    background-size:     68% 68%;
    background-image:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='0.75' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3c2.8 2.8 2.8 15.2 0 18'/%3E%3Cpath d='M12 3c-2.8 2.8-2.8 15.2 0 18'/%3E%3C/svg%3E");
}

/* Selected value (closed state): a touch tighter so it sits neatly in the box. */
.evov-region-select2 .select2-selection__rendered .evov-region-opt {
    gap: 10px;
}


/* ════════════════════════════════════════════════════════════════════════
   Linked-variations "Value" — cards grid

   pjax-nav.js (enhanceLinkedValueCards) replaces WoodMart's "Value" swatch row
   with this grid. Each card links to that value's product; picking one navigates
   via PJAX. Data (price, exchange rate, stock, current, best) comes from
   evov_get_linked_values(). Cashback is intentionally omitted for now.
   ════════════════════════════════════════════════════════════════════════ */

/* The widget fills its row. In a row container an Elementor widget otherwise
   sizes to its content, so the card grid's width followed the column count
   (fewer columns, narrower grid) instead of the space available. The
   widget's own Width control is more specific and still wins. */
.e-con > .elementor-widget-evov_variations {
    width: 100%;
}

.evov-value-cards {
    display:               grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap:                   12px;
    margin-top:            8px;
    width:                 100%;
}

.evov-value-card {
    position:         relative;
    display:          flex;
    flex-direction:   column;
    min-height:       112px;
    padding:          0;            /* zones own the padding (WoodMart forces 16px on <a>) */
    border-radius:    var(--wd-brd-radius, 14px);
    background-color: rgba(255, 255, 255, 0.06); /* lighter top tone */
    color:            inherit;
    text-decoration:  none;
    cursor:           pointer;
    transition:       opacity 0.2s ease, transform 0.12s ease;
}

/* No border on hover (only the selected card shows a border) — just dim. */
.evov-value-card:hover {
    opacity: 0.85;
}

.evov-value-card:active {
    transform: translateY(1px);
}

/* The card is an <a> inside product content, where WoodMart applies
   --wd-link-decor: underline to links AND 16px padding. padding:0 above + this
   rule keep the zones edge-to-edge and underline-free. */
.evov-value-card,
.evov-value-card:hover,
.evov-value-card:focus,
.evov-value-card * {
    text-decoration: none !important;
}

/* Dual tone: lighter top (value name + badge), darker bottom (price + rate).
   The zones carry their own corner radii (card has no overflow:hidden, so the
   check wrapper can overhang the corner to notch the border). Inner radius =
   card radius minus the 2px border. */
.evov-value-card-top {
    flex:             1 1 auto;
    display:          flex;
    flex-direction:   column;
    gap:              6px;
    padding:          14px 16px 12px;
    border-radius:    var(--wd-brd-radius, 14px) var(--wd-brd-radius, 14px) 0 0;
    background-color: var(--bgcolor-white);
}

.evov-value-card-bottom {
    display:          flex;
    flex-direction:   column;
    gap:              3px;
    padding:          11px 16px 13px;
    background-color: #141629;
    border-radius:    0 0 var(--wd-brd-radius, 14px) var(--wd-brd-radius, 14px);
}

/* "Best value" badge — outline pill above the name. */
.evov-value-badge {
    align-self:     flex-start;
    padding:        2px 7px;
    border:         1px solid #33ff8b;
    border-radius:  6px;
    color:          #33ff8b;
    font-size:      0.58rem;
    font-weight:    700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height:    1.2;
}

/* Selected value shown next to the "Value :" label. */
.evov-value-current-label {
    margin-inline-start: 6px;
    color:               var(--wd-text-color);
    font-weight:         700;
}

.evov-value-name {
    color:       #fff;
    font-size:   1.05rem;
    font-weight: 700;
    line-height: 1.15;
}

.evov-value-price {
    color:       #fff;
    font-size:   0.95rem;
    font-weight: 600;
}

.evov-value-rate {
    color:     rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
}

/* Selected value — a real 2px white border (drawn outside the zones so it stays
   visible; an inset shadow would be painted over by the opaque zones). The base
   card has no border, so the border shows only here. box-sizing:border-box keeps
   the outer size identical; the zones round to the inner corner (next rule). */
.evov-value-card.is-current {
    border: 2px solid #fff;
}

.evov-value-card.is-current .evov-value-card-top {
    border-radius: calc(var(--wd-brd-radius, 14px) - 2px) calc(var(--wd-brd-radius, 14px) - 2px) 0 0;
}

.evov-value-card.is-current .evov-value-card-bottom {
    border-radius: 0 0 calc(var(--wd-brd-radius, 14px) - 2px) calc(var(--wd-brd-radius, 14px) - 2px);
}

.evov-value-check {
    position:      absolute;
    right:         0;  /* selected card has the 2px border; abspos is from inside it */
    bottom:        0;
    /* bottom-right matches the border's inner corner (15px radius − 2px = 13px) so
       the white pocket nests cleanly; top-left is the only interior curve; top-right
       and bottom-left are square (flush to the edges). */
    padding:       3px;
    border-radius: 10px 0 12px 0;
    background:    #fff;
    display:       flex;
    line-height:   0;
}

.evov-value-check-mark {
    display:             block;
    width:               12px;
    height:              12px;
    border-radius:       50%;
    background-color:    #33ff8b;
    background-repeat:   no-repeat;
    background-position: center;
    background-size:     8px 8px;
    background-image:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

/* Sold-out — dimmed, but still clickable (the link leads to the OOS product).
   "Sold out" shows in place of the price/rate. No min-height: a sold-out card in a
   row with an in-stock card still stretches to match it (grid align-self:stretch),
   but a row of only sold-out cards shrinks to their content height. */
.evov-value-card.is-soldout {
    opacity:    0.45;
    min-height: 0;
}

.evov-value-card.is-soldout .evov-value-card-bottom {
    background-color: rgba(0, 0, 0, 0.12);
}

.evov-value-soldout {
    color:     rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

@media (max-width: 575px) {
    .evov-value-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap:                   8px;
    }
    .evov-value-card        { min-height: 96px; }
    .evov-value-card-top    { padding: 11px 12px 9px; }
    .evov-value-card-bottom { padding: 9px 12px 11px; }
}

/* ── Edition cards ──────────────────────────────────────────────────────
   The same cards (pjax-nav.js adds .evov-edition-cards to the grid), 90px
   tall at every breakpoint, on the edition's cover art (--evov-ed-img, set
   per card from the widget data). The art fills the card; the top zone
   darkens it enough to read the name, and the price zone lets only a trace
   through. Specificity (0,2,0) beats the base and small-phone heights. The
   zones take the small-phone padding everywhere: at the desktop padding the
   name and price alone came to 95px, past the 90. */
.evov-edition-cards .evov-value-card {
    min-height: 90px;
    background: var(--bgcolor-white) var(--evov-ed-img, none) center 25% / cover no-repeat;
}

.evov-edition-cards .evov-value-card-top {
    padding:    11px 12px 9px;
    background: linear-gradient(
        180deg,
        rgba(18, 20, 32, 0.85)   0%,
        rgba(18, 20, 32, 0.60)  55%,
        rgba(18, 20, 32, 0.35) 100%
    );
}

.evov-edition-cards .evov-value-card-bottom {
    padding:    9px 12px 11px;
    background: rgba(20, 22, 41, 0.95);
}

.evov-edition-cards .evov-value-name {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Price row: price on the left, the extra-cost tag on the right. */
.evov-edition-cards .evov-value-card-bottom {
    flex-direction:  row;
    flex-wrap:       wrap;
    align-items:     center;
    justify-content: space-between;
    gap:             4px 6px;
}

/* Extra-cost tag ("Base", "+$45.29"): what an edition costs over the cheapest
   one in stock (pjax-nav.js, evovEditionDeltas). The sold-out label shares
   the pill. */
.evov-value-delta,
.evov-edition-cards .evov-value-soldout {
    padding:       1px 6px;
    border-radius: 6px;
    background:    rgba(255, 255, 255, 0.08);
    color:         rgba(255, 255, 255, 0.7);
    font-size:     0.66rem;
    font-weight:   700;
    line-height:   1.5;
    white-space:   nowrap;
}
.evov-value-delta[hidden] { display: none; }
.evov-edition-cards .evov-value-soldout {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Spotlight: in-stock editions other than the one you're on are faded a
   touch and come back to full on hover. The selected one carries the accent (border,
   check, tag): the widget's "Edition selected colour" (--evov-ed-accent),
   else WoodMart's primary colour. */
.evov-edition-cards .evov-value-card {
    transition: opacity 0.2s ease, transform 0.12s ease, filter 0.3s ease;
}
.evov-edition-cards .evov-value-card:not(.is-current):not(.is-soldout) {
    opacity: 0.95;
}
.evov-edition-cards .evov-value-card:not(.is-current):not(.is-soldout):hover {
    opacity: 1;
}
.evov-edition-cards .evov-value-card.is-current {
    border-color: var(--evov-ed-accent, var(--wd-primary-color));
}
.evov-edition-cards .evov-value-card.is-current .evov-value-check {
    background: var(--evov-ed-accent, var(--wd-primary-color));
}
.evov-edition-cards .evov-value-card.is-current .evov-value-card-bottom {
    padding-right: 22px; /* clear of the check */
}
.evov-edition-cards .evov-value-card.is-current .evov-value-delta {
    background: color-mix(in srgb, var(--evov-ed-accent, var(--wd-primary-color)) 28%, transparent);
    color:      #fff;
}

/* Sold out: fully grey and darker, in place of the value cards' .45
   opacity, and it stays grey on hover. The one you're on keeps its
   primary border and only its art greys. */
.evov-edition-cards .evov-value-card.is-soldout {
    opacity: 1;
}
.evov-edition-cards .evov-value-card.is-soldout:not(.is-current) {
    filter: grayscale(1) brightness(0.6);
}
.evov-edition-cards .evov-value-card.is-soldout:not(.is-current):hover {
    filter: grayscale(1) brightness(0.75);
}
.evov-edition-cards .evov-value-card.is-soldout .evov-value-card-bottom {
    background: rgba(20, 22, 41, 0.95);
}
.evov-edition-cards .evov-value-card.is-current.is-soldout .evov-value-card-top {
    filter: grayscale(0.6);
}


/* ════════════════════════════════════════════════════════════════════════
   Value cards — Read more (collapse)

   Two modes, driven by pjax-nav.js (evovSyncValueCardsTrim) reading the CSS
   variables the [evov] Value cards → Read more controls write per breakpoint:
     • Cards  (--evov-vc-cards): cards past N get .evov-vc-hidden (display:none).
     • Pixels (--evov-vc-maxh):  the grid is capped and .evov-vc-collapsed adds
       overflow:hidden + a bottom mask fade; JS animates the max-height.
   The toggle (.evov-vc-actions > .evov-vc-toggle) reuses the .evov-readmore-
   toggle look from product-loop.css. Actions/toggle are injected by JS and
   hidden until it confirms the content actually overflows.
   ════════════════════════════════════════════════════════════════════════ */
.evov-value-card.evov-vc-hidden {
    display: none !important;
}

.evov-value-cards.evov-vc-collapsed {
    overflow:           hidden;
    -webkit-mask-image: linear-gradient(to top, transparent 0, #000 56px);
            mask-image: linear-gradient(to top, transparent 0, #000 56px);
}

/* ── expanding and collapsing ─────────────────────────────────────────────
   Both trim modes move on the Region dropdown's own curve and timings, so
   expanding a value grid and opening the region list read as the same gesture:
   0.24s cubic-bezier(.22,.61,.36,1) opening, 0.18s ease-in closing, the faster
   exit being what stops a collapse feeling reluctant.

   The transition lives on a state class rather than on .evov-value-cards
   itself. It used to be unconditional at 0.4s ease, which animated the Pixels
   mode but left Cards mode snapping, because that mode toggles display:none on
   individual cards and never touches the grid's height. js/pjax-nav.js now
   measures the height before and after the change and animates between the
   two, so both modes move the same way and the per-mode difference stops
   showing. Unconditional would also animate resize-driven re-syncs, which
   should be instant. */
.evov-value-cards.evov-vc-animating {
    overflow:   hidden;
    transition: max-height 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.evov-value-cards.evov-vc-animating.evov-vc-closing {
    transition: max-height 0.18s ease-in;
}

/* Cards arriving on expand drop in exactly as the dropdown panel does, reusing
   its keyframes rather than restating them. The small stagger keeps a long
   grid from appearing as one slab; it is capped so a 20-card grid does not
   take a second to settle. */
.evov-value-cards.evov-vc-opening .evov-value-card.evov-vc-revealed {
    animation: evovRegionDropIn 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .evov-value-cards.evov-vc-animating,
    .evov-value-cards.evov-vc-animating.evov-vc-closing {
        transition: none;
    }

    .evov-value-cards.evov-vc-opening .evov-value-card.evov-vc-revealed {
        animation: none;
    }
}

.evov-vc-actions {
    margin-top: 10px;
    width:      100%;
}
/* .evov-vc-toggle inherits .evov-readmore-toggle styling (colour, weight). */


/* ════════════════════════════════════════════════════════════════════════
   Linked-variations loading shimmer (anti-FOUC skeleton)

   An inline script (evov_linked_variations_after_render) drops these placeholders
   in place of the native swatches before pjax-nav.js builds the real dropdown /
   value cards, so the cloak window shows a shimmer instead of an empty gap. The
   card grid mirrors the real one (7 cols, same radius/height).

   Uses the SAME skeleton treatment as the product loop for uniformity: the shared
   @keyframes evovSkeletonShimmer (transitions.css) — a translateX band swept over
   a var(--bgcolor-white) base, clipped by overflow:hidden — applied via ::after.
   ════════════════════════════════════════════════════════════════════════ */

.evov-lv-skeleton {
    margin-top: 8px;
    width:      100%;
}

.evov-lv-skeleton-value {
    display:               grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap:                   12px;
}

.evov-lv-skeleton-card,
.evov-lv-skeleton-region,
.evov-lv-skeleton-label {
    position:         relative;
    overflow:         hidden; /* clips the sweeping ::after band to the element */
    border-radius:    var(--wd-brd-radius, 14px);
    background-color: var(--bgcolor-white);
}

.evov-lv-skeleton-card::after,
.evov-lv-skeleton-region::after,
.evov-lv-skeleton-label::after {
    content:    '';
    position:   absolute;
    inset:      0;
    background:  linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.00)  0%,
        var(--evov-skel-sweep, rgba(255, 255, 255, 0.30)) 50%,
        rgba(255, 255, 255, 0.00) 100%
    );
    animation: evovSkeletonShimmer 1.4s ease-in-out infinite;
}

.evov-lv-skeleton-card   { height: 112px; }

/* A real card has text, an empty skeleton card has none. Where the widget
   sizes to its content (a row container), the skeleton grid then shrank to
   the label pill's width and squeezed the cards into slivers. This gives
   each skeleton card a real card's natural width (equal fr tracks all take
   the widest item's), and max-width keeps it inside narrower tracks. */
.evov-lv-skeleton-card::before {
    content:   '';
    display:   block;
    width:     150px;
    max-width: 100%;
}
.evov-lv-skeleton-edition .evov-lv-skeleton-card { height: 90px; } /* matches the edition cards, every breakpoint */
.evov-lv-skeleton-region { height: 46px; max-width: 320px; }

/* Label mask — a shimmer pill in place of the "Region :" / "Value : …" label
   while the real UI builds. Inline so it occupies the label's spot in the th.
   The selector is deliberately specific: WooCommerce ships
   `table.variations .label span:empty { display:none }` (specificity 0,3,2 —
   :empty counts as a class), which would otherwise hide our empty pill. Chaining
   .evov-lv-skeleton.evov-lv-skeleton-label gives us (0,4,1) so we win. */
.variations_form-linked table.variations .evov-lv-skeleton.evov-lv-skeleton-label {
    display:        inline-block;
    vertical-align: middle;
    width:          90px;
    height:         16px;
    margin:         0;
    border-radius:  6px;
}
.variations_form-linked table.variations .evov-lv-skeleton.evov-lv-skeleton-label-value { width: 130px; }

@media (max-width: 575px) {
    .evov-lv-skeleton-value { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .evov-lv-skeleton-card  { height: 96px; }
}


/* ── Shop sort "Icon on mobile" — restore WoodMart's own icon-mode look ──
 * See the file-header note. WoodMart's .wd-ordering-mb-icon rule (style.css)
 * only exists inside its own max-width:768.98px block (true mobile only —
 * NOT tablet, despite the name; confirmed live in the compiled stylesheet),
 * but the base reskin above (specificity 0,0,2,2) outranks it (0,0,2,1) at
 * ANY width, since the wrapper's .wd-ordering-mb-icon class is present in
 * the markup whenever the Elementor toggle is on — regardless of viewport.
 * Re-asserting WoodMart's exact declarations here, at higher specificity,
 * inside the SAME media range restores icon mode precisely where WoodMart
 * itself activates it, without touching the reskin anywhere else (including
 * this same widget on tablet/desktop, where WoodMart's own rule never
 * applies either — an earlier max-width:1024px version of this override
 * wrongly forced position:absolute there too, collapsing the select to 0×0
 * since the wrapper's fixed 30×30 sizing is scoped to the same 768.98px
 * range and never applied at those wider widths). */
@media (max-width: 768.98px) {
    body:not(.wp-admin) .woocommerce-ordering.wd-ordering-mb-icon select:not(.select2-hidden-accessible) {
        position:   absolute;
        inset:      0;
        padding:    0;
        height:     inherit;
        min-height: 0;
        border:     none;
        background: none;
        color:      transparent !important;
        appearance: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .evov-lv-skeleton-card::after,
    .evov-lv-skeleton-region::after,
    .evov-lv-skeleton-label::after { animation: none; }
}

/* ── Plan, duration and version (sets linked on several attributes) ─────
   pjax-nav.js enhanceLinkedMulti. Plan and duration rows are the value /
   edition cards above. A card that can't keep the other current choices is
   dimmed (.is-alt) and names what else changes. Version is a pill group
   in the docs' segmented style, with its note underneath, beside the
   region dropdown when there is one. */
.evov-value-card.is-alt { opacity: 0.6; }
.evov-value-card.is-alt:hover { opacity: 0.85; }
.evov-value-card.is-alt.is-soldout { opacity: 0.4; }

.evov-value-alt {
    color:       rgba(255, 255, 255, 0.55);
    font-size:   var(--evov-fs-xs);
    line-height: 1.25;
}

.evov-lv-versions { margin-top: 8px; }

.evov-lv-seg {
    display:       inline-flex;
    flex-wrap:     wrap;
    gap:           2px;
    padding:       4px;
    border-radius: 30px;
    background:    var(--bgcolor-white);
}

/* Doubled class: WoodMart pads and underlines links in product content. */
.evov-lv-seg .evov-lv-seg-opt.evov-lv-seg-opt {
    padding:         8px 16px !important;
    border-radius:   30px;
    color:           rgba(255, 255, 255, 0.6);
    font-size:       var(--evov-fs);
    font-weight:     600;
    line-height:     1.2;
    text-decoration: none !important;
    transition:      color 0.25s, background-color 0.25s, transform 0.2s cubic-bezier(.2, .8, .2, 1);
}
.evov-lv-seg .evov-lv-seg-opt.evov-lv-seg-opt:hover { color: #fff; }
.evov-lv-seg .evov-lv-seg-opt.evov-lv-seg-opt:active { transform: scale(0.97); }
.evov-lv-seg .evov-lv-seg-opt.evov-lv-seg-opt.is-on {
    background: var(--btn-accented-bgcolor, #ff0f7b);
    color:      var(--btn-accented-color, #fff);
    cursor:     default;
}
.evov-lv-seg .evov-lv-seg-opt.evov-lv-seg-opt.is-on:hover {
    background: var(--btn-accented-bgcolor-hover, var(--btn-accented-bgcolor, #ff0f7b));
    color:      var(--btn-accented-color-hover, #fff);
}
.evov-lv-seg .evov-lv-seg-opt.evov-lv-seg-opt.is-soldout:not(.is-on) { opacity: 0.45; }

.evov-lv-seg-hint {
    min-height:  1.4em;
    margin-top:  6px;
    color:       rgba(255, 255, 255, 0.55);
    font-size:   var(--evov-fs-sm);
    line-height: 1.4;
}
.evov-lv-seg-hint.is-none { display: none; }

/* Beside the region dropdown: the cell becomes columns (pjax-nav.js
   evovInlineCols), each with its own label, so Region, a plan or duration
   dropdown and the version pills share one line where there's room and
   stack where there isn't. The note keeps its own line under the pills. */
/* (0,3,2): beats WoodMart's .wd-label-top-lg table.variations .cell block. */
.variations_form-linked table.variations td.evov-lv-region-inline { display: block; }
.variations_form-linked table.variations tr.evov-lv-has-cols > th { display: none; }
.evov-lv-cols {
    display:     flex;
    flex-wrap:   wrap;
    align-items: flex-start;
    gap:         14px 12px;
}
.evov-lv-col {
    display:        flex;
    flex-direction: column;
    gap:            8px;
    flex:           1 1 220px;
    min-width:      0;
    max-width:      var(--evov-lv-col-w, 330px);
}
.evov-lv-col > label { margin: 0; }
.evov-lv-col > .select2-container { width: 100% !important; }
.evov-lv-col .evov-lv-versions { margin-top: 0; }
.evov-lv-col .evov-lv-seg { width: 100%; height: var(--wd-form-height, 42px); box-sizing: border-box; flex-wrap: nowrap; }
.evov-lv-col .evov-lv-seg .evov-lv-seg-opt.evov-lv-seg-opt {
    display:         inline-flex;
    flex:            1 1 0;
    justify-content: center;
    min-width:       0;
    align-items:     center;
    height:          100%;
    padding-block:   0 !important;
    white-space:     nowrap;
}
.evov-lv-col .evov-lv-seg-hint { margin-top: 4px; padding-inline-start: 16px; }

/* Plan / duration dropdown rows. No search, so the selection stays
   visible while open (the region dropdown swaps it for its search field). */
.evov-lv-dd-select2.select2-container--open .select2-selection__rendered { visibility: visible; }
.evov-lv-ddopt { display: flex; align-items: center; gap: 10px; width: 100%; line-height: 1.25; }
.evov-lv-ddopt-img {
    flex:          none;
    width:         26px;
    height:        36px;
    border-radius: 6px;
    background:    var(--bgcolor-white) center 25% / cover no-repeat;
}
.evov-lv-ddopt-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.evov-lv-ddopt-name,
.evov-lv-ddopt-price { font-weight: 600; }
.evov-lv-ddopt-note,
.evov-lv-ddopt-pm { font-size: var(--evov-fs-xs); opacity: 0.6; }
.evov-lv-ddopt-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.evov-lv-ddopt.is-soldout { opacity: 0.45; }

.evov-lv-skeleton-cols { display: flex; flex-wrap: wrap; gap: 12px; }
.evov-lv-skeleton-cols > .evov-lv-skeleton-region { flex: 1 1 220px; max-width: var(--evov-lv-col-w, 330px); }

.evov-lv-skeleton-version { display: flex; flex-wrap: wrap; gap: 6px; }
.evov-lv-skeleton-version .evov-lv-skeleton-card { width: 110px; height: 40px; border-radius: 30px; }
.evov-lv-skeleton-version .evov-lv-skeleton-card::before { display: none; }
