/* ==========================================================================
   Ionix — category (PLP) design layer. Absorbed from the base category.css:
   same rules, but color tokens swapped from the base --color-*/--accent family
   to the design --c-* family (exact mapping of the ionix-oc.css token bridge,
   so the render is identical). Non-color tokens (--space/--fs/--fw/--radius/
   --shadow) still come from tokens.css. Loaded in the design layer (after the
   base bundle); base category.css is removed from the bundle list.
   ========================================================================== */
/* ==========================================================================
   Ionix — category.css
   Category / shop archive: page head, toolbar, sidebar facets,
   active-filter chips, list view, mobile filter drawer.
   Reuses st-product-card, st-breadcrumb, st-pagination, st-chip, st-btn.
   ========================================================================== */

/* --- Subcategories: page head already adds bottom spacing above this,
   so drop this section's own top padding to avoid stacking both. -------- */
.st-cat-subcats { padding-top: 0; }

/* --- Category description (shown after the product grid, inside
   .st-shop__main — same column as the grid, no separate layout needed).
   Photo floats so text wraps beside it; shows in full (no crop), capped
   at 600px, never upscaled past its natural size. */
.st-cat-description { margin-top: var(--section-y); }
.st-cat-description::after { content: ""; display: table; clear: both; }
.st-cat-description__image-wrap { max-width: min(600px, 100%); margin-bottom: var(--space-5); }
.st-cat-description__image { display: block; max-width: 100%; height: auto; border-radius: var(--radius-lg); }
@media (min-width: 768px) {
  .st-cat-description__image-wrap {
    float: left;
    max-width: min(45%, 600px);
    margin: 0 var(--space-6) var(--space-4) 0;
  }
}
.st-cat-description__text img { max-width: min(600px, 100%); width: auto; }

/* --- Subcategory buttons (st_subcategory_style == 'buttons') ----------- */
.st-cat-buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --- Subcategory tiles (overlay style, scoped to --sub modifier) ------- */
.st-cat-tiles--sub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-4);
}
.st-cat-tiles--sub .st-cat-tile { aspect-ratio: 1; }
.st-cat-tiles--sub .st-cat-tile__img { width: 100%; height: 100%; object-fit: cover; }
.st-cat-tiles--sub .st-cat-tile__body { padding: var(--space-3) var(--space-4); gap: var(--space-1); }
.st-cat-tiles--sub .st-cat-tile__name { font-size: var(--fs-sm2); font-weight: var(--fw-semibold); }

/* --- All-categories wall ---------------------------------------------- */
.st-cat-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}
@media (min-width: 768px)  { .st-cat-wall { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .st-cat-wall { grid-template-columns: repeat(4, 1fr); } }

.st-cat-wall__card {
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.st-cat-wall__card:hover { box-shadow: var(--shadow-md); border-color: var(--c-border); }

.st-cat-wall__img-wrap {
  position: relative; aspect-ratio: 4/3; overflow: hidden; display: block;
}
.st-cat-wall__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-lg) var(--ease);
}
.st-cat-wall__card:hover .st-cat-wall__img { transform: scale(1.05); }

.st-cat-wall__body {
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; flex: 1; gap: var(--space-3);
}

.st-cat-wall__name {
  font-size: var(--fs-md); font-weight: var(--fw-bold);
  color: var(--c-text); text-decoration: none; display: block;
  transition: color var(--dur) var(--ease);
}
.st-cat-wall__name:hover { color: var(--c-accent); }

.st-cat-wall__subs {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
}
.st-cat-wall__sub {
  font-size: var(--fs-sm); color: var(--c-text-muted);
  text-decoration: none; padding-block: 3px;
  display: flex; align-items: center; gap: 0.5em;
  transition: color var(--dur) var(--ease);
}
.st-cat-wall__sub::before {
  content: ""; width: 4px; height: 4px;
  border-radius: 50%; background: var(--c-border);
  flex: none; transition: background var(--dur) var(--ease);
}
.st-cat-wall__sub:hover { color: var(--c-accent); }
.st-cat-wall__sub:hover::before { background: var(--c-accent); }

