/* EVA listing prototype — built from EVA-Library-WEB (Figma q5jwASDszq6oGJBx5ogoKR, node 8138:41026).
   All values come from Foundation tokens (assets/tokens.css): spacing/N = N×4px. */

@font-face { font-family: "Proxima Nova"; src: url("assets/fonts/ProximaNova-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Proxima Nova"; src: url("assets/fonts/ProximaNova-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Proxima Nova"; src: url("assets/fonts/ProximaNova-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ease: cubic-bezier(.2, 0, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --page-max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg-default);
  color: var(--color-text-primary);
  font: var(--font-weight-regular) var(--font-size-14)/20px var(--font-primary), var(--font-fallback);
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
.muted-13 { font-size: var(--font-size-13); line-height: var(--caption-line-height); color: var(--color-text-muted); }

/* ───── Buttons (Figma Button 7076:5830) ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--spacing-2);
  border-radius: var(--radius-md); font-weight: var(--font-weight-semibold); white-space: nowrap;
  transition: background-color .2s var(--ease), opacity .2s var(--ease), transform .1s var(--ease);
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn--md { height: 40px; padding: 0 var(--spacing-4); font-size: var(--font-size-14); line-height: 20px; }
.btn--lg { height: 48px; padding: 0 var(--spacing-5); font-size: var(--font-size-16); line-height: 24px; }
.btn--primary { background: var(--color-bg-inverse); color: var(--color-text-on-dark); }
.btn--primary:disabled { background: var(--color-bg-medium); color: var(--color-text-disabled); cursor: default; }
.btn--ghost { color: var(--color-text-primary); }
.btn--pill { height: 40px; padding: 0 var(--spacing-4); border-radius: var(--radius-full); font-size: var(--font-size-14); }
.btn--block { width: 100%; }

.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; }
.icon-btn--dot::after { content: ""; position: absolute; top: 0; right: 0; width: 8px; height: 8px; border-radius: 8px; background: var(--color-brand-primary); border: var(--border-thin) solid var(--color-border-inverted); }
.round-btn { width: 40px; height: 40px; border-radius: var(--radius-2xl); border: var(--border-thin) solid var(--color-border-default); background: var(--color-bg-default); display: inline-flex; align-items: center; justify-content: center; }

.cart-count {
  position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--radius-full); background: var(--color-brand-primary); color: var(--color-text-on-dark);
  font-size: var(--font-size-11); line-height: 16px; font-weight: var(--font-weight-semibold); text-align: center;
}
.cart-count.bump { animation: bump .4s var(--ease-out); }
@keyframes bump { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Search (Figma 7406:8358) */
.search {
  flex: 1 1 0; min-width: 0; height: 40px; display: flex; align-items: center; gap: var(--spacing-1);
  padding: 0 var(--spacing-3); border: var(--border-thin) solid var(--color-border-default); border-radius: var(--radius-2xl);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: var(--font-size-14); line-height: 20px; }
.search input::placeholder { color: var(--color-text-muted); }

/* Dropdown (Figma 7382:8978) */
.dropdown {
  height: 40px; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 var(--spacing-3); border: var(--border-thin) solid var(--color-border-default); border-radius: var(--radius-md);
  background: var(--color-bg-default); font-size: var(--font-size-14); line-height: 20px; white-space: nowrap;
}
.dropdown--wide { width: 270px; }

/* ───── Desktop header ─────
   Like eva.ua: rows stay full-width (background / dividers), content sits on the central page grid;
   the nav row (logo · Каталог · search · icons) sticks to the top while scrolling.
   display: contents lets the nav row stick relative to the page instead of the short <header> box. */
.d-header { display: contents; }
.d-header__banner { width: 100%; height: 48px; object-fit: cover; }
.d-header__top, .d-header__nav { --grid-pad: max(var(--spacing-8), calc((100% - var(--page-max)) / 2 + var(--spacing-8))); }
.d-header__top {
  height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--grid-pad);
  border-bottom: var(--border-thin) solid var(--color-border-subtle);
}
.d-header__top-left { display: flex; align-items: center; gap: var(--spacing-10); }
.d-header__orig { display: inline-flex; align-items: center; gap: 6px; font-size: var(--font-size-13); line-height: 16px; font-weight: var(--font-weight-semibold); color: var(--color-text-muted); }
.d-header__top-right { display: flex; align-items: center; }
.d-link { display: inline-flex; align-items: center; gap: var(--spacing-2); padding: 0 var(--spacing-4); font-weight: var(--font-weight-semibold); }
.d-header__top-left .d-link { padding: 0; }
.d-link--sale { color: var(--color-status-error); }
.d-lang { display: inline-flex; align-items: center; gap: var(--spacing-1); padding-left: var(--spacing-4); font-weight: var(--font-weight-semibold); }
.d-lang i { width: 1px; height: 16px; background: var(--color-border-subtle); }
.d-lang span { color: var(--color-text-disabled); }
.d-header__nav {
  position: sticky; top: 0; z-index: 40; background: var(--color-bg-default);
  display: flex; align-items: center; gap: var(--spacing-6); padding: var(--spacing-4) var(--grid-pad);
  border-bottom: var(--border-thin) solid var(--color-border-subtle);   /* eva.ua: 1px #EBEBEB */
}
.d-header__icons { display: flex; gap: var(--spacing-6); }
.d-header__icons .icon-btn { width: 20px; height: 20px; }

/* ───── Mobile header (sticky) ───── */
.m-header {
  position: sticky; top: 0; z-index: 20; height: 57px; display: flex; align-items: center; gap: var(--spacing-4);
  padding: var(--spacing-2) var(--spacing-4); background: var(--color-bg-default); border-bottom: var(--border-thin) solid var(--color-border-subtle);
}

/* ───── Page ───── */
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--spacing-8); }
.crumbs { display: flex; align-items: center; gap: var(--spacing-2); height: 40px; font-size: var(--font-size-13); line-height: 16px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; }
.crumbs b { font-weight: var(--font-weight-regular); color: var(--color-text-primary); }

/* Chips (Figma Desktop/ProductList/Chips 8155:58659) */
.chips { display: flex; gap: var(--spacing-2); padding: var(--spacing-2) 0; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 28px; display: inline-flex; align-items: center; gap: var(--spacing-1); padding: 0 var(--spacing-2);
  border: var(--border-medium) solid var(--color-border-subtle); border-radius: var(--radius-xl);
  font-weight: var(--font-weight-semibold); background: var(--color-bg-default); transition: border-color .15s var(--ease);
}

.title-row { display: flex; align-items: center; gap: var(--spacing-4); padding: var(--spacing-4) 0; }
.title-row h1 { font-size: var(--font-size-32); line-height: 40px; font-weight: var(--font-weight-bold); letter-spacing: -0.64px; }

/* Category (Figma Category 8116:46328) */
.cats-wrap { position: relative; }
.cats { display: flex; gap: var(--spacing-2); overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; width: 120px; display: flex; flex-direction: column; align-items: center; gap: var(--spacing-2); padding: var(--spacing-2);
  border: var(--border-thin) solid var(--color-border-subtle); border-radius: var(--radius-md); background: var(--color-bg-default);
}
.cat img { width: 56px; height: 56px; object-fit: contain; }
.cat span {
  height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: var(--font-size-13); line-height: 16px; text-align: center; align-content: center;
}
.cats-wrap .round-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

/* ───── Layout ───── */
.layout { display: flex; gap: var(--spacing-2); padding-top: var(--spacing-6); padding-bottom: var(--spacing-6); }
.filters { flex: none; width: 282px; }
.list { flex: 1; min-width: 0; }
.list__bar { display: flex; justify-content: flex-end; margin-bottom: var(--spacing-2); }
#grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ───── Product card (Figma Listing/Product) ───── */
.card {
  position: relative; display: flex; flex-direction: column; gap: var(--spacing-2); padding: var(--spacing-4);
  border-radius: var(--radius-md); background: var(--color-bg-default); transition: box-shadow .3s ease;
}
.card__media { position: relative; height: 328px; padding: var(--spacing-8) 0; border-radius: var(--radius-sm); display: flex; align-items: center; overflow: hidden; }
.card__media > img { width: 100%; height: 100%; object-fit: contain; }
.card__badges { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--spacing-1); padding: var(--spacing-1); }
.badge { height: 16px; display: inline-flex; align-items: center; padding: 0 var(--spacing-1); border-radius: var(--radius-sm); font-size: var(--font-size-13); line-height: 16px; }
.badge--excl { background: var(--color-bg-cloud); }
.badge--promo { background: var(--color-brand-secondary-tint); }
.badge-sale { height: 16px; display: inline-flex; align-items: center; padding: 0 var(--spacing-1); border-radius: var(--radius-sm); background: var(--color-status-error); color: var(--color-text-on-dark); font-size: var(--font-size-13); line-height: 16px; }
.wish { position: absolute; top: 0; right: 0; padding: var(--spacing-1); }
.wish img { width: 20px; height: 20px; }
.wish:active img { transform: scale(.85); }

