/* Каркас витрины: поведение на телефоне, шторки, переходы. Внешний вид «Дропа» — drop.css (--токены). */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --teal: #00AC9E; --orange: #E44909;
  --gutter: 16px; --maxw: 1180px;
}
/* @view-transition — в <head> каждой страницы (build.mjs): так оно есть с первой миллисекунды. */
::view-transition-group(*) { animation-duration: 320ms; animation-timing-function: var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font-text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, a, select, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select { font-size: 16px; } /* меньше 16 — iPhone приближает страницу */
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus, var(--orange)); outline-offset: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }


/* Значки в шапке */
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--orange); color: #fff; font: 700 11px/18px var(--font-text); text-align: center; }
.icon-btn:active { transform: scale(0.92); transition: transform 120ms var(--ease-out); }

/* Сердечко */
.heart { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; z-index: 2; }
.heart svg { width: 22px; height: 22px; fill: transparent; stroke: var(--ink); stroke-width: 1.8; transition: fill 160ms var(--ease-out), stroke 160ms var(--ease-out); }
.heart.on svg { fill: var(--orange); stroke: var(--orange); }
.heart.pop svg { animation: pop 320ms var(--ease-out); }
@keyframes pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Шторки (dialog) */
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: 88dvh; padding: 0; border: 0;
  border-radius: var(--sheet-radius, 22px) var(--sheet-radius, 22px) 0 0; background: var(--sheet-bg, #fff); color: var(--ink);
  flex-direction: column; overscroll-behavior: contain; translate: 0 0; transition: translate 320ms var(--ease-drawer); }
