/**
 * evov-sub — Page transition + navigation spinner styles v1.8.3
 *
 * #evov-pjax-container fade: applied to the content area during AJAX nav.
 * #evov-page-spinner: full-viewport spinner rendered outside the container
 *   so the container's opacity: 0 never hides it. Ported from flex-ux
 *   Spinner component (spinnerRotate keyframe).
 * .evov-skel utility system: composable skeleton shimmer primitives.
 */

/* ── Container fade ───────────────────────────────────────────────────── */

#evov-pjax-container {
  opacity:    1;
  transition: opacity 0.15s ease;
}

#evov-pjax-container.evov-pjax-loading {
  opacity:        0;
  pointer-events: none;
}


/* ── Spinner keyframe (ported from flex-ux dashboard.php) ────────────── */

@keyframes evovSpinnerRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ── Per-line shimmer (background-position sweep) ───────────────────── */
/* Used by .evov-skel-title where each line is a self-contained block.
   Moves a gradient band from the right edge to the left edge (left-to-right
   visual sweep matching evovSkeletonShimmer direction). */

@keyframes evovLineShimmer {
  from { background-position: 100% center; }
  to   { background-position:   0% center; }
}


/* ── Skeleton utility system ────────────────────────────────────────────── */

:root {
  --evov-skel-bg:       rgba(255, 255, 255, 0.06);
  --evov-skel-shimmer:  rgba(255, 255, 255, 0.30);
  --evov-skel-duration: 1.4s;
}

/* Base: shimmer rectangle on any element */
.evov-skel {
  position:         relative;
  overflow:         hidden;
  background-color: var(--evov-skel-bg);
  border-radius:    var(--wd-brd-radius, 4px);
  pointer-events:   none;
  color:            transparent !important;
}
.evov-skel > * { visibility: hidden; }
.evov-skel::after {
  content:    '';
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.00)   0%,
    var(--evov-skel-shimmer)   50%,
    rgba(255, 255, 255, 0.00) 100%
  );
  animation: evovSkeletonShimmer var(--evov-skel-duration) ease-in-out infinite;
}

/* Shape modifiers */
.evov-skel--circle { border-radius: 50%; }
.evov-skel--pill   { border-radius: 999px; }
.evov-skel--inline { display: inline-block; }

/* Width helpers */
.evov-skel--full { display: block; width: 100%; }
.evov-skel--w90  { display: block; width: 90%; }
.evov-skel--w60  { display: block; width: 60%; }

/* Height tokens */
.evov-skel--h1em { height: 1em; }
.evov-skel--h14  { height: 14px; }
.evov-skel--h32  { height: 32px; width: 32px; }

/* Two-line text variant — ::before is line 1 (full width),
   ::after is line 2 (90%).  Both use evovLineShimmer so the
   sweep direction matches the per-line title skeleton. */
.evov-skel--lines-2 {
  --skel-fs: 14px;
  --skel-lh: 19.6px;
  position:   relative;
  min-height: calc(var(--skel-lh) + var(--skel-fs));
  background: none;     /* lines carry the bg — no block fill */
  overflow:   visible;
}

.evov-skel--lines-2::before,
.evov-skel--lines-2::after {
  content:         '';
  position:        absolute;
  top:             0;
  left:            0;
  right:           0;
  bottom:          auto;   /* reset inset:0 from .evov-skel::after */
  width:           auto;
  height:          var(--skel-fs);
  border-radius:   var(--wd-brd-radius, 4px);
  background:      linear-gradient(
    90deg,
    var(--evov-skel-bg)      0%,
    var(--evov-skel-bg)      30%,
    var(--evov-skel-shimmer) 50%,
    var(--evov-skel-bg)      70%,
    var(--evov-skel-bg)      100%
  );
  background-size: 400% 100%;
  animation:       evovLineShimmer var(--evov-skel-duration) ease-in-out infinite;
}

.evov-skel--lines-2::after {
  top:   var(--skel-lh);
  right: auto;
  width: 90%;
}


/* ── Page-load spinner ────────────────────────────────────────────────── */

/* opacity + visibility transition gives a smooth fade both on show AND
   on hide. display:none/flex cannot be transitioned so removal was instant. */
#evov-page-spinner {
  position:         fixed;
  top:              0;   /* overridden by JS: #evov-pjax-container rect.top */
  right:            0;
  bottom:           0;
  left:             0;  /* overridden by JS: #evov-pjax-container rect.left */
  z-index:          392; /* one below .wd-sticky-nav (393) so the nav renders on top */
  display:          flex;
  align-items:      center;
  justify-content:  center;
  pointer-events:   none;
  opacity:          0;
  visibility:       hidden;
  transition:       opacity 0.25s ease, visibility 0.25s;

  /* Background is set dynamically by pjax-nav.js at navigation time:
     it reads the computed background of .wd-page-content so the spinner
     always matches whichever WoodMart page-background option is active
     (All Pages, Product Archive, Single Product, etc.).
     This fallback only shows for the first hard-load spinner before JS runs. */
  background-color: var(--wd-main-bgcolor, #1a1a1a);
}

