/* ==========================================================================
   «Поля» — дизайн-система интернет-магазина канцелярии
   Концепция: страница как лист бумаги с полями. Тёплая бумага, чернила,
   цветные свотчи бумаги, тонкие линейки-волоски, рукописные заметки на полях.
   ========================================================================== */

/* ── 1. Токены ─────────────────────────────────────────────────────────── */
:root {
  --paper: #f7f2e8;
  --paper-2: #fcfaf4;
  --paper-3: #efe8da;
  --paper-4: #e7dfcd;
  --ink: #191c1e;
  --ink-2: #454a4d;
  --ink-3: #7c8285;
  --line: #dcd2c0;
  --line-2: #eae2d3;
  --accent: #2c4a8c;
  --accent-soft: #e3e8f2;
  --clay: #c0603b;
  --olive: #6c7a4e;
  --ochre: #d9a343;
  --sage: #a8c3b0;
  --powder: #c9d6e8;

  --font-display: 'Prata', 'Times New Roman', serif;
  --font-text: 'Golos Text', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-hand: 'Caveat', 'Segoe Script', cursive;

  --wrap: 1280px;
  --gut: 24px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-s: 0 1px 2px rgba(25, 28, 30, 0.05);
  --shadow-m: 0 18px 40px -28px rgba(25, 28, 30, 0.35);
}

/* ── 2. База ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.62 var(--font-text);
  font-feature-settings: 'kern' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

/* Зерно бумаги поверх всего — очень тихое */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ── 3. Типографика ────────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
.display, h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
h3, .h3 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }
small { font-size: 13.5px; color: var(--ink-3); }

.lead { font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-3); }
.hand { font-family: var(--font-hand); font-size: 21px; line-height: 1.25; color: var(--ink-2); }
.label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.17em; text-transform: uppercase; color: var(--ink-3);
}
.label--ink { color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }

/* Заголовок раздела: номер, подпись, название */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.sec-head__left { display: flex; align-items: baseline; gap: 18px; }
.sec-head__num { font-size: 11px; letter-spacing: 0.17em; color: var(--ink-3); padding-top: 4px; }
.sec-head__title { font-family: var(--font-display); font-size: clamp(24px, 3vw, 38px); line-height: 1.1; }
.sec-head__link { font-size: 13px; letter-spacing: 0.02em; border-bottom: 1px solid var(--line); padding-bottom: 3px; white-space: nowrap; transition: border-color 0.2s; }
.sec-head__link:hover { border-color: var(--ink); }
.sec-head__sub { margin: 10px 0 0; color: var(--ink-3); font-size: 15px; max-width: 70ch; }

/* Заметка на полях — рукописная, с чертой как поле тетради */
.margin-note {
  position: relative; padding-left: 22px; font-family: var(--font-hand); font-size: 20px;
  line-height: 1.3; color: var(--ink-2);
}
.margin-note::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 4px; width: 1px; background: var(--clay); }

/* ── 4. Сетка и секции ─────────────────────────────────────────────────── */
.wrap { width: min(var(--wrap), 100% - var(--gut) * 2); margin-inline: auto; }
.wrap--narrow { width: min(880px, 100% - var(--gut) * 2); margin-inline: auto; }
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--tight { padding: clamp(32px, 4vw, 56px) 0; }
.rule { height: 1px; background: var(--line); }
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.band--deep { background: var(--paper-3); }
.grid { display: grid; gap: 28px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-40 { gap: 40px; }

/* ── Иконки ────────────────────────────────────────────────────────────── */
.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; display: inline-block; vertical-align: -0.18em; }
.ico--lg { width: 1.5em; height: 1.5em; }
.btn .ico { width: 1.05em; height: 1.05em; }
.ticker__ico .ico { width: 26px; height: 26px; }
.tool .ico { width: 21px; height: 21px; }