.st-cat-wall__more {
  font-size: var(--fs-sm2); font-weight: var(--fw-semibold);
  color: var(--c-text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4em;
  transition: color var(--dur) var(--ease);
}
.st-cat-wall__more:hover { color: var(--c-accent); }
.st-cat-wall__more .fa { font-size: 0.75em; transition: transform var(--dur) var(--ease); }
.st-cat-wall__more:hover .fa { transform: translateX(3px); }

/* --- Page head -------------------------------------------------------- */
.st-page-head { padding-block: var(--space-6) var(--space-6); }
.st-page-head__inner { display: flex; flex-direction: column; gap: var(--space-3); padding-block: var(--space-6); }
.st-page-head__crumbs { margin-bottom: var(--space-2); }
.st-page-head__title { font-size: var(--fs-3xl); margin: 0; }
.st-page-head__lead { color: var(--c-text-muted); max-width: 60ch; }
.st-page-head__meta { color: var(--c-text-muted); font-size: var(--fs-sm2); }
.st-page-head__meta strong { color: var(--c-text); font-weight: var(--fw-semibold); }

/* --- Shop layout ------------------------------------------------------ */
.st-shop { padding-bottom: var(--space-16); }
/* Search page: the toolbar's white surface sits flush against the alt-bg
   search-form section above it with zero gap, so it visually merges into
   it. Only add breathing room when an --alt section directly precedes. */
.st-section--alt + .st-shop { padding-top: var(--space-8); }
.st-shop__layout { display: grid; grid-template-columns: 1fr; gap: var(--space-8); }
@media (min-width: 992px) {
  .st-shop__layout { grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-10); }
}
.st-shop__main { min-width: 0; }

/* Category nav and the filter panel are merged into ONE sticky unit
   (.st-sidebar-sticky, built by JS — see product/category.twig) instead of
   two separate sticky elements. Two independently-sticky siblings stacked
   in the same column was tried and reliably failed in testing: whichever
   came second just ignored its own `top` and kept scrolling with the page
   (true in both a flex and a plain block #column-left) — so rather than
   fight that, category simply becomes a plain flex child of the one sticky
   box that's proven to work, on whichever side matches its original DOM
   order relative to the filter module (Admin → Design → Layout order is
   still respected either way). A generous top offset (well past --header-h,
   which only covers .st-header__inner — the sticky header's {{ menu }} row
   adds more) keeps a clear gap under the header once stuck. Long facet
   lists can get much taller than the product grid, so .st-sidebar-scroll is
   capped to share whatever's left of the sticky box's max-height (flex: 1
   + min-height: 0) with its own internal scroll; the apply button is a
   non-scrolling flex sibling, never under the scrollbar. */
