/* ── Shared ── */
:root {
  --accent: #ff6b2c;
  --accent-hover: #ff8552;
  --accent-2: #0ea5e9;
  --accent-3: #10b981;
  --accent-soft: rgba(255, 107, 44, 0.12);
  --success: #10b981;
  --error: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --font: "Manrope", system-ui, sans-serif;
  --container: min(1120px, 100% - 2rem);
  --header-bg: rgba(255, 255, 255, 0.82);
  --hero-overlay: linear-gradient(135deg, rgba(255, 248, 240, 0.94) 0%, rgba(255, 248, 240, 0.78) 50%, rgba(240, 249, 255, 0.88) 100%);
  --hero-gradient: radial-gradient(ellipse 80% 60% at 90% 20%, rgba(255, 107, 44, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(14, 165, 233, 0.15), transparent);
  --btn-primary-text: #fff;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.14);
}

/* ── Light theme (default) ── */
html,
html[data-theme="light"] {
  --bg: #fff8f0;
  --bg-alt: #f0f9ff;
  --surface: #ffffff;
  --surface-hover: #fff5eb;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: rgba(15, 23, 42, 0.1);
  --input-bg: #f8fafc;
  color-scheme: light;
}

/* ── Dark theme ── */
html[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --input-bg: #0f172a;
  --header-bg: rgba(15, 23, 42, 0.88);
  --hero-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.82) 50%, rgba(30, 41, 59, 0.9) 100%);
  --hero-gradient: radial-gradient(ellipse 80% 60% at 90% 20%, rgba(255, 107, 44, 0.22), transparent),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(14, 165, 233, 0.18), transparent);
  --btn-primary-text: #fff;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --input-bg: #0f172a;
    --header-bg: rgba(15, 23, 42, 0.88);
    --hero-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.82) 50%, rgba(30, 41, 59, 0.9) 100%);
    --hero-gradient: radial-gradient(ellipse 80% 60% at 90% 20%, rgba(255, 107, 44, 0.22), transparent),
      radial-gradient(ellipse 60% 50% at 10% 80%, rgba(14, 165, 233, 0.18), transparent);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background 0.3s, color 0.3s;
  position: relative;
  overflow-x: clip;
}

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 15%, transparent));
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.offline-banner p {
  margin: 0;
  text-align: center;
}

.offline-banner__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.offline-banner__close:hover {
  color: var(--text);
}

/* ── Offline splash ── */
.offline-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.offline-screen[hidden] {
  display: none !important;
}

.offline-screen.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.offline-screen__backdrop {
  position: absolute;
  inset: 0;
  background:
    var(--hero-gradient),
    color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}

.offline-screen__decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.offline-screen__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.offline-screen__ring--1 {
  width: min(72vw, 420px);
  height: min(72vw, 420px);
  top: 12%;
  right: -12%;
  animation: offline-float 9s ease-in-out infinite;
}

.offline-screen__ring--2 {
  width: min(56vw, 320px);
  height: min(56vw, 320px);
  bottom: 8%;
  left: -10%;
  border-color: color-mix(in srgb, var(--accent-2) 24%, transparent);
  animation: offline-float 11s ease-in-out infinite reverse;
}

.offline-screen__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent-soft) 70%, transparent));
  clip-path: ellipse(120% 100% at 50% 100%);
}

.offline-screen__card {
  position: relative;
  width: min(100%, 26rem);
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  animation: offline-card-in 0.45s ease both;
}

.offline-screen__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.offline-screen__icon svg {
  width: 2.75rem;
  height: 2.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offline-screen__wifi {
  opacity: 0.95;
}

.offline-screen__wifi--1 {
  animation: offline-pulse 2.4s ease-in-out infinite;
}

.offline-screen__wifi--2 {
  animation: offline-pulse 2.4s ease-in-out 0.2s infinite;
}

.offline-screen__wifi--3 {
  fill: currentColor;
  stroke: none;
  animation: offline-pulse 2.4s ease-in-out 0.4s infinite;
}

.offline-screen__slash {
  stroke: var(--error);
  stroke-width: 3.5;
}

.offline-screen__brand {
  margin: 0 0 0.35rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}

.offline-screen__brand span {
  color: var(--accent);
}

.offline-screen__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 4.5vw, 1.5rem);
  line-height: 1.2;
}

.offline-screen__desc {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.offline-screen__phones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.offline-screen__phones a {
  color: var(--text);
}

.offline-screen__phones a:hover {
  color: var(--accent);
}

.offline-screen__retry {
  min-width: 9rem;
}

.offline-screen__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.offline-screen__continue {
  width: 100%;
}

.offline-mode-badge {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 550;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.offline-mode-badge[hidden] {
  display: none !important;
}

.offline-mode-badge__retry {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
  cursor: pointer;
}

.offline-mode-badge__retry:hover {
  border-color: var(--accent);
}

body.has-offline-badge .chat-widget {
  bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
}

html.is-offline,
body.is-offline {
  overflow: hidden;
}

@keyframes offline-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.03);
  }
}

