:root {
  --bg: #f6f6f4;
  --ink: #000;
  --mute: #8a8a8a;
  --line: #d9d9d6;
  --red: #e30613;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --promo: 34px;
  --head: 60px;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 13px/1.3 var(--font); text-transform: uppercase; letter-spacing: .01em;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.promo { height: var(--promo); display: grid; place-items: center; background: #000; color: #fff; font-size: 12px; position: relative; z-index: 6; }

.head {
  position: absolute; top: var(--promo); left: 0; right: 0; height: var(--head); z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-inline: clamp(16px, 2.6vw, 36px);
}
.head-left { display: flex; gap: 24px; }
.head-left a:hover, .site-link:hover, .grid-head a:hover { color: var(--red); }
.logo { color: var(--red); font-weight: 700; font-size: clamp(17px, 2vw, 24px); letter-spacing: -.07em; white-space: nowrap; line-height: 1; transform: scaleY(1.35); }
.head-right { display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.bag { min-height: 44px; }
#bag-count { display: inline-block; min-width: 1.2em; text-align: center; }

.hero { position: relative; height: calc(100vh - var(--promo)); height: calc(100svh - var(--promo)); min-height: 560px; overflow: hidden; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; opacity: 0; transition: opacity .6s ease; }
#stage.ready { opacity: 1; }
#stage.hot { cursor: pointer; }
body.focus #stage { touch-action: none; cursor: grab; }
body.focus #stage:active { cursor: grabbing; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); transition: opacity .3s; pointer-events: none; }
.loading.gone { opacity: 0; }
.loading.error { text-transform: none; padding: 24px; text-align: center; }

.caption {
  position: absolute; left: 0; right: 0; bottom: clamp(16px, 3vh, 30px); display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center; padding-inline: 16px; pointer-events: none; transition: opacity .25s ease;
}
#caption-name { font-weight: 700; }
#caption-price { color: var(--mute); }
body.focus .caption { opacity: 0; }

.round {
  position: absolute; z-index: 4; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: var(--bg);
  display: none; place-items: center; font-size: 17px; line-height: 1; text-transform: none; transition: background .15s, color .15s;
}
.round:hover { background: #000; color: #fff; }
body.focus .round { display: grid; }
.round-prev { left: clamp(16px, 4vw, 56px); top: 42%; }
.round-next { right: clamp(16px, 4vw, 56px); top: 42%; }
.round-close { right: clamp(16px, 2.6vw, 36px); top: calc(var(--head) + 8px); font-size: 22px; }

.panel {
  position: absolute; left: 50%; bottom: clamp(10px, 2.4vh, 24px); width: min(440px, calc(100% - 32px)); translate: -50% 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  animation: rise .45s cubic-bezier(.2, .8, .2, 1);
}
.panel[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.panel-tag { color: var(--red); font-size: 11px; min-height: 14px; }
.panel-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.panel-price { font-size: 14px; }
.panel-color { color: var(--mute); font-size: 11px; }
.toggle { display: inline-flex; border: 1px solid var(--ink); border-radius: 99px; padding: 2px; margin-top: 2px; }
.toggle button { min-height: 32px; min-width: 84px; padding: 0 12px; border-radius: 99px; font-size: 11px; }
.toggle button[aria-pressed="true"] { background: #000; color: #fff; }
.sizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.sizes button { min-width: 44px; min-height: 36px; padding: 0 8px; border: 1px solid var(--line); font-size: 12px; background: var(--bg); }
.sizes button:hover { border-color: #000; }
.sizes button[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }
.buy { width: 100%; min-height: 44px; background: #000; color: #fff; font-size: 12px; margin-top: 2px; transition: background .15s; }
.buy:hover:not(:disabled) { background: var(--red); }
.buy:disabled { background: #cfcfcc; color: #666; cursor: not-allowed; }
.site-link { font-size: 11px; text-decoration: underline; text-underline-offset: 2px; min-height: 22px; display: inline-flex; align-items: center; }
.panel-note { color: #666; font-size: 10px; text-transform: none; letter-spacing: 0; min-height: 13px; }

.grid-wrap { border-top: 1px solid var(--line); padding: 28px clamp(16px, 2.6vw, 36px) 56px; }
.grid-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.grid-head h2 { font-size: 13px; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); border-left: 1px solid var(--line); }
.card { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); border-left: 0; background: #f3f3f3; }
.card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: scale .35s ease; }
.card:hover img { scale: 1.03; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--bg); flex: 1; position: relative; }
.card-name { font-size: 12px; line-height: 1.2; }
.card-price { font-weight: 700; font-size: 12px; margin-top: auto; padding-top: 6px; }

.foot { padding: 22px clamp(16px, 2.6vw, 36px) 32px; border-top: 1px solid var(--line); color: #666; font-size: 11px; display: grid; gap: 4px; text-transform: none; letter-spacing: 0; }

@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  :root { --head: 52px; }
  .head { grid-template-columns: auto 1fr; }
  .head-left, .currency { display: none; }
  .logo { font-size: 18px; transform-origin: left center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .round-prev, .round-next { top: 30%; }
  .round-prev { left: 10px; }
  .round-next { right: 10px; }
}
@media (max-height: 720px) {
  .panel { gap: 4px; }
  .site-link { min-height: 18px; }
  .panel-color { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  #stage, .caption, .card img { transition: none; }
}

/* На телефоне пометка «Концепт» и плашка Netlify внизу не должны закрывать цену */
@media (max-width: 760px) { .caption { bottom: 72px; } }
