/* ============================================================
   Рос Ювелир — дизайн-система
   Палитра 70/20/10: кремовый / изумрудный / золото
   Шрифты: Cormorant Garamond (display) · Manrope (body) · Space Mono (цифры)
   ============================================================ */

:root {
  /* 70% — кремовый */
  --cream: #FBF8F2;
  --cream-card: #F3EDE1;
  /* 20% — изумрудно-зелёный */
  --green: #1F3A2E;
  --green-2: #2C4A3B;
  --green-ink: #14261D;
  /* 10% — золото */
  --gold: #C9A24B;
  --gold-2: #B8944A;
  /* нейтральные */
  --graphite: #4A4A46;
  --line: #E4DBC9;
  --white: #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --header-h: 76px;
  --wrap: 1280px;
  --gap: 24px;
  --radius: 4px;
  --shadow-sm: 0 2px 10px rgba(20, 38, 29, .06);
  --shadow-md: 0 10px 34px rgba(20, 38, 29, .12);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--green-ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- Типографика ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--green); line-height: 1.1; letter-spacing: .5px; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
.price, .mono { font-family: var(--font-mono); letter-spacing: -.5px; }
.eyebrow {
  font-family: var(--font-body); font-size: .74rem; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase; color: var(--gold-2);
}
.section-lead { color: var(--graphite); max-width: 62ch; }

/* ---- Утилиты ---- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.section { padding: clamp(56px, 8vw, 108px) 0; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Фирменный разделитель — «клеймо» (золотой ромб на линии) */
.hallmark { display: flex; align-items: center; gap: 14px; color: var(--gold); }
.hallmark::before, .hallmark::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold)); opacity: .55; }
.hallmark::after { background: linear-gradient(90deg, var(--gold), transparent); }
.hallmark i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); display: block; }
.hallmark.center { justify-content: center; }
.divider-lozenge { display: inline-block; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }

/* ---- Кнопки ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 30px; border-radius: var(--radius); font-weight: 600;
  font-size: .92rem; letter-spacing: .04em; transition: all .25s var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--green-ink); }
.btn-primary:hover { background: var(--gold-2); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201, 162, 75, .34); }
.btn-secondary { background: var(--green); color: var(--cream); }
.btn-secondary:hover { background: var(--green-2); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--green); color: var(--green); }
.btn-ghost:hover { background: var(--green); color: var(--cream); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ============================================================
   ШАПКА — прозрачная, блюр, фиксированная
   ============================================================ */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(251, 248, 242, .74);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 219, 201, .5);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.header.scrolled { background: rgba(251, 248, 242, .95); box-shadow: var(--shadow-sm); }
.header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; }
.nav-left { display: flex; gap: 28px; }
.nav-right { display: flex; gap: 22px; justify-content: flex-end; align-items: center; }
.nav-link { font-size: .84rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green); position: relative; padding: 4px 0; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px; background: var(--gold); transition: width .3s var(--ease); }
.nav-link:hover::after { width: 100%; }
.brand { display: flex; justify-content: center; }
.brand img { height: 52px; width: auto; display: block; filter: drop-shadow(0 1px 10px rgba(201, 162, 75, .45)) brightness(1.06); }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--green); transition: all .25s var(--ease); }
.icon-btn:hover { background: rgba(201, 162, 75, .16); color: var(--gold-2); }
.icon-btn svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.cart-icon { position: relative; }
.cart-badge {
  position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--gold); color: var(--green-ink); border-radius: 9px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
.cart-badge.empty { display: none; }
.burger { display: none; }

/* Мобильное меню */
.menu-overlay { position: fixed; inset: 0; background: rgba(20, 38, 29, .5); opacity: 0; visibility: hidden; transition: .3s; z-index: 110; }
.menu-overlay.open { opacity: 1; visibility: visible; }
.side-menu {
  position: fixed; top: 0; right: 0; height: 100%; width: min(84vw, 340px); background: var(--cream);
  transform: translateX(100%); transition: transform .35s var(--ease); z-index: 120;
  padding: 28px 26px; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(20,38,29,.2);
}
.side-menu.open { transform: translateX(0); }
.side-menu .close { align-self: flex-end; }
.side-menu nav { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }
.side-menu nav a { font-family: var(--font-display); font-size: 1.7rem; color: var(--green); padding: 10px 0; border-bottom: 1px solid var(--line); }
.side-menu .menu-foot { margin-top: auto; font-size: .86rem; color: var(--graphite); }
.side-menu .menu-foot a { color: var(--gold-2); }