@media (min-width: 992px) {
  .st-sidebar-sticky {
    position: sticky;
    top: calc(var(--st-sticky-header-h, var(--header-h)) + var(--space-6));
    max-height: calc((100vh - var(--st-sticky-header-h, var(--header-h)) - var(--space-6) - var(--space-8)) * 1.5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .st-sidebar-sticky > .st-facet { flex-shrink: 0; }
  .st-sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0; /* let a flex child shrink below its content height so overflow can kick in */
    /* overflow-y:auto means the scrollbar only appears when the filter list is
       taller than the sticky box (~1.5 viewports) — short filter sets show no
       scroll at all. The right-gutter that keeps the scrollbar off the cards'
       border is applied ONLY when the list actually overflows (.has-scroll,
       toggled by the sidebar JS): otherwise the filter cards would sit
       permanently narrower than the full-width nav card / apply button above
       them, which reads as misaligned. */
    scrollbar-width: thin;
    scrollbar-color: var(--c-border) transparent;
  }
  .st-sidebar-scroll.has-scroll { padding-right: var(--space-3); }
  .st-sidebar-scroll::-webkit-scrollbar { width: 6px; }
  .st-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
  .st-sidebar-scroll::-webkit-scrollbar-thumb {
    background: var(--c-border); border-radius: var(--radius-pill);
    border: 1px solid transparent; background-clip: padding-box;
  }
  .st-sidebar-scroll:hover::-webkit-scrollbar-thumb { background: var(--c-text-soft); background-clip: padding-box; }
}

/* --- Toolbar ---------------------------------------------------------- */
.st-shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-card);
  margin-bottom: var(--space-6);
}
.st-shop-toolbar__count { flex: 1 0 100%; font-size: var(--fs-sm2); color: var(--c-text-muted); }
.st-shop-toolbar__count strong { color: var(--c-text); font-weight: var(--fw-semibold); }
.st-shop-toolbar__group { display: inline-flex; align-items: center; gap: var(--space-2); }
.st-shop-toolbar__label { font-size: var(--fs-sm2); color: var(--c-text-muted); }
.st-shop-toolbar__select {
  height: 38px;
  padding: 0 2rem 0 var(--space-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-card);
  font-size: var(--fs-sm2);
  color: var(--c-text);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2316181d' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  cursor: pointer;
}
.st-shop-toolbar__view {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.st-shop-toolbar__view-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: var(--c-text-muted);
  border-right: 1px solid var(--c-border);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.st-shop-toolbar__view-btn:last-child { border-right: 0; }
.st-shop-toolbar__view-btn:hover { color: var(--c-text); }
.st-shop-toolbar__view-btn.is-active { background: var(--c-text); color: #fff; }
.st-shop-toolbar__filter-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55em 1em;
  height: 38px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm2);
  font-weight: var(--fw-semibold);
}
@media (max-width: 991.98px) { .st-shop-toolbar__filter-btn { display: inline-flex; } }

/* Mobile: стекаємо контролі в повноширинні рядки, select не вилазить за екран.
   Порядок: рядок лічильника → Filters + перемикач вигляду → Sort → Limit → in-stock */
@media (max-width: 575px) {
  .st-shop-toolbar { gap: var(--space-3) var(--space-4); padding: var(--space-4); }
  .st-shop-toolbar__filter-btn,
  .st-shop-toolbar__view { order: 1; }
  .st-shop-toolbar__group { order: 2; flex: 1 0 100%; }
  .st-shop-toolbar__group .st-shop-toolbar__select { flex: 1; min-width: 0; width: 100%; }
  .st-shop-toolbar__view { margin-left: auto; }
}

/* --- Active filters --------------------------------------------------- */
.st-shop-active {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.st-shop-active__label { font-size: var(--fs-sm2); color: var(--c-text-muted); margin-right: var(--space-1); }
.st-shop-active__clear { margin-left: var(--space-2); font-size: var(--fs-sm2); color: var(--c-sale); text-decoration: underline; text-underline-offset: 3px; }
.st-shop-active__clear:hover { color: var(--c-text); }

/* --- Sidebar / facets ------------------------------------------------- */
.st-shop__layout #column-left { min-width: 0; }
/* Section heading over the whole filter block (Розмір/Колір/Бренд groups),
   parallel to the "Категорії" card heading above it — without it the filter
   groups read as a loose continuation of the category card instead of their
   own section. */
.st-facets__head {
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: var(--space-4);
}
.st-facets { display: flex; flex-direction: column; gap: var(--space-3); }
.st-facets__apply { display: none; width: 100%; margin-top: var(--space-4); }
.st-shop__layout #column-left .st-facets__apply { display: block; }
/* Direct flex child of #column-left, a sibling of .st-sidebar-scroll (not
   inside it) — never scrolls with the facets, never sits under the scrollbar. */
@media (min-width: 992px) {
  .st-shop__layout #column-left .st-facets__apply {
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: var(--space-6); /* extra gap on top of the sticky box's own flex gap — visual break before categories */
    padding-top: var(--space-4);
    border-top: 1px solid var(--c-border);
  }
}