/* ── 5. Кнопки ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border: 1px solid var(--ink); border-radius: var(--radius);
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  background: transparent; color: var(--ink); position: relative; overflow: hidden; white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn::after {
  content: ''; position: absolute; inset: 0; background: var(--ink);
  transform: translateY(101%); transition: transform 0.32s var(--ease); z-index: 0;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { color: var(--paper-2); }
.btn:hover::after { transform: translateY(0); }
.btn--solid { background: var(--ink); color: var(--paper-2); }
.btn--solid::after { background: var(--accent); }
.btn--solid:hover { color: #fff; border-color: var(--accent); }
.btn--small { padding: 11px 20px; font-size: 11px; }
.btn--wide { width: 100%; }
.btn--quiet { border-color: var(--line); color: var(--ink-2); }
.btn--quiet:hover { border-color: var(--ink); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.link-underline { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color 0.2s; }
.link-underline:hover { border-color: var(--ink); }
.link-arrow { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; letter-spacing: 0.02em; }
.link-arrow svg { transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* ── 6. Формы ──────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > span { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; padding: 13px 15px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.2s, background 0.2s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237c8285'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; line-height: 1.5; }
.check input { appearance: none; flex: 0 0 auto; width: 19px; height: 19px; margin: 1px 0 0; border: 1px solid var(--ink-3); border-radius: 1px; background: var(--paper-2); transition: background 0.15s, border-color 0.15s; }
.check input:checked { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10'%3E%3Cpath d='M1 5l3.2 3.2L11 1.4' stroke='%23fcfaf4' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") center no-repeat; border-color: var(--ink); }
.check a { border-bottom: 1px solid var(--line); }
.check a:hover { border-color: var(--ink); }
.field-error { color: var(--clay); font-size: 13.5px; }

.notice { padding: 14px 18px; border: 1px solid var(--line); border-left: 2px solid var(--clay); background: var(--paper-2); font-size: 14.5px; }
.notice--ok { border-left-color: var(--olive); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }

/* ── 7. Шапка ──────────────────────────────────────────────────────────── */
.topbar { background: var(--ink); color: var(--paper-3); font-size: 12.5px; letter-spacing: 0.02em; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 38px; }
.topbar a:hover { color: #fff; }
.topbar__facts { display: flex; gap: 26px; overflow: hidden; white-space: nowrap; }
.topbar__facts span { opacity: 0.85; }
.topbar__facts b { font-weight: 500; color: #fff; }

.header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); transition: box-shadow 0.3s, background 0.3s; }
.header.is-stuck { box-shadow: 0 10px 30px -26px rgba(25, 28, 30, 0.55); background: rgba(247, 242, 232, 0.92); backdrop-filter: blur(8px); }
.header__in { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; height: 76px; }

.logo { display: flex; align-items: center; gap: 13px; }
.logo__mark { width: 34px; height: 34px; flex: 0 0 auto; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-family: var(--font-display); font-size: 25px; letter-spacing: 0.01em; }
.logo__tag { font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }

.nav { display: flex; gap: 30px; justify-content: center; }
.nav a { font-size: 14px; position: relative; padding: 4px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.28s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }

.tools { display: flex; align-items: center; gap: 6px; }
.tool { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; transition: background 0.2s; position: relative; }
.tool:hover { background: var(--paper-3); }
.tool__badge {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--clay); color: #fff; border-radius: 9px; font-size: 10.5px; font-weight: 600;
  display: grid; place-items: center; line-height: 1;
}
.burger { display: none; }