dialog.sheet[open] { display: flex; }
@starting-style { dialog.sheet[open] { translate: 0 100%; } }
dialog.sheet.closing { translate: 0 100%; transition-duration: 200ms; }
dialog.sheet::backdrop { background: rgb(0 0 0 / 0.38); transition: opacity 320ms var(--ease-out); }
@starting-style { dialog.sheet[open]::backdrop { opacity: 0; } }
.grip { padding: 10px 0 4px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.grip::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: rgb(0 0 0 / 0.18); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px var(--gutter) 10px; }
.sheet-head h2 { margin: 0; font: var(--sheet-title, 700 20px/1.2 var(--font-display)); }
.sheet-head .x { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgb(0 0 0 / 0.06); }
.x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.sheet-body { overflow-y: auto; padding: 0 var(--gutter) 18px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgb(0 0 0 / 0.08); }
.sheet-foot .cta { flex: 1; }
.sheet-body section { padding: 12px 0; }
.sheet-body h3 { margin: 0 0 10px; font: 600 15px/1.2 var(--font-text); }
.lead { margin: 4px 0 14px; color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.fine.flash { animation: flash 900ms var(--ease-out); }
@keyframes flash { 0%, 40% { color: var(--orange); } 100% { color: var(--muted); } }

/* Кнопки */
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; border-radius: var(--cta-radius, 14px);
  background: var(--cta-bg, var(--ink)); color: var(--cta-ink, #fff); font: 700 16px/1 var(--font-text); width: 100%; transition: transform 120ms var(--ease-out), background 160ms; }
.cta:active { transform: scale(0.97); }
.cta[disabled] { opacity: 0.45; }
.cta.file { cursor: pointer; }
.ghost { min-height: 52px; padding: 0 18px; border-radius: var(--cta-radius, 14px); background: rgb(0 0 0 / 0.06); font-weight: 600; }
.link { color: var(--accent-ink, var(--teal)); font-weight: 600; font-size: 14px; }

/* Чипы в фильтрах */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 42px; padding: 0 14px; border-radius: var(--chip-radius, 999px); background: var(--chip-bg, #f1f1f1); font-weight: 600; font-size: 15px;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out); }
.chips button:active { transform: scale(0.95); }
.chips button.on { background: var(--chip-on, var(--ink)); color: var(--chip-on-ink, #fff); }
.chips.brands button { display: inline-flex; align-items: center; min-width: 72px; justify-content: center; }
.chips.brands img { height: 18px; width: auto; }
.chips.brands button.on img { filter: invert(1); }
.chips.sizes button { min-width: 56px; padding: 0 10px; }
.range { display: flex; gap: 10px; }
.range input { flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid rgb(0 0 0 / 0.14); padding: 0 12px; background: #fff; }

/* «Мой размер» */
.size-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-bottom: 14px; }
.size-pick button { min-height: 56px; border-radius: 12px; background: var(--chip-bg, #f1f1f1); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.size-pick button small { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.size-pick button.on { background: var(--chip-on, var(--ink)); color: var(--chip-on-ink, #fff); }
.size-pick button.on small { color: inherit; opacity: 0.75; }

/* Корзина */
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-list li { display: grid; grid-template-columns: 84px 1fr 40px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgb(0 0 0 / 0.07); }
.cart-list img { width: 84px; height: 64px; object-fit: contain; background: var(--tile, #f4f4f4); border-radius: 10px; }
.cart-list div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cart-list .p { font-weight: 700; font-size: 15px; }
.cart-list .x { width: 40px; height: 40px; display: grid; place-items: center; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; font-size: 17px; }
.cart-total b { font-size: 22px; }
.empty { padding: 28px 0; text-align: center; color: var(--muted); }
.empty p { margin: 0 0 6px; }
.empty .ghost { margin-top: 10px; }

/* Таблица размеров */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgb(0 0 0 / 0.07); }
th { font-weight: 600; color: var(--muted); font-size: 13px; }
tr.on td { background: var(--row-on, rgb(0 172 158 / 0.12)); font-weight: 700; }

/* Карточка товара: общее */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--bar-bg, rgb(255 255 255 / 0.92)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgb(0 0 0 / 0.06); }
.buybar .cta { max-width: 560px; margin: 0 auto; display: flex; }
.page-product main { padding-bottom: 110px; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.size-grid button { position: relative; min-height: 64px; border-radius: var(--size-radius, 12px); background: var(--chip-bg, #f1f1f1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out); }
.size-grid button:active { transform: scale(0.96); }
.size-grid button b { font-size: 17px; }
.size-grid button small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.size-grid button i { position: absolute; top: -7px; right: -4px; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 8px; background: var(--orange); color: #fff; }
.size-grid button.on { background: var(--chip-on, var(--ink)); color: var(--chip-on-ink, #fff); }
.size-grid button.on small { color: inherit; opacity: 0.8; }
.size-grid.nudge { animation: nudge 420ms var(--ease-out); }
@keyframes nudge { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.sizes-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.sizes-head h2 { margin: 0; font-size: 16px; }
.info details { border-top: 1px solid rgb(0 0 0 / 0.08); padding: 14px 0; }
.info details:last-of-type { border-bottom: 1px solid rgb(0 0 0 / 0.08); }
.info summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.info summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; transition: rotate 200ms var(--ease-out); }
.info details[open] summary::after { rotate: 45deg; }
.info details p { margin: 10px 0 0; color: var(--muted); }
.stock { font-size: 14px; color: var(--muted); margin: 14px 0 18px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail a { scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.rail img { aspect-ratio: 4 / 3; object-fit: contain; background: var(--tile, #f4f4f4); border-radius: 12px; padding: 8px; }
.ghost-fly { position: fixed; z-index: 50; object-fit: contain; pointer-events: none; }
.brand-mark { height: 20px; width: auto; }
.brand-mark.word { height: auto; font-weight: 800; font-size: 14px; letter-spacing: -0.01em; }
@media (min-width: 900px) { .rail { grid-auto-columns: 22%; } }
@media (hover: hover) and (pointer: fine) { .chips button:hover { background: var(--chip-hover, #e6e6e6); } .chips button.on:hover { background: var(--chip-on, var(--ink)); } }

/* Оформление (пока без оплаты на сайте): текст заказа, Telegram, звонок */
pre.order { white-space: pre-wrap; font: 14px/1.5 var(--font-text); background: var(--tile); padding: 12px 14px; border-radius: 10px; margin: 0 0 14px; }
.ghost.wide { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 10px; }
a.cta { text-decoration: none; }

/* «Глазами клиента» (логотип склада → /catalog.html#staff): полоса только для своих, гость её не видит */
.staff { background: var(--teal); color: #fff; font-size: 14px; }
.staff-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.staff a { color: #fff; font-weight: 700; white-space: nowrap; padding: 6px 0; }

/* Контакты и реквизиты */
.page { padding: 22px 0 10px; max-width: 760px; }
.block { border-top: var(--line, 1px solid rgb(0 0 0 / 0.1)); padding: 16px 0; }
.block h2 { margin: 0 0 8px; }
.block p { margin: 0 0 8px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { dl { grid-template-columns: 1fr; gap: 0; } dd { margin-bottom: 8px; } }
/* «Дроп» (выбор Дэна 28.10): уличная энергия Instagram. Строчные заголовки как в логотипе, наклейки под углом, жёсткие края, бегущая строка брендов. */
:root {
  --bg: #FFFFFF; --ink: #141414; --muted: #5F5F5F; --tile: #EDEDEB; /* = photoBg в shop.json: фон фото и плитки один */ --line: 2px solid var(--ink);
  --font-display: "Dela Gothic One", system-ui, sans-serif; --font-text: "Onest", system-ui, sans-serif;
  --chip-bg: #fff; --chip-on: var(--ink); --chip-on-ink: #fff; --chip-radius: 999px; --size-radius: 4px;
  --cta-bg: var(--ink); --cta-radius: 4px; --accent-ink: var(--ink); --sheet-radius: 14px; --row-on: #FFE3D6;
  --sheet-title: 400 22px/1.1 var(--font-display);
}
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 8px; }
.logo img { height: 36px; width: auto; }
.page-product .logo { margin-right: auto; }
.acts { display: flex; }

/* Одна постоянная анимация на странице — бегущая строка. Под reduced-motion стоит на месте. */
.marquee { background: var(--orange); overflow: hidden; border-block: var(--line); }
.marquee .track { display: flex; align-items: center; gap: 34px; width: max-content; padding: 10px 0; animation: run 38s linear infinite; }
.marquee img { height: 22px; width: auto; }
.marquee span { font: 400 19px/1 var(--font-display); color: var(--ink); text-transform: lowercase; }
@keyframes run { to { translate: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

.intro { padding: 22px var(--gutter) 2px; }
.intro h1 { margin: 0; font: 400 clamp(44px, 14vw, 96px)/0.9 var(--font-display); letter-spacing: -0.02em; text-transform: lowercase; }
.intro p { margin: 12px 0 0; color: var(--muted); }

.brands { display: flex; gap: 8px; overflow-x: auto; padding-top: 18px; padding-bottom: 6px; scrollbar-width: none; }
.brands::-webkit-scrollbar { display: none; }
.brands button { flex: none; height: 44px; padding: 0 16px; display: flex; align-items: center; gap: 6px; border: var(--line); border-radius: 999px; transition: background 160ms var(--ease-out); }
.brands button .brand-mark { height: 18px; }
.brands button small { font-size: 11px; font-weight: 700; }
.brands button.on { background: var(--ink); color: #fff; }
.brands button.on img { filter: invert(1); }

.toolbar { display: flex; gap: 8px; align-items: center; padding-top: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: var(--line); border-radius: 999px; font-weight: 700; font-size: 14.5px; }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pill.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.pill .n, .pill .count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--orange); color: #fff; font-size: 12px; line-height: 20px; text-align: center; padding: 0 5px; }
.pill.on .n, .pill.on .count { background: #fff; color: var(--orange); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; grid-auto-flow: dense; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.drop-card { display: flex; flex-direction: column; gap: 8px; }
.drop-card.big { grid-column: span 2; }
.drop-card .ph { position: relative; aspect-ratio: 1 / 1; background: var(--tile); border-radius: 4px; display: flex; align-items: center; justify-content: center; padding: 12px; }
.drop-card.big .ph { aspect-ratio: 2 / 1.15; }
.drop-card .ph img { width: 100%; max-height: 100%; object-fit: contain; transition: transform 240ms var(--ease-out); }
.drop-card:active .ph img { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .drop-card:hover .ph img { transform: rotate(-4deg) scale(1.04); } }
.drop-card .heart { background: #fff; border: var(--line); width: 38px; height: 38px; }
.tag { position: absolute; left: 8px; font-style: normal; font: 400 12.5px/1 var(--font-display); padding: 6px 9px; text-transform: lowercase; border: var(--line); }
.tag.last { top: 10px; background: var(--teal); color: var(--ink); rotate: -5deg; }
.tag.sale { bottom: 10px; background: var(--orange); color: #fff; rotate: 4deg; }
.drop-card .meta { display: grid; gap: 2px; }
.drop-card .nm { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.drop-card .pr { font: 400 19px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.drop-card .pr s { font: 500 13px var(--font-text); color: var(--muted); }
.drop-card .sz { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.drop-card .sz i { font-style: normal; font-size: 12px; font-weight: 700; border: 1.5px solid var(--ink); padding: 0 5px; line-height: 19px; }
.drop-card .sz i.mine { background: var(--orange); border-color: var(--orange); color: #fff; }
.drop-card .sz i.more { border-color: transparent; }
.grid .empty { grid-column: 1 / -1; }

.chips button { border: var(--line); background: #fff; }
.chips button.on { background: var(--ink); }
.size-pick button, .size-grid button { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.size-pick button.on, .size-grid button.on { background: var(--orange); color: #fff; box-shadow: inset 0 0 0 2px var(--orange); }
.size-grid button i { background: var(--teal); color: var(--ink); border: 1.5px solid var(--ink); rotate: 6deg; }

.product { padding-top: 6px; }
.hero { position: relative; aspect-ratio: 1 / 0.9; background: var(--tile); border-radius: 4px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.hero img { width: 100%; max-height: 100%; object-fit: contain; }
.hero .heart { top: 14px; right: 14px; background: #fff; border: var(--line); }
.info { padding-top: 16px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.info h1 { margin: 10px 0 6px; font: 400 clamp(30px, 9.6vw, 60px)/0.95 var(--font-display); letter-spacing: -0.015em; }
.info .price { margin: 6px 0 0; font: 400 30px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.info .price s { font: 500 16px var(--font-text); color: var(--muted); }
.more h2 { font: 400 22px/1.1 var(--font-display); text-transform: lowercase; margin: 28px 0 12px; }
.rail img { border-radius: 4px; }
.buybar { border-top: var(--line); background: #fff; }
.foot { padding-top: 34px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }
.foot p { margin: 0 0 4px; }
.proto-note { margin-top: 10px !important; font-style: italic; }

/* Счётчик и сортировка — одной строкой над сеткой */
.found-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; margin-bottom: 10px; }
.found { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.sort select { appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 8px 18px 8px 4px; font-weight: 700; font-size: 16px; color: var(--ink);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 6px center, right 1px center; background-size: 5px 5px; background-repeat: no-repeat; }

.block h2 { font: 400 22px/1.1 var(--font-display); text-transform: lowercase; }
.page h1 { margin: 0 0 16px; font: 400 clamp(34px, 11vw, 64px)/0.92 var(--font-display); text-transform: lowercase; }
.foot a { text-decoration: underline; }
.hero.sold img { opacity: 0.45; filter: grayscale(1); }
.page-sold .price { color: var(--orange); }