.card__info { display: flex; flex-direction: column; gap: var(--spacing-3); }
.card__brand-row { display: flex; align-items: center; gap: var(--spacing-2); }
.card__brand { flex: 1; min-width: 0; font-weight: var(--font-weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads { display: inline-flex; align-items: center; gap: 4px; font-size: var(--font-size-11); line-height: 16px; color: var(--color-text-muted); }
.card__name { padding-bottom: var(--spacing-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 44px; }
.rating { display: flex; align-items: center; gap: var(--spacing-1); height: 16px; font-size: var(--font-size-13); color: var(--color-text-muted); }
.rating img { width: 12px; height: 12px; }
.vols { display: flex; align-items: center; gap: 8px; height: 16px; font-size: var(--font-size-13); line-height: 16px; }
.vol { height: 16px; display: inline-flex; align-items: center; padding: 0 var(--spacing-1); border: var(--border-medium) solid var(--color-border-default); border-radius: var(--radius-sm); }
.vols .dots { display: inline-flex; gap: 4px; }
.vols .dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.price { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.price__old { display: flex; align-items: center; gap: var(--spacing-1); }
.price__old s { font-size: var(--font-size-13); line-height: 16px; color: var(--color-text-muted); }
.price__now { font-size: var(--font-size-18); line-height: 24px; font-weight: var(--font-weight-semibold); }
.oos { display: inline-flex; align-items: center; gap: 6px; font-size: var(--font-size-13); color: var(--color-text-muted); }
.oos::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-status-error); }

/* Add-to-cart: Button Secondary · Only Icon · 40px (7101:6598) → hover/added Primary black (7785:14838) */
.cart-btn {
  position: relative; width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: var(--border-medium) solid var(--color-border-primary); border-radius: var(--radius-md); background: var(--color-bg-default);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .1s var(--ease);
}
.cart-btn img { width: 20px; height: 20px; }
.cart-btn .i-white, .cart-btn .i-check { display: none; }
.cart-btn:active { transform: scale(.92); }
.cart-btn.is-added { background: var(--color-bg-black); border-color: var(--color-bg-black); }
.cart-btn.is-added .i-dark, .cart-btn.is-added .i-white { display: none; }
.cart-btn.is-added .i-check { display: block; }

/* Hover only on desktop width — mobile layout (incl. desktop simulators) has no hover states */
@media (hover: hover) and (min-width: 1024px) {
  .btn--primary:hover:not(:disabled) { background: var(--color-bg-black); }
  .btn--ghost:hover { background: var(--color-bg-subtle); }
  .chip:hover { border-color: var(--color-border-default); }
  /* same as eva.ua .o-listing-product:hover::before */
  .card:hover { z-index: 1; box-shadow: 0 1px 14px rgba(0, 0, 0, .15); }
  .card:hover .cart-btn { background: var(--color-bg-black); border-color: var(--color-bg-black); }
  .card:hover .cart-btn:not(.is-added) .i-dark { display: none; }
  .card:hover .cart-btn:not(.is-added) .i-white { display: block; }
}

/* ───── Pager ───── */
.pager { display: flex; flex-direction: column; gap: var(--spacing-6); padding-top: var(--spacing-8); }
.pagination { display: flex; justify-content: center; gap: var(--spacing-2); }
.pg { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); font-weight: var(--font-weight-semibold); }
.pg.is-active { border: var(--border-medium) solid var(--color-border-primary); }
.pg--arrow { border: var(--border-thin) solid var(--color-border-default); }
.pg--dots { cursor: default; }

/* ───── Filters sidebar ───── */
.f-sec { padding: var(--spacing-4) 0; border-bottom: var(--border-thin) solid var(--color-border-subtle); display: flex; flex-direction: column; gap: var(--spacing-3); }
.f-sec:first-child { padding-top: 0; }
.f-head { display: flex; justify-content: space-between; align-items: center; }
.f-title { font-size: var(--font-size-18); line-height: 24px; font-weight: var(--font-weight-semibold); }
.f-clear { font-weight: var(--font-weight-semibold); }
.f-chips { display: flex; flex-wrap: wrap; gap: var(--spacing-2); }
.f-chip { height: 28px; display: inline-flex; align-items: center; gap: var(--spacing-1); padding: 0 var(--spacing-2); border-radius: var(--radius-xl); background: var(--color-bg-subtle); font-weight: var(--font-weight-semibold); }
.f-chip::after { content: "×"; font-weight: var(--font-weight-regular); }
.f-toggle { display: flex; align-items: center; justify-content: space-between; height: 32px; font-weight: var(--font-weight-semibold); cursor: pointer; }
.f-toggle input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--color-bg-medium); position: relative; cursor: pointer; transition: background .2s var(--ease); margin: 0; }
.f-toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-bg-default); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.f-toggle input:checked { background: var(--color-brand-secondary); }
.f-toggle input:checked::after { transform: translateX(16px); }
.f-price { display: flex; gap: var(--spacing-2); }
.f-input { flex: 1; min-width: 0; height: 40px; padding: 0 var(--spacing-3); border: var(--border-thin) solid var(--color-border-default); border-radius: var(--radius-md); outline: 0; }
.f-input:focus { border-color: var(--color-border-primary); }
.f-range { width: 100%; accent-color: var(--color-bg-inverse); }
.f-letters { display: flex; flex-wrap: wrap; gap: 4px 8px; font-weight: var(--font-weight-semibold); }
.f-search { height: 40px; }
.f-group { font-size: var(--font-size-13); color: var(--color-text-muted); }
.f-check { display: flex; align-items: center; gap: var(--spacing-3); height: 32px; cursor: pointer; }
.f-check input { appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: var(--border-medium) solid var(--color-border-default); border-radius: var(--radius-sm); position: relative; cursor: pointer; }
.f-check input:checked { background: var(--color-bg-inverse); border-color: var(--color-bg-inverse); }
.f-check input:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--color-text-on-dark); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.f-check span { flex: 1; }
.f-check em { font-style: normal; font-size: var(--font-size-13); color: var(--color-text-muted); }
.f-more { display: inline-flex; align-items: center; gap: var(--spacing-1); font-weight: var(--font-weight-semibold); align-self: flex-start; }

