/* =====================================================================
   KAIJU storefront design system — light fashion minimalism.
   Typography: the footer's pairing, used site-wide — Cousine (an open
   monospace with full Cyrillic) for body copy, titles, product names and
   prices, and a tiny uppercase Helvetica for navigation and labels.
   Surfaces are pure white; greys are neutral and only used locally
   for lines, inactive states and technical UI.
   ===================================================================== */

/* Brand palette — BRANDBOOK_FINAL:
   Pantone 433 #353535 · Pantone 2365 #e8c1d7 · Pantone 7622 #9d302b
   plus #fce8f1 and #e5e3e3. The page stays white; brand tones are used
   for accents, fills and lines. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f3f3;
  --bg-muted: #e5e3e3;
  --ink: #353535;
  --ink-2: #4e4e4e;
  --muted: #7b7878;
  --muted-2: #9a9696;
  --line: #e5e3e3;
  --line-strong: #c9c5c5;
  --pink: #e8c1d7;
  --pink-pale: #fce8f1;
  --accent: #9d302b;
  --danger: #9d302b;
  --success: #1f7a3d;

  /* Семантические слои: всё, что раньше было «белым», теперь берёт цвет
     отсюда — поэтому тёмная тема меняет только этот блок. */
  --surface: #ffffff; /* поля, панели, карточки */
  --surface-glass: rgba(255, 255, 255, 0.94); /* плашки поверх фото */
  --on-ink: #ffffff; /* текст на залитой «чернилами» кнопке */
  --ink-hover: #1f1f1f;
  --scrim: rgba(17, 17, 17, 0.28);
  --shadow: rgba(0, 0, 0, 0.35);
  --skeleton-hi: #f7f6f3;
  --hatch: rgba(17, 17, 17, 0.035);
  --snow-edge: #9fc0e6; /* холодная кромка снежинки на белом */

  /* Brandbook type: Montserrat (Black for statements). Phonk Sans is the
     display face of the book — drop its webfont in and point --font-display
     at it, nothing else changes. */
  --font-ui: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Cousine", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-text: var(--font-ui);
  --font-display: var(--font-ui);

  --gutter: 24px;
  --header-h: 96px;
  --max: 1600px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-header: 50;
  --z-drawer: 90;
  --z-cookie: 80;
  --z-toast: 120;
}

@media (max-width: 989px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
video,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

::selection {
  background: var(--ink);
  color: var(--on-ink);
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--on-ink);
  font: 11px/1 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- type scale ---------- */
.t-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.t-muted {
  color: var(--muted);
}

.t-mono {
  font-family: var(--font-mono);
}

/* Statements are set in Montserrat Black, tight and uppercase — the
   brandbook's headline voice. Sizes stay restrained. */
.t-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.t-h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.t-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.t-h3 {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.t-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}

.t-caps {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.t-small {
  font-size: 12px;
}

.link-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.link-hover:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow {
  max-width: 760px;
}

.page {
  padding-top: calc(var(--header-h) + 24px);
  padding-bottom: 96px;
  min-height: 70vh;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.stack {
  display: flex;
  flex-direction: column;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--on-ink);
}

.btn--solid {
  background: var(--ink);
  color: var(--on-ink);
}

.btn--solid:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  min-height: 32px;
  padding: 0 14px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
  color: var(--ink);
}

.btn--solid:disabled {
  background: var(--ink);
  color: var(--on-ink);
}

.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-color: var(--ink) transparent var(--ink) transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn--solid.is-loading::after {
  border-color: var(--on-ink) transparent var(--on-ink) transparent;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-btn {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 0;
}

.text-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-text);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease;
  appearance: none;
}

.textarea {
  min-height: 96px;
  border-radius: 18px;
  resize: vertical;
  line-height: 1.5;
}

.select {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--ink-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input:disabled {
  background: var(--bg-soft);
  color: var(--muted);
}

/* 16px keeps iOS from zooming into a focused field. */
@media (max-width: 989px) {
  .input,
  .select,
  .textarea {
    font-size: 16px;
  }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 599px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 84px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 4px;
}

.password-toggle:hover {
  color: var(--ink);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1px solid var(--ink-2);
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-content: center;
}

.check input::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.12s ease;
}