/* Поиск */
.search-panel {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: rgba(251, 248, 242, .97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .25s var(--ease);
}
.search-panel.open { transform: translateY(0); opacity: 1; visibility: visible; }
.search-inner { max-width: 720px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 48px) 26px; }
.search-field { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--green); padding-bottom: 10px; }
.search-field svg { width: 22px; height: 22px; stroke: var(--green); fill: none; stroke-width: 1.6; }
.search-field input { flex: 1; border: none; background: none; font-family: var(--font-display); font-size: 1.6rem; outline: none; }
.search-field input::placeholder { color: #b7ae9c; }
.search-results { margin-top: 16px; max-height: 52vh; overflow: auto; }
.sr-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--radius); transition: background .2s; }
.sr-item:hover { background: var(--cream-card); }
.sr-item img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius); background: var(--cream-card); }
.sr-item .sr-name { font-weight: 600; }
.sr-item .sr-type { font-size: .78rem; color: var(--graphite); }
.sr-item .sr-price { margin-left: auto; font-family: var(--font-mono); font-weight: 700; color: var(--green); }
.sr-empty { padding: 20px 10px; color: var(--graphite); }

/* ============================================================
   HERO-СЛАЙДЕР
   ============================================================ */
.hero { position: relative; height: 100vh; min-height: 620px; overflow: hidden; }
.hero-track {
  position: absolute; inset: 0; display: flex; height: 100%;
  transition: transform .85s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
}
.hero-slide {
  position: relative; flex: 0 0 100%; width: 100%; height: 100%;
  display: grid; place-items: center; background-size: cover; background-position: center;
}
.hero-content { position: relative; z-index: 3; text-align: center; color: var(--cream); padding: 0 20px; max-width: 820px; }
.hero-content .eyebrow { color: var(--gold); }
.hero-content h1 { color: var(--cream); margin: 14px 0 10px; text-shadow: 0 2px 30px rgba(0,0,0,.3); }
.hero-content p { font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.7rem); color: #efe8d8; font-style: italic; }
.hero-content .btn { margin-top: 30px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(251,248,242,.12); border: 1px solid rgba(251,248,242,.4); color: var(--cream);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: .25s;
}
.hero-arrow:hover { background: var(--gold); color: var(--green-ink); border-color: var(--gold); transform: translateY(-50%) scale(1.08); }
.hero-arrow.prev { left: clamp(10px, 2.6vw, 32px); }
.hero-arrow.next { right: clamp(10px, 2.6vw, 32px); }
.hero-arrow svg { width: 17px; height: 17px; stroke: currentColor; fill: none; }
.hero-dots { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 10px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; background: rgba(251,248,242,.45); transition: .25s; }
.hero-dots button.active { background: var(--gold); width: 26px; border-radius: 5px; }

/* ============================================================
   БЛОКИ ГЛАВНОЙ
   ============================================================ */
/* История */
.story { background: var(--cream); }
.story-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.story-media { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--cream-card); box-shadow: var(--shadow-md); }
.story-media img { width: 100%; height: 100%; }
.story-text .eyebrow { margin-bottom: 14px; display: block; }
.story-text h2 { margin-bottom: 20px; }
.story-text p { color: var(--graphite); margin-bottom: 16px; }

