:root {
  --bg: #ffffff;
  --bg-alt: #f4f4f5;
  --dark: #18181b;
  --dark-2: #27272a;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-soft: #fff7ed;
  --ok: #16a34a;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(24, 24, 27, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: 10px; font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn--ghost:hover { border-color: #fff; }
.btn--light { background: var(--bg-alt); color: var(--text); }
.btn--light:hover { background: var(--line); }
.btn--lg { min-height: 52px; padding: 14px 26px; font-size: 16px; }
.btn--block { width: 100%; }
.link { font-weight: 600; text-decoration: none; }

/* Шапка */
.header { position: sticky; top: 0; z-index: 30; background: rgba(24, 24, 27, .96); backdrop-filter: blur(8px); color: #fff; }
.header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.logo span { color: var(--accent); }
.logo--sm { font-size: 20px; }
.nav { display: flex; gap: 22px; margin-right: auto; }
.nav a { color: #d4d4d8; text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: #fff; }
.header__phone { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 600 15px var(--font); cursor: pointer; }
.cart-btn:hover { background: var(--accent-dark); }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-btn__count { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--accent-dark); font-size: 12px; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--dark); }

/* Первый экран */
.hero { background: radial-gradient(1000px 500px at 85% 0%, rgba(249, 115, 22, .28), transparent 60%), var(--dark); color: #fff; }
.hero__inner { padding: 80px 20px 96px; max-width: 1200px; }
.hero__badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(249, 115, 22, .15); color: #fdba74; font-size: 14px; font-weight: 600; }
.hero h1 { max-width: 760px; font-size: clamp(34px, 6vw, 60px); letter-spacing: -.03em; margin: 18px 0 20px; }
.hero__lead { max-width: 620px; color: #d4d4d8; font-size: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 40px; }
.hero__codes { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.hero__codes li { padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; color: #a1a1aa; font-size: 14px; }
.hero__codes b { color: #fff; margin-right: 4px; }

/* Преимущества */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -48px; position: relative; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature__num { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

/* Секции */
.section { padding: 80px 20px; }
.section.container { padding-left: 20px; padding-right: 20px; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--dark); color: #fff; }
.section__head { margin-bottom: 32px; }
.section__head p { color: var(--muted); margin: 0; }

/* Каталог */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__media { position: relative; padding: 0; border: 0; background: var(--bg-alt); cursor: zoom-in; aspect-ratio: 4 / 3; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__code { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 8px; background: var(--dark); color: #fff; font-weight: 800; font-size: 14px; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; list-style: none; }
.tags li { padding: 2px 9px; border-radius: 6px; background: var(--bg-alt); color: #52525b; font-size: 13px; font-weight: 600; }
.card__title { font-size: 17px; margin-bottom: 6px; }
.card__fits { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.card__price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stock { color: var(--ok); font-size: 13px; font-weight: 600; }
.stock--out { color: var(--muted); }
.card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card__actions .btn { padding: 10px 12px; font-size: 14px; }
.note { margin: 28px 0 0; color: var(--muted); }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.step { position: relative; padding: 24px; border-radius: var(--radius); background: #fff; }
.step__num { display: block; font-size: 40px; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; font-size: 15px; }

/* О компании */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.about__lead { font-size: 19px; color: #3f3f46; }
.about h3 { margin-top: 28px; font-size: 20px; }
.about__main p { color: #3f3f46; }
.about__list { padding-left: 20px; color: #3f3f46; }
.about__list li { margin-bottom: 8px; }
.about__side { position: sticky; top: 92px; padding: 28px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid #fed7aa; }
.about__side h3 { margin-top: 0; }
.checks { padding: 0; margin: 0 0 22px; list-style: none; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }

/* Марки */
.brands { padding-bottom: 72px; text-align: center; }
.brands p { color: var(--muted); font-weight: 600; }
.brands ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding: 0; margin: 0; list-style: none; }
.brands li { font-size: 20px; font-weight: 800; color: #a1a1aa; letter-spacing: -.01em; }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contacts__lead { color: #a1a1aa; max-width: 460px; }
.contacts__phones { display: flex; flex-direction: column; gap: 4px; margin: 24px 0; }
.contacts__phones a { color: #fff; font-size: 28px; font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.contacts__phones a:hover { color: var(--accent); }
.contacts__card { padding: 28px; border-radius: var(--radius); background: var(--dark-2); }
.contacts__card h3 { color: #a1a1aa; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.contacts__card p { margin-bottom: 22px; }
.contacts__card .link { color: var(--accent); }

.footer { background: #0f0f11; color: #a1a1aa; padding: 36px 0; font-size: 14px; }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.footer p { margin: 0; }

/* Модалка товара */
.modal { width: min(920px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 32px; border: 0; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.modal::backdrop { background: rgba(9, 9, 11, .6); }
.modal__close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg-alt); font-size: 26px; line-height: 1; cursor: pointer; }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.modal__grid img { border-radius: var(--radius); background: var(--bg-alt); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.modal h2 { font-size: 24px; padding-right: 40px; }
.modal .card__price { margin-bottom: 14px; }
.specs { width: 100%; margin-top: 22px; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { padding: 7px 0; border-bottom: 1px solid var(--line); text-align: left; }
.specs th { color: var(--muted); font-weight: 500; }
.modal__text { margin-top: 26px; color: #3f3f46; font-size: 15px; }

/* Корзина */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(9, 9, 11, .5); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; display: flex; flex-direction: column; width: min(460px, 100%); background: #fff; box-shadow: -20px 0 50px rgba(0, 0, 0, .2); transform: translateX(105%); transition: transform .25s ease; }
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 22px; margin: 0; }
.drawer__close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg-alt); font-size: 26px; line-height: 1; cursor: pointer; }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; }
.drawer__empty { color: var(--muted); }
.cart-items { padding: 0; margin: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--bg-alt); }
.cart-item__name { font-weight: 600; font-size: 14px; line-height: 1.35; }
.cart-item__price { color: var(--muted); font-size: 14px; }
.cart-item__remove { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.cart-item__remove:hover { background: var(--bg-alt); color: var(--danger); }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; }
.qty button { width: 30px; height: 32px; border: 0; background: none; font-size: 18px; cursor: pointer; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 6px; font-size: 18px; }
.cart-total b { font-size: 26px; letter-spacing: -.02em; }

.order-form { margin-top: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.order-form h3 { font-size: 20px; margin-bottom: 4px; }
.order-form label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.order-form label span { color: var(--accent-dark); }
.order-form input, .order-form textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 13px; border: 1px solid #d4d4d8; border-radius: 10px; font: 16px var(--font); color: var(--text); background: #fff; }
.order-form textarea { resize: vertical; }
.order-form input:focus, .order-form textarea:focus { outline: 2px solid rgba(249, 115, 22, .35); border-color: var(--accent); }
.order-form .is-invalid { border-color: var(--danger); background: #fef2f2; }
.order-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: var(--danger); font-size: 14px; }

.drawer__success { text-align: center; padding-top: 60px; }
.success-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; background: #dcfce7; color: var(--ok); font-size: 36px; font-weight: 800; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); padding: 12px 20px; border-radius: 12px; background: var(--dark); color: #fff; font-weight: 600; box-shadow: var(--shadow); }

/* Адаптив */
@media (max-width: 1080px) {
  .products, .features, .steps { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .header__phone { margin-left: auto; }
}
@media (max-width: 760px) {
  .container, .section.container { padding-left: 16px; padding-right: 16px; }
  .section { padding: 56px 16px; }
  .hero__inner { padding: 48px 16px 80px; }
  .header__phone { display: none; }
  .cart-btn { margin-left: auto; }
  .about, .contacts, .modal__grid { grid-template-columns: 1fr; gap: 28px; }
  .about__side { position: static; }
  .footer__inner { grid-template-columns: 1fr; gap: 12px; }
  .modal { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .products, .features, .steps { grid-template-columns: 1fr; }
  .cart-btn span { display: none; }
  .hero__actions .btn { width: 100%; }
  .contacts__phones a { font-size: 24px; }
}
