@font-face {
  font-family: Onest;
  src: url("assets/onest-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: Onest;
  src: url("assets/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: Onest;
  src: url("assets/onest-ruble.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+20BD;
}

:root {
  color-scheme: light;
  --ink: #19172c;
  --text: #514e66;
  --muted: #706d83;
  --canvas: #f5f5fa;
  --white: #fff;
  --line: #e7e5f0;
  --brand: #5137df;
  --brand-hover: #4028c6;
  --brand-light: #eee9ff;
  --lime: #d6f98b;
  --sale: #aa2556;
  --sale-light: #ffe1ed;
  --radius: 12px;
  --shell: 1304px;
  font: 400 100% / 1.5 Onest, system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
body:has(dialog[open]) { overflow: hidden; }
::selection { color: var(--ink); background: var(--lime); }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #8a70ff; outline-offset: 3px; }
svg { flex-shrink: 0; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon, .shop-icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 20; top: 12px; left: 12px; background: var(--white); padding: 10px 16px; border-radius: var(--radius); }

.container { width: min(calc(100% - 80px), var(--shell)); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.header-grid {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  position: relative;
}
.logo { display: inline-flex; align-items: center; gap: 9px; align-self: center; color: var(--ink); text-decoration: none; font-size: 1.9rem; line-height: 1; font-weight: 850; letter-spacing: -.075em; white-space: nowrap; }
.logo-mark { color: var(--brand); width: 25px; height: 25px; }
.logo-dot { color: var(--brand); }
.catalog-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding-inline: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #f5f2ff; color: #482fc9; font-size: .9rem; font-weight: 700;
}
.catalog-trigger .icon { width: 18px; height: 18px; }
.catalog-trigger:hover, .catalog-trigger[aria-expanded="true"] { background: var(--brand-light); border-color: #d1c6fc; }
.catalog-menu {
  position: absolute; top: calc(100% - 3px); left: 150px; z-index: 5; display: grid; gap: 2px;
  width: 240px; padding: 12px; border: 1px solid var(--line); border-radius: 17px;
  background: var(--white); box-shadow: 0 22px 48px #2b225120;
}
.catalog-menu p { font-size: .82rem; font-weight: 650; color: var(--muted); margin: 4px 8px 6px; }
.catalog-menu button { text-align: left; background: transparent; color: var(--ink); border: 0; padding: 9px 10px; border-radius: 9px; }
.catalog-menu button:hover, .catalog-menu button.is-active { color: var(--brand); background: var(--brand-light); }
.search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: 10px; padding: 3px 3px 3px 13px; border: 1px solid #e0d9f9; border-radius: 13px; background: #f9f7ff; min-height: 48px; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px #5137df20; }
.search > .icon { width: 20px; height: 20px; color: var(--brand); }
.search input { padding: 0; border: 0; width: 100%; min-width: 0; background: transparent; outline: none; color: var(--ink); }
.search input:focus-visible { outline: none; }
.search input::placeholder { color: var(--muted); }
.search button { background: var(--brand); color: var(--white); border: 0; border-radius: 9px; min-height: 40px; padding-inline: 22px; font-weight: 720; font-size: .9rem; }
.search button:hover { background: var(--brand-hover); }
.header-actions { display: flex; align-items: stretch; gap: 12px; }
.account-action { display: grid; place-items: center; align-content: center; gap: 1px; position: relative; min-width: 67px; min-height: 48px; border-radius: 11px; padding: 4px 6px; color: var(--ink); border: 0; background: transparent; font-size: .75rem; font-weight: 600; line-height: 1.2; }
.account-action:hover { color: var(--brand); background: var(--brand-light); }
.action-icon { display: grid; place-items: center; position: relative; }
.account-action .icon { height: 23px; width: 23px; }
.counter { position: absolute; top: -4px; right: -10px; font-size: .7rem; line-height: 17px; min-width: 17px; height: 17px; padding-inline: 4px; border-radius: 99px; background: var(--brand); color: var(--white); font-weight: 750; text-align: center; }
.header-secondary { border-top: 1px solid #f0eff6; }
.secondary-inner { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.utility-nav { display: flex; align-items: center; gap: 25px; font-size: .875rem; font-weight: 570; }
.utility-nav a, .utility-nav button { text-decoration: none; }
.utility-nav a:hover, .utility-nav button:hover { color: var(--brand); }
.utility-sale { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #a52456; padding: 0; font-weight: 710; }
.utility-sale.is-active { text-decoration: underline; text-underline-offset: 3px; }
.utility-sale .icon, .location .icon { width: 17px; height: 17px; }
.location { display: flex; align-items: center; gap: 5px; color: var(--text); font-size: .875rem; font-weight: 620; white-space: nowrap; }
.location .icon { color: var(--brand); }

.storefront { padding-block: 22px 64px; }
.promotions { display: grid; grid-template-columns: minmax(0, 3fr) minmax(244px, 1.06fr); gap: 14px; }
.hero {
  position: relative; display: flex; align-items: center; isolation: isolate; overflow: hidden;
  min-height: 334px; padding: 30px 40px 51px; border-radius: 26px;
  color: var(--white); background: #2b1a79;
}
.hero-photo { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 90%; height: 100%; object-fit: cover; object-position: 70% 51%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #2b1a79 0%, #2b1a79 12%, #2b1a79f2 28%, #2b1a7985 51%, #2b1a7900 73%); }
.hero-content { max-width: 48%; }
.hero h1 { margin: 0; font-size: clamp(2.5rem, 4.05vw, 3.6rem); font-weight: 810; line-height: 1.02; letter-spacing: -.064em; text-wrap: balance; }
.hero p { margin: 15px 0 20px; max-width: 23ch; color: #efebff; font-size: 1rem; line-height: 1.4; text-wrap: pretty; }
.hero-button { display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: var(--radius); min-height: 46px; padding: 9px 16px; color: #263414; background: var(--lime); font-weight: 760; font-size: .92rem; white-space: nowrap; box-shadow: 0 4px 12px #18103622; }
.hero-button:hover { background: #e8ffb9; }
.hero:has(.hero-button:focus-visible), .hero:has(.slider-dot:focus-visible) { outline: 3px solid #8a70ff; outline-offset: 3px; }
.hero[data-tone="sand"] { background: #f7e0cf; color: #342014; }
.hero[data-tone="sand"]::after { background: linear-gradient(90deg,#f7e0cf 18%,#f7e0cff4 39%,#f7e0cf15 66%); }
.hero[data-tone="sand"] p { color: #5c4132; }
.hero[data-tone="green"] { background: #dcebd8; color: #193422; }
.hero[data-tone="green"]::after { background: linear-gradient(90deg,#dcebd8 18%,#dcebd8f5 40%,#dcebd825 70%); }
.hero[data-tone="green"] p { color: #3d5745; }
.hero[data-tone="sand"] .hero-photo, .hero[data-tone="green"] .hero-photo { width: 56%; mix-blend-mode: multiply; object-position: center; }
.hero[data-tone="sand"] .hero-button, .hero[data-tone="green"] .hero-button { color: var(--white); background: #342451; }
.hero[data-tone="sand"] .hero-button:hover, .hero[data-tone="green"] .hero-button:hover { background: #4b346f; }
.slider { position: absolute; bottom: 17px; left: 40px; display: flex; align-items: center; gap: 4px; }
.slider-dot { border: 0; padding: 0; background: transparent; width: 24px; height: 20px; border-radius: 10px; display: grid; place-items: center; }
.slider-dot::before { display: block; content: ""; width: 7px; height: 7px; background: #ffffff69; border-radius: 100px; transition: width .16s, background .16s; }
.hero .slider-dot[aria-current="true"], .hero .slider-dot.is-active { width: 27px; background: transparent; }
.slider-dot[aria-current="true"]::before, .slider-dot.is-active::before { width: 19px; background: #fff; }
.hero[data-tone="sand"] .slider-dot::before, .hero[data-tone="green"] .slider-dot::before { background: #22202c56; }
.hero[data-tone="sand"] .slider-dot.is-active::before, .hero[data-tone="green"] .slider-dot.is-active::before, .hero[data-tone="sand"] .slider-dot[aria-current="true"]::before, .hero[data-tone="green"] .slider-dot[aria-current="true"]::before { background: #342451; }

.promotions-aside { display: grid; gap: 14px; grid-template-rows: 1fr 1fr; }
.mini-promo {
  position: relative; isolation: isolate; display: flex; align-items: flex-start; text-align: left;
  padding: 22px; min-height: 143px; border: 0; border-radius: 22px; overflow: hidden;
  transition: box-shadow .18s ease;
}
.mini-promo:hover { box-shadow: 0 4px 16px #34245120; }
.mini-home { background: #ffe9d9; color: #3b271d; }
.mini-sale { background: #e7e0fc; color: #302250; }
.mini-copy { display: flex; flex-direction: column; gap: 5px; max-width: 67%; position: relative; z-index: 1; }
.mini-copy strong { font-size: clamp(1.2rem,2.15vw,1.64rem); font-weight: 800; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
.mini-copy > span { font-size: .87rem; font-weight: 520; line-height: 1.3; }
.mini-promo img { position: absolute; z-index: -2; right: -10%; bottom: -39%; width: 76%; height: 157%; object-fit: contain; mix-blend-mode: multiply; transform: scale(1.03); transition: transform .22s ease; mask-image: radial-gradient(ellipse at 52% 48%, #000 29%, #000b 49%, transparent 71%); }
.mini-promo:hover img { transform: scale(1.09); }
.mini-promo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#ffe9d9 0%,#ffe9d9f0 29%,#ffe9d900 72%); }
.mini-sale::before { background: linear-gradient(90deg,#e7e0fc 0%,#e7e0fcf7 32%,#e7e0fc00 76%); }
.mini-symbol { display: grid; place-items: center; position: absolute; bottom: 14px; left: 22px; width: 34px; height: 34px; border-radius: 11px; background: #fff8; }
.mini-symbol .icon { width: 18px; height: 18px; }

.categories { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin-block: 19px 24px; }
.category {
  display: flex; min-width: 0; align-items: center; gap: 9px; justify-content: flex-start;
  min-height: 64px; padding: 8px 10px; background: var(--white); border: 1px solid var(--line); border-radius: 15px;
  color: var(--ink); text-align: left; font-size: .86rem; font-weight: 700; line-height: 1.18;
}
.category:hover, .category.is-active { border-color: #c4b7fd; background: #fcfaff; }
.category.is-active { box-shadow: inset 0 0 0 1px #c4b7fd; color: #3c23b3; }
.category-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; background: #eae3fc; color: #5137cf; }
.category-icon .icon { width: 22px; height: 22px; }
.category-tech .category-icon { background: #e0eafd; color: #3c58b3; }
.category-home .category-icon { background: #ffeacc; color: #9c570e; }
.category-style .category-icon { background: #ffe6ef; color: #a63960; }
.category-sport .category-icon { background: #e3f1d5; color: #497633; }
.category-sale .category-icon { background: #f7dbec; color: #a52d63; }

.listing { scroll-margin-top: 16px; }
.listing-header, .listing-heading, .listing-controls { display: flex; align-items: center; }
.listing-header { justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.listing-heading { align-items: baseline; gap: 12px; min-width: 0; }
.listing-header h2 { margin: 0; min-width: 0; font-size: clamp(1.5rem,3vw,2.25rem); font-weight: 820; letter-spacing: -.055em; line-height: 1.12; overflow-wrap: anywhere; }
.result-count { color: var(--muted); white-space: nowrap; font-size: .83rem; }
.listing-controls { justify-content: flex-end; gap: 8px; }
.clear-filters { background: transparent; border: 0; border-radius: 8px; color: var(--brand); padding: 8px; font-weight: 660; font-size: .82rem; }
.clear-filters:hover { background: var(--brand-light); }
.sort-control { position: relative; display: flex; align-items: center; }
.sort-control select { appearance: none; color: var(--text); background: var(--white); border: 1px solid var(--line); border-radius: 11px; min-height: 42px; padding: 6px 36px 6px 13px; font-size: .84rem; font-weight: 620; cursor: pointer; }
.sort-control .icon { pointer-events: none; position: absolute; right: 10px; width: 16px; height: 16px; color: var(--brand); }

.product-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; align-items: stretch; }
.product-card {
  min-width: 0; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
  padding: 5px; border-radius: 17px; transition: border-color .18s ease, box-shadow .18s ease;
}
.product-card:hover { border-color: #d8cffe; box-shadow: 0 9px 24px #3026500e; }
.product-media {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 3 / 4;
  background: #efecf7; border-radius: 12px 12px 8px 8px;
}
.product-open { display: block; border: 0; padding: 0; width: 100%; height: 100%; background: transparent; }
.product-open:focus-visible { outline-offset: -4px; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product-open:hover img { transform: scale(1.035); }
.product-favorite {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; z-index: 1; display: grid; place-items: center;
  padding: 0; border: 1px solid #ffffffa0; border-radius: 10px; background: #fffffff1; color: var(--ink);
  box-shadow: 0 1px 5px #1b143411;
}
.product-favorite .shop-icon, .product-favorite .icon, .product-favorite svg { width: 20px; height: 20px; }
.product-favorite:hover, .product-favorite.is-favorite { color: var(--sale); }
.product-favorite.is-favorite svg { fill: #ff8fba; }
.product-discount {
  position: absolute; top: 10px; left: 8px; z-index: 1; background: var(--sale-light); color: var(--sale);
  border-radius: 7px; padding: 3px 6px; font-size: .75rem; font-weight: 780; line-height: 1.3; pointer-events: none; white-space: nowrap;
}
.product-content { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: stretch; padding: 10px 6px 5px; gap: 5px; }
.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; white-space: nowrap; line-height: 1.1; }
.product-price strong { font-size: 1.26rem; letter-spacing: -.055em; font-weight: 800; }
.product-price del { color: var(--muted); font-size: .78rem; font-weight: 600; }
.product-name { background: transparent; color: var(--ink); border: 0; padding: 0; font-size: .87rem; line-height: 1.32; text-align: left; font-weight: 650; min-height: 2.64em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.product-name:hover { color: var(--brand); }
.product-rating { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: .76rem; line-height: 1.35; white-space: nowrap; }
.product-rating strong { color: var(--ink); font-weight: 710; }
.product-rating small { font-size: inherit; }
.product-rating svg { width: 15px; height: 15px; color: #c57707; }
.product-delivery { min-height: 1.4em; display: flex; align-items: center; gap: 5px; color: #565468; font-size: .77rem; line-height: 1.35; font-weight: 540; }
.product-delivery svg { width: 16px; height: 16px; color: var(--brand); }
.add-button { display: flex; justify-content: center; align-items: center; gap: 6px; width: 100%; min-height: 41px; margin-top: 5px; padding: 7px 5px; border: 0; border-radius: var(--radius); color: var(--white); background: var(--brand); font-size: .84rem; font-weight: 740; line-height: 1.2; }
.add-button svg { width: 17px; height: 17px; }
.add-button:hover { background: var(--brand-hover); }
.add-button.is-added { background: #e5f6cc; color: #36551f; }
.add-button.is-added:hover { background: #daf0bc; }

.empty-state, .panel-empty { text-align: center; padding: 34px 16px; border: 1px dashed #d7d1e6; border-radius: 16px; background: #fbfaff; }
.empty-state h3, .panel-empty h3 { margin: 7px 0 4px; }
.empty-state p, .panel-empty p { color: var(--muted); margin: 0 0 12px; }
.empty-icon { width: 28px; height: 28px; color: var(--brand); }
.empty-reset, .checkout-button { border: 0; border-radius: var(--radius); padding: 10px 15px; color: var(--white); background: var(--brand); font-weight: 710; }
.empty-reset:hover, .checkout-button:hover { background: var(--brand-hover); }

.site-footer { padding-block: 28px 34px; background: var(--white); border-top: 1px solid var(--line); scroll-margin-top: 18px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.1fr 1.2fr; gap: 28px; }
.footer-brand .logo { font-size: 1.6rem; }
.footer-brand .logo-mark { width: 20px; height: 20px; }
.footer-inner p { font-size: .84rem; color: var(--muted); margin: 2px 0 0; }
.footer-brand p { margin-top: 7px; }
.footer-delivery { display: flex; align-items: center; gap: 11px; }
.footer-delivery strong { font-size: .9rem; }
.footer-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; color: var(--brand); background: var(--brand-light); border-radius: 11px; }
.footer-icon .icon { width: 20px; height: 20px; }

.mobile-bar { display: none; }
.shop-dialog {
  width: min(100% - 24px, 510px); max-height: calc(100% - 24px); margin: auto; padding: 0;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 28px 100px #1d143e52;
}
.shop-dialog::backdrop { background: #21173a88; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 1.28rem; line-height: 1.25; letter-spacing: -.035em; }
.dialog-close { display: grid; place-items: center; flex: 0 0 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: var(--brand-light); color: var(--brand); }
.dialog-close:hover { background: #dfd4fc; }
.dialog-close .icon { width: 20px; height: 20px; }
.dialog-body { padding: 16px 18px 20px; }
.dialog-body > p { margin: 0 0 12px; color: var(--text); }
.cart-item { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; align-items: center; gap: 10px; padding-block: 9px; border-bottom: 1px solid var(--line); }
.cart-item-image { width: 60px; height: 69px; object-fit: cover; border-radius: 9px; background: var(--canvas); }
.cart-item-info { color: var(--ink); font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
.cart-item-info p { margin: 0 0 3px; }
.cart-item-info button:not(.add-button) { color: var(--ink); background: transparent; text-align: left; border: 0; padding: 0; font-weight: 690; }
.cart-item-info button:not(.add-button):hover { color: var(--brand); }
.quantity-control { display: flex; align-items: center; gap: 5px; width: max-content; margin-top: 5px; border-radius: 9px; padding: 3px; background: #f5f1fe; white-space: nowrap; font-weight: 700; font-size: .85rem; }
.quantity-control button, .cart-remove, .item-remove, .panel-favorite, .dialog-favorite { display: grid; place-items: center; border: 0; border-radius: 7px; min-width: 30px; min-height: 30px; padding: 4px; background: var(--white); color: var(--brand); }
.quantity-control button:hover, .cart-remove:hover, .item-remove:hover, .panel-favorite:hover, .dialog-favorite:hover { background: var(--brand-light); }
.quantity-control svg, .cart-remove svg, .item-remove svg, .panel-favorite svg, .dialog-favorite svg { width: 16px; height: 16px; }
.cart-summary { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; color: var(--ink); }
.checkout-button { margin-inline-start: auto; }
.demo-checkout-note { flex-basis: 100%; margin: 0; padding: 9px 12px; border-radius: 9px; background: var(--brand-light); color: var(--text); font-size: .85rem; }
.detail-product { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.1fr); gap: 16px; }
.detail-image { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: var(--canvas); }
.detail-copy { display: flex; flex-direction: column; gap: 8px; }
.detail-copy h3 { margin: 0; line-height: 1.22; }
.detail-copy p { margin: 0; color: var(--text); font-size: .86rem; line-height: 1.4; }
.detail-actions { display: flex; align-items: center; gap: 7px; }
.detail-actions .add-button { margin: 0; }
.detail-actions .product-favorite { position: static; flex: 0 0 36px; }
.toast { position: fixed; z-index: 9; bottom: 22px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); color: var(--white); background: #292040; padding: 10px 16px; border-radius: 11px; box-shadow: 0 4px 22px #21113b35; font-weight: 630; font-size: .88rem; }

@media (min-width: 1121px) {
  .hero-content { max-width: 56%; }
  .hero h1 { max-width: 470px; }
}

@media (max-width: 1120px) {
  .container { width: calc(100% - 48px); }
  .header-grid { gap: 10px; }
  .header-actions { gap: 4px; }
  .hero { padding-inline: 29px; }
  .slider { left: 29px; }
  .category { font-size: .81rem; gap: 7px; padding: 7px; }
  .category-icon { width: 35px; height: 35px; border-radius: 9px; }
  .category-icon .icon { width: 19px; height: 19px; }
  .product-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 800px) {
  .container { width: calc(100% - 32px); }
  .header-grid { grid-template-columns: auto minmax(0,1fr) auto; gap: 7px 10px; padding-block: 9px; min-height: 0; }
  .header-actions { grid-column: 3; grid-row: 1; }
  .header-grid > .logo { grid-column: 1 / 3; grid-row: 1; font-size: 1.67rem; }
  .catalog-trigger { grid-column: 1; grid-row: 2; height: 44px; }
  .search { grid-column: 2 / 4; grid-row: 2; min-height: 44px; }
  .search button { min-height: 36px; padding-inline: 15px; }
  .catalog-menu { left: 0; }
  .header-secondary .secondary-inner { min-height: 37px; }
  .utility-nav { gap: 16px; font-size: .815rem; }
  .location { font-size: .815rem; }
  .promotions { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .promotions-aside { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; gap: 10px; }
  .mini-promo { min-height: 112px; padding: 14px; border-radius: 17px; }
  .mini-symbol { left: 14px; bottom: 9px; width: 27px; height: 27px; border-radius: 8px; }
  .mini-symbol .icon { width: 15px; height: 15px; }
  .mini-copy > span { font-size: .78rem; }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .categories { display: flex; gap: 8px; overflow: auto; scrollbar-width: thin; margin-block: 13px 18px; padding-bottom: 3px; }
  .category { flex: 0 0 auto; padding: 8px; min-height: 51px; white-space: nowrap; }
  .storefront { padding-top: 13px; padding-bottom: 42px; }
  .footer-inner { gap: 16px; }
}

@media (max-width: 540px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .container { width: calc(100% - 24px); }
  .header-grid { grid-template-columns: auto minmax(0,1fr); padding-top: 14px; gap: 10px; }
  .header-grid > .logo { margin-bottom: 2px; }
  .header-actions { display: none; }
  .search { grid-column: 2; gap: 7px; padding-left: 8px; }
  .search > .icon { width: 17px; height: 17px; }
  .search button { padding-inline: 11px; font-size: .8rem; }
  .search input { font-size: 1rem; }
  .catalog-trigger { padding-inline: 10px; font-size: .79rem; gap: 5px; }
  .catalog-trigger .icon { width: 16px; height: 16px; }
  .utility-nav { gap: 14px; }
  .utility-sale .icon, .location .icon { width: 15px; height: 15px; }
  .hero { border-radius: 19px; align-items: flex-end; min-height: 290px; padding: 18px 16px 40px; }
  .hero-photo { width: 100%; object-position: 71% center; }
  .hero::after { background: linear-gradient(90deg,#2b1a79f5,#2b1a79ac 35%,#2b1a7900 90%),linear-gradient(0deg,#2b1a79d9,#2b1a7900 80%); }
  .hero-content { max-width: 76%; }
  .hero h1 { max-width: 10ch; font-size: clamp(2.05rem, 9vw, 2.65rem); }
  .hero p { margin: 10px 0 13px; font-size: .86rem; max-width: 21ch; }
  .hero-button { min-height: 42px; padding-inline: 12px; font-size: .82rem; }
  .slider { bottom: 9px; left: 14px; }
  .hero[data-tone="sand"] .hero-photo, .hero[data-tone="green"] .hero-photo { width: 75%; object-position: right center; }
  .hero[data-tone="sand"]::after { background: linear-gradient(90deg,#f7e0cf 7%,#f7e0cfe8 36%,#f7e0cf10 100%); }
  .hero[data-tone="green"]::after { background: linear-gradient(90deg,#dcebd8 7%,#dcebd8e8 36%,#dcebd810 100%); }
  .mini-promo { min-height: 99px; padding: 11px; }
  .mini-copy { max-width: 79%; gap: 4px; }
  .mini-copy strong { font-size: 1.03rem; text-wrap: wrap; }
  .mini-copy > span { font-size: .725rem; }
  .mini-symbol { display: none; }
  .mini-promo img { right: -25%; width: 100%; height: 175%; bottom: -57%; }
  .mini-promo::before { background: linear-gradient(90deg,#ffe9d9 16%,#ffe9d9eb 32%,#ffe9d940 57%,#ffe9d900 68%); }
  .mini-sale::before { background: linear-gradient(90deg,#e7e0fc 16%,#e7e0fceb 32%,#e7e0fc40 57%,#e7e0fc00 68%); }
  .mini-home .mini-copy { text-shadow: 0 1px 3px #ffe9d9; }
  .mini-sale .mini-copy { text-shadow: 0 1px 3px #e7e0fc; }
  .listing-header { align-items: flex-start; gap: 8px; margin-bottom: 10px; }
  .listing-heading { flex-direction: column; align-items: flex-start; gap: 4px; }
  .listing-header h2 { font-size: 1.43rem; }
  .result-count { font-size: .75rem; white-space: normal; }
  .listing-controls { flex-wrap: wrap; flex: 0 1 auto; gap: 2px; }
  .sort-control select { min-height: 38px; font-size: .75rem; padding-inline: 7px 23px; max-width: 140px; }
  .sort-control .icon { width: 12px; height: 12px; right: 7px; }
  .clear-filters { padding: 3px 5px; font-size: .75rem; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .product-card { padding: 4px; border-radius: 14px; }
  .product-content { padding: 8px 4px 4px; }
  .product-favorite { width: 33px; height: 33px; top: 5px; right: 5px; }
  .product-discount { top: 7px; left: 5px; }
  .product-price strong { font-size: 1.12rem; }
  .product-name { font-size: .8rem; }
  .product-rating, .product-delivery { font-size: .73rem; }
  .add-button { font-size: .79rem; min-height: 40px; gap: 4px; }
  .add-button svg { width: 15px; height: 15px; }
  .site-footer { padding-block: 20px 26px; }
  .footer-inner { grid-template-columns: 1fr; }
  .mobile-bar {
    display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); position: fixed; inset: auto 0 0; z-index: 4;
    min-height: calc(61px + env(safe-area-inset-bottom)); padding: 3px 4px env(safe-area-inset-bottom);
    background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px #25144408;
  }
  .mobile-bar > * { display: grid; place-items: center; position: relative; align-content: center; gap: 3px; text-decoration: none; color: var(--text); background: transparent; border: 0; font-size: .71rem; font-weight: 630; padding: 2px; }
  .mobile-bar [data-home], .mobile-bar .is-active { color: var(--brand); }
  .mobile-bar .icon { width: 22px; height: 22px; }
  .mobile-bar .counter { top: 2px; right: calc(50% - 24px); }
  .shop-dialog { max-height: calc(100% - 16px); }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .detail-product { grid-template-columns: minmax(84px, .7fr) minmax(0, 1fr); gap: 11px; }
  .detail-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