/* О пробе */
.proba { background: var(--green); color: var(--cream); }
.proba h2 { color: var(--cream); }
.proba .eyebrow { color: var(--gold); }
.proba-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); margin-top: 44px; }
.proba-card { background: var(--green-2); border: 1px solid rgba(201,162,75,.28); border-radius: var(--radius); padding: 34px; }
.proba-card .num { font-family: var(--font-display); font-size: 3.4rem; color: var(--gold); line-height: 1; }
.proba-card h3 { color: var(--cream); margin: 8px 0 12px; }
.proba-card p { color: #d7e0d9; font-size: .96rem; }
.proba-note { margin-top: 36px; text-align: center; color: #cfd8d0; font-style: italic; font-family: var(--font-display); font-size: 1.3rem; }

/* Партнёры */
.partners { background: var(--cream-card); }
.partners-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(32px, 5vw, 64px); margin-top: 44px; }
.partner-item { display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.partner-item:hover { opacity: .78; }
.partners-row img { height: 110px; width: auto; max-width: 260px; object-fit: contain; }

/* ============================================================
   ФУТЕР
   ============================================================ */
.footer { background: var(--green-ink); color: #cfd8d0; padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: clamp(28px, 5vw, 60px); }
.footer h4 { color: var(--cream); font-size: 1.3rem; margin-bottom: 18px; }
.footer .f-brand img { height: 52px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1) opacity(.92); }
.footer p, .footer li { font-size: .92rem; margin-bottom: 8px; }
.footer a:hover { color: var(--gold); }
.footer .f-addr li { display: flex; gap: 8px; }
.footer .f-addr li::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); margin-top: 8px; flex: 0 0 auto; }
.f-whatsapp {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 18px;
  width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: var(--green-ink) !important;
  transition: .2s;
}
.f-whatsapp:hover { background: #ddb662; color: var(--green-ink) !important; transform: scale(1.06); }
.f-whatsapp svg { width: 23px; height: 23px; flex: 0 0 auto; }
.footer-map { border: 1px solid rgba(201,162,75,.3); border-radius: var(--radius); overflow: hidden; height: 220px; }
.footer-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.2); }
.footer-bottom { margin-top: 50px; border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .82rem; color: #9aa79e; }
.footer-bottom a { color: #b9c4bb; }

/* ============================================================
   КАТАЛОГ
   ============================================================ */
.page-head { padding: calc(var(--header-h) + 40px) 0 20px; text-align: center; }
.page-head .eyebrow { display: block; margin-bottom: 10px; }
.breadcrumbs { font-size: .82rem; color: var(--graphite); margin-bottom: 8px; }
.breadcrumbs a:hover { color: var(--gold-2); }
.breadcrumbs span { color: var(--gold-2); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--graphite); margin-bottom: 14px; transition: color .2s; }
.back-link:hover { color: var(--gold-2); }
.back-link svg { width: 15px; height: 15px; stroke: currentColor; fill: none; flex: 0 0 auto; }

/* Список категорий (аккордеон) */
.cat-list { max-width: 860px; margin: 30px auto 0; }
.cat-item { border-bottom: 1px solid var(--line); }
.cat-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 6px; text-align: left; transition: color .2s;
}
.cat-head:hover { color: var(--gold-2); }
.cat-head .cat-name { font-family: var(--font-display); font-size: 1.7rem; color: var(--green); }
.cat-head:hover .cat-name { color: var(--gold-2); }
.cat-head .cat-meta { display: flex; align-items: center; gap: 14px; color: var(--graphite); font-size: .84rem; }
.cat-head .chev { width: 20px; height: 20px; stroke: var(--gold-2); fill: none; stroke-width: 1.8; transition: transform .3s var(--ease); }
.cat-item.open .chev { transform: rotate(180deg); }
.cat-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease), padding .35s var(--ease); padding: 0 6px; }
.cat-item.open .cat-subs { max-height: 420px; padding: 0 6px 24px; }
.cat-subs a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--cream-card); border-radius: var(--radius); font-size: .92rem; font-weight: 600; color: var(--green); transition: .2s; }
.cat-subs a::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.cat-subs a:hover { background: var(--green); color: var(--cream); }
.cat-subs a:hover::before { background: var(--gold); }

/* Панель управления сеткой */
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; margin: 24px 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.toolbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.count-label { font-size: .84rem; color: var(--graphite); }
.sort-select {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--white); font-size: .86rem; font-weight: 600; color: var(--green);
}
.sort-select select { border: none; background: none; outline: none; font-weight: 600; color: var(--green); cursor: pointer; }
.size-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.size-toggle button { padding: 9px 12px; color: var(--graphite); display: grid; place-items: center; transition: .2s; }
.size-toggle button svg { width: 18px; height: 18px; fill: currentColor; }
.size-toggle button.active { background: var(--green); color: var(--cream); }