/* The mobile bottom bar stays visible while a page loads: the spinner covers
   the viewport at 392 and WoodMart's .wd-toolbar sits at 350, so the bar
   vanished for the whole PJAX navigation. 393 puts it above the spinner and
   still below WoodMart's side panels and their overlay (400 and up).
   Doubled class: WoodMart's toolbar stylesheet loads after this file. */
.wd-toolbar.wd-toolbar {
  z-index: 393;
}

#evov-page-spinner.evov-spinner-active {
  opacity:    1;
  visibility: visible;

  /* Appear INSTANTLY; the 0.25s above applies to the hide direction only.
     A PJAX navigation is a dense run of main-thread blocks, so a fade-IN
     competes for frames it will not get: measured live, the spinner peaked at
     opacity 0.000 across all 88 animation frames of a home to archive click.
     Fading out is safe because by then the destination has finished rendering
     and frames are available again. */
  transition: none;
}

.evov-spinner-ring {
  width:            50px;
  height:           50px;
  border-radius:    50%;

  /* Track: primary color at 18% opacity — matches flex-ux Spinner */
  border:           4px solid color-mix(in srgb, var(--wd-primary-color, #6366f1) 18%, transparent);
  /* Arc: full primary color on the top segment */
  border-top-color: var(--wd-primary-color, #6366f1);

  animation: evovSpinnerRotate 0.7s linear infinite;
  /* Only spins while the spinner shows: hidden, it kept animating (and the
     browser compositing) through every page view. */
  animation-play-state: paused;
}
#evov-page-spinner.evov-spinner-active .evov-spinner-ring {
  animation-play-state: running;
}

/* WoodMart's "Load HTML dropdown with AJAX" placeholders (sticky side menu):
   the evov spinner instead of WoodMart's thin grey one. Same ring as
   .evov-spinner-ring; it only turns while WoodMart is loading (.dropdowns-loading). */
.dropdown-html-placeholder::after {
  width:            50px;
  height:           50px;
  border:           4px solid color-mix(in srgb, var(--wd-primary-color, #6366f1) 18%, transparent);
  border-top-color: var(--wd-primary-color, #6366f1);
  border-radius:    50%;
  animation:        evovSpinnerRotate 0.7s linear infinite;
  animation-play-state: paused;
}
.dropdowns-loading .dropdown-html-placeholder::after {
  animation-play-state: running;
}


/* ── Filter navigation: product-grid overlay ──────────────────────────── */

/* Block interaction on the product/project grid while new content loads.
   Skeleton classes on individual cards handle the visual loading state. */
.wd-content-layout.evov-filter-loading .wd-products[data-source],
.wd-content-layout.evov-filter-loading .wd-projects[data-source] {
  pointer-events: none;
}


/* ── Sort toolbar + result count skeleton during PJAX filter/pagination ─ */

/* Applied in pjax-nav.js immediately after the DOM swap so there is never
   a visible frame where an uninitialised or wrong-width Select2 is shown.
   Removed in the setTimeout(0) callback once evovForceInitSelect2 has set
   the correct width and the correct widget is ready to display. */

/* translateX sweep — GPU-composited, works regardless of background colours.
   overflow:hidden on the parent clips the band at element edges so it only
   appears while passing through the visible area. */

@keyframes evovSkeletonShimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(200%); }
}

.woocommerce-ordering.evov-ordering-skeleton,
.wd-content-layout.evov-entry-skeleton .woocommerce-ordering {
  position:         relative;
  overflow:         hidden; /* clips the sweeping ::after to element bounds */
  border-radius:    var(--wd-form-brd-radius, 4px);
  pointer-events:   none;
  /* Keep the dropdown background visible behind the shimmer so it sweeps
     over the correct surface rather than the bare page background.
     var(--evov-skel-surface, #272831) is the shared skeleton surface across the site — the checkout
     mini-cart shimmer uses the same value. */
  background-color: var(--evov-skel-surface, #272831);
}

/* Hide only the widget content (text, arrow) — the wrapper bg above stays. */
.woocommerce-ordering.evov-ordering-skeleton .select2-container,
.woocommerce-ordering.evov-ordering-skeleton select,
.wd-content-layout.evov-entry-skeleton .woocommerce-ordering .select2-container,
.wd-content-layout.evov-entry-skeleton .woocommerce-ordering select {
  opacity: 0;
  /* Hide at once; the fade back in runs when the class comes off. A fade
     out here showed the old content through the shimmer for 0.2s. */
  transition: none !important;
}

/* Fade the widget back in when the skeleton class is removed. */
.woocommerce-ordering .select2-container,
.woocommerce-ordering select {
  transition: opacity 0.2s ease;
}

/* Sweeping highlight band — fills the element, then translateX moves it
   entirely across from left to right on each cycle. */
.woocommerce-ordering.evov-ordering-skeleton::after,
.wd-content-layout.evov-entry-skeleton .woocommerce-ordering::after {
  /* !important: on phones the sort box is WoodMart's icon button, whose icon
     glyph is this same ::after, and its content rule won (the icon showed on
     the placeholder). */
  content:    '' !important;
  position:   absolute;
  inset:      0;
  width:      auto;   /* WoodMart sizes the icon glyph box */
  height:     auto;
  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;
}


/* ── Price label + filter link skeleton during PJAX ──────────────────── */

/* Price range label (.price_label inside .widget_price_filter). Also masked
   while the visitor's currency differs from the cached page's, until Curcy
   swaps the numbers (html.evov-wmc-pending). */
.price_label.evov-price-skeleton,
.wd-content-layout.evov-entry-skeleton .price_label,
html.evov-wmc-pending .widget_price_filter .price_label {
  position:         relative;
  overflow:         hidden;
  border-radius:    var(--wd-form-brd-radius, 4px);
  pointer-events:   none;
  /* !important: WoodMart's higher-specificity color rule wins without it */
  color:            transparent !important;
  /* Re-declare the variable to override WoodMart's widget-container value */
  --wd-form-bg:     var(--evov-skel-surface, #272831);
  background-color: var(--wd-form-bg);
  min-height:       1.2em;             /* preserve row height          */
  transition:       none !important;   /* hide at once (no show-through) */
}

/* Hide the $0 / $130 span values */
.price_label.evov-price-skeleton span,
.wd-content-layout.evov-entry-skeleton .price_label span,
html.evov-wmc-pending .widget_price_filter .price_label span {
  visibility: hidden !important;
}

.price_label.evov-price-skeleton::after,
.wd-content-layout.evov-entry-skeleton .price_label::after,
html.evov-wmc-pending .widget_price_filter .price_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;
}

/* Layered-nav / brand swatch links (.layered-nav-link) */
/* Each link is shimmer'd individually so the swatch grid shimmers per-tile. */
.layered-nav-link.evov-filter-link-skeleton,
.wd-content-layout.evov-entry-skeleton .layered-nav-link {
  position:         relative;
  overflow:         hidden;
  pointer-events:   none;
  border-radius:    var(--wd-form-brd-radius, 4px);
  /* Re-declare the variable to override WoodMart's widget-container value.
     !important guards against any WoodMart rule that might win on background-color. */
  --wd-form-bg:     var(--evov-skel-surface, #272831);
  background-color: var(--wd-form-bg) !important;
}

/* Hide the scrollbar on the brand/filter swatch list while loading. Only its
   colour: overflow-y:hidden removed the scrollbar's width, so every filter row
   widened by it and narrowed back when results arrived (the sidebar shake). */
/* (Not scrollbar-color: in Chrome that swaps the site's 5px scrollbar for
   the default one, which floats on macOS and changes the width all the same.) */
.wd-content-layout.evov-filter-loading .wd-swatches-filter::-webkit-scrollbar-thumb,
.wd-content-layout.evov-filter-loading .wd-swatches-filter::-webkit-scrollbar-track {
  background: transparent !important;
}

/* Stand-in for WoodMart's active-filters bar ("Clear filters", chips) while a
   filter loads (pjax-nav.js evovReserveActiveFilters). Elementor leaves that
   widget out when nothing is filtered, so without this the grid dropped by
   the bar's height when results arrived. Same height as the bar (25px on
   evov; a site with a taller bar sets --evov-active-filters-h); the
   container's flex gap supplies the spacing below it. */
.evov-active-filters-skel {
  display:          flex;
  gap:              10px;
  height:           var(--evov-active-filters-h, 25px);
  flex:             none;
}
.wd-content-layout:not(.evov-filter-loading) .evov-active-filters-skel {
  display: none;
}
.evov-active-filters-skel span {
  position:         relative;
  overflow:         hidden;
  width:            110px;
  border-radius:    var(--wd-brd-radius, 4px);
  background-color: var(--evov-skel-surface, #272831);
}
.evov-active-filters-skel span + span {
  width:            80px;
}
.evov-active-filters-skel span::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;
}

/* Enter the loading state at once. WoodMart animates these controls
   (`transition: all`), so their skeleton look arrived a quarter second late
   and the live values (counts, chips, Filter button) showed meanwhile. Only
   while loading: their own transition still fades them back in afterwards. */
.wd-content-layout.evov-filter-loading :is(.layered-nav-link, .wc-layered-nav-term .count, .price_slider_amount button, .wd-filter-search, .price_slider, .wd-shop-active-filters a),
.wd-content-layout.evov-filter-loading :is(.layered-nav-link, .wc-layered-nav-term .count, .price_slider_amount button, .wd-filter-search, .price_slider, .wd-shop-active-filters a) *,
.layered-nav-link.evov-filter-link-skeleton {
  transition: none !important;
}

/* The active-filters bar when it is already on the page (a filter is being
   removed or changed): its "Clear filters" link and chips shimmer with the
   rest instead of staying live. Chip and clear icons are ::before. */
.wd-content-layout.evov-filter-loading .wd-shop-active-filters a {
  position:         relative;
  overflow:         hidden;
  pointer-events:   none;
  color:            transparent !important;
  border-radius:    var(--wd-brd-radius, 4px);
  background-color: var(--evov-skel-surface, #272831);
}
.wd-content-layout.evov-filter-loading .wd-shop-active-filters a > *,
.wd-content-layout.evov-filter-loading .wd-shop-active-filters a::before,
.wd-content-layout.evov-filter-loading .wd-shop-active-filters .wd-action-icon::before {
  opacity: 0 !important;
}
.wd-content-layout.evov-filter-loading .wd-shop-active-filters a::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;
}

/* Hide children + ::before checkbox behind the shimmer.
   !important needed: WoodMart has higher-specificity rules for .wd-swatch.
   ::before is the checkbox pseudo-element and is NOT covered by > *. */
.layered-nav-link.evov-filter-link-skeleton > *,
.layered-nav-link.evov-filter-link-skeleton::before,
.wd-content-layout.evov-entry-skeleton .layered-nav-link > *,
.wd-content-layout.evov-entry-skeleton .layered-nav-link::before {
  opacity:    0 !important;
  /* Hide at once; the fade back in (below) runs when the class comes off. */
  transition: none !important;
}

/* Graceful fade-in when the class is removed */
.layered-nav-link > *,
.layered-nav-link::before {
  transition: opacity 0.15s ease;
}

.layered-nav-link.evov-filter-link-skeleton::after,
.wd-content-layout.evov-entry-skeleton .layered-nav-link::after {
  content:    '';
  position:   absolute;
  inset:      0;
  z-index:    5;
  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;
}


/* ── Price slider / Filter button / filter search / term counts ──────────
   The remaining sidebar controls, so the whole filter panel enters the
   loading state as one surface instead of leaving live widgets stranded
   among skeletons. All four share the #272831 surface and the same 1.4s
   evovSkeletonShimmer, and because navigate() adds every skeleton class in a
   single synchronous batch they start together and stay in phase (verified
   live: eight shimmer animations, 0ms spread). */

/* Price range slider. ::before is the 2px track line — a separate pseudo from
   the pink .ui-slider-range, so hiding the range and handles alone left a
   visible hairline across the shimmer. */
.wd-content-layout.evov-filter-loading .price_slider {
  position:         relative;
  overflow:         hidden;
  background-color: var(--evov-skel-surface, #272831) !important;
  background-image: none !important;
  border:           0 !important;
  border-radius:    35px !important;
  pointer-events:   none;
}

.wd-content-layout.evov-filter-loading .price_slider::before {
  display: none !important;
}

.wd-content-layout.evov-filter-loading .price_slider .ui-slider-range,
.wd-content-layout.evov-filter-loading .price_slider .ui-slider-handle {
  opacity: 0 !important;
}

/* Filter submit button — kill the brand fill as well as the label, or the
   pink pill stays lit while everything around it is a placeholder. */
.wd-content-layout.evov-filter-loading .price_slider_amount button {
  position:         relative;
  overflow:         hidden;
  background-color: var(--evov-skel-surface, #272831) !important;
  background-image: none !important;
  border-color:     transparent !important;
  color:            transparent !important;
  box-shadow:       none !important;
  pointer-events:   none;
}

/* Filter search box. The 35px pill radius lives on the INPUT, which we hide,
   so it has to be restated on the wrapper we actually paint — without it the
   box renders as a hard rectangle among rounded rows. ::before is the
   magnifier icon and, being a pseudo-element, is not reached by > *. */
.wd-content-layout.evov-filter-loading .wd-filter-search {
  position:         relative;
  overflow:         hidden;
  background-color: var(--evov-skel-surface, #272831) !important;
  border-color:     transparent !important;
  border-radius:    35px !important;
  pointer-events:   none;
}

.wd-content-layout.evov-filter-loading .wd-filter-search::before {
  display: none !important;
}

.wd-content-layout.evov-filter-loading .wd-filter-search > * {
  opacity: 0 !important;
}

/* Term counts — real numbers sitting on a placeholder row read as data the
   page does not actually have yet. */
.wd-content-layout.evov-filter-loading .wc-layered-nav-term .count {
  position:         relative;
  overflow:         hidden;
  background-color: var(--evov-skel-surface, #272831) !important;
  border-color:     transparent !important;
  color:            transparent !important;
  pointer-events:   none;
}

.wd-content-layout.evov-filter-loading .price_slider::after,
.wd-content-layout.evov-filter-loading .price_slider_amount button::after,
.wd-content-layout.evov-filter-loading .wd-filter-search::after,
.wd-content-layout.evov-filter-loading .wc-layered-nav-term .count::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;
}


/* ── Price filter before its script runs ─────────────────────────────────
   WooCommerce ships the slider and its "Price: … — …" label display:none and
   the slider script runs at the end of the page, so on a direct load the
   widget showed only the Filter button and the rest popped in about a
   quarter second after load. WoodMart reserves 60px for the hidden slider,
   but it takes 40px (20px + 20px margin), so the button jumped as well. Both
   show as shimmer placeholders from first paint instead, in the finished
   layout (76px, label left of the button), until jQuery UI builds the slider
   (.ui-slider) and WooCommerce un-hides the label (its inline style changes). */
.widget_price_filter .price_slider:not(.ui-slider) {
  display:          block !important;
  position:         relative;
  overflow:         hidden;
  height:           20px;
  margin-bottom:    20px;
  border-radius:    var(--wd-brd-radius, 4px);
  background-color: var(--evov-skel-surface, #272831);
}

.widget_price_filter .price_slider:not(.ui-slider) + .price_slider_amount {
  margin-top:      0 !important;
  justify-content: space-between !important;
}

.widget_price_filter .price_label[style*="none"] {
  display:          block !important;
  position:         relative;
  overflow:         hidden;
  width:            140px;
  min-height:       1.2em;
  color:            transparent !important;
  border-radius:    var(--wd-form-brd-radius, 4px);
  background-color: var(--evov-skel-surface, #272831);
}

/* When a mask comes off, the label fades in with the Filter button, which
   WoodMart gives a 0.25s transition. Masking stays instant: the skeleton
   rules set transition:none while they apply. */
.widget_price_filter .price_label {
  transition: color 0.25s ease, background-color 0.25s ease;
}

/* The Filter button with them, as it is while a filter loads (below): until
   the slider is built, and while the label waits for the visitor's currency
   (html.evov-wmc-pending, lifted when Curcy answers). */
.widget_price_filter .price_slider:not(.ui-slider) + .price_slider_amount button,
html.evov-wmc-pending .widget_price_filter .price_slider_amount button {
  position:         relative;
  overflow:         hidden;
  background-color: var(--evov-skel-surface, #272831) !important;
  background-image: none !important;
  border-color:     transparent !important;
  color:            transparent !important;
  box-shadow:       none !important;
  pointer-events:   none;
  transition:       none !important;
}

.widget_price_filter .price_slider:not(.ui-slider)::after,
.widget_price_filter .price_label[style*="none"]::after,
.widget_price_filter .price_slider:not(.ui-slider) + .price_slider_amount button::after,
html.evov-wmc-pending .widget_price_filter .price_slider_amount button::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;
}


/* ── Entry-only reveals ──────────────────────────────────────────────────
   Two filter controls are display:none at entry time, so they cannot shimmer
   however they are styled. Both are revealed here for the duration of the
   entry skeleton only, then handed straight back to their normal owners. */

/* WooCommerce ships the slider as <div class="price_slider" style="display:none">
   and jQuery UI un-hides it on init, which has not happened yet during entry.
   The inline style needs !important to beat it. */
.wd-content-layout.evov-entry-skeleton .price_slider {
  display: block !important;
}

/* Our own updateFilterSearchVisibility() (pjax-nav.js) reveals a filter search
   box only when its wrapper holds MORE than 5 filter links, and it runs after
   the swap. :has(li:nth-child(6)) is the same test declaratively — the 6th item
   exists exactly when there are more than 5 — so the boxes that shimmer here
   are precisely the ones that will still be on screen afterwards, with none
   appearing or vanishing as the skeleton clears. */
.wd-content-layout.evov-entry-skeleton .wd-filter-wrapper:has(li:nth-child(6)) .wd-filter-search {
  display: flex !important;
}


/* ── Layered-nav filter search inputs ────────────────────────────────── */

/* Hidden by default — JS (updateFilterSearchVisibility) reveals only those
   whose filter list exceeds 5 items, preventing a flash-then-hide on load. */
.wd-filter-search {
  display: none;
}

/* WoodMart overrides --wd-form-bg inside .elementor-widget-container, so
   these inputs inherit rgb(18,20,32) instead of the correct #0b0d14.
   Re-declare the variable on the input to restore the intended form colour. */
.wd-filter-search input {
  --wd-form-bg: #0b0d14;
  background-color: var(--wd-form-bg);
}


/* ── Logged-in customers: numbers from the per-user block ─────────────── */

/* On a shared logged-in page (inc/class-evov-esi.php) the cart count,
   subtotal and wishlist count are printed as 0; the evov-user block fills in
   the customer's own and removes the class. Hidden until then, so another
   customer's numbers or a wrong 0 never show. Space is kept (visibility).
   On a page from Cloudflare (built for guests) the class is on <html>, set
   in <head> for customers, and also hides "Login / Register". */
.evov-user-pending :is(.wd-cart-number, .wd-cart-subtotal, .wd-header-wishlist .wd-tools-count, .wd-header-waitlist .wd-tools-count, .wd-header-my-account .wd-tools-text, .mobile-nav .menu-item-account.login-side-opener) {
  visibility: hidden;
}

/* A guest with a cart on a page from Cloudflare (built with an empty cart):
   the header cart number and total stay hidden until WooCommerce's cart
   fragments put in the guest's own (inc/class-evov-esi.php). */
.evov-cart-pending :is(.wd-cart-number, .wd-cart-subtotal) {
  visibility: hidden;
}

/* The review form, until we know this customer bought the product (it is
   then shown, or replaced by WooCommerce's "only customers who purchased"
   note). */
body.evov-review-pending #review_form_wrapper {
  display: none;
}


/* ── Search bar loading spinner ───────────────────────────────────────── */

/* WoodMart adds .wd-search-loading to the <form> while the AJAX request is
   in flight. It uses ::before on .searchsubmit for the spinner (sized to
   calc(var(--wd-form-height) / 2.5) and centered via absolute positioning)
   and fades the ::after search icon out via opacity.
   We keep WoodMart's sizing/positioning and just replace the border colors
   and animation with our own so the arc style is consistent site-wide. */
.searchform.wd-search-loading .searchsubmit::before {
    border-color:     color-mix(in srgb, var(--wd-primary-color, #6366f1) 18%, transparent) !important;
    border-top-color: var(--wd-primary-color, #6366f1) !important;
    border-radius:    50% !important;
    animation-name:            evovSpinnerRotate !important;
    animation-duration:        0.7s              !important;
    animation-timing-function: linear            !important;
    animation-iteration-count: infinite          !important;
    animation-play-state:      var(--wd-anim-state, running) !important;
}


/* ── Result count skeleton ────────────────────────────────────────────── */

/* Hide the count text and show the same shimmer over the element background. */
.woocommerce-result-count.evov-result-count-skeleton,
.wd-content-layout.evov-entry-skeleton .woocommerce-result-count {
  position:         relative;
  overflow:         hidden;
  border-radius:    var(--wd-form-brd-radius, 4px);
  pointer-events:   none;
  color:            transparent;
  background-color: var(--evov-skel-surface, #272831);
  transition:       none !important;   /* hide at once (no show-through) */
}

.woocommerce-result-count.evov-result-count-skeleton::after,
.wd-content-layout.evov-entry-skeleton .woocommerce-result-count::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;
}


/* ── Breadcrumb skeleton during PJAX filter/pagination ───────────────────── */

/* Shimmer <a> links and .wd-last (current page); .wd-delimiter separators are
   not targeted so the / characters remain visible throughout. */
.wd-breadcrumbs.evov-breadcrumb-skeleton a,
.wd-breadcrumbs.evov-breadcrumb-skeleton .wd-last,
.wd-content-layout.evov-entry-skeleton .wd-breadcrumbs a,
.wd-content-layout.evov-entry-skeleton .wd-breadcrumbs .wd-last {
  position:         relative;
  overflow:         hidden;
  display:          inline-block;
  border-radius:    var(--wd-form-brd-radius, 4px);
  color:            transparent !important;
  background-color: var(--evov-skel-surface, #272831);
  pointer-events:   none;
  transition:       none !important;   /* hide at once (no show-through) */
}

.wd-breadcrumbs.evov-breadcrumb-skeleton a::after,
.wd-breadcrumbs.evov-breadcrumb-skeleton .wd-last::after,
.wd-content-layout.evov-entry-skeleton .wd-breadcrumbs a::after,
.wd-content-layout.evov-entry-skeleton .wd-breadcrumbs .wd-last::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;
}


/* ── Search dropdown: keep history/requests visible alongside AJAX results ── */
/* WoodMart adds wd-searched to .wd-search-form when autocomplete initialises, */
/* then its own CSS hides .wd-search-history / .wd-search-requests / .wd-search-area. */
/* Override so those elements stay visible alongside search results — matching  */
/* the dropdown appearance when the user clicks the search bar without typing.  */
/* evov only (body class evov-search-look, evov_feature('search-look')); OTLT   */
/* keeps WoodMart's default. :where() adds no weight.                           */

:where(.evov-search-look) .wd-searched .wd-dropdown-results :is(.wd-search-history, .wd-search-requests, .wd-search-area) {
  display: block !important;
}


/* ── Single-product gallery: shimmer skeleton for the pre-init "large image" flash ── */
/* Scoped to .evov-gallery-only-featured — the wrapper class evov_gallery_before_render()
   adds (functions.php) only when the Elementor "Product gallery" widget's
   "Exclude gallery" toggle is on (single featured-image-only carousel). That's
   the only variant that actually shows the flash in practice, so the skeleton
   stays off everywhere else rather than running on every gallery sitewide.
   WoodMart's product gallery is a .wd-carousel. Each slide only gets its real
   pixel width via an inline style set by WoodMart's carousel JS on init (adds
   .wd-initialized); before that, the slide's flex-basis
   (calc(100% / var(--wd-col))) resolves against an Elementor "auto width"
   flex column that itself shrink-wraps to content — so the only thing
   bounding the slide is the raw <img>'s own intrinsic size. Net effect: the
   featured image briefly paints at its full native size, then visibly snaps
   down to the JS-computed layout width a moment later.
   Targets .wd-carousel-container (via :has(), not .wd-carousel itself) and
   hides .wd-carousel-inner — its one direct child — because
   woodmart_on_product_image (video/zoom buttons) and the carousel nav
   arrows render as SIBLINGS of the .wd-carousel figure in
   product-image.php, not descendants of it. Skeletoning just .wd-carousel
   left those buttons visibly floating over the shimmer.
   Same recipe as the .evov-skel grid skeleton (shared --evov-skel-* tokens +
   evovSkeletonShimmer sweep) instead of the grid's opacity/JS-toggle version,
   since here there's no evov-sub JS moment to add/remove a class — the gate
   is purely WoodMart's own .wd-initialized, driven by :not(). The three
   failsafe keyframes below all fire at the same 1.5s mark and just re-assert
   plain, un-skeletoned display in case .wd-initialized never arrives (JS
   error, blocked script) — without them the skeleton would persist forever. */
@keyframes evovCarouselSkeletonBgFailsafe  { to { background-color: transparent; } }
@keyframes evovCarouselSkeletonRevFailsafe { to { visibility: visible; } }
@keyframes evovCarouselSkeletonFadeFailsafe { to { opacity: 0; } }

.evov-gallery-only-featured .wd-carousel-container:has(.wd-carousel:not(.wd-initialized)) {
  overflow:         hidden;
  background-color: var(--evov-skel-bg);
  border-radius:    var(--wd-brd-radius, 4px);
  pointer-events:   none;
  animation:        evovCarouselSkeletonBgFailsafe 0s 1.5s forwards;
}
.evov-gallery-only-featured .wd-carousel-container:has(.wd-carousel:not(.wd-initialized)) > * {
  visibility: hidden;
  animation:  evovCarouselSkeletonRevFailsafe 0s 1.5s forwards;
}
.evov-gallery-only-featured .wd-carousel-container:has(.wd-carousel:not(.wd-initialized))::after {
  content:    '';
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.00)  0%,
    var(--evov-skel-shimmer) 50%,
    rgba(255, 255, 255, 0.00) 100%
  );
  animation: evovSkeletonShimmer var(--evov-skel-duration) ease-in-out infinite,
             evovCarouselSkeletonFadeFailsafe 0s 1.5s forwards;
}


/* ── [arm_activation_status] text skeleton ──────────────────────────────── */
/* Pure CSS, no JS timing involved at all. The shortcode (ARM plugin) always
   outputs the span empty — real text is written in by arm-frontend.js only
   once the visitor's country is known (instant from a cookie on repeat
   visits; one AJAX round-trip on a first-ever visit). :empty naturally stops
   matching the instant real text is inserted, so this can never be "a few
   seconds late" or "shows twice" the way a JS-driven build/reveal pair can —
   it's exactly as fast as the real content is, no slower, no faster.
   Deliberately scoped to just this span, not the surrounding icon/title/PSN/
   Digital-Key content: those are static, server-rendered, and correct on the
   very first paint — hiding them too (an earlier version of this fix did,
   via a <head> cloak) meant delaying always-correct content behind this
   span's loading state for no reason, which read as the whole page being
   slower to paint. */
.arm-activation-status:empty {
  display:          inline-block;
  position:         relative;
  overflow:         hidden;
  width:             14em;
  max-width:        100%;
  height:           1em;
  vertical-align:   middle;
  border-radius:    var(--wd-brd-radius, 4px);
  background-color: var(--evov-skel-bg);
}
.arm-activation-status:empty::after {
  content:    '';
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.00)  0%,
    var(--evov-skel-shimmer) 50%,
    rgba(255, 255, 255, 0.00) 100%
  );
  animation: evovSkeletonShimmer var(--evov-skel-duration) ease-in-out infinite;
}


/* ── Mobile / tablet header search: slides out of the icon into the header ──
   WoodMart's "full screen 2" search, re-laid out at ≤1024px. Tapping the
   header search icon: the bar (a pill) starts as a circle on the icon and
   stretches leftwards to full width in the header row, on the header row's
   own background; the magnifier and a round close button inside the pill
   fade in as it lands. Closing runs it in reverse (see the exit rules). The backdrop (WoodMart's own) covers only the content
   below the header; history, trending searches and results sit on it.
   WoodMart still drives open/close, history, trending and AJAX results.
   No colours here: the band takes the header row's background (measured on
   open), the pill/magnifier/close use WoodMart's form colours.
   pjax-nav.js: measures on open (--evov-sh-top / --evov-sh-h header row,
   --evov-sh-l / --evov-sh-r pill insets leaving just the icon's circle,
   --evov-sh-bg header row background), raises the keyboard on the tap, and
   holds html.evov-sh-closing for the fold-back.
   "html body" outranks WoodMart's own rules, which load later. */
@media (max-width: 1024px) {
  html body .wd-search-full-screen-2 {
    top: calc(var(--evov-sh-top, 0px) + var(--evov-sh-h, 71px));
    display: block;
    padding: 0;
    /* Closed: hide at once (after the fold-back, everything in it is
       already invisible; WoodMart's fade here flashed the backdrop back). */
    transition: opacity 0s, visibility 0s, background-color 0s;
  }
  html body .wd-search-full-screen-2.wd-opened {
    transition: opacity .2s ease, visibility 0s, background-color .2s ease;
  }
  html body .wd-search-full-screen-2 > .container {
    max-height: 100%;
    padding-top: 24px;
    padding-bottom: 24px;
  }
  html body .wd-search-full-screen-2 .searchform {
    position: fixed;
    top: var(--evov-sh-top, 0px);
    inset-inline: 0;
    height: var(--evov-sh-h, 71px);
    margin: 0;
    padding: 0 15px;
    display: flex;
    align-items: center;
    background-color: var(--evov-sh-bg, var(--wd-main-bgcolor));
    transform: none;
    transition: opacity .1s ease .26s, visibility 0s linear .36s;
  }
  html body .wd-search-full-screen-2.wd-opened .searchform {
    transition: opacity .12s ease, visibility 0s;
  }
  /* The pill: a circle on the icon, then right-to-left to full width;
     closing folds it back. */
  html body .wd-search-full-screen-2 .searchform input[type="text"] {
    height: 46px;
    width: 100%;
    padding-inline-start: 48px;
    padding-inline-end: 56px;
    border-radius: 999px;
    font-size: 16px; /* 16px stops iOS zooming into the field */
    clip-path: inset(0 var(--evov-sh-r, 0px) 0 var(--evov-sh-l, 85%) round 999px);
    transition: clip-path .24s cubic-bezier(0.4, 0, 1, 1) .08s;
  }
  html body .wd-search-full-screen-2.wd-opened .searchform input[type="text"] {
    clip-path: inset(0 0 0 0 round 999px);
    transition: clip-path .45s cubic-bezier(0.33, 1, 0.68, 1) .05s;
  }
  /* Magnifier inside the pill, on the left. */
  html body .wd-search-full-screen-2 .searchform::before {
    content: "\f130";
    font-family: "woodmart-font";
    position: absolute;
    inset-inline-start: 31px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    color: var(--wd-form-color);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity .1s ease;
  }
  html body .wd-search-full-screen-2.wd-opened .searchform::before {
    opacity: .8;
    transition: opacity .2s ease .24s;
  }
  /* Searching (WoodMart puts .wd-search-loading on the form while its
     request runs): the magnifier turns into the site spinner, as the
     desktop search button does. `scale` rather than transform, which
     carries the magnifier's centring and the spinner's rotation. */
  html body .wd-search-full-screen-2 .searchform::after {
    content: "";
    position: absolute;
    inset-inline-start: 31px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--wd-primary-color) 18%, transparent);
    border-top-color: var(--wd-primary-color);
    opacity: 0;
    scale: .5;
    pointer-events: none;
    z-index: 1;
    transition: opacity .15s ease, scale .15s ease;
  }
  html body .wd-search-full-screen-2.wd-opened .searchform::after {
    animation: evovSpinnerRotate .7s linear infinite;
  }
  html body .wd-search-full-screen-2.wd-opened .searchform.wd-search-loading::before {
    opacity: 0;
    scale: .5;
    transition: opacity .15s ease, scale .15s ease;
  }
  html body .wd-search-full-screen-2.wd-opened .searchform.wd-search-loading::after {
    opacity: 1;
    scale: 1;
  }
  /* Enter searches; the close button replaces the submit and clear buttons. */
  html body .wd-search-full-screen-2 .searchform .searchsubmit,
  html body .wd-search-full-screen-2 .searchform .wd-clear-search {
    display: none !important;
  }
  /* Close: a round button inside the pill, on the right. */
  html body .wd-search-full-screen-2 .wd-close-search.wd-style-icon {
    --wd-action-icon-size: 14px;
    position: fixed;
    top: calc(var(--evov-sh-top, 0px) + (var(--evov-sh-h, 71px) - 36px) / 2);
    inset-inline-end: 21px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--wd-form-color) 14%, var(--wd-form-bg));
    opacity: 0;
    transition: opacity .1s ease;
  }
  html body .wd-search-full-screen-2.wd-opened .wd-close-search.wd-style-icon {
    opacity: 1;
    transition: opacity .2s ease .24s;
  }
  html body .wd-search-full-screen-2 .wd-close-search > a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* History, trending and results settle in under the bar. */
  html body .wd-search-full-screen-2 :is(.wd-search-history, .wd-search-requests, .wd-search-area) {
    transform: translateY(12px);
    transition: all .35s cubic-bezier(0.22, 0.8, 0.24, 1) .12s;
  }
  html body .wd-search-full-screen-2.wd-opened :is(.wd-search-history, .wd-search-requests, .wd-search-area) {
    transform: none;
  }
  html body .wd-search-full-screen-2.wd-searched .wd-search-results {
    height: calc(100dvh - var(--evov-sh-top, 0px) - var(--evov-sh-h, 71px) - 48px);
  }

  /* Exit (pjax-nav.js keeps html.evov-sh-closing ~0.36s after close), the
     opening in reverse: history, trending and results slide down a touch
     and fade first; then the pill folds back into the icon while the
     backdrop fades; the header-coloured band goes last. */
  html.evov-sh-closing body .wd-search-full-screen-2 {
    visibility: visible;
    opacity: 1;
    background-color: transparent;
    pointer-events: none;
    transition: background-color .26s ease .04s;
  }
  html.evov-sh-closing body .wd-search-full-screen-2 :is(.wd-search-history, .wd-search-requests, .wd-search-area, .wd-search-results) {
    visibility: visible;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .16s ease-in, transform .16s ease-in;
  }
  html.evov-sh-closing body .wd-search-full-screen-2 .searchform {
    visibility: visible;
    opacity: 0;
    transition: opacity .1s ease .26s;
  }
}