/* Поиск-оверлей */
.search-ov { position: fixed; inset: 0; z-index: 70; background: rgba(25, 28, 30, 0.32); backdrop-filter: blur(3px); display: none; }
.search-ov.is-open { display: block; }
.search-ov__box { background: var(--paper); border-bottom: 1px solid var(--line); padding: 26px 0 30px; animation: slide-down 0.3s var(--ease); }
@keyframes slide-down { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.search-ov__form { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--ink); padding-bottom: 12px; }
.search-ov__form input { flex: 1; border: 0; background: none; font-family: var(--font-display); font-size: clamp(22px, 3vw, 34px); }
.search-ov__form input:focus { outline: none; }
.search-ov__hint { margin-top: 14px; font-size: 13px; color: var(--ink-3); display: flex; gap: 18px; flex-wrap: wrap; }
.search-ov__hint button { font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.search-results { margin-top: 18px; display: grid; gap: 2px; max-height: 46vh; overflow: auto; }
.sr-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding: 9px 10px; border-radius: var(--radius); }
.sr-item:hover { background: var(--paper-3); }
.sr-item img { width: 54px; height: 54px; object-fit: cover; border: 1px solid var(--line-2); }
.sr-item__t { font-size: 15px; }
.sr-item__c { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }

/* ── 8. Карточка товара ────────────────────────────────────────────────── */
.card { position: relative; display: flex; flex-direction: column; }
.card__media {
  position: relative; aspect-ratio: 1 / 1; background: var(--paper-3); overflow: hidden;
  border: 1px solid var(--line-2); display: block;
}
.card__media::after {
  content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(25, 28, 30, 0.04);
}
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), opacity 0.4s; }
.card__img--b { position: absolute; inset: 0; opacity: 0; }
.card:hover .card__img { transform: scale(1.035); }
.card:hover .card__img--b { opacity: 1; }
.card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.badge {
  font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; padding: 5px 9px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2);
}
.badge--sale { background: var(--clay); border-color: var(--clay); color: #fff; }
.badge--new { background: var(--accent); border-color: var(--accent); color: #fff; }
.card__quick {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2;
  opacity: 0; transform: translateY(8px); transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.card:hover .card__quick { opacity: 1; transform: none; }
.card__body { padding: 14px 0 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__cat { font-size: 10.5px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-3); }
.card__title { font-size: 15.5px; font-weight: 500; line-height: 1.35; letter-spacing: -0.005em; }
.card__sub { font-size: 13px; color: var(--ink-3); }
.card__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.price { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.price s { font-weight: 400; font-size: 13.5px; color: var(--ink-3); margin-left: 8px; }
.price--sale { color: var(--clay); }
.swatches { display: flex; gap: 5px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(25, 28, 30, 0.16); }
.stock { font-size: 12px; color: var(--ink-3); }
.stock--low { color: var(--clay); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 26px; }
.product-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ── 9. Главная: hero ──────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(40px, 5vw, 76px) 0 clamp(48px, 6vw, 88px); overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.02fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.hero__eyebrow::before { content: ''; width: 46px; height: 1px; background: var(--ink-3); }
.hero h1 { margin-bottom: 24px; }
.hero h1 em {
  font-style: normal;
  background-image: linear-gradient(to top, rgba(217, 163, 67, 0.42) 0 0.3em, transparent 0.3em);
  background-repeat: no-repeat;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero__text { max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__facts { display: flex; gap: 34px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero__fact b { display: block; font-family: var(--font-display); font-size: 25px; line-height: 1; margin-bottom: 6px; }
.hero__fact span { font-size: 12.5px; color: var(--ink-3); }

.hero__media { position: relative; }
.hero__frame { position: relative; border: 1px solid var(--line); background: var(--paper-2); padding: 14px; }
.hero__frame img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.hero__caption { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; }
.hero__margin { position: absolute; left: -118px; bottom: 62px; width: 132px; transform: rotate(-3.5deg); }
@media (max-width: 1180px) { .hero__margin { display: none; } }

/* Полоса фактов под hero */
.ticker { border-block: 1px solid var(--line); background: var(--paper-2); }
.ticker__in { display: grid; grid-template-columns: repeat(4, 1fr); }
.ticker__item { padding: 22px 26px; border-left: 1px solid var(--line-2); display: flex; gap: 14px; align-items: flex-start; }
.ticker__item:first-child { border-left: 0; padding-left: 0; }
.ticker__ico { flex: 0 0 auto; color: var(--ink-2); margin-top: 2px; }
.ticker__t { font-size: 14.5px; font-weight: 500; }
.ticker__d { font-size: 12.5px; color: var(--ink-3); }

/* ── 10. Свотчи категорий ──────────────────────────────────────────────── */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 214px; padding: 24px; border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.cat:hover { transform: translateY(-3px); border-color: var(--ink-3); }
.cat--wide { grid-column: span 2; grid-row: span 2; min-height: 446px; }
.cat__bg { position: absolute; inset: 0; opacity: 0.5; transition: opacity 0.4s, transform 0.7s var(--ease); }
.cat:hover .cat__bg { opacity: 0.66; transform: scale(1.03); }
.cat__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; opacity: 0.9; }
.cat__top, .cat__bottom { position: relative; z-index: 1; }
.cat__count { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-2); }
.cat__title { font-family: var(--font-display); font-size: clamp(20px, 2vw, 27px); line-height: 1.15; margin-bottom: 8px; }
.cat--wide .cat__title { font-size: clamp(26px, 2.6vw, 36px); }
.cat__sub { font-size: 13.5px; color: var(--ink-2); max-width: 34ch; }
.cat__arrow { position: absolute; right: 22px; bottom: 22px; z-index: 1; opacity: 0; transform: translateX(-6px); transition: 0.3s var(--ease); }
.cat:hover .cat__arrow { opacity: 1; transform: none; }

/* ── 11. Полоса подарка ────────────────────────────────────────────────── */
.giftband { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.giftband__media { position: relative; }
.giftband__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.giftband__stamp {
  position: absolute; right: -18px; top: -18px; width: 96px; height: 96px; border-radius: 50%;
  background: var(--clay); color: #fff; display: grid; place-items: center; text-align: center;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.35; padding: 12px;
  transform: rotate(-8deg); box-shadow: var(--shadow-m);
}
.steps { display: grid; gap: 0; margin: 30px 0 32px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n { font-family: var(--font-display); font-size: 19px; color: var(--ink-3); }
.step__t { font-size: 15.5px; font-weight: 500; margin-bottom: 3px; }
.step__d { font-size: 14px; color: var(--ink-3); }

/* Двухколоночная шапка страницы (подарки, о нас, оптом) */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 4vw, 52px); align-items: center; }
.split--media { grid-template-columns: 1.05fr 1fr; }
@media (max-width: 900px) { .split, .split--media { grid-template-columns: 1fr; } }

/* ── 12. Каталог ───────────────────────────────────────────────────────── */
.catalog { display: grid; grid-template-columns: 258px 1fr; gap: 46px; align-items: start; }
.filters { position: sticky; top: 96px; }
.filters__group { border-top: 1px solid var(--line); padding: 16px 0; }
.filters__group:last-child { border-bottom: 1px solid var(--line); }
.filters__title { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.filters__list { display: flex; flex-direction: column; gap: 9px; }
.filters__list label { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.filters__list input { appearance: none; width: 15px; height: 15px; border: 1px solid var(--ink-3); border-radius: 50%; transition: 0.15s; }
.filters__list input:checked { border-color: var(--ink); box-shadow: inset 0 0 0 3.5px var(--paper), inset 0 0 0 9px var(--ink); }
.filters__list label:hover { color: var(--ink); }
.filters__reset { font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.catalog__bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 11px; border: 1px solid var(--line); color: var(--ink-2); }
.chip button { color: var(--ink-3); }
.chip button:hover { color: var(--clay); }
.color-list { display: flex; flex-wrap: wrap; gap: 8px; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(25, 28, 30, 0.16); position: relative; }
.color-dot.is-active { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.empty { padding: 70px 0; text-align: center; color: var(--ink-3); }

/* ── 13. Страница товара ───────────────────────────────────────────────── */
.breadcrumbs { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-3); padding: 22px 0; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--ink); }
.product { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(30px, 4vw, 64px); align-items: start; }
.gallery { display: grid; gap: 12px; }
.gallery__main { position: relative; border: 1px solid var(--line); background: var(--paper-2); }
.gallery__main img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 12px; }
.gallery__thumb { width: 84px; height: 84px; border: 1px solid var(--line); padding: 0; overflow: hidden; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--ink); }
.product__sku { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.product h1 { font-size: clamp(26px, 3.2vw, 40px); margin: 14px 0 12px; }
.product__price { display: flex; align-items: baseline; gap: 14px; margin: 22px 0 6px; }
.product__price .price { font-family: var(--font-display); font-size: 33px; font-weight: 400; }
.product__price s { font-size: 16px; color: var(--ink-3); }
.product__save { font-size: 13px; color: var(--clay); }
.product__desc { margin: 22px 0; color: var(--ink-2); }
.product__buy { display: flex; gap: 14px; align-items: stretch; margin: 24px 0; }
.qty { display: inline-flex; border: 1px solid var(--line); }
.qty button { width: 42px; display: grid; place-items: center; color: var(--ink-2); }
.qty button:hover { background: var(--paper-3); color: var(--ink); }
.qty input { width: 46px; border: 0; background: none; text-align: center; font-variant-numeric: tabular-nums; }
.qty input:focus { outline: none; }
.product__meta { border-top: 1px solid var(--line); margin-top: 26px; }
.meta-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.meta-row dt { color: var(--ink-3); }
.meta-row dd { margin: 0; }
.feature-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink-2); }
.feature-list li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 10px; height: 1px; background: var(--clay); }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs button { padding: 14px 0; font-size: 14px; color: var(--ink-3); border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tabs button.is-active { color: var(--ink); border-color: var(--ink); }

/* ── 14. Корзина и чекаут ──────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 52px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cart-line__img { border: 1px solid var(--line-2); background: var(--paper-2); }
.cart-line__img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.cart-line__title { font-size: 16px; font-weight: 500; }
.cart-line__opts { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.cart-line__ctrl { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.cart-line__del { font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid transparent; }
.cart-line__del:hover { color: var(--clay); border-color: var(--clay); }
.cart-line__sum { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary { position: sticky; top: 96px; border: 1px solid var(--line); background: var(--paper-2); padding: 26px; }
.summary__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 15px; }
.summary__row--total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 18px; font-size: 19px; }
.summary__row--total b { font-family: var(--font-display); font-weight: 400; font-size: 25px; }
.gift-progress { margin: 18px 0; padding: 16px; background: var(--paper-3); border: 1px dashed var(--line); }
.gift-progress__bar { height: 3px; background: var(--paper-4); margin: 10px 0 8px; }
.gift-progress__fill { height: 100%; background: var(--clay); transition: width 0.5s var(--ease); }
.radio-card { display: flex; gap: 14px; padding: 15px 16px; border: 1px solid var(--line); background: var(--paper-2); cursor: pointer; margin-bottom: 10px; transition: border-color 0.2s, background 0.2s; }
.radio-card:hover { border-color: var(--ink-3); }
.radio-card input { appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; border: 1px solid var(--ink-3); border-radius: 50%; transition: 0.15s; }
.radio-card input:checked { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--paper-2), inset 0 0 0 9px var(--ink); }
.radio-card.is-active { border-color: var(--ink); background: #fff; }
.radio-card__t { font-size: 15px; font-weight: 500; }
.radio-card__d { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.radio-card__p { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 14.5px; white-space: nowrap; }
.checkout-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 52px; align-items: start; }
.steps-line { display: flex; gap: 26px; margin-bottom: 34px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.steps-line b { color: var(--ink); font-weight: 500; }

/* ── 15. Контентные страницы ───────────────────────────────────────────── */
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-family: var(--font-display); font-size: clamp(23px, 2.4vw, 30px); color: var(--ink); margin-top: 2.1em; line-height: 1.2; }
.prose h3 { font-size: 18.5px; color: var(--ink); margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--ink-3); }
.prose a { color: var(--ink); border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--ink); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--clay); font-family: var(--font-hand); font-size: 22px; color: var(--ink); }
.prose table { margin: 1.6em 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.prose code { background: var(--paper-3); padding: 2px 6px; font-size: 0.9em; }
.legal-doc { max-width: 74ch; }
.legal-doc h2 { font-size: 22px; margin-top: 1.9em; }
.legal-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 40px; }
.legal-list a { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.legal-list a:hover { color: var(--accent); }

.post-hero { position: relative; border: 1px solid var(--line); }
.post-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-list { display: grid; gap: 0; }
.post-item { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 30px 0; border-top: 1px solid var(--line); align-items: center; }
.post-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--line-2); }
.post-item__meta { display: flex; gap: 16px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.post-item h3 { font-family: var(--font-display); font-weight: 400; font-size: 25px; margin-bottom: 10px; }
.post-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.post-feature img { width: 100%; aspect-ratio: 16/11; object-fit: cover; border: 1px solid var(--line-2); }
.post-feature h2 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 16px; }
.article-head { max-width: 74ch; }
.article-head h1 { font-size: clamp(28px, 4vw, 46px); margin-bottom: 18px; }
.article-meta { display: flex; gap: 20px; font-size: 12.5px; color: var(--ink-3); padding: 20px 0; border-block: 1px solid var(--line); margin: 26px 0 40px; }