.catalog-layout { display: grid; grid-template-columns: 264px 1fr; gap: 36px; align-items: start; }

/* Фильтр */
.filter { background: var(--cream-card); border-radius: var(--radius); padding: 24px; position: sticky; top: calc(var(--header-h) + 16px); }
.filter h3 { font-size: 1.2rem; margin-bottom: 6px; }
.filter-group { padding: 18px 0; border-bottom: 1px solid var(--line); }
.filter-group:last-of-type { border-bottom: none; }
.filter-group > .fg-title { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: .9rem; cursor: pointer; }
.check input { accent-color: var(--green); width: 16px; height: 16px; }
.check-scroll { max-height: 190px; overflow: auto; padding-right: 4px; }
.price-inputs { display: flex; align-items: center; gap: 8px; }
.price-inputs input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--font-mono); font-size: .86rem; background: var(--white); }
.filter-actions { margin-top: 18px; display: flex; gap: 10px; }
.filter-actions .btn { flex: 1; padding: 11px; font-size: .82rem; }

/* Сетка товаров */
.grid { display: grid; gap: var(--gap); }
.grid[data-size="small"] { grid-template-columns: repeat(4, 1fr); }
.grid[data-size="large"] { grid-template-columns: repeat(2, 1fr); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-md); border-color: var(--gold); }
.card-media { position: relative; aspect-ratio: 1; background: var(--cream-card); overflow: hidden; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-pop { position: absolute; top: 10px; left: 10px; background: var(--gold); color: var(--green-ink); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 3px; }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-type { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.card-name { font-family: var(--font-display); font-size: 1.16rem; color: var(--green); line-height: 1.2; }
.grid[data-size="small"] .card-name { font-size: 1rem; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.card-price { font-family: var(--font-mono); font-weight: 700; font-size: 1.02rem; color: var(--green); }
.grid[data-size="small"] .card-price { font-size: .9rem; }
.card-add { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--green); color: var(--cream); display: grid; place-items: center; transition: .25s; }
.card-add:hover { background: var(--gold); color: var(--green-ink); transform: scale(1.08); }
.card-add svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.grid[data-size="small"] .card-add { width: 34px; height: 34px; }

.empty-state { text-align: center; padding: 80px 20px; grid-column: 1 / -1; }
.empty-state .divider-lozenge { margin-bottom: 16px; }
.empty-state p { font-family: var(--font-display); font-size: 1.7rem; color: var(--green); }
.empty-state span { color: var(--graphite); }

/* Пагинация */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 46px; flex-wrap: wrap; }
.pagination button { min-width: 42px; height: 42px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); font-family: var(--font-mono); font-weight: 700; font-size: .88rem; color: var(--green); transition: .2s; }
.pagination button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.pagination button.active { background: var(--green); color: var(--cream); border-color: var(--green); }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination .dots { border: none; background: none; }

/* ============================================================
   СТРАНИЦА ТОВАРА
   ============================================================ */
