/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Tokens ---------- */
:root {
  --bg:          #08080A;
  --bg-elevated: #111114;
  --bg-hover:    #1A1A1F;
  --bg-input:    #0C0C0F;

  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --border-accent: rgba(214,0,0,0.45);

  --text-primary: #F3F3F5;
  --text-sec:     rgba(243,243,245,0.62);
  --text-ter:     rgba(243,243,245,0.38);

  --accent:      #D60000;
  --accent-hi:   #F01A1A;
  --accent-dim:  rgba(214,0,0,0.12);
  --accent-glow: rgba(214,0,0,0.35);

  --green: #22C55E;
  --amber: #F59E0B;

  --font-head: 'Russo One', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --header-h: 68px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.has-cartbar { padding-bottom: 88px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.12; letter-spacing: -0.005em; }
h1 { font-size: clamp(38px, 7.2vw, 76px); }
h2 { font-size: clamp(28px, 4.4vw, 44px); }
h3 { font-size: 19px; }
p { color: var(--text-sec); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.red { color: var(--accent); }

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent-hi); margin-bottom: 12px;
}
.section-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-md);
  background: var(--accent); color: #fff; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background .2s, transform .15s, border-color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-primary); }
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--text-ter); }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-hi); outline-offset: 2px;
}

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); cursor: pointer; transition: background .2s;
}
.icon-btn:hover { background: var(--bg-hover); }

.icon-box {
  width: 40px; height: 40px; border-radius: var(--r-md); flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid var(--border-accent); color: var(--accent-hi);
}

.card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color .2s, transform .2s;
}

/* ---------- Decor ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.blob { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.deco-bg {
  position: absolute; left: 50%; bottom: -0.18em; transform: translateX(-50%);
  font-family: var(--font-head); font-size: clamp(110px, 26vw, 300px); line-height: 1;
  color: rgba(255,255,255,0.025); pointer-events: none; user-select: none; white-space: nowrap;
}

/* ---------- Announce ---------- */
.announce {
  background: var(--accent); color: #fff; text-align: center;
  padding: 8px 16px; font-size: 14px; font-weight: 600;
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,8,10,0.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-in { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.wordmark { font-family: var(--font-head); font-size: 24px; letter-spacing: .01em; }
.nav { display: none; gap: 28px; margin-right: 16px; }
.nav a { color: var(--text-sec); text-decoration: none; font-weight: 600; font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--text-primary); }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border-radius: var(--r-md); border: 1px solid var(--border); text-decoration: none; font-weight: 700; font-size: 15px;
  transition: background .2s;
}
.header-phone:hover { background: var(--bg-hover); }
.header-phone-text { display: none; }
.cart-btn {
  position: relative; width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center; cursor: pointer;
  background: var(--accent); border: none; color: #fff; transition: background .2s;
}
.cart-btn:hover { background: var(--accent-hi); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: #fff; color: #000; font-size: 12px; font-weight: 800;
  display: grid; place-items: center; line-height: 1;
}
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.15); } }

@media (min-width: 720px) { .header-phone-text { display: inline; } }
@media (min-width: 960px) { .nav { display: flex; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 48px 0 72px; border-bottom: 1px solid var(--border); }
.blob-1 { width: 520px; height: 520px; background: var(--accent); opacity: .22; top: -180px; right: -140px; }
.blob-2 { width: 360px; height: 360px; background: #7a0000; opacity: .25; bottom: -200px; left: -120px; }
.hero-in { position: relative; display: grid; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.lead { font-size: 17px; max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.facts { display: grid; gap: 14px; }
.facts li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-sec); }
.facts b { display: block; color: var(--text-primary); font-size: 15px; }

.hero-logo { display: none; position: relative; justify-self: center; width: min(78vw, 400px); aspect-ratio: 1; place-items: center; }
.hero-logo img { position: relative; width: 86%; height: auto; border-radius: 50%; box-shadow: 0 30px 80px -20px var(--accent-glow), 0 0 0 10px rgba(255,255,255,0.04); }
.hero-logo-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--border-strong); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, auto); gap: 24px; } }
@media (min-width: 900px) {
  .hero { padding: 88px 0 110px; }
  .hero-logo { display: grid; }
  .hero-in { grid-template-columns: 1.25fr 1fr; }
}

/* ---------- Catalog ---------- */
.catalog { padding: 72px 0 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.note { font-size: 14px; margin-bottom: 28px; }

.tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; }
.tab {
  min-height: 42px; padding: 8px 20px; border-radius: 9px; border: none; background: transparent; cursor: pointer;
  color: var(--text-sec); font-weight: 700; font-size: 15px; transition: background .2s, color .2s;
}
.tab:hover { color: var(--text-primary); }
.tab[aria-selected="true"] { background: var(--accent); color: #fff; }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

.product { display: flex; flex-direction: column; padding: 18px; }
@media (min-width: 620px) { .product { padding: 20px; min-height: 196px; } }
.product:hover { border-color: var(--border-strong); }
.product.in-cart { border-color: var(--border-accent); background: linear-gradient(160deg, rgba(214,0,0,0.08), rgba(214,0,0,0.01) 60%), var(--bg-elevated); }
.product-img { margin: -20px -20px 16px; aspect-ratio: 16/10; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--bg-hover); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.product h3 { font-size: 20px; }
.product-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-ter); white-space: nowrap; padding-top: 4px; }
.product p { font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.product-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--font-head); font-size: 22px; white-space: nowrap; }
.price small { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text-ter); margin-left: 2px; }