/* ── 16. Футер ─────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: var(--paper-3); margin-top: 40px; }
.footer a { color: var(--paper-3); }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 66px 0 48px; }
.footer__logo { font-family: var(--font-display); font-size: 34px; color: var(--paper-2); margin-bottom: 14px; }
.footer__col h4 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(252, 250, 244, 0.5); font-weight: 500; margin-bottom: 18px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 14.5px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 24px 0 34px; border-top: 1px solid rgba(252, 250, 244, 0.14); font-size: 12.5px; color: rgba(252, 250, 244, 0.62); }
.footer__req { font-size: 12.5px; line-height: 1.7; color: rgba(252, 250, 244, 0.62); }
.pay { display: flex; gap: 8px; flex-wrap: wrap; }
.pay span { border: 1px solid rgba(252, 250, 244, 0.22); padding: 4px 9px; font-size: 11px; letter-spacing: 0.06em; }
.subscribe { display: flex; gap: 10px; margin-top: 18px; }
.subscribe input { flex: 1; background: rgba(252, 250, 244, 0.08); border: 1px solid rgba(252, 250, 244, 0.22); color: var(--paper-2); padding: 12px 14px; }
.subscribe input::placeholder { color: rgba(252, 250, 244, 0.45); }
.subscribe input:focus { outline: none; border-color: var(--paper-2); }
.subscribe button { border: 1px solid var(--paper-2); color: var(--paper-2); padding: 0 20px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.subscribe button:hover { background: var(--paper-2); color: var(--ink); }

/* ── 17. Корзина-панель, тосты, cookie ─────────────────────────────────── */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; overflow: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__veil { position: absolute; inset: 0; background: rgba(25, 28, 30, 0.34); opacity: 0; transition: opacity 0.3s; }
.drawer.is-open .drawer__veil { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(430px, 100%); background: var(--paper);
  border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.36s var(--ease);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow: auto; padding: 6px 24px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 20px 24px 26px; background: var(--paper-2); }
