/* =========================================================
   купить.online — Design System
   Linear × Stripe × Vercel × Raycast × Apple
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-muted: #f7f7f8;
  --bg-subtle: #f2f2f3;
  --surface: #ffffff;
  --surface-hover: #fafafa;
  --ink: #0a0a0b;
  --ink-2: #3f3f46;
  --ink-3: #71717a;
  --ink-4: #a1a1aa;
  --line: rgba(10, 10, 11, 0.08);
  --line-strong: rgba(10, 10, 11, 0.14);
  --line-focus: rgba(10, 10, 11, 0.28);
  --accent: #0a0a0b;
  --accent-fg: #ffffff;
  --accent-soft: rgba(10, 10, 11, 0.04);
  --success: #0d7a5f;
  --success-bg: #ecf8f4;
  --danger: #c23b3b;
  --danger-bg: #fdf1f1;
  --warning: #b45309;
  --warning-bg: #fff7ed;
  --info-bg: #f4f4f5;

  --shadow-xs: 0 1px 2px rgba(10, 10, 11, 0.04);
  --shadow-sm: 0 1px 2px rgba(10, 10, 11, 0.04), 0 4px 12px rgba(10, 10, 11, 0.03);
  --shadow-md: 0 2px 4px rgba(10, 10, 11, 0.03), 0 12px 32px rgba(10, 10, 11, 0.06);
  --shadow-lg: 0 8px 16px rgba(10, 10, 11, 0.04), 0 24px 48px rgba(10, 10, 11, 0.08);
  --shadow-ring: 0 0 0 1px rgba(10, 10, 11, 0.06), var(--shadow-sm);

  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;

  --container: 1120px;
  --header-h: 64px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-display: "Sora", "IBM Plex Sans", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 180ms;
  --dur-slow: 320ms;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-muted: #111113;
  --bg-subtle: #18181b;
  --surface: #111113;
  --surface-hover: #18181b;
  --ink: #fafafa;
  --ink-2: #d4d4d8;
  --ink-3: #a1a1aa;
  --ink-4: #71717a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-focus: rgba(255, 255, 255, 0.28);
  --accent: #fafafa;
  --accent-fg: #09090b;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --success-bg: rgba(13, 122, 95, 0.15);
  --danger-bg: rgba(194, 59, 59, 0.15);
  --info-bg: rgba(255, 255, 255, 0.04);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
  --shadow-ring: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-sm);
  color-scheme: dark;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--ink);
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; color: var(--ink-3); }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
::selection { background: rgba(10, 10, 11, 0.12); color: var(--ink); }
[data-theme="dark"] ::selection { background: rgba(255, 255, 255, 0.16); }

/* ---------- Layout ---------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
@media (max-width: 640px) {
  .container { width: min(100% - 1.5rem, var(--container)); }
}

.section { padding: 5rem 0; }
.section-tight { padding: 3.5rem 0; }
.section + .section { padding-top: 0; }

.section-head {
  max-width: 560px;
  margin-bottom: 2rem;
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}
.section-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.35;
}
.section-head h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  margin-bottom: 0.55rem;
}
.section-head p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.logo-mark svg { width: 14px; height: 14px; }
.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  justify-content: center;
}
.nav a {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: var(--ink-3);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.mobile-toggle { display: none; }
.nav-mobile {
  display: none;
  position: absolute;
  inset: var(--header-h) 0 auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0 1rem;
  box-shadow: var(--shadow-md);
}
.nav-mobile.open { display: block !important; }
.nav-mobile .container {
  display: grid;
  gap: 0.2rem;
}
.nav-mobile a {
  padding: 0.75rem 0.25rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child { border-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--btn-h);
  padding: 0 0.95rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    color var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { --btn-h: 34px; padding: 0 0.75rem; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { --btn-h: 48px; padding: 0 1.25rem; font-size: 0.95rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: var(--shadow-sm);
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--line-focus);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--ink); }
.btn-soft {
  background: var(--bg-subtle);
  color: var(--ink);
}
.btn-soft:hover { background: var(--bg-muted); }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--ink);
}
.icon-btn.active { color: var(--danger); background: var(--danger-bg); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 0.95rem; }
.form-group label,
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.form-control,
.input,
.select,
textarea.form-control {
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  appearance: none;
}
textarea.form-control { min-height: 112px; resize: vertical; line-height: 1.5; }
.form-control::placeholder { color: var(--ink-4); }
.form-control:hover { border-color: var(--line-focus); }
.form-control:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 11, 0.08);
}
[data-theme="dark"] .form-control:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap .form-control { padding-right: 2.2rem; }

.checkbox-row,
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.checkbox-row:last-child,
.radio-row:last-child { border-bottom: 0; }
.checkbox-row input,
.radio-row input,
.package-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check-ui,
.radio-ui {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: all var(--dur) var(--ease);
}
.check-ui { border-radius: 5px; }
.radio-ui { border-radius: 50%; }
.checkbox-row input:checked + .check-ui,
.package-option input:checked ~ .package-option-body .radio-ui,
.radio-row input:checked + .radio-ui {
  background: var(--accent);
  border-color: var(--accent);
}
.check-ui::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent-fg);
  border-bottom: 2px solid var(--accent-fg);
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform var(--dur) var(--ease);
}
.checkbox-row input:checked + .check-ui::after { transform: rotate(-45deg) translateY(-1px) scale(1); }
.radio-ui::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-fg);
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
}
.package-option input:checked ~ .package-option-body .radio-ui::after,
.radio-row input:checked + .radio-ui::after { transform: scale(1); }

/* ---------- Badges / Alerts / Toast ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.5rem;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--bg-subtle);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge-accent { background: var(--ink); color: var(--bg); border-color: transparent; }
.alert {
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  font-size: 0.92rem;
}
.alert-success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.alert-info { background: var(--info-bg); color: var(--ink-2); }

.toast-stack {
  position: fixed;
  top: calc(var(--header-h) + 0.75rem);
  right: 0.75rem;
  z-index: 120;
  display: grid;
  gap: 0.5rem;
  width: min(360px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  animation: toast-in 240ms var(--ease-out);
}
.toast-success { border-color: rgba(13, 122, 95, 0.25); }
.toast-error { border-color: rgba(194, 59, 59, 0.25); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 4.5rem 0 3.25rem;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(10, 10, 11, 0.035), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(10, 10, 11, 0.03), transparent 50%),
    linear-gradient(180deg, var(--bg-muted) 0%, var(--bg) 72%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 75%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
}
.hero-copy { max-width: 720px; }
.brand-signal {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
  margin: 0 0 1.1rem;
  color: var(--ink);
}
.hero h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  max-width: 20ch;
  margin-bottom: 0.85rem;
  color: var(--ink-2);
}
.hero-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 48ch;
  margin-bottom: 1.5rem;
  color: var(--ink-3);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* ---------- Cards ---------- */