@keyframes offline-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes offline-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .offline-screen,
  .offline-screen__card,
  .offline-screen__ring,
  .offline-screen__wifi--1,
  .offline-screen__wifi--2,
  .offline-screen__wifi--3 {
    animation: none !important;
    transition: none !important;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent) 9%, transparent) 0%, transparent 42%),
    radial-gradient(circle at 6% 88%, color-mix(in srgb, var(--accent-2) 10%, transparent) 0%, transparent 38%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent-3) 4%, transparent) 0%, transparent 55%);
}

main {
  position: relative;
  z-index: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  min-width: 0;
}

.logo span span {
  color: var(--accent);
}

.logo__image {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.logo__brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
  min-width: 0;
}

.logo__tagline {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  max-width: 14rem;
  line-height: 1.25;
}

.header__contact-block {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}

.header__hours {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.header__phone--main {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav a:hover {
  color: var(--accent);
}

.header__phone {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  font-size: 0.9375rem;
}

.header__phone:hover {
  color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.theme-toggle__sun {
  display: none;
}

.theme-toggle__moon {
  display: block;
}

html[data-theme="dark"] .theme-toggle__sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

.theme-toggle--mobile {
  width: 100%;
  height: auto;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  justify-content: space-between;
  gap: 1rem;
}

.theme-toggle__label {
  font-weight: 500;
  color: var(--text);
}

.theme-toggle__state {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.mobile-menu a {
  color: var(--text);
  font-weight: 500;
}

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-menu.is-open {
  display: flex;
  max-height: min(70dvh, calc(100dvh - 4rem));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 3rem 0 5rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay), var(--hero-gradient);
  z-index: 0;
}

.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 84% 24%,
      transparent 0 58px,
      color-mix(in srgb, var(--accent) 18%, transparent) 58px 62px,
      transparent 62px
    ),
    radial-gradient(
      circle at 84% 24%,
      color-mix(in srgb, var(--accent) 7%, transparent) 0%,
      transparent 68%
    ),
    radial-gradient(circle at 14% 72%, color-mix(in srgb, var(--accent-2) 12%, transparent) 0%, transparent 48%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  top: 14%;
  left: 4%;
  width: 3.5rem;
  height: 3.5rem;
  border: 2px solid color-mix(in srgb, var(--accent-2) 24%, transparent);
  border-radius: 10px;
  transform: rotate(-16deg);
  --deco-rot: -16deg;
}

.hero::after {
  top: 22%;
  right: 18%;
  width: 0;
  height: 0;
  border-left: 1.35rem solid transparent;
  border-right: 1.35rem solid transparent;
  border-bottom: 2.35rem solid color-mix(in srgb, var(--accent) 14%, transparent);
  transform: rotate(8deg);
  --deco-rot: 8deg;
}

.hero__bg::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, var(--bg), transparent);
}

.hero__layout {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin-inline: auto;
}

.hero__content {
  min-width: 0;
  text-align: center;
}

.hero__content .hero__lead {
  margin-inline: auto;
}

.hero__content .hero__actions {
  justify-content: center;
}

.hero__content .hero__stats {
  justify-content: center;
}

/* Вёрстка hero не зависит от сеток тем оформления */
html[data-design] .hero__layout {
  display: block !important;
  grid-template-columns: unset !important;
  max-width: 56rem;
  margin-inline: auto;
}

html[data-design] .hero__layout .hero__content {
  order: 0 !important;
  max-width: none !important;
  width: 100%;
  text-align: center;
}

html[data-design] .hero__layout .hero__actions {
  justify-content: center;
}

html[data-design] .hero__layout .hero__stats {
  justify-content: center;
}

.hero__badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 44, 0.35);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .hero h1 {
  background: linear-gradient(135deg, #1e293b 50%, #ff6b2c 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero__lead {
  max-width: 32rem;
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__stats li {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__stats strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.hero__stats span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero__cta-thumb--emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero__visual {
  position: relative;
  min-height: 380px;
}

.hero__photo {
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--surface);
}

.hero__photo--main {
  width: 100%;
  max-height: 420px;
  aspect-ratio: 4/3;
}

.hero__photo--sub {
  position: absolute;
  bottom: -1rem;
  left: -1.5rem;
  width: 45%;
  max-width: 200px;
  border-color: var(--accent);
  border-width: 3px;
  transform: rotate(-4deg);
}

/* Доп. элементы hero — включаются по дизайну в hero-layouts.css / designs.css */
.hero__eyebrow,
.hero__perks,
.hero__rings,
.hero__wave,
.hero__float,
.hero__pedestal,
.hero__frame,
.hero__img,
.hero__cta-thumb,
.hero__cta-arrow,
.logo__tagline,
.header__contact-block,
.header__phone--main,
.hero__photo--sub {
  display: none;
}

html[data-design="classic"] .hero__img--classic,
html[data-design="classic"] .hero__photo--sub {
  display: block;
}

html[data-design="showcase"] .header__phone--compact {
  display: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 20px rgba(255, 107, 44, 0.4);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #ffa060);
  color: var(--btn-primary-text);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 44, 0.45);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent-2);
}

.btn--ghost:hover {
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent-2);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
}