.mini-line { display: grid; grid-template-columns: 68px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.mini-line img { width: 68px; height: 68px; object-fit: cover; border: 1px solid var(--line-2); }
.mini-line__t { font-size: 14.5px; line-height: 1.35; }

.toast-host { position: fixed; left: 24px; bottom: 24px; z-index: 90; display: grid; gap: 10px; }
.toast { background: var(--ink); color: var(--paper-2); padding: 14px 20px; font-size: 14px; box-shadow: var(--shadow-m); animation: toast-in 0.3s var(--ease); max-width: 340px; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; background: var(--paper-2); border-top: 1px solid var(--line); padding: 18px 0; display: none; }
.cookie.is-open { display: block; }
.cookie__in { display: flex; align-items: center; gap: 26px; justify-content: space-between; flex-wrap: wrap; }
.cookie p { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 78ch; }

/* ── 18. Админка ───────────────────────────────────────────────────────── */
.admin { font-size: 15px; }
.admin__bar { display: flex; gap: 22px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.admin__bar a { font-size: 14px; color: var(--ink-3); }
.admin__bar a.is-active, .admin__bar a:hover { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 34px; }
.stat { border: 1px solid var(--line); padding: 20px; background: var(--paper-2); }
.stat b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 400; margin-bottom: 6px; }
.stat span { font-size: 12.5px; color: var(--ink-3); }
.table { font-size: 14.5px; }
.table th { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 500; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:hover td { background: var(--paper-2); }
.pill { display: inline-block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--line); }
.pill--new { background: var(--ochre); border-color: var(--ochre); color: #2a1f06; }
.pill--paid { background: var(--olive); border-color: var(--olive); color: #fff; }
.pill--cancelled { background: var(--paper-3); color: var(--ink-3); }
.admin input[type=text], .admin input[type=number], .admin input[type=password] { width: 100%; padding: 8px 10px; border: 1px solid var(--line); background: var(--paper-2); }

/* ── 19. Анимация появления ────────────────────────────────────────────── */
/* Появление блоков. Скрываем только при работающем JS: без него контент виден сразу. */
.js .rise { opacity: 0; transform: translateY(16px); }
.js .rise.is-in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ── 20. Адаптив ───────────────────────────────────────────────────────── */
@media (max-width: 1120px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .cat--wide { grid-column: span 3; grid-row: auto; min-height: 300px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .ticker__in { grid-template-columns: repeat(2, 1fr); }
  .ticker__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .ticker__item:nth-child(n + 3) { border-top: 1px solid var(--line-2); }
  .catalog { grid-template-columns: 220px 1fr; gap: 34px; }
}
@media (max-width: 980px) {
  .hero__in, .giftband, .product, .cart-layout, .checkout-grid, .post-feature { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .nav { display: none; }
  .burger { display: grid; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .summary { position: static; }
  .legal-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .post-item { grid-template-columns: 150px 1fr; gap: 20px; }
}
@media (max-width: 680px) {
  :root { --gut: 18px; }

  /* Верхняя полоса: на телефоне оставляем только факты, без ссылки */
  .topbar__in { justify-content: center; }
  .topbar__in > a { display: none; }
  .topbar__facts { gap: 16px; justify-content: center; }

  /* Cookie-плашка компактнее, чтобы не закрывала пол-экрана */
  .cookie { padding: 14px 0; }
  .cookie__in { gap: 12px; }
  .cookie p { font-size: 12.5px; line-height: 1.45; }
  .cookie .btn { padding: 10px 14px; font-size: 11px; }

  /* Кнопка покупки в одну строку */
  .product__buy { flex-wrap: wrap; }
  .product__buy .btn { flex: 1 1 100%; }
  .product__price .price { font-size: 28px; }
  body { font-size: 16px; }
  .cols-3, .cols-4, .cols-2 { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr 1fr; }
  .cat--wide { grid-column: span 2; min-height: 260px; }
  .cat { min-height: 168px; padding: 18px; }
  .cat__sub { display: none; }
  .product-grid, .product-grid--3 { grid-template-columns: 1fr 1fr; gap: 26px 14px; }
  .header__in { height: 64px; gap: 14px; }
  .logo__name { font-size: 21px; }
  .topbar__facts { gap: 18px; }
  .topbar__facts span:nth-child(n + 3) { display: none; }
  .cart-line { grid-template-columns: 84px 1fr; }
  .cart-line__sum { grid-column: 2; text-align: left; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; padding: 44px 0 32px; }
  .hero__facts { gap: 22px; }
  .post-item { grid-template-columns: 1fr; }
  .steps-line { gap: 14px; font-size: 11px; }
  .tabs { gap: 18px; overflow-x: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .giftband__stamp { width: 78px; height: 78px; right: -8px; top: -8px; font-size: 9px; }
}