.product-wrap { padding-top: calc(var(--header-h) + 30px); }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.gallery-main { aspect-ratio: 1; background: var(--cream-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button { width: 74px; height: 74px; border-radius: var(--radius); overflow: hidden; border: 2px solid transparent; background: var(--cream-card); }
.gallery-thumbs button.active { border-color: var(--gold); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
  position: fixed; inset: 0; z-index: 400; background: rgba(15, 26, 20, .94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox-close, .lightbox-arrow {
  position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(251,248,242,.1); border: 1px solid rgba(251,248,242,.35); color: var(--cream);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: .2s;
}
.lightbox-close:hover, .lightbox-arrow:hover { background: var(--gold); color: var(--green-ink); border-color: var(--gold); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); }
.lightbox-arrow svg { width: 20px; height: 20px; }
.lightbox-arrow.prev { left: clamp(10px, 3vw, 32px); }
.lightbox-arrow.next { right: clamp(10px, 3vw, 32px); }
@media (max-width: 640px) {
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .lightbox-arrow { width: 38px; height: 38px; }
}

.product-info .p-type { display: block; margin-bottom: 8px; }
.product-info h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 14px; }
.product-price { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.product-brand { color: var(--graphite); font-size: .92rem; margin-bottom: 22px; }
.product-desc-wrap { margin-bottom: 26px; }
.product-desc { color: var(--graphite); margin-bottom: 0; white-space: pre-line; }
.product-desc.collapsed {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.desc-toggle {
  margin-top: 8px; font-size: .84rem; font-weight: 600; color: var(--gold-2);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.desc-toggle:hover { border-bottom-color: var(--gold-2); }
.spec-list { border-top: 1px solid var(--line); margin-bottom: 26px; }
.spec-list .spec { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.spec-list .spec .k { color: var(--graphite); }
.spec-list .spec .v { font-weight: 600; color: var(--green); text-align: right; }
.size-block { margin-bottom: 26px; }
.size-block .fg-title { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 12px; }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip { min-width: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-family: var(--font-mono); font-weight: 700; font-size: .88rem; color: var(--green); transition: .2s; }
.size-chip:hover { border-color: var(--gold); }
.size-chip.active { background: var(--green); color: var(--cream); border-color: var(--green); }
.size-hint { color: #c0392b; font-size: .82rem; margin-top: 8px; }
.product-cta { display: flex; gap: 12px; align-items: center; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qty-stepper button { width: 42px; height: 48px; font-size: 1.2rem; color: var(--green); }
.qty-stepper button:hover { background: var(--cream-card); }
.qty-stepper span { min-width: 40px; text-align: center; font-family: var(--font-mono); font-weight: 700; }

/* ============================================================
   КОРЗИНА / ОФОРМЛЕНИЕ
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.cart-rows { display: flex; flex-direction: column; gap: 14px; }
.cart-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.cart-row img { width: 92px; height: 92px; object-fit: cover; border-radius: var(--radius); background: var(--cream-card); }
.cart-row .cr-name { font-family: var(--font-display); font-size: 1.24rem; color: var(--green); }
.cart-row .cr-meta { font-size: .84rem; color: var(--graphite); margin-top: 3px; }
.cart-row .cr-controls { display: flex; align-items: center; gap: 18px; }
.cart-row .cr-price { font-family: var(--font-mono); font-weight: 700; color: var(--green); white-space: nowrap; }
.cart-row .cr-remove { color: var(--graphite); transition: .2s; }
.cart-row .cr-remove:hover { color: #c0392b; }
.cart-row .cr-remove svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.summary { background: var(--cream-card); border-radius: var(--radius); padding: 28px; position: sticky; top: calc(var(--header-h) + 16px); }
.summary h3 { margin-bottom: 18px; }
.summary .s-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: .94rem; color: var(--graphite); }
.summary .s-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--line); }
.summary .s-total .lbl { font-family: var(--font-display); font-size: 1.4rem; color: var(--green); }
.summary .s-total .val { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--green); }
.summary .note { font-size: .8rem; color: var(--graphite); margin-top: 14px; }

.empty-cart { text-align: center; padding: 70px 20px; }
.empty-cart .divider-lozenge { margin-bottom: 16px; }
.empty-cart h2 { margin-bottom: 10px; }
.empty-cart p { color: var(--graphite); margin-bottom: 24px; }

/* Форма */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--green); }
.field label .req { color: var(--gold-2); }
.field input, .field textarea, .field select {
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  font-size: .95rem; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 90px; }
.field .err { color: #c0392b; font-size: .78rem; }
.field.invalid input, .field.invalid textarea { border-color: #c0392b; }

.fulfillment { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: .2s; background: var(--white); }
.radio-card:hover { border-color: var(--gold); }
.radio-card.active { border-color: var(--green); background: var(--cream-card); }
.radio-card .rc-title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--green); }
.radio-card .rc-title input { accent-color: var(--green); }
.radio-card .rc-desc { font-size: .82rem; color: var(--graphite); margin-top: 6px; padding-left: 26px; }
.pickup-addresses { margin-top: 14px; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; font-size: .88rem; color: var(--graphite); }
.consent input { accent-color: var(--green); width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.consent a { color: var(--gold-2); text-decoration: underline; }

/* Подтверждение заказа */
.confirm { max-width: 620px; margin: 0 auto; text-align: center; }
.confirm .seal { width: 96px; height: 96px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--gold); }
.confirm .seal svg { width: 46px; height: 46px; stroke: currentColor; fill: none; stroke-width: 2; }
.confirm .order-num { font-family: var(--font-mono); font-size: 1.1rem; color: var(--gold-2); margin: 10px 0 6px; }
.confirm h1 { margin-bottom: 16px; }
.confirm p { color: var(--graphite); margin-bottom: 10px; }
.confirm .recap { text-align: left; background: var(--cream-card); border-radius: var(--radius); padding: 24px; margin: 28px 0; }
.confirm .recap h3 { font-size: 1.2rem; margin-bottom: 14px; }
.confirm .recap .r-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: .92rem; }
.email-preview { text-align: left; border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; margin-top: 18px; font-size: .84rem; color: var(--graphite); }
.email-preview .ep-head { font-weight: 700; color: var(--green); margin-bottom: 8px; }

/* ============================================================
   ТОСТ
   ============================================================ */
.toast-host { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--green-ink); color: var(--cream); padding: 14px 22px; border-radius: var(--radius); box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 12px; font-size: .9rem; font-weight: 600; opacity: 0; transform: translateY(16px); transition: .3s var(--ease); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast .t-mark { width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); flex: 0 0 auto; }

/* ============================================================
   АНИМАЦИИ ПРИ СКРОЛЛЕ
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-track { transition: transform .3s; }
}

/* ============================================================
   АДМИНКА
   ============================================================ */
.admin-body { background: #f0ece2; }
.admin-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-gate .gate-card { width: min(420px, 100%); background: var(--white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-md); text-align: center; }
.admin-gate .gate-card svg { width: 40px; height: 40px; stroke: var(--gold); fill: none; stroke-width: 1.6; margin-bottom: 14px; }
.admin-gate h1 { font-size: 2rem; margin-bottom: 6px; }
.admin-gate p { color: var(--graphite); font-size: .88rem; margin-bottom: 22px; }
.admin-gate input { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; text-align: center; }
.admin-gate .gate-err { color: #c0392b; font-size: .84rem; margin-bottom: 10px; min-height: 20px; }
.admin-gate .hint { margin-top: 16px; font-size: .76rem; color: #9a9488; }

.admin-shell { display: none; min-height: 100vh; grid-template-columns: 240px 1fr; }
.admin-shell.on { display: grid; }
.admin-side { background: var(--green-ink); color: var(--cream); padding: 26px 18px; position: sticky; top: 0; height: 100vh; }
.admin-side .a-brand { font-family: var(--font-display); font-size: 1.5rem; color: var(--cream); margin-bottom: 4px; }
.admin-side .a-brand span { color: var(--gold); }
.admin-side .a-sub { font-size: .72rem; color: #8fa096; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 26px; }
.admin-nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius); color: #c7d1c9; font-weight: 600; font-size: .92rem; margin-bottom: 4px; transition: .2s; }
.admin-nav button:hover { background: rgba(255,255,255,.06); color: var(--cream); }
.admin-nav button.active { background: var(--gold); color: var(--green-ink); }
.admin-side .a-foot { position: absolute; bottom: 22px; left: 18px; right: 18px; font-size: .78rem; }
.admin-side .a-foot a { color: #8fa096; }
.admin-side .a-foot button { color: #8fa096; margin-top: 8px; }

.admin-main { padding: 30px clamp(18px, 3vw, 40px); }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-head h2 { font-size: 1.9rem; }
.admin-tab { display: none; }
.admin-tab.on { display: block; }

.a-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.a-table th, .a-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: .88rem; vertical-align: middle; }
.a-table th { background: var(--cream-card); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.a-table tr:last-child td { border-bottom: none; }
.a-table .t-img { width: 46px; height: 46px; object-fit: cover; border-radius: var(--radius); background: var(--cream-card); }
.a-table .t-actions { display: flex; gap: 6px; }
.mono-cell { font-family: var(--font-mono); font-weight: 700; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: .74rem; font-weight: 700; }
.chip.new { background: #eef4ff; color: #2f5bb7; }
.chip.confirmed { background: #fff4e0; color: #a97817; }
.chip.done { background: #e7f4ec; color: #2f7d4f; }
.chip.cancelled { background: #fbe9e7; color: #b23b2e; }
.chip.pop { background: rgba(201,162,75,.18); color: var(--gold-2); }

.btn-sm { padding: 7px 12px; font-size: .8rem; border-radius: var(--radius); }
.btn-icon { width: 34px; height: 34px; border-radius: var(--radius); display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); color: var(--green); transition: .2s; }
.btn-icon:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-icon.danger:hover { border-color: #c0392b; color: #c0392b; }
.btn-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* Модалка / форма товара */
.modal-back { position: fixed; inset: 0; background: rgba(20,38,29,.55); z-index: 300; display: none; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow: auto; }
.modal-back.on { display: flex; }
.modal { background: var(--cream); border-radius: var(--radius); width: min(760px, 100%); box-shadow: var(--shadow-md); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 1.5rem; }
.modal-body { padding: 24px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 12px; background: var(--cream-card); border-radius: 0 0 var(--radius) var(--radius); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.one { grid-template-columns: 1fr; }
.thumbs-edit { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.thumb-edit { position: relative; width: 76px; height: 76px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.thumb-edit img { width: 100%; height: 100%; object-fit: cover; }
.thumb-edit button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(20,38,29,.7); color: #fff; display: grid; place-items: center; font-size: 14px; }
.upload-zone { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 16px; text-align: center; color: var(--graphite); font-size: .86rem; cursor: pointer; transition: .2s; }
.upload-zone:hover { border-color: var(--gold); color: var(--gold-2); }
.checkbox-inline { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--green); }
.checkbox-inline input { accent-color: var(--green); width: 18px; height: 18px; }

.order-detail .od-section { margin-bottom: 20px; }
.order-detail .od-section h4 { font-size: 1.1rem; margin-bottom: 8px; color: var(--green); }
.order-detail .od-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.status-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.status-picker button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: .82rem; font-weight: 600; background: var(--white); }
.status-picker button.active { background: var(--green); color: var(--cream); border-color: var(--green); }

.admin-empty { text-align: center; padding: 60px 20px; color: var(--graphite); background: var(--white); border-radius: var(--radius); }
.a-setting { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); max-width: 460px; margin-bottom: 16px; }
.a-setting label { display: block; font-weight: 600; color: var(--green); margin-bottom: 8px; }
.a-setting input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1024px) {
  /* Планшет: логотип по центру, гамбургер справа (раздел 5.2) */
  .nav-left { display: none; }
  .burger { display: grid; }
  .header .wrap { grid-template-columns: 1fr auto 1fr; }
  .brand { justify-content: center; }
  .nav-right .contacts-link { display: none; }
  .grid[data-size="small"] { grid-template-columns: repeat(4, 1fr); }
  .grid[data-size="large"] { grid-template-columns: repeat(2, 1fr); }
  .catalog-layout { grid-template-columns: 1fr; }
  .filter { position: static; }
  .story-grid { grid-template-columns: 1fr; }
  .story-media { max-width: 460px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-map-col { grid-column: 1 / -1; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .product-grid { grid-template-columns: 1fr; }
  .admin-shell.on { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: flex; flex-direction: column; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-nav button { width: auto; margin-bottom: 0; }
  .admin-side .a-foot { position: static; margin-top: 16px; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand { justify-content: center; }
  .brand img { height: 42px; }
  .story-media { order: 2; }
  .story-text { order: 1; }
  .proba-grid { grid-template-columns: 1fr; }
  .fulfillment { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .partners-row img { height: 76px; max-width: 190px; }
  .grid[data-size="small"] { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid[data-size="large"] { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-row img { width: 72px; height: 72px; }
  .cart-row .cr-controls { grid-column: 1 / -1; justify-content: space-between; }
  .catalog-toolbar { gap: 12px; }
  .hero-content h1 { font-size: 2.5rem; }
  .a-table thead { display: none; }
  .a-table, .a-table tbody, .a-table tr, .a-table td { display: block; width: 100%; }
  .a-table tr { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
  .a-table td { border: none; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 12px; }
  .a-table td::before { content: attr(data-label); font-weight: 700; color: var(--graphite); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
}