.add-btn { min-height: 44px; padding: 10px 18px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; background: var(--bg-input); }
.stepper button {
  width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: none; cursor: pointer;
  color: var(--text-primary); font-size: 20px; font-weight: 600; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.stepper button:hover { background: var(--bg-hover); }
.stepper output { min-width: 64px; text-align: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }

.skeleton { height: 196px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--bg-elevated), var(--bg-hover), var(--bg-elevated)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.grid-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--text-sec); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }

/* ---------- How ---------- */
.how { padding: 56px 0 72px; }
.how h2 { margin-bottom: 32px; }
.steps { display: grid; gap: 14px; counter-reset: s; }
.steps .card { padding: 24px; }
.steps .card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.step-n { display: block; font-family: var(--font-head); font-size: 36px; color: var(--accent); line-height: 1; margin-bottom: 18px; }
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 14px; line-height: 1.55; }
@media (min-width: 620px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Contacts ---------- */
.contacts { padding: 72px 0; border-top: 1px solid var(--border); background: radial-gradient(800px 400px at 90% 100%, rgba(214,0,0,0.10), transparent 70%); }
.contacts-in { display: grid; gap: 40px; align-items: center; }
.contacts h2 { margin-bottom: 28px; }
.contact-list { display: grid; gap: 18px; margin-bottom: 28px; }
.contact-list dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-ter); margin-bottom: 2px; }
.contact-list dd { font-size: 18px; font-weight: 600; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent-hi); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.storefront { padding: 40px; display: grid; place-items: center; }
.storefront img { width: min(100%, 280px); border-radius: 50%; }
@media (min-width: 900px) { .contacts-in { grid-template-columns: 1.3fr 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 24px 0; font-size: 14px; color: var(--text-ter); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer a { color: var(--text-sec); }

/* ---------- Cart bar ---------- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: rgba(17,17,20,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-strong);
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } }
.cartbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cartbar-info { display: flex; flex-direction: column; line-height: 1.3; }
.cartbar-info span { font-size: 13px; color: var(--text-sec); }
.cartbar-info b { font-size: 18px; font-weight: 800; }

/* ---------- Drawer ---------- */
.drawer {
  margin: 0; margin-left: auto; height: 100dvh; max-height: 100dvh; width: min(100vw, 480px); max-width: 100vw;
  background: var(--bg-elevated); color: var(--text-primary); border: none; border-left: 1px solid var(--border);
  padding: 0; overflow: hidden;
}
.drawer[open] { display: flex; flex-direction: column; animation: drawerIn .28s ease; }
.drawer::backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 24px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }

.cart-list li { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-name { font-weight: 700; }
.cart-name small { display: block; font-weight: 500; font-size: 13px; color: var(--text-ter); }
.cart-sum { font-weight: 800; text-align: right; white-space: nowrap; }
.cart-controls { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.cart-controls .stepper button { width: 38px; height: 38px; }
.cart-controls .stepper output { min-width: 58px; font-size: 14px; }
.remove-btn { background: none; border: none; color: var(--text-ter); cursor: pointer; font-size: 13px; font-weight: 600; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }
.remove-btn:hover { color: var(--accent-hi); }
.empty { padding: 32px 0; text-align: center; }

.order-form { display: grid; gap: 14px; padding-top: 24px; }
.order-form h3 { font-size: 20px; }
.field { display: grid; gap: 6px; }
.field > span, .seg legend { font-size: 13px; font-weight: 700; color: var(--text-sec); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg-input); border: 1px solid var(--border-strong);
  font-size: 16px; transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field input.invalid { border-color: var(--accent-hi); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { border: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg legend { margin-bottom: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center; min-height: 48px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--bg-input); font-weight: 700; transition: all .2s;
}
.seg input:checked + span { background: var(--accent-dim); border-color: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.seg input:disabled + span { opacity: .4; }

.hint { font-size: 13px; color: var(--text-ter); line-height: 1.5; }
.hint:empty { display: none; }
.warn { font-size: 14px; color: var(--amber); font-weight: 600; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-sec); cursor: pointer; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex-shrink: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.summary { display: grid; gap: 6px; padding: 16px; border-radius: var(--r-md); background: var(--bg-input); border: 1px solid var(--border); }
.summary > div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--text-sec); }
.summary > div span:last-child { color: var(--text-primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-total { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--border); }
.summary-total span { font-size: 18px; font-weight: 800; color: var(--text-primary) !important; }

.form-error { padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-dim); border: 1px solid var(--border-accent); color: #ffb4b4; font-size: 14px; font-weight: 600; }

.success { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 40px 28px; }
.success-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.35); }
.success h3 { font-size: 26px; }
.success a { color: var(--text-primary); font-weight: 700; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 60;
  background: #fff; color: #000; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 100px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: toastIn .25s ease; white-space: nowrap;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Fade-in ---------- */
.fi { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fi.visible { opacity: 1; transform: none; }
.fi:nth-child(2) { transition-delay: .08s; }
.fi:nth-child(3) { transition-delay: .16s; }
.fi:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .fi { opacity: 1; transform: none; }
}