.product-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
  padding: 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-ring);
  transition:
    transform var(--dur-slow) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
  overflow: hidden;
}
a.product-card { color: inherit; }
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.product-card-media {
  height: 120px;
  border-radius: var(--r-md);
  background:
    linear-gradient(145deg, var(--bg-subtle), var(--bg-muted)),
    radial-gradient(circle at 80% 20%, rgba(10,10,11,0.06), transparent 45%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}
.product-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.product-card h3 {
  font-size: 1.2rem;
  margin: 0;
}
.product-card p {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.55;
}
.product-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.old-price {
  color: var(--ink-4);
  text-decoration: line-through;
  font-size: 0.88rem;
}

.surface-card,
.feature-item,
.step-item,
.stat-item,
.review-card,
.info-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  padding: 1.2rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.feature-item:hover,
.step-item:hover,
.review-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.feature-item h3,
.step-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.feature-item p,
.step-item p { margin: 0; font-size: 0.92rem; }
.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  color: var(--ink-2);
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--ink);
  color: var(--bg);
  margin-bottom: 0.95rem;
}
.stat-item {
  text-align: left;
  padding: 1.15rem 1.2rem;
}
.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.2rem;
}
.stat-item span {
  color: var(--ink-3);
  font-size: 0.88rem;
}
.stars {
  color: #ca8a04;
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}
.review-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
.review-card .author {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
}
.review-card .role {
  color: var(--ink-4);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.55rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  transition: background var(--dur) var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--surface-hover); }