/* Category nav card. In the reference (html/category.html) the "Category"
   block is simply the first filter group — same bordered card, same head,
   same caret — so `.st-facet` (nav, module category.twig) gets exactly the
   `.st-facet__group` treatment defined below. It is deliberately NOT scoped
   to `.st-sidebar-sticky`: that wrapper is only built when a filter module
   is present, and the card must look the same on categories without
   filters. */
.st-facet,
.st-facet__group {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.st-facet + .st-facet { margin-top: var(--space-4); }

.st-facet__head {
  width: 100%; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold);
  letter-spacing: normal; text-transform: none;
  color: var(--c-text); text-align: left;
}
.st-facet__head .st-icon,
.st-facet__head i {
  width: 16px; height: 16px; font-size: 16px; color: var(--c-text-soft);
  transition: transform 0.2s; flex-shrink: 0;
}
.st-facet > .st-facet__body,
.st-facet__group > .st-facet__body { padding: 0 16px 14px; display: none; }
.st-facet.is-open > .st-facet__body,
.st-facet__group.is-open > .st-facet__body { display: block; }
.st-facet.is-open > .st-facet__head .st-icon,
.st-facet.is-open > .st-facet__head i,
.st-facet__group.is-open > .st-facet__head .st-icon,
.st-facet__group.is-open > .st-facet__head i { transform: rotate(180deg); }

/* Facet: checkbox list */
.st-facet__list { display: flex; flex-direction: column; gap: 0.55rem; }
.st-facet__option {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: var(--fs-sm); color: var(--c-text);
  cursor: pointer; line-height: 1.3;
}
.st-facet__option input[type="checkbox"],
.st-facet__option input[type="radio"] {
  appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--c-border);
  border-radius: 3px;
  display: inline-grid; place-items: center;
  background: var(--c-card);
  cursor: pointer; flex-shrink: 0;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.st-facet__option input[type="radio"] { border-radius: 50%; }
.st-facet__option input:checked { background: var(--c-accent); border-color: var(--c-accent); }
.st-facet__option input[type="checkbox"]:checked::before {
  content: "";
  width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path fill='none' stroke='white' stroke-width='2' d='M1 5l3 3 5-7'/></svg>") center/contain no-repeat;
}
.st-facet__option input[type="radio"]:checked::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--on-accent);
}
.st-facet__option:hover { color: var(--c-text); }
.st-facet__count { margin-left: auto; font-size: var(--fs-xs); color: var(--c-text-muted); }
.st-facet__more {
  margin-top: var(--space-3);
  font-size: var(--fs-sm2); font-weight: var(--fw-semibold);
  color: var(--c-accent);
  display: inline-flex; align-items: center; gap: 0.3rem;
}

/* Facet: category nav links (sidebar category tree module) */
.st-facet__link {
  display: flex; align-items: center;
  font-size: var(--fs-sm2); color: var(--c-text);
  text-decoration: none; line-height: 1.3;
  transition: color var(--dur) var(--ease);
}
.st-facet__link:hover { color: var(--c-text); }
.st-facet__link.is-active { color: var(--c-text); font-weight: var(--fw-semibold); }
.st-facet__sublist {
  display: flex; flex-direction: column; gap: 0.4rem;
  margin-top: 0.4rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--c-border);
}
.st-facet__sublist .st-facet__link { font-size: var(--fs-xs); color: var(--c-text-muted); }
.st-facet__sublist .st-facet__link:hover,
.st-facet__sublist .st-facet__link.is-active { color: var(--c-text); }

/* ---- Etalon filter cards (OC Filter module → .st-facet__group) -------------
   Reference html/category.html renders each filter group as a bordered card
   with a check-box surrogate (.st-facet__box) and a collapsible body. The card
   shell, head and body-padding are shared with the category-nav card and are
   declared once above (.st-facet, .st-facet__group); only the checkbox-list
   internals are filter-specific and live here. */
