/* ═══════════════════════════════════════════════════════
   Product Listing — Figma [D] Yonelle - Listing (822:9008)
   Source spec:  _workspace/brain/attachments/figma-listing-2026-05-02/spec.md
   Scaling:      Figma 1440 → prod 1920 (×1.333)
   Tokens:       var(--wp--preset--...) from theme.json (no hardcoded fonts)
   Item view:    yonelle_render_product_item_view()  (Damian/Woo canonical
                 product presentation; this stylesheet wraps grid/layout only)

   Layout per Figma (x=0..1440 all content):
     sidebar 253 | gap 131 | main 1056  =  1440
     ×1.333   →  337           175           1408  =  1920
     %        →  17.552%       9.115%        73.333%

   Grid inside main (scaled): 3 × 437 cards, col-gap 21, row-gap 96.
   Breakpoints follow yonelle-blocks-v2 _tokens.scss:
     $bp-mobile 600  /  $bp-tablet 782  /  $bp-desktop 1024  /  $bp-large 1920
   ═══════════════════════════════════════════════════════ */

/* ---------- Page shell ---------- */
.yl-listing-page {
  max-width: 1920px;
  margin: 0 auto;
  background-color: var(--wp--preset--color--beige-100, #faf9f6);
  /* box-shadow: 0 0 0 100vmax var(--wp--preset--color--beige-100, #FAF9F6); */
  /* clip-path: inset(0 -100vmax); */
}

/* ---------- Breadcrumb — Figma Top-navi 2 (822:9018) ---------- */
.yl-breadcrumb {
  padding: 11px 53px 0; /* 8→11, 40→53 */
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 400;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  color: var(--wp--preset--color--beige-700, #716e68);
}

.yl-breadcrumb__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.yl-breadcrumb a {
  color: var(--wp--preset--color--beige-700, #716e68);
  text-decoration: none;
  transition: color 0.2s;
}

.yl-breadcrumb a:hover {
  color: var(--wp--preset--color--beige-900, #272725);
}

.yl-breadcrumb__current {
  color: var(--wp--preset--color--beige-900, #272725);
}

.yl-breadcrumb__sep {
  display: inline-flex;
  color: var(--wp--preset--color--beige-700, #716e68);
  flex-shrink: 0;
}

.yl-breadcrumb__chev {
  display: block;
}

/* ---------- Two-column layout — Figma 822:9008 content (822:9025) ----------
   sidebar 17.552% | gap 9.115% | main 73.333%  (sum 100%)
   At 1920 viewport → 337 | 175 | 1408. Scales linearly for <1920.
   -------------------------------------------------------------- */
.yl-listing {
  display: grid;
  grid-template-columns: 17.552% 73.333%;
  column-gap: 9.115%;
  max-width: none;
  margin: 0;
  min-height: 600px;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

/* Sidebar — Figma left-section (822:9026): 253×1578, inside padding-left 40 */
.yl-listing__sidebar {
  width: auto;
  min-width: 0;
  padding: 43px 0 75px 53px; /* 32→43, 56→75, 40→53 */
  display: flex;
  flex-direction: column;
  gap: 21px; /* 16→21 between filter groups */
  overflow: hidden;
  box-sizing: border-box;
}

/* Main — Figma right-section (822:9135): 1056×5318, inner listing 1016 centered */
.yl-listing__main {
  width: auto;
  min-width: 0;
  padding: 32px 27px 0 27px; /* 24→32 top, 20→27 sides */
  display: flex;
  flex-direction: column;
  gap: 43px; /* header → grid → seo spacing */
  box-sizing: border-box;
}

/* wpautop() injects <br> inside shortcode output — kill them in sidebar */
.yl-listing__sidebar br {
  display: none !important;
}

/* ---------- Sidebar: Filter groups ---------- */
.yl-filter-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
}
@media (max-width: 1080px) {
  .yl-filter-group {
    padding: 12px 24px;
  }
  .yl-filter-group:first-child {
    margin-top: 12px;
  }
  .yl-filter-group:last-child {
    margin-bottom: 12px;
  }
  .yl-filter-group.active {
    gap: 40px;
    padding: 40px 24px;
    height: fit-content;
    max-height: 100%;
  }
  .yl-filter-group.hidden {
    display: none;
  }
}
.yl-sidebar__top {
  display: none;
}

.yl-filter-group__title {
  font-family: var(--wp--preset--font-family--headers, "Cormorant", serif);
  font-weight: 500;
  font-size: 32px; /* Figma 24 → 32 prod — $headers-h2-ish scale */
  line-height: 1.2;
  color: var(--wp--preset--color--beige-900, #272725);
  margin: 0;
}
@media (max-width: 1080px) {
  .yl-filter-group__title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    font-family: var(
      --wp--preset--font-family--body,
      "Plus Jakarta Sans",
      sans-serif
    );
    font-weight: 400;
    font-size: var(--wp--preset--font-size--body-s, 14px);
    line-height: 1.5;
  }
  .yl-filter-group__title.active {
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-weight: 700;
    letter-spacing: -0.28px;
    text-transform: uppercase;
  }
  .yl-filter-group__title.cat.active {
    flex-direction: row;
    justify-content: space-between;
  }
  .yl-filter-group__title::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 18L15 12L9 6' stroke='%23272725' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .yl-filter-group__title.active::after {
    transform: rotate(180deg);
  }
}

.yl-filter-group__list {
  display: flex;
  flex-direction: column;
  gap: 21px; /* 16→21 between rows in a group */
}

@media (max-width: 1080px) {
  .yl-filter-group__list {
    display: none;
  }
  .yl-filter-group__list.show {
    display: flex;
  }
}

/* Series / type links — PJS 500 12px UPPERCASE ($title-smalltitle) */
.yl-listing__sidebar .yl-filter-link {
  display: flex;
  align-items: center;
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--wp--preset--color--beige-700, #716e68);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box;
}

.yl-listing__sidebar .yl-filter-link[hidden] {
  display: none !important;
}

.yl-listing__sidebar .yl-filter-link:hover,
.yl-listing__sidebar .yl-filter-link--active {
  color: var(--wp--preset--color--beige-900, #272725);
  font-weight: 700;
}

/* Checkbox filters */
.yl-filter-check {
  display: flex;
  gap: 11px; /* 8→11 */
  align-items: center;
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--wp--preset--color--beige-700, #716e68);
  cursor: pointer;
  text-decoration: none;
  margin: 0;
  padding: 0;
}

.yl-listing__sidebar a.yl-filter-check,
.yl-listing .yl-filter-group a.yl-filter-check {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box;
  line-height: 1.4;
}

.yl-filter-check:hover,
.yl-filter-check--active {
  color: var(--wp--preset--color--beige-900, #272725);
  font-weight: 700;
}

/* Checkbox square — Figma 16×16 → 21×21 prod */
.yl-filter-check__box {
  width: 21px;
  height: 21px;
  padding: 2px;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
}

.yl-filter-check__box::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--wp--preset--color--beige-700, #716e68);
  box-sizing: border-box;
}

.yl-filter-check__box--checked::before {
  border-color: var(--wp--preset--color--beige-900, #272725);
  background: var(--wp--preset--color--beige-900, #272725);
}

.yl-filter-check__box--checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.yl-filter-show-more {
  align-self: flex-start;
}

@media (max-width: 1080px) {
  .yl-filter-show-more {
    display: none !important;
  }
  .yl-filter-show-more.show {
    display: flex !important;
  }
}

/* ---------- Loyalty points (Kordian atom 3b, shared with product-card-v2) ---------- */
.yl-listing .yl-product-card__points {
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.24px;
  color: var(--wp--preset--color--beige-700, #716e68);
  margin: 0 0 5px;
}

/* ---------- Underline link (shared) ---------- */
.yl-underline-link {
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.28px;
  color: var(--wp--preset--color--beige-900, #272725);
  text-decoration: none;
  border-bottom: 1px solid var(--wp--preset--color--beige-900, #272725);
  padding-bottom: 5px;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.yl-underline-link:hover {
  color: var(--wp--preset--color--beige-700, #716e68);
  border-color: var(--wp--preset--color--beige-700, #716e68);
}

/* ---------- Listing header row — Figma 822:9137 (1016 × 40 → 1354 × 53 prod) ---------- */
.yl-listing__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 21px;
}

/* Sticky header — Figma 822:8193 (Frame 822:8949).
   Two layers working together:
   1. Inline .yl-listing__header stays in flow (title+count+sort+filters-toggle)
      inside .yl-listing__main. This is the one users see on page load.
   2. .yl-sticky-header is a full-width fixed bar rendered outside the grid
      that MORPHS IN when body.yl-header-stuck is toggled by IO observer on
      the main column top sentinel. Contains title+count, chips (no "Aktywne
      filtry:" label, just "Filtr:"), and sort button — per Figma 822:8949.
   Chips/sort inside sticky-header are stateless clones — each action does a
   full redirect via the shared rebuildUrlFromState()/sort handler so no
   per-instance state sync is required. */

/* Full-width fixed sticky header (desktop only) */
.yl-sticky-header {
  display: none;
}

@media (min-width: 1080px) {
  .yl-sticky-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--wp--preset--color--beige-000, #ffffff);
    border-bottom: 1px solid var(--wp--preset--color--beige-200, #dbdad6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 11px 32px; /* 8/24 Figma → 11/32 prod */
    min-height: 75px; /* 56 Figma → 75 prod */
    box-sizing: border-box;
    transform: translateY(-100%);
    transition: transform 0.2s ease-out;
  }

  body.yl-header-stuck .yl-sticky-header {
    display: block;
    transform: translateY(0);
  }

  /* WP admin bar push-down */
  body.admin-bar.yl-header-stuck .yl-sticky-header {
    top: 32px;
  }
  @media (max-width: 782px) {
    body.admin-bar.yl-header-stuck .yl-sticky-header {
      top: 46px;
    }
  }

  .yl-sticky-header__inner {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 43px; /* 32 Figma → 43 prod between title and chips */
  }

  .yl-sticky-header__title-row {
    display: flex;
    align-items: baseline;
    gap: 11px; /* 8 Figma → 11 prod */
    flex-shrink: 0;
  }

  .yl-sticky-header__title {
    font-family: var(--wp--preset--font-family--headers, "Cormorant", serif);
    font-weight: 500;
    font-size: 32px; /* $headers-h1 */
    line-height: 1;
    color: var(--wp--preset--color--beige-900, #272725);
    margin: 0;
  }

  .yl-sticky-header__count {
    font-family: var(
      --wp--preset--font-family--body,
      "Plus Jakarta Sans",
      sans-serif
    );
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.24px;
    text-transform: uppercase;
    color: var(--wp--preset--color--beige-700, #716e68);
  }

  .yl-sticky-header__chips {
    display: flex;
    align-items: center;
    gap: 21px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .yl-sticky-header .yl-sort {
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* Background of the inline header — transparent so Figma 822:9008 baseline
   keeps the beige page background. No sticky positioning on the inline
   header; sticky behavior is handled entirely by .yl-sticky-header above. */
@media (min-width: 1080px) {
  .yl-listing__header {
    background: transparent;
    padding: 0;
    margin: 0;
  }
}

.yl-listing__title-row {
  display: flex;
  gap: 11px; /* 8→11 */
  align-items: baseline;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.yl-listing__title {
  font-family: var(--wp--preset--font-family--headers, "Cormorant", serif);
  font-weight: 500;
  font-size: 32px; /* $headers-h1 */
  line-height: 1.2;
  color: var(--wp--preset--color--beige-900, #272725);
  margin: 0;

  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.yl-listing__count {
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--wp--preset--color--beige-700, #716e68);
}

/* ---------- Sort dropdown — Figma button instance 822:9142 (214×40 → 285×53) ---------- */
.yl-sort {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.yl-listing__sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 9.5px 40px;
  background: var(--wp--preset--color--beige-000, #ffffff);
  border: 1px solid var(--wp--preset--color--beige-900, #272725);
  cursor: pointer;
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.28px;
  color: var(--wp--preset--color--beige-900, #272725);
  white-space: nowrap;
  box-sizing: border-box;
}

.yl-listing__sort-btn svg {
  width: 21px;
  height: 21px;
} /* 16→21 chevron */

.yl-listing__sort-btn:hover {
  background: var(--wp--preset--color--beige-100, #faf9f6);
}

.yl-sort--open .yl-listing__sort-btn svg {
  transform: rotate(180deg);
}

.yl-sort__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 100%;
  background: var(--wp--preset--color--beige-000, #ffffff);
  border: 1px solid var(--wp--preset--color--beige-200, #dbdad6);
  list-style: none;
  margin: 0;
  padding: 5px 0;
  z-index: 10;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
}

.yl-sort--open .yl-sort__dropdown {
  display: block;
}

.yl-sort__option {
  padding: 11px 32px;
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.28px;
  color: var(--wp--preset--color--beige-900, #272725);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.yl-sort__option:hover {
  background: var(--wp--preset--color--beige-100, #faf9f6);
}
.yl-sort__option--active {
  font-weight: 600;
}

/* ---------- Active filter chips — Figma 822:8325 "Frame 743" ----------
   Layout: label "Aktywne filtry:" + N × badges + "Wyczyść wszystkie" link.
   Badge: 131×25 Figma → 175×33 prod, 1px solid #444340, padding 11×5 prod,
          PJS Medium 12px UPPERCASE.
   X close icon: 16×16 Figma → 21×21 prod, stroke #444340.
   -------------------------------------------------------------- */
.yl-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 21px; /* 16→21 label↔badges + between badges */
  padding: 0;
  margin-top: -21px; /* zasysa pod header (ujemny do gapu 43 w main) */
}

.yl-active-filters__label {
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--wp--preset--color--beige-900, #272725);
}

.yl-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 13px; /* 10→13 label↔close */
  padding: 5px 11px; /* 4/8 Figma → 5/11 prod */
  min-height: 33px; /* 25→33 */
  border: 1px solid var(--wp--preset--color--beige-800, #444340);
  border-radius: 0; /* badge per spec = ostry prostokąt */
  background: var(--wp--preset--color--beige-000, #ffffff);
  box-sizing: border-box;
}

.yl-active-filter__label {
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--wp--preset--color--beige-900, #272725);
  white-space: nowrap;
}

.yl-active-filter__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px; /* 16→21 */
  height: 21px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  color: var(--wp--preset--color--beige-800, #444340);
  cursor: pointer;
  transition: color 0.15s;
}

.yl-active-filter__close:hover {
  color: var(--wp--preset--color--beige-900, #272725);
}

.yl-active-filters__clear {
  margin-left: auto;
}

/* ---------- Ad tile — Figma 822:9155 "image 5" (Atom 4b) ----------
   Card-sized tile 328×589 Figma → 437×785 prod. Rotates randomly per page
   view, injected at slot #6 by yonelle_render_product_grid_v2(). Covers
   one grid column entirely (no split with product card content).

   Aspect-ratio 437/785 ≈ 0.557 locks the tile to the card dimensions so
   the grid row stays consistent at the desktop breakpoint.
   On mobile (1fr column) aspect-ratio still applies; tile scales with
   viewport width.
   -------------------------------------------------------------- */
.yl-ad-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--wp--preset--color--beige-200, #dbdad6);
  overflow: hidden;
  aspect-ratio: 437 / 785;
  min-height: 0;
  isolation: isolate;
}

.yl-ad-tile__link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  z-index: 1;
}

.yl-ad-tile__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
  transition: transform 0.45s ease;
}

.yl-ad-tile__link:hover .yl-ad-tile__image {
  transform: scale(1.03);
}

.yl-ad-tile__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 32px 32px 27px; /* Figma scaled — generous bottom */
  background: linear-gradient(
    to top,
    rgba(39, 39, 37, 0.72) 0%,
    rgba(39, 39, 37, 0.42) 45%,
    rgba(39, 39, 37, 0) 100%
  );
  color: var(--wp--preset--color--beige-000, #ffffff);
  z-index: 2;
  pointer-events: none;
}

.yl-ad-tile__title {
  font-family: var(--wp--preset--font-family--headers, "Cormorant", serif);
  font-weight: 500;
  font-size: 32px; /* $headers-h1 scale */
  line-height: 1.1;
  margin: 0 0 11px;
  color: var(--wp--preset--color--beige-000, #ffffff);
}

.yl-ad-tile__copy {
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--wp--preset--color--beige-000, #ffffff);
  margin: 0;
}

/* Badge "Reklama" top-left for disclosure (GDPR/Prawo.com ad-labeling). */
.yl-ad-tile::before {
  content: "Reklama";
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 4px 11px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--wp--preset--color--beige-900, #272725);
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 500;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  z-index: 3;
}

/* Smaller type on mobile 1-col (the tile is already ~full viewport wide) */
@media (max-width: 599px) {
  .yl-ad-tile__title {
    font-size: 28px;
  }
}

/* ---------- Product grid ---------- */
.yl-listing__grid {
  width: 100%;
}

.yl-listing__grid .yb2-product-grid,
.yl-listing__grid .yb2-product-grid--listing {
  width: 100%;
}

/* Override plugin defaults (max-width 1280 + gap 16) so the listing grid fills
   the main column at 1920 with Figma-scaled gaps.
   Card width = (inner_main − 2×21) / 3   → at 1920: ~437px matches Figma. */
.yl-listing__main .yl-listing__grid .yb2-product-grid__inner {
  max-width: none;
  gap: 16px;
}

@media (min-width: 1080px) {
  .yl-listing__main .yl-listing__grid .yb2-product-grid__inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Pagination ---------- */
.yl-listing .wp-block-query-pagination {
  display: flex;
  gap: 11px;
  justify-content: center;
  /* margin-top: 64px; */
}

.yl-listing .wp-block-query-pagination-numbers {
  display: flex;
  gap: 11px;
  padding-bottom: 1px;
}

.yl-listing .wp-block-query-pagination a,
.yl-listing .wp-block-query-pagination span.page-numbers {
  align-items: center;
  background-color: var(--wp--preset--color--beige-000, #ffffff);
  border: 1px solid var(--wp--preset--color--beige-200, #dbdad6);
  color: var(--wp--preset--color--beige-900, #272725);
  display: inline-flex;
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-size: 12px;
  font-weight: 500;
  /* height: 48px; */
  justify-content: center;
  letter-spacing: 0.24px;
  /* min-width: 48px; */
  padding: 8px 16px;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.yl-listing .wp-block-query-pagination a:hover {
  background: var(--wp--preset--color--beige-200, #dbdad6);
  border-color: var(--wp--preset--color--beige-900, #272725);
}

.yl-listing .wp-block-query-pagination span.page-numbers.current {
  background: var(--wp--preset--color--beige-900, #272725);
  border-color: var(--wp--preset--color--beige-900, #272725);
  color: var(--wp--preset--color--beige-000, #ffffff);
}

.yl-listing .wp-block-query-pagination span.page-numbers.dots {
  background: none;
  border: none;
  min-width: auto;
  padding: 0 5px;
}

/* ---------- Empty state ---------- */
.yl-listing__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
  padding: 107px 0; /* 80→107 Figma big empty */
}

.yl-listing__empty p {
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-size: 16px;
  color: var(--wp--preset--color--beige-700, #716e68);
}

/* ---------- SEO section — Figma 822:9180 (1016×366 → 1354×488 prod) ---------- */
.yl-listing__seo {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 40px 0 24px;
  padding: 0;
}

.yl-listing__seo-title {
  color: var(--wp--preset--color--beige-900, #272725);
  font-family: var(--wp--preset--font-family--headers, Cormorant, sans-serif);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--h-2, 24px);
  line-height: 1.2;
}

.yl-listing__seo-text {
  color: var(--wp--preset--color--beige-900, #272725);
  font-family: var(
    --wp--preset--font-family--body,
    "Plus Jakarta Sans",
    sans-serif
  );
  font-weight: 400;
  font-size: var(--wp--preset--font-size--body-s, 14px);
  line-height: 1.5;
  letter-spacing: 0.28px;
}

/* Mobile drawer trigger + close — hidden on desktop ≥1080 */
.yl-filters-toggle,
.yl-sidebar__close {
  display: none;
}
.yl-listing__buttons--mobile {
  display: none;
}
.yl-filter__all-options {
  display: none;
}

.yl-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(39, 39, 37, 0.45);
  backdrop-filter: blur(2px);
  z-index: 999;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   Breakpoints (yonelle-blocks-v2 tokens):
     mobile   <600
     tablet   600-781
     desktop  ≥782 (wide split) — actually ≥1080 for the Figma 2-col layout
   ═══════════════════════════════════════════════════════ */

@media (max-width: 1080px) {
  .yl-breadcrumb {
    padding: 11px 24px 0;
  }

  .yl-listing {
    display: flex;
    flex-direction: column;
    column-gap: 0;
  }
  .yl-listing__header {
    align-items: flex-start;
  }

  /* Sidebar becomes an off-canvas drawer on mobile/tablet. */
  .yl-listing__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100vw;
    height: calc(100vh - 100px);
    background: var(--wp--preset--color--beige-100, #faf9f6);
    padding: 64px 24px 32px;
    padding: 0;
    /* gap: 32px; */
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    will-change: transform;
  }

  body.yl-drawer-open {
    overflow: hidden;
  }

  body.yl-drawer-open .wp-block-template-part .y-megamenu {
    display: none;
  }

  body.yl-drawer-open .yl-listing__sidebar {
    transform: translateX(0);
  }

  body.yl-drawer-open .yl-drawer-overlay {
    display: block;
  }

  .yl-sidebar__top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    background-color: var(--wp--preset--color--beige-000, #fff);
    padding: 24px;
  }

  .yl-sidebar__title {
    display: flex;
    color: var(--wp--preset--color--beige-900, #272725);
    font-family: var(
      --wp--preset--font-family--body,
      "Plus Jakarta Sans",
      sans-serif
    );
    font-weight: 700;
    font-size: var(--wp--preset--font-size--body-s, 14px);
    line-height: 1;
    letter-spacing: 0.28px;
    text-transform: uppercase;
  }

  .yl-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* position: absolute; */
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    color: var(--wp--preset--color--beige-900, #272725);
    cursor: pointer;
  }

  .yl-filters-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 15px 30px;
    background: var(--wp--preset--color--beige-900, #272725);
    border: 1px solid var(--wp--preset--color--beige-900, #272725);
    color: var(--wp--preset--color--beige-000, #ffffff);
    font-family: var(
      --wp--preset--font-family--body,
      "Plus Jakarta Sans",
      sans-serif
    );
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.24px;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
  }

  .yl-listing__buttons {
    width: 100%;
  }
  .yl-filter__all-options {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    align-items: center;
    justify-content: center;
    margin: auto 0 0;
    padding: 13.5px 20px;
    background: var(--wp--preset--color--beige-000, #ffffff);
    border: 1px solid var(--wp--preset--color--beige-900, #272725);
    color: var(--wp--preset--color--beige-900, #272725);
    font-family: var(
      --wp--preset--font-family--body,
      "Plus Jakarta Sans",
      sans-serif
    );
    font-weight: 400;
    font-size: var(--wp--preset--font-size--body-s, 14px);
    line-height: 1.5;
    letter-spacing: 0.28px;
    cursor: pointer;
  }
  .yl-filter__all-options.show {
    display: flex;
  }

  .yl-listing__main {
    width: 100%;
    padding: 24px 24px 0;
    gap: 24px;
  }

  .yl-listing__main .yl-listing__grid .yb2-product-grid__inner {
    gap: 16x;
  }

  .yl-listing__header {
    flex-wrap: wrap;
    gap: 24px;
  }
  .yl-active-filters {
    margin-top: 0;
  }
  .yl-active-filters__clear {
    display: none;
  }
  .yl-filter-check__box {
    width: 16px;
    height: 16px;
  }
  .yl-filter-check__box::after {
    width: 3px;
    height: 6px;
  }

  .yl-listing__buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .yl-listing__buttons--desktop {
    display: none;
  }

  .yl-sort {
    width: 100%;
    margin-left: 0;
  }
  .yl-listing__sort-btn {
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 8px 24px;
  }
}

/* Tablet: 2-column product grid */
@media (min-width: 600px) and (max-width: 1080px) {
  .yl-listing__main .yl-listing__grid .yb2-product-grid__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: single-column grid + sort button grows to match layout */
@media (max-width: 599px) {
  .yl-listing__main .yl-listing__grid .yb2-product-grid__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .yl-listing__header {
    flex-direction: column;
  }

  .yl-listing__title {
    font-size: 28px;
  }

  .yl-listing__main {
    padding: 16px 20px 0;
    gap: 24px;
  }
}
