/* whatever — витрина
   Палитра: чёрный, белый, два серых. Шрифты: Unbounded (заголовки), Onest (текст). */

@font-face { font-family: 'Unbounded'; src: url('/fonts/unbounded.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Onest'; src: url('/fonts/onest.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #000000;
  --paper: #ffffff;
  --ash: #666666;     /* вторичный текст на белом, 5.7:1 */
  --smoke: #a3a3a3;   /* вторичный текст на чёрном */
  --fog: #f1f1f1;     /* подложки фото и секций */
  --line: #dcdcdc;
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --text: 'Onest', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --max: 1440px;
  --header: 64px;
  --ease: cubic-bezier(.6, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Типографика ---------- */
.h-page { font: 700 clamp(1.9rem, 4vw, 3.2rem)/1.05 var(--display); letter-spacing: -0.035em; margin: 0; }
.h-section { font: 600 clamp(1.35rem, 2.2vw, 1.9rem)/1.15 var(--display); letter-spacing: -0.03em; margin: 0; }
.h-small { font: 600 1.02rem/1.3 var(--display); letter-spacing: -0.01em; margin: 0; }
.muted { color: var(--ash); }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 50px; padding: 0 26px;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* ---------- Объявление и шапка ---------- */
.announce { background: var(--ink); color: var(--paper); font-size: 13px; text-align: center; padding: 8px var(--gutter); }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-in { height: var(--header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.brand { justify-self: start; display: inline-flex; }
.brand img { height: 22px; width: auto; }
.nav { display: flex; gap: clamp(18px, 2.4vw, 36px); font-size: 15px; }
.nav a { position: relative; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px; background: currentColor; transition: right .3s var(--ease); }
.nav a:hover::after, .nav a[aria-current='page']::after { right: 0; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 16px; font-size: 15px; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; }
.cart-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; }
.menu-btn svg { width: 26px; height: 26px; }
.mobile-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; top: var(--header); z-index: 49; background: var(--paper);
  flex-direction: column; padding: 24px var(--gutter); gap: 4px; border-top: 1px solid var(--line); overflow-y: auto; }
.mobile-nav a { font: 600 1.6rem/1.5 var(--display); letter-spacing: -0.03em; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) {
  .header-in { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header.menu-open + .mobile-nav { display: flex; }
}

/* ---------- Главный экран ---------- */
.hero { position: relative; background: var(--ink); }
.hero-media { position: relative; height: min(78svh, 800px); min-height: 460px; overflow: hidden; background: #1a1a1a; }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.slide.is-on { opacity: 1; }
.hero-panel { position: absolute; left: var(--gutter); bottom: var(--gutter); width: min(520px, calc(100% - 2 * var(--gutter)));
  background: var(--paper); color: var(--ink); padding: clamp(24px, 3vw, 36px); }
.hero-kicker { font: 500 14px/1.4 var(--text); color: var(--ash); margin: 0 0 14px; }
.hero-title { font: 700 clamp(1.7rem, 3.2vw, 2.7rem)/1.05 var(--display); letter-spacing: -0.035em; margin: 0 0 12px; }
.hero-sub { margin: 0 0 24px; color: #333; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-body { transition: opacity .35s; }
.hero-body.is-fading { opacity: 0; }
.hero-ctrl { position: absolute; right: var(--gutter); bottom: var(--gutter); display: flex; align-items: center; gap: 12px; color: var(--paper); font-size: 14px; }
.hero-ctrl button { width: 44px; height: 44px; border: 1.5px solid var(--paper); background: rgba(0, 0, 0, .35); color: var(--paper); display: grid; place-items: center; }
.hero-ctrl button:hover { background: var(--paper); color: var(--ink); }
.hero-ctrl svg { width: 16px; height: 16px; }
.hero.no-banners .hero-media { display: none; }
.hero.no-banners .hero-panel { position: static; width: auto; max-width: none; background: var(--ink); color: var(--paper); padding: clamp(56px, 10vw, 140px) var(--gutter); }
.hero.no-banners .hero-sub { color: var(--smoke); }
@media (max-width: 760px) {
  .hero-media { height: 62svh; min-height: 360px; }
  .hero-panel { position: static; width: auto; padding: 24px var(--gutter) 32px; border-bottom: 1px solid var(--line); }
  .hero-ctrl { bottom: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .hero-body, .nav a::after { transition: none !important; }
}

/* ---------- Секции ---------- */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section.tinted { background: var(--fog); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(20px, 3vw, 36px); }
.section-head p { margin: 6px 0 0; color: var(--ash); }

/* ---------- Категории ---------- */
.cats { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
.cat { display: block; }
.cat-media { aspect-ratio: 4 / 5; background: var(--fog); overflow: hidden; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat:hover .cat-media img { transform: scale(1.03); }
.cat-meta { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.cat-name { font: 600 1rem/1.3 var(--display); letter-spacing: -0.01em; }
.cat-count { font-size: 14px; color: var(--ash); }
@media (max-width: 760px) { .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Сетка товаров: ровная, одинаковые карточки ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); row-gap: clamp(32px, 4vw, 48px); }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; aspect-ratio: 3 / 4; background: var(--fog); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media .alt { opacity: 0; transition: opacity .4s; }
@media (hover: hover) { .card:hover .card-media .alt { opacity: 1; } }
.badge { position: absolute; left: 0; top: 0; background: var(--ink); color: var(--paper); font: 600 13px/1 var(--display); padding: 9px 11px; }
.flag { position: absolute; left: 0; bottom: 0; background: var(--paper); color: var(--ink); font-size: 13px; padding: 6px 10px; }
.card-body { padding-top: 12px; display: grid; gap: 4px; }
.card-title { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 600; font-size: 15px; }
.price s { color: var(--ash); font-weight: 400; margin-left: 8px; }
.card-sizes { font-size: 13px; color: var(--ash); }
.card.is-soldout .card-media img { opacity: .45; }
.card.is-soldout .price { color: var(--ash); }

/* ---------- Условия ---------- */
.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.term { border-top: 1.5px solid var(--ink); padding-top: 20px; }
.term h3 { margin-bottom: 8px; }
.term p { margin: 0; color: var(--ash); max-width: 36ch; }
@media (max-width: 760px) { .terms { grid-template-columns: 1fr; } }

/* ---------- О магазине ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.about-text { font-size: 18px; line-height: 1.6; max-width: 56ch; margin: 0 0 20px; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* ---------- Каталог ---------- */
.page-head { padding-top: clamp(32px, 5vw, 64px); padding-bottom: 20px; }
.page-head p { margin: 8px 0 0; color: var(--ash); }
.filters { position: sticky; top: var(--header); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.filters-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; min-width: 0; max-width: 100%; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--ink); background: var(--paper); padding: 0 16px; font-size: 14px; min-height: 40px; white-space: nowrap; }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.chip .n { color: var(--ash); margin-left: 6px; }
.chip[aria-pressed='true'] .n { color: var(--smoke); }
.filter-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: #000; }
.select { border: 1.5px solid var(--ink); background: var(--paper); padding: 0 36px 0 14px; min-height: 40px; font-size: 14px; appearance: none; border-radius: 0;
  background-image: linear-gradient(45deg, transparent 50%, #000 50%), linear-gradient(135deg, #000 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.empty { padding: 64px 0; max-width: 44ch; }
.empty p { color: var(--ash); }
@media (max-width: 760px) { .filters-in { flex-direction: column; align-items: stretch; } .filters-in > * { min-width: 0; } .chips { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); } .filter-right { justify-content: space-between; } }

/* ---------- Страница товара ---------- */
.product { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4vw, 64px); padding-top: 24px; padding-bottom: clamp(48px, 7vw, 96px); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.gallery .shot:first-child { grid-column: 1 / -1; }
.gallery.single { grid-template-columns: 1fr; }
.shot { margin: 0; }
.shot img, .shot .ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--fog); }
.shot figcaption { font-size: 13px; color: var(--ash); padding-top: 8px; white-space: pre-line; }
.buy { position: sticky; top: calc(var(--header) + 24px); align-self: start; }
.crumbs { font-size: 14px; color: var(--ash); margin-bottom: 16px; }
.crumbs a:hover { color: var(--ink); }
.buy h1 { font: 600 clamp(1.5rem, 2.4vw, 2.2rem)/1.1 var(--display); letter-spacing: -0.03em; margin: 0 0 16px; }
.buy-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 22px; font-weight: 600; }
.buy-price s { color: var(--ash); font-size: 17px; font-weight: 400; }
.buy-price .off { background: var(--ink); color: var(--paper); font: 600 13px/1 var(--display); padding: 6px 8px; align-self: center; }
.buy-note { font-size: 14px; color: var(--ash); margin: 8px 0 24px; }
.sizes { border: 0; margin: 0 0 8px; padding: 0; }
.sizes legend { font-size: 14px; font-weight: 500; margin-bottom: 10px; padding: 0; }
.size-list { display: flex; flex-wrap: wrap; gap: 8px; }
.size-list input { position: absolute; opacity: 0; pointer-events: none; }
.size-list label { min-width: 52px; height: 46px; display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--ink); cursor: pointer; font-weight: 500; }
.size-list input:checked + label { background: var(--ink); color: var(--paper); }
.size-list input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; }
.size-list input:disabled + label { border-color: var(--line); color: #b5b5b5; text-decoration: line-through; cursor: not-allowed; }
.stock-hint { font-size: 14px; font-weight: 500; margin: 10px 0 0; }
.stock-hint:empty, .form-error:empty { display: none; }
.buy-actions { display: grid; gap: 10px; margin-top: 20px; }
.form-error { font-weight: 600; font-size: 14px; margin: 10px 0 0; }
.soldout-box { border: 1.5px solid var(--ink); padding: 16px; margin-bottom: 8px; }
.soldout-box p { margin: 4px 0 0; color: var(--ash); font-size: 14px; }
.specs { margin: 32px 0 0; border-top: 1.5px solid var(--ink); }
.specs details { border-bottom: 1px solid var(--line); }
.specs summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; padding: 15px 0; font-weight: 500; }
.specs summary::-webkit-details-marker { display: none; }
.specs summary::after { content: '+'; font: 400 20px/1 var(--display); }
.specs details[open] summary::after { content: '−'; }
.spec-body { padding: 0 0 18px; white-space: pre-line; color: #222; max-width: 52ch; }
@media (max-width: 860px) {
  .product { grid-template-columns: 1fr; padding-top: 0; }
  .product.wrap { padding: 0; }
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding: 0 var(--gutter); scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 86%; scroll-snap-align: start; }
  .gallery.single .shot { flex-basis: 100%; }
  .buy { position: static; padding: 8px var(--gutter) 0; }
}

/* ---------- Корзина ---------- */
.checkout { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 5vw, 88px); padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(48px, 7vw, 96px); }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; } }
.lines { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.line { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line img, .line .ph { width: 88px; aspect-ratio: 3/4; object-fit: cover; background: var(--fog); }
.line-title { font-weight: 500; }
.line-sub { font-size: 14px; color: var(--ash); }
.line-warn { font-size: 13px; font-weight: 600; margin-top: 4px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); margin-top: 10px; }
.qty button { width: 36px; height: 36px; border: 0; background: none; font-size: 18px; }
.qty button:hover { background: var(--ink); color: var(--paper); }
.qty button:disabled { opacity: .3; pointer-events: none; }
.qty output { min-width: 32px; text-align: center; font-weight: 500; }
.line-side { display: flex; flex-direction: column; align-items: end; justify-content: space-between; }
.remove { background: none; border: 0; padding: 0; font-size: 14px; color: var(--ash); text-decoration: underline; text-underline-offset: 3px; }
.remove:hover { color: var(--ink); }
.totals { margin-top: 20px; display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals .grand { font: 600 1.3rem/1.2 var(--display); letter-spacing: -0.02em; padding-top: 12px; border-top: 1.5px solid var(--ink); margin-top: 6px; }
.delivery-box { margin-top: 20px; background: var(--fog); padding: 18px; font-size: 14px; }
.delivery-box strong { display: block; font-size: 15px; margin-bottom: 4px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--ink); background: var(--paper); padding: 12px 14px; font-size: 16px; border-radius: 0; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.field .hint { font-size: 13px; color: var(--ash); }
.field.invalid input, .field.invalid textarea { border-width: 3px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.option-row { display: flex; gap: 14px; align-items: start; border: 1.5px solid var(--ink); padding: 14px 16px; }
.option-row .mark { width: 18px; height: 18px; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 2px; }
.option-row .mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.option-row small { display: block; color: var(--ash); font-size: 13px; margin-top: 2px; }
.success { padding-top: clamp(48px, 9vw, 120px); padding-bottom: clamp(48px, 9vw, 120px); max-width: 60rem; }
.success .num { font: 800 clamp(2.6rem, 8vw, 6rem)/1 var(--display); letter-spacing: -0.05em; margin: 12px 0 20px; }

/* ---------- Инфо ---------- */
.info-row { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(20px, 5vw, 80px); padding: clamp(32px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.info-row .prose { font-size: 17px; white-space: pre-line; }
@media (max-width: 760px) { .info-row { grid-template-columns: 1fr; } }
.contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 17px; }
.contacts a { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(48px, 6vw, 80px) 0 28px; }
.footer-top { display: grid; grid-template-columns: 5fr 3fr 4fr; gap: 40px; }
.footer-logo { width: min(100%, 280px); height: auto; }
.footer-about { color: var(--smoke); max-width: 40ch; margin: 20px 0 0; font-size: 15px; }
.footer-top h3 { font-size: 13px; font-weight: 400; color: var(--smoke); margin: 0 0 12px; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-top a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: clamp(40px, 6vw, 72px); font-size: 13px; color: var(--smoke); }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Уведомление ---------- */
.toast { visibility: hidden; position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper);
  display: flex; gap: 20px; align-items: center; padding: 14px 18px 14px 20px; font-size: 15px; max-width: calc(100vw - 32px); transition: transform .4s var(--ease); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 600px) {
  .toast { left: 12px; right: 12px; bottom: 12px; transform: translateY(160%); justify-content: space-between; }
  .toast.show { transform: none; }
}
.skeleton .card-media { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton .card-media { animation: none; } .toast { transition: none; } }