.st-facets { display: flex; flex-direction: column; gap: var(--space-4); }
.st-facet__group .st-facet__list { display: flex; flex-direction: column; gap: 6px; }
.st-facet__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-facet__group .st-facet__option {
  display: flex; align-items: center; gap: 10px; flex: 1;
  font-size: 13.5px; color: var(--c-text); cursor: pointer; line-height: 1.3;
}
.st-facet__group .st-facet__option input { display: none; }
.st-facet__box {
  width: 18px; height: 18px;
  border: 2px solid var(--c-border); border-radius: 4px;
  display: grid; place-items: center; flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.st-facet__option input:checked ~ .st-facet__box { background: var(--c-text); border-color: var(--c-text); }
.st-facet__box .st-icon { font-size: 10px; color: #fff; display: none; }
.st-facet__option input:checked ~ .st-facet__box .st-icon { display: block; }
.st-facet__option:hover .st-facet__box { border-color: var(--c-text); }
.st-facet__group .st-facet__count { margin-left: 0; font-family: var(--f-mono); font-size: 11px; color: var(--c-text-soft); }

/* Facet: price range */
.st-facet-price { display: flex; flex-direction: column; gap: var(--space-3); }
.st-facet-price__track { position: relative; height: 4px; background: var(--c-border); border-radius: 999px; }
.st-facet-price__bar { position: absolute; inset: 0 30% 0 10%; background: var(--c-accent); border-radius: 999px; }
.st-facet-price__thumb {
  position: absolute; top: 50%;
  width: 16px; height: 16px;
  background: var(--c-card); border: 2px solid var(--c-accent); border-radius: 50%;
  transform: translate(-50%, -50%); box-shadow: var(--shadow-xs);
}
.st-facet-price__thumb--lo { left: 10%; }
.st-facet-price__thumb--hi { left: 70%; }
.st-facet-price__inputs { display: flex; align-items: center; gap: var(--space-2); }
.st-facet-price__input {
  flex: 1; min-width: 0; height: 36px; padding: 0 0.7rem;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font-size: var(--fs-sm2); background: var(--c-card);
  -moz-appearance: textfield;
}
.st-facet-price__input::-webkit-outer-spin-button,
.st-facet-price__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.st-facet-price__sep { color: var(--c-text-muted); }

/* Facet: color swatches */
.st-facet-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.st-facet-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12); box-shadow: inset 0 0 0 2px #fff;
  cursor: pointer; position: relative;
  transition: box-shadow var(--dur) var(--ease);
}
.st-facet-swatch.is-active { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--c-text); }
.st-facet-swatch__label {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--c-text); color: #fff;
  font-size: var(--fs-xs); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.st-facet-swatch:hover .st-facet-swatch__label { opacity: 1; }