.faq-item summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p {
  margin: 0;
  padding: 0 1.1rem 1.05rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- CTA / Footer ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 1.85rem;
  border-radius: var(--r-xl);
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 65%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: inherit; margin: 0 0 0.35rem; font-size: 1.45rem; }
.cta-band p { color: rgba(255,255,255,0.68); margin: 0; max-width: 42ch; }
.cta-band .btn-primary {
  background: #fff;
  color: #0a0a0b;
}
[data-theme="dark"] .cta-band {
  background: #fafafa;
  color: #09090b;
}
[data-theme="dark"] .cta-band p { color: rgba(0,0,0,0.55); }
[data-theme="dark"] .cta-band .btn-primary {
  background: #09090b;
  color: #fafafa;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg-muted);
  padding: 3.25rem 0 1.75rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.65rem;
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 0.85rem;
}
.footer-col a {
  display: block;
  color: var(--ink-2);
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover { color: var(--ink); }
.footer-newsletter {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.footer-newsletter .form-control { min-height: 40px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--ink-4);
  font-size: 0.85rem;
}
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Breadcrumbs / Product ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-4);
  font-size: 0.85rem;
  margin: 1.35rem 0 1.5rem;
}
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { opacity: 0.5; }
.breadcrumbs .current { color: var(--ink-2); }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1.75rem;
  align-items: start;
  padding-bottom: 3.5rem;
}
.gallery {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-muted);
  box-shadow: var(--shadow-xs);
}
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-placeholder {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-4);
  background:
    linear-gradient(145deg, var(--bg-subtle), var(--bg-muted));
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.product-section { margin: 2rem 0; }
.product-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}
.prose {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.7;
}
.prose p:last-child { margin-bottom: 0; }
.prose h2, .prose h3 { margin-top: 1.2rem; }

.configurator {
  position: sticky;
  top: calc(var(--header-h) + 0.85rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
}
.configurator-title {
  font-size: 1.45rem;
  margin: 0.55rem 0 0.45rem;
}
.config-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 1.15rem 0 0.55rem;
}
.package-option {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.9rem 0.95rem;
  margin-bottom: 0.55rem;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.package-option:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}
.package-option.active,
.package-option:has(input:checked) {
  border-color: var(--ink);
  background: var(--accent-soft);
  box-shadow: var(--shadow-xs);
}
.package-option-body {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.7rem;
  align-items: start;
}
.package-option strong { font-size: 0.95rem; }
.package-option .pkg-desc {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.live-price {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  margin: 1.1rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.live-price-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}
.live-price-sum > span {
  color: var(--ink-4);
  font-size: 0.82rem;
  font-weight: 600;
}
.live-price strong,
.live-price [data-live-price] {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--ink);
  margin: 0;
}
.live-meta {
  text-align: left;
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.55;
  word-break: break-word;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 10, 11, 0.42);
  backdrop-filter: blur(6px);
}
.modal.open { display: flex; animation: fade-in 160ms var(--ease); }
.modal-dialog {
  width: min(100%, 480px);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  animation: rise-in 220ms var(--ease-out);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.modal-head h2 { margin: 0; font-size: 1.15rem; }

/* ---------- Account / Auth ---------- */
.auth-card,
.content-card {
  width: min(100%, 440px);
  margin: 2.75rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.6rem;
  box-shadow: var(--shadow-md);
}
.content-card { width: min(100%, 800px); }
.auth-card h1,
.content-card h1 { font-size: 1.45rem; }
.account-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.75rem 0 3.5rem;
}
.account-nav {
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 0.85rem);
  padding: 0.55rem;
}
.account-nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  color: var(--ink-3);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.account-nav a:hover,
.account-nav a.active {
  background: var(--accent-soft);
  color: var(--ink);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 0.8rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  vertical-align: top;
}
th {
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-muted);
}
tr:last-child td { border-bottom: 0; }
.status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--ink-2);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

/* ---------- Cookie / Scroll ---------- */
.cookie-notice {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 90;
  width: min(680px, calc(100% - 1.5rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 0.95rem 1rem;
  display: none;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.cookie-notice.show {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cookie-notice p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.scroll-top.show { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-2px); }

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Empty / Utility ---------- */
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--bg-muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .product-cards,
  .grid-3,
  .grid-4,
  .product-layout,
  .footer-grid,
  .account-layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .configurator,
  .account-nav { position: static; }
  .nav { display: none; }
  .mobile-toggle { display: inline-grid; }
  .hero { padding: 3rem 0 2.25rem; }
  .section { padding: 3.5rem 0; }
  .cookie-notice { flex-direction: column; align-items: stretch; text-align: left; }
  .pages-contacts .content-card,
  .grid-3 > .content-card { grid-column: auto; }
}
@media (max-width: 640px) {
  .product-cards { grid-template-columns: 1fr; }
  .header-actions .btn-secondary { display: none; }
  .brand-signal { font-size: clamp(2.1rem, 11vw, 3rem); }
  .footer-newsletter { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