/* ───── Footer (simplified Desktop/Footer) ───── */
.footer { background: var(--color-bg-subtle); margin-top: var(--spacing-10); }
.footer__inner { max-width: var(--page-max); margin: 0 auto; padding: var(--spacing-8); display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-6); flex-wrap: wrap; }
.footer__contacts { display: flex; flex-direction: column; }
.footer__contacts b { font-size: var(--font-size-24); line-height: 32px; }

/* ───── Color modal: Popup (8935:48275) on desktop, Active sheet (8210:27423) on mobile ───── */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(33, 33, 33, 0); transition: background-color .25s var(--ease);
}
.overlay.is-open { background: rgba(33, 33, 33, .5); }
.sheet {
  width: 440px; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-bg-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); outline: 0;
  opacity: 0; transform: translateY(8px) scale(.97); transition: opacity .2s var(--ease), transform .25s var(--ease-out);
}
.overlay.is-open .sheet { opacity: 1; transform: none; }
.sheet__header { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--spacing-4); }
.sheet__header h2 { font-size: var(--font-size-18); line-height: 24px; font-weight: var(--font-weight-semibold); }
.cm-product { display: flex; gap: var(--spacing-3); padding: var(--spacing-2) var(--spacing-4); }
.cm-product__img { width: 64px; height: 64px; object-fit: contain; flex: none; border-radius: var(--radius-sm); }
.cm-product__info { min-width: 0; display: flex; flex-direction: column; }
.cm-product__info > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-product__price { display: flex; align-items: center; gap: var(--spacing-1); margin-top: var(--spacing-1); }
.cm-product__price s { font-size: var(--font-size-13); color: var(--color-text-muted); }
.cm-product__price b { font-size: var(--font-size-16); line-height: 24px; margin-left: var(--spacing-1); }
.cm-body { padding: var(--spacing-4); display: flex; flex-direction: column; gap: var(--spacing-3); overflow-y: auto; }
.cm-label { font-size: var(--font-size-14); line-height: 20px; color: var(--color-text-secondary); }
.cm-label span { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.cm-label.is-empty span { color: var(--color-text-muted); font-weight: var(--font-weight-regular); }
.sheet__footer { display: flex; gap: var(--spacing-2); padding: var(--spacing-2) var(--spacing-4) var(--spacing-6); flex: none; }
.sheet__footer .btn { flex: 1 1 0; min-width: 0; }

.sheet:focus { outline: none; }
/* Swatch/Large/Color (7438:8102) */
.swatches { display: flex; flex-wrap: wrap; gap: var(--spacing-2); }
.swatch {
  position: relative; flex: none; width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md);
  border: var(--border-medium) solid var(--color-border-default); display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.swatch i { flex: none; width: 32px; height: 32px; border-radius: var(--radius-full); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.swatch .sale { position: absolute; top: -7.65px; right: -7.65px; width: 20px; height: 20px; z-index: 2; }
@media (hover: hover) and (min-width: 1024px) { .swatch:not(:disabled):not([aria-checked="true"]):hover { background: var(--color-bg-muted); border-color: var(--color-border-accent); } }
.swatch[aria-checked="true"] { border-color: var(--color-brand-secondary); }
.swatch:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.swatch:disabled { border-color: var(--color-border-subtle); cursor: not-allowed; }
.swatch:disabled i { opacity: .5; }
.swatch .line { position: absolute; left: 50%; top: 4px; width: 29.34px; height: 29.34px; transform: translateX(-50%); z-index: 2; }
/* Swatch/Large/Label (7675:7319) — volume / weight / quantity / size */
.swatch--label { width: auto; min-width: 40px; padding: 0 var(--spacing-3); font-size: var(--font-size-14); line-height: 20px; font-weight: var(--font-weight-semibold); color: var(--color-text-primary); white-space: nowrap; }
.swatch--label .sale { top: -5.5px; right: -8.5px; }
.swatch--label:disabled { border-color: transparent; background: var(--color-bg-medium, #ebebeb); color: var(--color-text-muted); }
.swatch--label:disabled span { text-decoration: line-through; }

/* ───── Toast (10186:50850 · Type=Success) ───── */
.toast {
  position: fixed; left: 50%; bottom: var(--spacing-6); z-index: 200; width: 360px; max-width: calc(100vw - 32px); min-height: 48px;
  display: flex; align-items: center; gap: var(--spacing-3); padding: var(--spacing-3) var(--spacing-4);
  background: var(--color-bg-inverse); color: var(--color-text-on-dark); border-radius: var(--radius-lg);
  box-shadow: 0 2px 3px rgba(0,0,0,.06), 0 4px 8px rgba(0,0,0,.1);
  transform: translate(-50%, calc(100% + 48px)); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .45s var(--ease-out), opacity .3s var(--ease), visibility 0s linear .45s;
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .45s var(--ease-out), opacity .2s var(--ease), visibility 0s; }
.toast img { flex: none; }
.toast__content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.toast__content b { font-weight: var(--font-weight-semibold); }
.toast__content span { color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast__content span:empty { display: none; }
.toast.is-shown { pointer-events: auto; }
/* Toast · Action=Button → Button Style=Text Link Inverse */
.toast__action {
  flex: none; margin: calc(-1 * var(--spacing-2)) calc(-1 * var(--spacing-2)) calc(-1 * var(--spacing-2)) 0; padding: var(--spacing-2);
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  font: var(--font-weight-semibold) var(--font-size-14)/20px var(--font-primary), var(--font-fallback); color: var(--color-text-on-dark); white-space: nowrap;
}
.toast__action:focus-visible { outline: 2px solid var(--color-text-on-dark); outline-offset: -2px; }
@media (hover: hover) and (min-width: 1024px) { .toast__action:hover { text-decoration: underline; text-underline-offset: 3px; } }

/* ───── Responsive ───── */
.only-mobile { display: none !important; }

@media (max-width: 1023px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: flex !important; }
  .page { padding: 0; }
  .crumbs, .chips, .cats { padding-left: var(--spacing-4); padding-right: var(--spacing-4); }
  .chips { padding-top: var(--spacing-2); padding-bottom: var(--spacing-2); }
  .title-row { justify-content: space-between; padding: var(--spacing-2) var(--spacing-4); }
  .title-row h1 { font-size: var(--font-size-24); line-height: 32px; letter-spacing: -0.24px; }
  .m-filter { gap: var(--spacing-2); padding: var(--spacing-2) var(--spacing-4); }
  .m-filter > *, .m-bottom__filter > * { flex: 1 1 0; min-width: 0; }
  .cats { padding-top: var(--spacing-2); padding-bottom: var(--spacing-2); }
  .layout { padding: var(--spacing-4); display: block; }
  #grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--spacing-4); }
  .card { padding: 0; }
  .card__media { height: 220px; }
  .price .price__now { font-size: var(--font-size-18); }
  .footer { padding-bottom: 150px; }
  .footer__inner { padding: var(--spacing-6) var(--spacing-4); flex-direction: column; align-items: flex-start; }

  /* Bottom navigation */
  .m-bottom {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; flex-direction: column; gap: var(--spacing-2);
    padding: var(--spacing-4) var(--spacing-4) calc(var(--spacing-4) + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 60%); pointer-events: none;
  }
  .m-bottom > * { pointer-events: auto; }
  .m-bottom__filter { display: flex; gap: var(--spacing-2); transition: opacity .2s var(--ease), transform .25s var(--ease); }
  .m-bottom__filter.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; height: 0; margin-top: -8px; overflow: hidden; }
  .tabbar {
    display: flex; gap: var(--spacing-2); padding: 0 var(--spacing-4); background: var(--color-bg-default);
    border: var(--border-thin) solid var(--color-border-subtle); border-radius: var(--radius-full); box-shadow: 0 2px 21px rgba(0,0,0,.16);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--spacing-1); padding: var(--spacing-2) 0; font-size: var(--font-size-11); line-height: 16px; font-weight: var(--font-weight-semibold); color: var(--color-text-muted); }
  .tab.is-active { color: var(--color-text-primary); }
  .tab__ico { position: relative; }

  /* Active sheet as bottom sheet */
  .overlay { align-items: flex-end; }
  .sheet {
    width: 100%; max-width: none; max-height: 88vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    opacity: 1; transform: translateY(100%); transition: transform .32s var(--ease-out);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .overlay.is-open .sheet { transform: translateY(var(--drag, 0px)); }
  .sheet.is-dragging { transition: none; }
  .sheet__header { cursor: grab; touch-action: none; }
  .sheet__footer { padding: var(--spacing-4) var(--spacing-4) var(--spacing-8); }

  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (min-width: 600px) and (max-width: 1023px) {
  #grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Toast · Type=Timer (countdown ring) and Action=Close */
.toast__timer { position: relative; flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.toast__timer[hidden] { display: none; }
.toast__timer svg { position: absolute; inset: 2px; transform: rotate(-90deg); }
.toast__timer circle { fill: none; stroke: var(--color-text-on-dark); stroke-width: 1.5; stroke-dasharray: 56.55; stroke-dashoffset: 0; }
.toast.is-counting .toast__timer circle { animation: toast-ring var(--t, 5000ms) linear forwards; }
.toast:hover .toast__timer circle { animation-play-state: paused; }
@keyframes toast-ring { to { stroke-dashoffset: 56.55; } }
.toast__timer b { position: relative; font-size: var(--font-size-12); line-height: 16px; font-weight: var(--font-weight-semibold); }
.toast__close { flex: none; width: 20px; height: 20px; display: inline-flex; }
.toast__close[hidden] { display: none; }
.toast:has(.toast__close:not([hidden])) .toast__content b, .toast.is-timer .toast__content b { font-weight: var(--font-weight-semibold); }