/* ── Sections ── */
.section {
  position: relative;
  isolation: isolate;
  padding: 5rem 0;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section::before,
.section::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.section::before {
  top: 10%;
  right: 5%;
  width: 4.5rem;
  height: 4.5rem;
  border: 2px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 50%;
}

.section::after {
  bottom: 12%;
  left: 4%;
  width: 3rem;
  height: 3rem;
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  border-radius: 8px;
  transform: rotate(22deg);
  --deco-rot: 22deg;
}

#categories::before {
  top: 16%;
  left: 6%;
  right: auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  transform: rotate(-12deg);
  --deco-rot: -12deg;
}

#categories::after {
  bottom: 18%;
  right: 8%;
  left: auto;
  width: 0;
  height: 0;
  background: none;
  border-left: 1.1rem solid transparent;
  border-right: 1.1rem solid transparent;
  border-bottom: 1.9rem solid color-mix(in srgb, var(--accent) 12%, transparent);
  transform: rotate(-6deg);
  --deco-rot: -6deg;
}

#gallery::before {
  top: 8%;
  right: 10%;
  width: 5rem;
  height: 5rem;
  border-width: 2px;
  background: transparent;
}

#gallery::after {
  bottom: 10%;
  left: 8%;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid color-mix(in srgb, var(--accent-3) 22%, transparent);
  background: transparent;
  border-radius: 50%;
}

#advantages::before {
  top: 12%;
  right: 7%;
  width: 3.75rem;
  height: 3.75rem;
  border: none;
  border-radius: 0;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

#advantages::after {
  bottom: 14%;
  left: 5%;
  width: 4rem;
  height: 4rem;
  border: 2px solid color-mix(in srgb, var(--accent-2) 18%, transparent);
  background: transparent;
  border-radius: 50%;
}

#request::before {
  top: 18%;
  left: 7%;
  right: auto;
  width: 3rem;
  height: 3rem;
  border-radius: 4px;
  transform: rotate(45deg);
  background: color-mix(in srgb, var(--accent-2) 9%, transparent);
  border: 2px solid color-mix(in srgb, var(--accent-2) 16%, transparent);
  --deco-rot: 45deg;
}

#request::after {
  bottom: 16%;
  right: 6%;
  left: auto;
  width: 0;
  height: 0;
  background: none;
  border-top: 1.5rem solid color-mix(in srgb, var(--accent) 13%, transparent);
  border-left: 1rem solid transparent;
  border-right: 1rem solid transparent;
  transform: none;
}

#contacts::before {
  top: 14%;
  right: 9%;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-3) 12%, transparent);
  border: none;
}

#contacts::after {
  bottom: 20%;
  left: 6%;
  width: 3.5rem;
  height: 3.5rem;
  border: 2px solid color-mix(in srgb, var(--accent) 15%, transparent);
  background: transparent;
  border-radius: 6px;
  transform: rotate(-18deg);
  --deco-rot: -18deg;
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before,
  .section::before,
  .section::after {
    animation: bg-deco-float 16s ease-in-out infinite;
  }

  .hero::after,
  #categories::after,
  #request::after {
    animation: bg-deco-float 18s ease-in-out infinite reverse;
  }
}

@keyframes bg-deco-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(var(--deco-rot, 0deg));
  }

  50% {
    transform: translate3d(0, -8px, 0) rotate(calc(var(--deco-rot, 0deg) + 5deg));
  }
}

.section--alt {
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

.section--gallery {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg-alt) 85%, transparent) 0%,
    color-mix(in srgb, var(--bg) 90%, transparent) 100%
  );
}

.section__head {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.section__head--center {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.section__head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section__head h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: 0.75rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

.section__head--center h2::after {
  margin-inline: auto;
}

.section__head p {
  margin: 0;
  color: var(--text-muted);
}

/* ── Categories ── */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.category-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 44, 0.35);
}

.category-card--static {
  cursor: default;
}

.category-card--static:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.category-card--static:hover .category-card__img img,
.category-card--static:hover .category-card__img .category-card__photo,
.category-card--static:hover .category-card__img .category-card__svg {
  transform: none;
}

.category-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  line-height: 0;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg-alt));
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card__img img,
.category-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 0.35rem;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s;
}

.category-card__svg {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  transition: transform 0.4s;
}

.category-card:hover .category-card__img img,
.category-card:hover .category-card__img .category-card__photo,
.category-card:hover .category-card__img .category-card__svg {
  transform: scale(1.04);
}

/* Карточки каталога всегда видны (без ожидания scroll-анимации) */
html.motion-ready .category-card.motion-el {
  opacity: 1;
  transform: none;
}

.category-card__body {
  padding: 1.25rem;
}

.category-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.category-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Store gallery (carousel) ── */
.store-gallery {
  max-width: 960px;
  margin-inline: auto;
  outline: none;
}

.store-gallery:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.store-gallery__stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.store-gallery__btn {
  align-self: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
}

.store-gallery__btn:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
}

.store-gallery__btn:active {
  transform: scale(0.96);
}

.store-gallery__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.store-gallery__viewport {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--surface);
  box-shadow: var(--shadow);
  line-height: 0;
}

.store-gallery__viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.store-gallery__slides {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: min(70vh, 540px);
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 4%, transparent);
}

.store-gallery__slides.is-animating {
  pointer-events: none;
}

.store-gallery__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.store-gallery__slide.is-active {
  opacity: 1;
  z-index: 1;
  transform: translateX(0);
}