.check input:checked::before {
  transform: scale(1);
}

.check input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.check a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.radio-card:hover {
  border-color: var(--ink-2);
}

.radio-card:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.radio-card input {
  appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 1px solid var(--ink-2);
  border-radius: 50%;
  display: grid;
  place-content: center;
}

.radio-card input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.12s ease;
}

.radio-card input:checked::before {
  transform: scale(1);
}

.radio-card-body {
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.radio-card-title {
  font-size: 13px;
}

.radio-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.form-error,
.form-success {
  font-size: 12px;
  min-height: 0;
}

.form-error {
  color: var(--danger);
}

.form-success {
  color: var(--success);
}

.form-error:empty,
.form-success:empty {
  display: none;
}

/* ---------- chips / option buttons ---------- */
.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option {
  min-width: 48px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option:hover {
  border-color: var(--ink);
}

.option[aria-pressed="true"],
.option[aria-checked="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}

.option.is-unavailable {
  color: var(--muted-2);
  background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--line-strong) 50%, transparent calc(50% + 0.5px)) var(--surface);
}

.option.is-unavailable[aria-pressed="true"] {
  color: var(--on-ink);
  background: var(--muted);
  border-color: var(--muted);
}

.chip-nav {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.chip-nav::-webkit-scrollbar {
  display: none;
}

.chip-nav a,
.chip-nav button {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  white-space: nowrap;
}

.chip-nav a:hover,
.chip-nav button:hover {
  color: var(--ink);
}

.chip-nav [aria-current="true"],
.chip-nav [aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.qty {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  border: 1px solid var(--line-strong);
  height: 40px;
}

.qty button {
  width: 38px;
  height: 100%;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-2);
}

.qty button:hover:not(:disabled) {
  background: var(--bg-soft);
}

.qty button:disabled {
  color: var(--line-strong);
  cursor: not-allowed;
}

.qty output,
.qty span {
  min-width: 32px;
  text-align: center;
  font-size: 13px;
}

.qty--sm {
  height: 32px;
}

.qty--sm button {
  width: 30px;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  color: var(--ink-2);
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-solid,
.site-header.is-open {
  background: var(--bg);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

/* Шапка всегда сплошная и белая: тёмный текст поверх видео читался плохо,
   поэтому видео начинается под ней, а не за ней. */
.site-header {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  position: relative;
  max-width: 2000px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  line-height: 0;
}

.header-logo img {
  height: 30px;
  width: auto;
}

@media (max-width: 989px) {
  .header-logo img {
    height: 22px;
  }
}

.header-nav {
  margin-right: auto;
  display: none;
}

.header-nav > ul,
.header-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  column-gap: 22px;
}

.nav-link,
.header-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
}

.nav-link:hover,
.header-action:hover,
.nav-link[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  left: -14px;
  top: 100%;
  min-width: 220px;
  margin: 6px 0 0;
  padding: 8px 0;
  list-style: none;
  background: var(--surface-glass);
  border: 1px solid var(--line);
  color: var(--ink-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown,
.nav-item.is-open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.nav-dropdown a:hover {
  background: var(--bg-soft);
}

.header-actions {
  margin-left: auto;
  column-gap: 18px;
}

.header-action .count {
  font-variant-numeric: tabular-nums;
}

.header-desktop-only {
  display: none;
}

.header-menu-btn {
  margin-right: auto;
}

@media (min-width: 990px) {
  .header-desktop-only {
    display: flex;
  }
}

/* ссылки разделов — только там, где им хватает места слева от логотипа */
@media (min-width: 1200px) {
  .header-nav {
    display: flex;
  }
  /* кнопка остаётся и на десктопе: через неё открывается полноэкранная
     навигация по разделам мира KAIJU */
  .header-menu-btn {
    margin-right: 22px;
  }
}

/* Keeps page content from sliding under the fixed header. */
.header-offset {
  height: var(--header-h);
}

/* =====================================================================
   DRAWERS (mobile menu, cart, search)
   ===================================================================== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  visibility: hidden;
  pointer-events: none;
}

.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(100vw, 440px);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  outline: none;
}

.drawer--left .drawer-panel {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

.drawer.is-open .drawer-panel {
  transform: none;
}

.drawer--top .drawer-panel {
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  transform: translateY(-100%);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px var(--gutter);
}

.drawer-foot {
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-links a,
.menu-links button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-align: left;
}

.menu-sub {
  list-style: none;
  margin: 0;
  padding: 4px 0 8px 16px;
}

.menu-sub a {
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 0;
  color: var(--ink-2);
}

.menu-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.search-form {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px var(--gutter);
}

.search-form .input {
  border: 0;
  border-bottom: 1px solid var(--ink);
  font-size: clamp(18px, 2vw, 22px);
  padding: 8px 0;
  box-shadow: none;
}

/* ---------- полноэкранное меню ---------- */
.drawer--menu .drawer-backdrop {
  background: var(--scrim);
}

.drawer--menu .drawer-panel {
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  transform: translateY(-100%);
}

.drawer--menu.is-open .drawer-panel {
  transform: none;
}

.drawer--menu .drawer-head,
.drawer--menu .drawer-body {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.menu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-content: start;
  padding-top: clamp(24px, 4vw, 56px);
}

.menu-col {
  min-width: 0;
}

.menu-sections {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.menu-search {
  margin: 14px 0 20px;
}

/* Пункты появляются по очереди — ступенчато, без резких влётов. */
.drawer--menu .menu-col > *,
.drawer--menu .menu-sections li,
.drawer--menu .menu-links li {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}

.drawer--menu.is-open .menu-col > *,
.drawer--menu.is-open .menu-sections li,
.drawer--menu.is-open .menu-links li {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 16px;
  }
}

/* ---------- mini cart ---------- */
.mini-cart-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.mini-cart-item:first-child {
  padding-top: 0;
}

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--bg-muted);
}

.mini-cart-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mini-cart-name {
  font-size: 12px;
  text-transform: uppercase;
}

.mini-cart-meta {
  font-size: 12px;
  color: var(--muted);
}

.mini-cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.summary-line--total {
  font-size: 16px;
}

.summary-line .neg {
  color: var(--accent);
}

.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

.empty .t-h2 {
  color: var(--ink);
  margin-bottom: 8px;
}

/* =====================================================================
   PRODUCT GRID / CARD
   ===================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 20px;
}

@media (max-width: 1199px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 10px;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.product-card-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-muted);
}

.product-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.8s var(--ease);
}

.product-card-media img.alt {
  opacity: 0;
}

@media (hover: hover) {
  .product-card:hover .product-card-media img.alt {
    opacity: 1;
  }
  .product-card:hover .product-card-media img:only-of-type {
    transform: scale(1.02);
  }
}

.product-card-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.product-card-badges {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--dark {
  background: var(--ink);
  color: var(--on-ink);
}

.product-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
}

.product-card-name {
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
}

.product-card-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.price {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.price s {
  color: var(--muted);
  margin-left: 8px;
}

@media (max-width: 767px) {
  .product-card-name,
  .price {
    font-size: 11px;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 0%, var(--skeleton-hi) 50%, var(--bg-muted) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.skeleton-line {
  height: 12px;
  margin-top: 10px;
}

/* ---------- section label: 01 · NAME · rule · meta ---------- */
.sec-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.sec-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.sec-rule {
  flex: 1;
  height: 1px;
  min-width: 24px;
  background: var(--line);
}

/* ---------- section heading ---------- */
.section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 767px) {
  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .section-head {
    margin-bottom: 24px;
  }
}

/* ---------- accordion ---------- */
.accordion {
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
}

.accordion-trigger .plus {
  position: relative;
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.accordion-trigger .plus::before,
.accordion-trigger .plus::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s ease;
}

.accordion-trigger .plus::after {
  transform: rotate(90deg);
}

.accordion-trigger[aria-expanded="true"] .plus::after {
  transform: rotate(0);
}

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}