/* Facet: sizes */
.st-facet-sizes { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.st-facet-size {
  min-width: 40px; height: 36px; padding: 0 0.7rem;
  display: inline-grid; place-items: center;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font-size: var(--fs-sm2); font-weight: var(--fw-semibold);
  color: var(--c-text); background: var(--c-card);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  cursor: pointer;
}
.st-facet-size:hover { border-color: var(--c-text); }
.st-facet-size.is-active { background: var(--c-text); border-color: var(--c-text); color: #fff; }
.st-facet-size.is-out { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }

/* Facet: rating rows */
.st-facet-rating { display: flex; flex-direction: column; gap: 0.45rem; }
.st-facet-rating__row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: var(--fs-sm2); color: var(--c-text-muted); cursor: pointer;
}
.st-facet-rating__row:hover { color: var(--c-text); }

/* --- Product card: category-page extras (lead text + buy row) --------- */
.st-product-card__lead { display: none; }
.st-product-card__buy  { display: none; }

/* --- PLP grid: 4-up ---------------------------------------------------
   The design gives the category page its own narrower grid — 4 columns
   (html/styles/category.css:211 `.st-plp-grid`) — while the 5-up
   `.st-product-grid` belongs to home. category.twig already asks for
   `.st-product-grid--4`, but that modifier lives in the base components.css
   (bundle), so the design layer's generic `.st-product-grid { repeat(5,1fr) }`
   loaded later beat it and the page rendered wider than the design. Restate
   the design's PLP breakpoints here, scoped to the category-only class. */
.st-shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1199px) { .st-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .st-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones stay 2-up down to 320 (big-store PLP); the old ≤399 → 1 column made one card fill the screen. */

/* List view — a real row: photo | details. The body had no padding (copy glued to the
   photo and the card edges, buttons sitting on the bottom border), and below 640px the
   row turned back into a column, so on phones "list" looked exactly like the grid. */
.st-shop-grid--list { grid-template-columns: 1fr !important; }
.st-shop-grid--list .st-product-card { flex-direction: row; align-items: stretch; gap: var(--space-5); }
.st-shop-grid--list .st-product-card__media { width: 160px; flex-shrink: 0; aspect-ratio: var(--product-aspect); }
/* Photo inset from the card edges (it ran into the top/left/bottom border), own radius */
.st-shop-grid--list .st-product-card__media { margin: 16px 0 16px 16px; align-self: flex-start; border-radius: var(--r-sm); overflow: hidden; }
.st-shop-grid--list .st-product-card__body { padding: 18px 20px 18px 0; gap: var(--space-2); flex: 1; min-width: 0; }
.st-shop-grid--list .st-product-card__lead { display: block; margin-top: 0; font-size: var(--fs-sm2); color: var(--c-text-muted); line-height: 1.5; }
.st-shop-grid--list .st-product-card__actions,
.st-shop-grid--list .st-product-card__cart { display: none; }
/* one 8px rhythm title → stock → lead → price → buttons; the price is not pushed to the bottom
   and the title doesn't reserve the grid's 2-line height */
.st-shop-grid--list .st-product-card__body > * { margin-top: 0; margin-bottom: 0; }
.st-shop-grid--list .st-product-card__title { min-height: 0; }
.st-shop-grid--list .st-product-card__row { margin-top: 0; padding-right: 0; min-height: 0; }
.st-shop-grid--list .st-product-card__buy { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 4px; }
@media (max-width: 767.98px) {
  .st-shop-grid--list { gap: 12px; }
  .st-shop-grid--list .st-product-card { gap: 12px; }
  .st-shop-grid--list .st-product-card__media { width: 96px; aspect-ratio: 1; align-self: flex-start; margin: 10px 0 10px 10px; position: relative; } /* badges sit on the thumb, not the card corner */
  .st-shop-grid--list .st-product-card__badges { top: 4px; left: 4px; }
  .st-shop-grid--list .st-product-card__badges .st-badge { font-size: 9px; padding: 2px 5px; }
  .st-shop-grid--list .st-product-card__body { padding: 12px 12px 12px 0; gap: 4px; }
  .st-shop-grid--list .st-product-card__title { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .st-shop-grid--list .st-product-card__lead { display: none; }
  .st-shop-grid--list .st-product-card__buy { margin-top: 4px; }
  .st-shop-grid--list .st-product-card__buy .st-btn { height: 36px; padding-inline: 12px; font-size: 13px; }
}

/* --- Pagination row --------------------------------------------------- */
.st-shop-foot {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-4); margin-top: var(--space-10);
}
.st-shop-foot__hint { font-size: var(--fs-sm2); color: var(--c-text-muted); }

/* --- Filter drawer footer (2-column buttons) -------------------------- */
.st-drawer__foot--2col { grid-template-columns: 1fr 1fr; }

/* Desktop: hide filter drawer, show sidebar */
@media (min-width: 992px) {
  .st-drawer--filter { display: none; }
}
/* Mobile: hide sidebar, show drawer trigger */
@media (max-width: 991.98px) {
  .st-shop__layout #column-left { display: none; }
}