.store-gallery__slide.is-enter-next {
  z-index: 2;
  animation: store-gallery-in-next 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.store-gallery__slide.is-exit-next {
  z-index: 1;
  animation: store-gallery-out-next 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.store-gallery__slide.is-enter-prev {
  z-index: 2;
  animation: store-gallery-in-prev 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.store-gallery__slide.is-exit-prev {
  z-index: 1;
  animation: store-gallery-out-prev 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes store-gallery-in-next {
  from {
    opacity: 0;
    transform: translateX(14%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes store-gallery-out-next {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-14%);
  }
}

@keyframes store-gallery-in-prev {
  from {
    opacity: 0;
    transform: translateX(-14%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes store-gallery-out-prev {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(14%);
  }
}

.store-gallery__counter {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.store-gallery__counter.is-tick {
  animation: store-gallery-counter 0.35s ease;
}

@keyframes store-gallery-counter {
  0% {
    opacity: 0.55;
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-gallery__slide,
  .lightbox__slide {
    animation: none !important;
    transition: none !important;
  }

  .store-gallery__counter.is-tick {
    animation: none;
  }
}

.store-gallery__thumbs-wrap {
  margin-top: 0.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  padding: 0.5rem;
  border: 1px solid var(--border);
}

.store-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.15rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.store-gallery__thumb {
  flex: 0 0 auto;
  width: 4.25rem;
  height: 2.85rem;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  opacity: 0.82;
  transition:
    opacity 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.store-gallery__thumb:hover {
  opacity: 1;
}

.store-gallery__thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.store-gallery__thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.store-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .store-gallery__btn {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.25rem;
  }

  .store-gallery__viewport img {
    max-height: min(52vh, 360px);
  }

  .store-gallery__thumb {
    width: 3.75rem;
    height: 2.5rem;
  }
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__frame {
  margin: 0;
  width: min(960px, 100%);
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  flex: 0 1 auto;
}

.lightbox__slides {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 8rem);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-inline: auto;
}

.lightbox__slides.is-animating {
  pointer-events: none;
}

.lightbox__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.lightbox__slide.is-active {
  opacity: 1;
  z-index: 1;
  transform: translateX(0);
}

.lightbox__slide.is-enter-next {
  z-index: 2;
  animation: store-gallery-in-next 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lightbox__slide.is-exit-next {
  z-index: 1;
  animation: store-gallery-out-next 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lightbox__slide.is-enter-prev {
  z-index: 2;
  animation: store-gallery-in-prev 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lightbox__slide.is-exit-prev {
  z-index: 1;
  animation: store-gallery-out-prev 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.lightbox__caption {
  margin-top: 0.75rem;
  text-align: center;
  color: #fff;
  font-size: 0.9375rem;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.75rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  line-height: 1;
}

.lightbox__nav--prev {
  left: 1rem;
}

.lightbox__nav--next {
  right: 1rem;
}

/* ── Advantages ── */
.advantages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.advantage {
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.advantage:hover {
  transform: translateY(-3px);
}

.advantage__img {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.advantage__img img,
.advantage__svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.advantage__svg {
  vertical-align: top;
}

.advantage__num,
.advantage h3,
.advantage p {
  padding-inline: 1.25rem;
}

.advantage__num {
  display: block;
  padding-top: 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-2);
  letter-spacing: 0.1em;
}

.advantage h3 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.0625rem;
}

.advantage p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Request ── */
.request-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.request-info h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
}

.request-info > p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.request-info__list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.request-info__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.request-info__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-3);
  font-weight: 700;
}

.form {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form__group {
  margin-bottom: 1.25rem;
}

.form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.form label span {
  color: var(--error);
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.2);
}

.form input.is-invalid,
.form textarea.is-invalid {
  border-color: var(--error);
}

.form__error {
  display: block;
  min-height: 1.25rem;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--error);
}

.form__note {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Contacts ── */
.contacts-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: stretch;
}

.contacts-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.contact-item p {
  margin: 0;
  color: var(--text);
}

.contact-item a {
  color: var(--text);
  font-weight: 600;
}

.contact-item a:hover {
  color: var(--accent);
}

.map-wrap {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-wrap__iframe {
  flex: 1;
  min-height: 320px;
  position: relative;
}

.map-wrap iframe {
  border: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.map-wrap__address {
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  background: linear-gradient(to top, var(--surface), color-mix(in srgb, var(--bg-alt) 88%, var(--surface)));
  border-top: 1px solid var(--border);
}

.map-wrap__address strong {
  font-weight: 700;
  color: var(--text-muted);
}

/* ── Footer ── */
.footer {
  position: relative;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.footer__brand {
  margin: 0;
  font-weight: 600;
}

.footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__credit {
  flex-basis: 100%;
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
  text-align: center;
}

.footer__credit a {
  color: inherit;
  text-decoration: none;
}

.footer__credit a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.scroll-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 500;
  pointer-events: none;
  background: color-mix(in srgb, var(--border) 60%, transparent);
}

.scroll-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.08s linear;
}

.footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.footer__catalog {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--btn-primary-text, #fff);
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  border-radius: 999px;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.footer__catalog:hover {
  color: var(--btn-primary-text, #fff);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 45%, transparent);
}

.footer__top {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-family: inherit;
  cursor: pointer;
}

.footer__top:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.footer__admin {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer__admin-btn {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.footer__admin-btn:hover {
  color: var(--accent);
}

/* ── Promo banners ── */
.promo-banners {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.catalog-intro {
  padding: 1.25rem 0 0.25rem;
}

.catalog-intro__text {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}

.catalog-intro__text a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.catalog-intro__text a:hover {
  text-decoration: underline;
}

/* Единые размеры баннеров:
   - слайдер (перелистываемые) одного размера между собой
   - боковой баннер ("доставка") меньше по высоте */
:root {
  --promo-slider-h: clamp(340px, 30vw, 420px);
  --promo-side-h: clamp(200px, 18vw, 260px);
}

.promo-banners__grid {
  display: block;
  max-width: 100%;
}

.promo-banners__main,
.promo-banners__aside {
  min-width: 0;
}

.promo-slider {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  height: var(--promo-slider-h);
}

.promo-slider__track {
  position: relative;
  flex: 1;
  min-height: 0;
  z-index: 1;
}

.promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  background: var(--slide-bg, #fce7f3);
  color: var(--slide-color, #1e293b);
  z-index: 1;
  overflow: hidden;
}

.promo-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  position: absolute;
}

.promo-slide__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 0 !important;
  background: var(--slide-bg);
  overflow: hidden;
}

.promo-slide__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--slide-bg) 94%, transparent) 0%,
    color-mix(in srgb, var(--slide-bg) 78%, transparent) 42%,
    color-mix(in srgb, var(--slide-bg) 28%, transparent) 62%,
    transparent 100%
  );
}

.promo-slide__media .promo-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

.promo-slide__panel {
  position: relative;
  z-index: 2;
  max-width: min(56%, 32rem);
  height: 100%;
  padding: 1.75rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  box-sizing: border-box;
}

.promo-slide__badge {
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.promo-slide__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  line-height: 1.25;
}

.promo-slide__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  opacity: 0.9;
}

.promo-slide__btn {
  display: inline-flex;
  margin-top: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  width: fit-content;
  flex-shrink: 0;
}

.promo-slider__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.promo-slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, background 0.2s;
}

.promo-slider__arrow:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.promo-slider__arrow-icon {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
}

.promo-slider__arrow--prev .promo-slider__arrow-icon {
  transform: rotate(135deg);
  margin-left: 0.15rem;
}

.promo-slider__arrow--next .promo-slider__arrow-icon {
  transform: rotate(-45deg);
  margin-right: 0.15rem;
}

.promo-slider__dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.promo-slider__dot {
  width: 0.5rem;
  height: 0.5rem;
  border: none;
  border-radius: 999px;
  background: var(--text-muted);
  cursor: pointer;
  padding: 0;
  opacity: 0.45;
  transition: opacity 0.2s, width 0.2s, background 0.2s;
}

.promo-slider__dot:hover {
  opacity: 0.75;
}

.promo-slider__dot.is-active {
  width: 1.25rem;
  opacity: 1;
  background: var(--accent);
}

.promo-side {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  height: var(--promo-side-h);
  min-height: 0;
  padding: 1.25rem 1rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--side-color, #fff);
  background: var(--side-bg, #22c55e);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s;
}

.promo-side:hover {
  transform: translateY(-2px);
}

.promo-side__content {
  min-width: 0;
}

.promo-side__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
}

.promo-side__text {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0.95;
}

.promo-side__cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

.promo-side__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.promo-side__img {
  width: auto;
  height: auto;
  max-width: 88px;
  max-height: calc(var(--promo-side-h) - 2.5rem);
  border-radius: 12px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 1;
  background: rgba(255, 255, 255, 0.15);
}

.promo-side__deco {
  font-size: 2.5rem;
  line-height: 1;
  opacity: 0.9;
}

@media (max-width: 640px) {
  .promo-slide__panel {
    max-width: 100%;
    justify-content: flex-end;
    padding: 1rem 1rem 0.85rem;
  }

  .promo-slide__media::after {
    background: linear-gradient(
      180deg,
      transparent 0%,
      color-mix(in srgb, var(--slide-bg) 22%, transparent) 38%,
      color-mix(in srgb, var(--slide-bg) 88%, transparent) 72%,
      color-mix(in srgb, var(--slide-bg) 96%, transparent) 100%
    );
  }
}

/* ── Reviews (Ozon-style) ── */
.reviews-section {
  background: var(--bg);
}

.reviews-section__head h2 {
  margin-bottom: 1.5rem;
}

.reviews-ozon {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.reviews-summary {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 5rem;
}

.reviews-summary__score-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.reviews-summary__score {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
}

.reviews-summary__stars {
  display: flex;
  gap: 0.1rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.reviews-summary__star {
  font-size: 1.125rem;
  line-height: 1;
}

.reviews-summary__star--full,
.reviews-summary__star--half {
  color: #ffa800;
}

.reviews-summary__star--empty {
  color: #d1d5db;
}

.reviews-summary__count {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.reviews-summary__bars {
  display: grid;
  gap: 0.45rem;
}

.reviews-summary__bar-row {
  display: grid;
  grid-template-columns: 1rem 1rem 1fr 1.75rem;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
}

.reviews-summary__bar-label {
  text-align: right;
  color: var(--text-muted);
  font-weight: 600;
}

.reviews-summary__bar-star {
  color: #ffa800;
  font-size: 0.75rem;
}

.reviews-summary__bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  overflow: hidden;
}

.reviews-summary__bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #ffa800;
  min-width: 0;
}

.reviews-summary__bar-count {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.reviews-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.reviews__empty {
  margin: 0;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.review-ozon {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.review-ozon:last-child {
  border-bottom: none;
}

.review-ozon__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.45rem;
}

.review-ozon__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.review-ozon__date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.review-ozon__stars {
  display: inline-block;
  line-height: 0;
  margin-bottom: 0.55rem;
}

.review-ozon__stars-svg {
  display: block;
  height: 0.875rem;
  width: auto;
}

.review-ozon__stars-svg__empty {
  fill: #d1d5db;
}

.review-ozon__stars-svg__full {
  fill: #ffa800;
}

.review-ozon__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.reviews-form-wrap {
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

@media (max-width: 900px) {
  .reviews-ozon {
    grid-template-columns: 1fr;
  }

  .reviews-summary {
    position: static;
  }

  .reviews-form-wrap {
    order: -1;
  }
}

.reviews-form__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--accent-2) 8%, var(--surface)));
  border-bottom: 1px solid var(--border);
}

.reviews-form__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  box-shadow: 0 6px 16px rgba(255, 107, 44, 0.35);
}

.reviews-form__title {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.reviews-form__lead {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.reviews-form {
  padding: 1.25rem 1.35rem 1.35rem;
}

.reviews-form > .reviews-form__error {
  margin: 0 0 1rem;
}

.review-rating-group .form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.review-rating-value {
  margin: 0 0 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.review-stars-input {
  display: inline-block;
  margin-bottom: 0.35rem;
}

.review-stars-input:focus-within {
  outline: none;
}

.review-stars-input__body {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.review-stars-input__svg {
  display: block;
  width: auto;
  height: 1.875rem;
}

.review-stars-input__star-empty,
.review-card__stars-svg__empty {
  fill: color-mix(in srgb, var(--text-muted) 45%, transparent);
}

.review-stars-input__star-full,
.review-card__stars-svg__full {
  fill: #f59e0b;
}

.review-stars-input__hits {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: stretch;
}

.review-stars-input__hit {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
}

.review-stars-input__hit:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.review-stars-input__hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 1;
}

.reviews-form .form__group input,
.reviews-form .form__group textarea {
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reviews-form .form__group input:focus,
.reviews-form .form__group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.reviews-form__note {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: 8px;
  line-height: 1.45;
}

.reviews-form__error {
  min-height: 1.1rem;
}

#reviews[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .review-card {
    animation: none;
  }

  .review-card:hover {
    transform: none;
  }
}

/* ── Cookie consent ── */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  box-sizing: border-box;
  z-index: 500;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
  pointer-events: none;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner__inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.cookie-banner__text {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.cookie-banner__text strong {
  color: var(--text);
  font-weight: 700;
}

.cookie-banner__text-short,
.cookie-banner__accept-short {
  display: none;
}

.cookie-banner__actions {
  flex-shrink: 0;
}

.cookie-banner__accept {
  white-space: nowrap;
  padding-inline: 1.25rem;
}

html.cookie-banner-open .chat-widget,
body.cookie-banner-open .chat-widget {
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
}

@media (max-width: 640px) {
  .cookie-banner {
    padding: 0.5rem 0.65rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      180deg,
      transparent 0%,
      color-mix(in srgb, var(--bg) 55%, transparent) 35%,
      color-mix(in srgb, var(--bg) 88%, transparent) 100%
    );
    border-top: none;
    box-shadow: none;
    backdrop-filter: none;
  }

  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem 0.65rem;
    max-width: none;
    margin: 0;
    padding: 0.5rem 0.55rem 0.5rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow:
      0 10px 32px rgba(15, 23, 42, 0.16),
      0 2px 8px rgba(15, 23, 42, 0.08);
  }

  .cookie-banner__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--text);
  }

  .cookie-banner__text-full,
  .cookie-banner__accept-full {
    display: none;
  }

  .cookie-banner__text-short,
  .cookie-banner__accept-short {
    display: inline;
  }

  .cookie-banner__accept {
    width: auto;
    min-width: 2.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.2;
    border-radius: 10px;
  }

  html.cookie-banner-open .chat-widget,
  body.cookie-banner-open .chat-widget {
    bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Admin modal ── */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-modal[hidden] {
  display: none !important;
}

.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.admin-modal__box {
  position: relative;
  width: min(400px, 100%);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.admin-modal__box h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.admin-modal__hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.admin-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.admin-form {
  display: grid;
  gap: 0.75rem;
}

.admin-form__field span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.admin-form__field input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.admin-form__error {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.875rem;
  color: var(--error);
}

body.admin-modal-open {
  overflow: hidden;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 1rem 1.5rem;
  max-width: 90vw;
  background: var(--surface);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
  color: var(--text);
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast[hidden] {
  display: block;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root {
    --container: min(1120px, 100% - clamp(1rem, 4vw, 1.5rem));
    --promo-slider-h: clamp(240px, 62vw, 340px);
    --promo-side-h: clamp(150px, 42vw, 220px);
  }

  .hero::before,
  .hero::after,
  .section::before,
  .section::after,
  .reviews-section::after {
    opacity: 0.55;
  }

  .section {
    padding: 3.75rem 0;
  }

  .section__head {
    margin-bottom: 2rem;
  }

  .nav,
  .header__contact-block,
  .header__phone--main {
    display: none;
  }

  .logo__tagline {
    display: block;
    max-width: 12rem;
    font-size: 0.6rem;
    line-height: 1.25;
  }

  html[data-design="showcase"] .header__phone--compact {
    display: inline-flex;
  }

  .header__phone--compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.7rem;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
  }

  .header__inner {
    gap: 0.5rem;
    padding: 0.65rem 0;
  }

  .logo {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 1.0625rem;
  }

  .header__actions {
    margin-left: auto;
    gap: 0.4rem;
  }

  .burger {
    display: flex;
    flex-shrink: 0;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: 2rem 0 3.5rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero__visual {
    order: -1;
    min-height: 220px;
  }

  .hero__photo--sub {
    display: none;
  }

  .hero__lead {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero__actions {
    margin-bottom: 1.75rem;
  }

  .hero__stats {
    gap: 0.75rem;
  }

  .hero__stats li {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 8.5rem;
    padding: 0.65rem 0.85rem;
  }

  .categories {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
  }

  .advantages {
    grid-template-columns: 1fr;
  }

  .request-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .request-grid > *,
  .request-info,
  .request-grid .form {
    min-width: 0;
    max-width: 100%;
  }

  .request-info__photo {
    display: none;
  }

  .map-wrap {
    min-height: 280px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .footer__actions,
  .footer__admin {
    justify-content: center;
  }

  .promo-slide__panel {
    max-width: 100%;
    justify-content: flex-end;
    padding: 1rem 1rem 0.85rem;
  }

  .promo-slide__media::after {
    background: linear-gradient(
      180deg,
      transparent 0%,
      color-mix(in srgb, var(--slide-bg) 22%, transparent) 38%,
      color-mix(in srgb, var(--slide-bg) 88%, transparent) 72%,
      color-mix(in srgb, var(--slide-bg) 96%, transparent) 100%
    );
  }

  .reviews-list {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .lightbox__nav--prev {
    left: 0.25rem;
  }

  .lightbox__nav--next {
    right: 0.25rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .hero__actions .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .hero__stats li {
    flex: 1 1 100%;
  }

  .review-card {
    padding: 1.1rem 1rem 1.1rem 1.15rem;
  }

  .review-card__quote {
    font-size: 2.5rem;
  }

  .footer__catalog {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .header__phone--compact {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    overflow: hidden;
    text-indent: -9999px;
    position: relative;
  }

  .header__phone--compact::after {
    content: "📞";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-indent: 0;
    font-size: 1.15rem;
  }

  .logo__tagline {
    display: none;
  }
}

/* ── Chat bot ── */
.chat-widget {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.chat-widget__fab-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.scroll-top-fab {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.scroll-top-fab[hidden] {
  display: none;
}

.scroll-top-fab.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top-fab:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.chat-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255, 107, 44, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 107, 44, 0.5);
}

.chat-toggle__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.chat-panel {
  position: relative;
  width: min(480px, calc(100vw - 2.5rem));
  height: min(70vh, calc(100vh - 6.5rem));
  min-width: 320px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chat-panel__resize {
  display: none;
}

@media (min-width: 601px) {
  .chat-panel__resize {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: none;
    border-radius: 0 0 10px 0;
    background:
      linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.55) 46%, rgba(255, 255, 255, 0.55) 54%, transparent 55%),
      linear-gradient(135deg, transparent 62%, rgba(255, 255, 255, 0.4) 63%, rgba(255, 255, 255, 0.4) 71%, transparent 72%);
    cursor: nwse-resize;
    z-index: 2;
    touch-action: none;
  }

  .chat-panel__resize:hover,
  .chat-panel__resize:focus-visible {
    background-color: rgba(255, 255, 255, 0.18);
    outline: none;
  }

  .chat-panel.is-resizing {
    user-select: none;
  }
}

.chat-panel[hidden] {
  display: none !important;
}

.chat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.chat-panel__head strong {
  display: block;
  font-size: 0.9375rem;
}

.chat-panel__head span {
  font-size: 0.75rem;
  opacity: 0.9;
}

.chat-panel__close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.chat-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.chat-providers__item {
  flex: 1 1 calc(33% - 0.3rem);
  min-width: 3.5rem;
  padding: 0.3rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.625rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.chat-providers__item--configured {
  color: var(--text);
}

.chat-providers__item--active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 93, 4, 0.35);
}

.chat-providers__item--off {
  opacity: 0.45;
}

.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg);
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.chat-msg--user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg--bot {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-msg__bubble {
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-msg--user .chat-msg__bubble {
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--bot .chat-msg__bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-msg__bubble strong {
  color: var(--accent);
}

.chat-msg--user .chat-msg__bubble strong {
  color: #fff;
}

.chat-msg__time {
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.chat-msg__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.chat-msg__meta .chat-msg__time {
  margin-top: 0;
}

.chat-msg__source {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.chat-msg__source--ai {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-2);
}

.chat-msg__source--gemini {
  background: rgba(66, 133, 244, 0.15);
  color: #4285f4;
}

.chat-msg__source--groq {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.chat-msg__source--yandex {
  background: rgba(252, 63, 29, 0.12);
  color: #fc3f1d;
}

.chat-msg__source--gigachat {
  background: rgba(33, 160, 56, 0.15);
  color: #21a038;
}

.chat-msg__source--local {
  background: rgba(255, 107, 44, 0.12);
  color: var(--accent);
}

.chat-ai-warn {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem 0;
  background: var(--bg);
}

.chat-quick__btn {
  padding: 0.35rem 0.65rem;
  font-family: inherit;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.chat-quick__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chat-panel__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.chat-panel__form input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--text);
}

.chat-panel__form input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-live-status {
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  background: color-mix(in srgb, var(--accent-2) 14%, var(--surface));
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.chat-live-status[hidden] {
  display: none !important;
}

.chat-live-status--waiting {
  background: color-mix(in srgb, #f59e0b 18%, var(--surface));
}

.chat-live-status--human {
  background: color-mix(in srgb, #10b981 16%, var(--surface));
}

.chat-operator-bar {
  padding: 0.5rem 0.75rem 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.chat-operator-bar[hidden] {
  display: none !important;
}

.chat-rate-modal {
  position: fixed;
  inset: 0;
  z-index: 760;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.chat-rate-modal[hidden] {
  display: none !important;
}

.chat-rate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.chat-rate-modal__box {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.chat-rate__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.chat-rate__lead {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  color: var(--text);
}

.chat-rate__name {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.chat-rate__stars {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.chat-rate__stars button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  color: color-mix(in srgb, var(--text-muted) 55%, transparent);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.chat-rate__stars button.is-on,
.chat-rate__stars button.is-hover {
  color: #f59e0b;
}

.chat-rate__stars.is-need button {
  animation: chat-rate-nudge 0.35s ease;
}

@keyframes chat-rate-nudge {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-2px); }
}

.chat-rate-modal textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  resize: vertical;
  text-align: left;
}

.chat-rate__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

body.chat-rate-open {
  overflow: hidden;
}

.chat-operator-btn {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--accent-2) 45%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-2) 10%, var(--surface));
  color: var(--accent-2);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chat-operator-btn:hover:not(:disabled) {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

.chat-operator-btn:disabled {
  opacity: 0.65;
  cursor: default;
  color: var(--text-muted);
  background: var(--surface);
}

.chat-handoff-prompt {
  margin-top: 0.5rem;
}

.chat-handoff-prompt__btn {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-handoff-prompt__btn:hover {
  filter: brightness(1.05);
}

.chat-msg--operator .chat-msg__bubble {
  background: color-mix(in srgb, #10b981 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #10b981 35%, var(--border));
  border-bottom-left-radius: 4px;
}

.chat-msg--operator .chat-msg__bubble strong {
  color: #059669;
}

.chat-msg--system {
  align-self: center;
  max-width: 95%;
}

.chat-msg--system .chat-msg__bubble {
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--text-muted);
  background: transparent;
  border: none;
}

.chat-panel__form .btn {
  padding: 0.7rem 1rem;
  min-width: 2.75rem;
}

.chat-msg--typing .chat-msg__bubble {
  color: var(--text-muted);
  font-style: italic;
}

.chat-typing {
  display: inline-block;
  animation: chat-pulse 1.2s ease-in-out infinite;
}

@keyframes chat-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.chat-msg__bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-msg--bot .chat-msg__bubble a {
  color: var(--accent);
}

body.chat-open-mobile {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

@media (max-width: 600px) {
  .scroll-top-fab {
    display: none !important;
  }

  .chat-toggle__text {
    display: none;
  }

  .chat-widget {
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    left: auto;
    align-items: flex-end;
    gap: 0.65rem;
  }

  .chat-widget.is-chat-open,
  .chat-widget:has(.chat-panel:not([hidden])) {
    inset: 0;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    z-index: 450;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .chat-widget.is-chat-open::before,
  .chat-widget:has(.chat-panel:not([hidden]))::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  html[data-theme="light"] .chat-widget.is-chat-open::before,
  html[data-theme="light"] .chat-widget:has(.chat-panel:not([hidden]))::before {
    background: rgba(15, 23, 42, 0.45);
  }

  .chat-widget.is-chat-open .chat-widget__fab-row,
  .chat-widget:has(.chat-panel:not([hidden])) .chat-widget__fab-row {
    display: none !important;
  }

  .chat-widget.is-chat-open .chat-panel,
  .chat-widget:has(.chat-panel:not([hidden])) .chat-panel {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-widget.is-chat-open .chat-panel__head {
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
  }

  .chat-widget.is-chat-open .chat-panel__form {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  .chat-panel {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
  }

  .chat-panel__resize {
    display: none !important;
  }

  .chat-toggle {
    padding: 0.85rem;
    min-width: 3rem;
    min-height: 3rem;
    justify-content: center;
  }

  .hero {
    padding: 1.75rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

  .form {
    padding: 1.25rem;
  }

  .toast {
    bottom: max(5.5rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
    left: max(1rem, env(safe-area-inset-left, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    transform: translateY(100px);
    max-width: none;
  }

  .toast.is-visible {
    transform: translateY(0);
  }
}