.accordion-panel > div {
  overflow: hidden;
}

.accordion-item.is-open .accordion-panel {
  grid-template-rows: 1fr;
}

.accordion-content {
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--ink-2);
  white-space: pre-line;
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: grid;
  place-items: center;
  padding: 16px;
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.modal .drawer-backdrop {
  position: fixed;
}

.modal.is-open .drawer-backdrop {
  opacity: 1;
}

.modal-panel {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: var(--surface);
  padding: 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease);
}

.modal.is-open .modal-panel {
  opacity: 1;
  transform: none;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

@media (max-width: 599px) {
  .modal {
    place-items: end center;
    padding: 0;
  }
  .modal-panel {
    width: 100%;
    padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom));
    transform: translateY(24px);
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------- toast ---------- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: var(--z-toast);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(calc(100vw - 32px), 420px);
  pointer-events: none;
}

.toast {
  padding: 14px 18px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast--error {
  background: var(--danger);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px 32px;
}

@media (max-width: 989px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* На крупных телефонах ссылки идут в две колонки — иначе футер
   растягивается на несколько экранов. */
@media (max-width: 599px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
}

@media (max-width: 419px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.footer-brand img {
  height: 30px;
  width: auto;
  margin-bottom: 14px;
}

.footer-col h2 {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a,
.footer-col button {
  font-family: inherit;
  font-size: inherit;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
  overflow-wrap: anywhere;
  text-align: left;
}

.footer-col a:hover,
.footer-col button:hover {
  border-color: var(--ink-2);
}

.footer-requisites {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}

.footer-bottom {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-bottom button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.footer-note {
  font-size: 11px;
  color: var(--muted);
}

/* Общий снег: перекрывает страницу целиком, кликам не мешает и живёт
   ниже шапки и шторок, чтобы не попадать поверх интерфейса. */
.snow-global {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

/* =====================================================================
   COOKIE CONSENT
   ===================================================================== */
.cookie-bar {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: var(--z-cookie);
  width: min(calc(100vw - 32px), 420px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px -18px var(--shadow);
  padding: 20px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.4s var(--ease);
}

.cookie-bar.is-visible {
  opacity: 1;
  transform: none;
}

.cookie-bar p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cookie-actions .btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.cookie-settings {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cookie-settings[hidden] {
  display: none;
}

.cookie-settings .check {
  font-size: 13px;
}

@media (max-width: 599px) {
  .cookie-bar {
    left: 0;
    bottom: 0;
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
    font-size: 13px;
  }
  .cookie-actions .btn {
    flex: 1 1 auto;
  }
}

/* =====================================================================
   PRODUCT PAGE
   ===================================================================== */
.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* Галерея: первый кадр крупный, остальные — сеткой. Так карточка читается
   как разворот, а не как колонка одинаковых картинок. */
.pdp-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pdp-shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--bg-muted);
}

.pdp-shot.is-lead {
  grid-column: 1 / -1;
}

.pdp-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease);
}

.pdp-shot.is-lead img {
  aspect-ratio: 4 / 5;
}

@media (hover: hover) {
  .pdp-shot:hover img {
    transform: scale(1.02);
  }
}

.pdp-dots {
  display: none;
}

.pdp-info {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 460px;
}

.pdp-crumb {
  margin-bottom: 14px;
}

.pdp-crumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Характеристики из описания: значение крупно, подпись мелко */
.pdp-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdp-spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.pdp-spec b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}

.pdp-stock {
  margin-top: 10px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pdp-stock.is-in {
  color: var(--success);
}

.pdp-stock.is-out {
  color: var(--muted);
}

.pdp-single {
  margin-top: 8px;
  font-size: 13px;
}

/* Покупка: счётчик и кнопка в одну строку */
.pdp-buy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pdp-out {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 13px;
  color: var(--ink-2);
}

/* Таблица размеров вместо простыни текста */
.pdp-sizes {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pdp-sizes th,
.pdp-sizes td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}

.pdp-sizes th {
  width: 88px;
  font-family: var(--font-mono);
}

.pdp-title {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.25;
}

.pdp-price {
  font-size: 15px;
  margin-top: 10px;
}

.pdp-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.pdp-message {
  font-size: 12px;
  min-height: 20px;
}

@media (max-width: 989px) {
  .pdp {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .pdp-gallery {
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
  }
  .pdp-gallery::-webkit-scrollbar {
    display: none;
  }
  /* на телефоне каждый кадр — отдельный «слайд» */
  .pdp-shot {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
  .pdp-shot.is-lead img,
  .pdp-gallery img {
    aspect-ratio: 3 / 4;
  }
  .pdp-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
  }
  .pdp-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--line-strong);
    transition: background 0.2s ease;
  }
  .pdp-dots span.is-active {
    background: var(--ink);
  }
  .pdp-info {
    position: static;
    max-width: none;
  }
}

/* sticky mobile add-to-cart bar */
.pdp-sticky-bar {
  display: none;
}

@media (max-width: 989px) {
  .pdp-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--surface-glass);
    border-top: 1px solid var(--line);
    transform: translateY(100%);
    transition: transform 0.35s var(--ease);
  }
  .pdp-sticky-bar.is-visible {
    transform: none;
  }
  .pdp-sticky-bar .btn {
    flex: 1;
  }
}

/* =====================================================================
   CHECKOUT
   ===================================================================== */
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.checkout-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-step-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.checkout-step-title .t-label {
  color: var(--muted);
}

.checkout-summary {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  background: var(--bg);
  border-top: 1px solid var(--ink);
  padding: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.promo-row {
  display: flex;
  gap: 8px;
}

.promo-row .input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 989px) {
  .checkout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .checkout-summary {
    position: static;
    padding: 20px 0 0;
  }
}

/* =====================================================================
   AUTH
   ===================================================================== */
.auth {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.auth-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  padding: 0 0 12px;
  margin-bottom: -1px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--muted-2);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.auth-tab[aria-selected="true"] {
  color: var(--ink);
  border-color: var(--ink);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form[hidden] {
  display: none;
}

/* =====================================================================
   ACCOUNT
   ===================================================================== */
.account {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.account-aside {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-nav a {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}

.account-nav a span:first-child {
  font-family: var(--font-mono);
  color: var(--muted-2);
}

.account-nav a:hover,
.account-nav a[aria-current="true"] {
  color: var(--ink);
}

.account-nav a[aria-current="true"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.member-meta strong {
  display: block;
  font-weight: 400;
  font-size: 15px;
  margin-top: 4px;
}

.account-main {
  display: flex;
  flex-direction: column;
  gap: 88px;
  min-width: 0;
}

.account-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.account-section > .sec-label {
  margin-bottom: -8px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.account .t-h1 {
  line-height: 1.25;
}

.card {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 28px 0 0;
  background: var(--bg);
}

/* Only genuinely separate objects (saved addresses) keep an outline. */
.card--outline {
  border: 1px solid var(--line);
  padding: 20px;
}

.card--soft {
  background: var(--bg);
}

.profile-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-muted) center / cover no-repeat;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--muted);
  overflow: hidden;
}

.profile-avatar button {
  position: absolute;
  inset: auto 0 0 0;
  height: 26px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.profile-avatar:hover button,
.profile-avatar button:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .profile-avatar button {
    opacity: 1;
  }
}

.dl {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
  font-size: 13px;
}

.dl dt {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}

.dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* loyalty */
.loyalty {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.loyalty-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.loyalty-percent {
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.loyalty-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  text-align: center;
}

.loyalty-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.loyalty-stats strong {
  display: block;
  font-weight: 400;
  font-size: 16px;
  margin-top: 4px;
}

.loyalty-track {
  position: relative;
  height: 2px;
  background: var(--line);
  margin: 10px 0 4px;
}

.loyalty-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
  transition: width 0.8s var(--ease);
}

.loyalty-dot {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  transform: translate(-50%, -50%);
}

.loyalty-dot.is-reached {
  background: var(--ink);
  border-color: var(--ink);
}

.loyalty-scale {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.loyalty-scale > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loyalty-scale > div:last-child {
  text-align: right;
  align-items: flex-end;
}

.loyalty-scale button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.loyalty-scale button.is-current {
  color: var(--ink);
}

.loyalty-scale button:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* orders */
.order-card {
  border-top: 1px solid var(--line);
}

.order-card:last-child {
  border-bottom: 1px solid var(--line);
}

.order-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  padding: 20px 0;
}

.order-thumbs {
  display: flex;
}

.order-thumbs img,
.order-thumbs span {
  width: 40px;
  height: 52px;
  object-fit: cover;
  background: var(--bg-muted);
  border: 2px solid var(--bg);
  margin-left: -8px;
}

.order-thumbs > :first-child {
  margin-left: 0;
}

.order-thumbs span {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--muted {
  color: var(--muted);
}

.status--danger {
  color: var(--danger);
}

.status--success {
  color: var(--success);
}

.order-body {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
}

.order-body[hidden] {
  display: none;
}

.order-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.order-line:first-child {
  padding-top: 0;
}

.order-line .thumb {
  width: 56px;
}

@media (max-width: 989px) {
  .account {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .account-aside {
    position: static;
    gap: 20px;
  }
  .account-nav {
    flex-direction: row;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--line);
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    position: sticky;
    top: var(--header-h);
    background: var(--bg);
    z-index: 5;
  }
  .account-nav::-webkit-scrollbar {
    display: none;
  }
  .account-nav a {
    flex-shrink: 0;
    padding: 14px 0;
  }
  .account-main {
    gap: 56px;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .order-head {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px 0;
  }
  .order-head .order-thumbs {
    grid-row: 2;
  }
  .order-body {
    grid-template-columns: 1fr;
    padding: 16px 0;
    gap: 24px;
  }
  .card {
    padding: 20px 0 0;
  }
  .card--outline {
    padding: 16px;
  }
  .dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .dl dd {
    margin-bottom: 10px;
  }
}

.address-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* =====================================================================
   LEGAL
   ===================================================================== */
.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  gap: 64px;
  align-items: start;
}

.legal-nav {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-nav a {
  padding: 6px 0;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--ink);
}

.legal-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-doc h1 {
  margin: 8px 0 32px;
}

.legal-doc h2 {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 32px 0 12px;
}

.legal-doc p,
.legal-doc li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}

.legal-doc p + p {
  margin-top: 12px;
}

.legal-doc ul {
  padding-left: 20px;
  margin: 12px 0;
}

.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 12px;
}

.legal-doc th,
.legal-doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.legal-doc th {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-mobile-select {
  display: none;
}

@media (max-width: 989px) {
  .legal {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .legal-nav {
    display: none;
  }
  .legal-mobile-select {
    display: block;
  }
  .legal-doc table {
    display: block;
    overflow-x: auto;
  }
}

/* =====================================================================
   MOBILE — отдельная настройка, а не «десктоп в колонку»:
   пальцевые цели минимум 44px, мелкие подписи крупнее, шапка компактнее.
   ===================================================================== */
@media (max-width: 989px) {
  .text-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
  }

  .header-action,
  .nav-link {
    min-height: 44px;
    padding: 0 2px;
  }

  .header-logo {
    padding: 11px 12px;
  }

  .footer-col ul {
    gap: 2px;
  }

  .footer-col a,
  .footer-col button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  .footer-bottom {
    gap: 4px 20px;
  }

  .footer-bottom button {
    min-height: 40px;
  }
}

@media (max-width: 767px) {
  .t-label,
  .text-btn,
  .btn,
  .sec-label {
    font-size: 11px;
  }

  .badge {
    font-size: 10px;
    min-height: 24px;
  }

  .t-small,
  .field-hint,
  .form-error,
  .form-success {
    font-size: 12.5px;
  }

  /* строка «Меню / логотип / корзина» не должна слипаться */
  .header-inner {
    gap: 12px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

.legal-doc a,
.checkout-step p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* телефон: в шапке только «Меню», логотип, счётчик корзины и тема —
   слово «Корзина» наезжало на логотип */
@media (max-width: 599px) {
  .cart-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
