:root {
  --ink: #0b2a4a;
  --ink-2: #44607d;
  --muted: #6c8299;
  --sea: #0a7ea4;
  --aqua: #19c3d6;
  --foam: #e8f6fa;
  --bg: #f5f9fc;
  --card: #ffffff;
  --line: #dde8f0;
  --ok: #138a52;
  --ok-bg: #e4f6ec;
  --off: #8a97a5;
  --off-bg: #eef1f4;
  --wb: #a3238e;
  --ozon: #005bff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(11, 42, 74, .06), 0 8px 24px rgba(11, 42, 74, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: .08em; color: var(--ink); }
.logo svg { width: 32px; height: 32px; color: var(--sea); }
.logo--small { font-size: 18px; }
.top__nav { display: flex; gap: 24px; }
.top__nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.top__nav a:hover { color: var(--sea); }

/* Первый экран */
.hero {
  background: linear-gradient(160deg, #0b2a4a 0%, #0a5c86 55%, #0a7ea4 100%);
  color: #fff;
  overflow: hidden;
}
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding-top: 64px; padding-bottom: 56px; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; color: var(--aqua); }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; }
.lead { font-size: 18px; color: #cfe6f2; max-width: 34em; margin: 18px 0 28px; }
.hero__art svg { width: 100%; height: auto; max-width: 440px; margin-left: auto; display: block; }
.hero__art .bubble { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 2; }
.hero__art .strap { fill: none; stroke: #062038; stroke-width: 10; stroke-linecap: round; }
.hero__art .lens { fill: rgba(25, 195, 214, .35); stroke: #fff; stroke-width: 6; }
.hero__art .bridge { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; }
.hero__art .shine { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 5; stroke-linecap: round; }
.hero__art .wave { fill: none; stroke: var(--aqua); stroke-width: 5; stroke-linecap: round; }
.hero__art .wave--2 { stroke: rgba(255, 255, 255, .35); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: 12px; border: 0;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--aqua); color: #062038; padding: 12px 24px; font-size: 16px; }
.btn--primary:hover { box-shadow: 0 6px 20px rgba(25, 195, 214, .4); }
.btn--wb { background: var(--wb); color: #fff; }
.btn--ozon { background: var(--ozon); color: #fff; }
.btn--off { background: var(--off-bg); color: var(--off); }
.btn--off::after { content: "нет"; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* Каталог */
.catalog { padding: 56px 0 40px; }
.catalog__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.catalog__head h2, .about h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.catalog__head p { margin: 0; font-size: 14px; }

.tools { display: grid; gap: 12px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.chip span { color: var(--muted); font-size: 13px; }
.chip:hover { border-color: var(--sea); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active span { color: #9fc0d8; }
.chips--sub .chip { font-size: 14px; padding: 6px 12px; background: var(--foam); border-color: transparent; }
.chips--sub .chip.is-active { background: var(--sea); color: #fff; }
.chips--sub .chip.is-active span { color: #d4eef7; }

.tools__row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 8px;
  padding: 0 14px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
}
.search:focus-within { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(10, 126, 164, .15); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--ink-2); font-weight: 500; }
.toggle input { width: 18px; height: 18px; accent-color: var(--sea); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(11, 42, 74, .06), 0 16px 36px rgba(11, 42, 74, .1); }
.card[hidden] { display: none; }
.card__photo { display: block; width: 100%; aspect-ratio: 1; padding: 14px; border: 0; background: #fff; cursor: zoom-in; }
.card__photo img { width: 100%; height: 100%; object-fit: contain; }
.card__nophoto { display: block; width: 100%; height: 100%; border-radius: 12px; background: var(--foam) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M5 18c3 0 3-2.5 5.5-2.5S13 18 16 18s3-2.5 5.5-2.5S24 18 27 18' fill='none' stroke='%2399c6d8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 40% no-repeat; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 4px 16px 16px; flex: 1; }
.card__title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.card__meta { margin: 0; color: var(--muted); font-size: 14px; }
.card__buy { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.card__buy .btn { flex: 1; padding: 8px 10px; font-size: 14px; }

.badge { align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge--in { background: var(--ok-bg); color: var(--ok); }
.badge--out { background: var(--off-bg); color: var(--off); }
.card[data-stock="0"] .card__photo img { opacity: .55; }

.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* Как купить */
.about { padding: 48px 0 72px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.step { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step__n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--foam); color: var(--sea); font-weight: 800; margin-bottom: 12px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-2); }

.foot { border-top: 1px solid var(--line); background: #fff; }
.foot__in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; font-size: 14px; }

/* Карточка товара */
.modal {
  width: min(920px, calc(100% - 32px)); max-height: calc(100% - 32px);
  padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: #fff;
  box-shadow: 0 30px 80px rgba(6, 32, 56, .35);
}
.modal::backdrop { background: rgba(6, 32, 56, .55); backdrop-filter: blur(3px); }
.modal__close-form { position: absolute; top: 10px; right: 10px; margin: 0; z-index: 1; }
.modal__close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.modal__close:hover { background: var(--line); }
.modal__in { display: grid; grid-template-columns: 1fr 1fr; }
.modal__photo { background: #fff; padding: 28px; display: grid; place-items: center; }
.modal__photo img, .modal__nophoto { width: 100%; aspect-ratio: 1; object-fit: contain; }
.modal__info { padding: 40px 32px 32px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.modal__info h2 { font-size: 24px; padding-right: 32px; }
.props { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; }
.modal__buy { display: grid; gap: 10px; margin-top: auto; padding-top: 8px; }
.modal__buy .btn { min-height: 48px; font-size: 16px; }
.modal__buy .btn--off::after { content: "нет в наличии"; }

@media (max-width: 820px) {
  .hero__in { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .hero__art { display: none; }
  .steps { grid-template-columns: 1fr; }
  .modal__in { grid-template-columns: 1fr; }
  .modal__photo { padding: 20px 20px 0; }
  .modal__photo img { max-height: 46vh; }
  .modal__info { padding: 20px; background: #fff; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .top__nav { gap: 16px; font-size: 15px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card__photo { padding: 8px; }
  .card__body { padding: 2px 10px 12px; }
  .card__title { font-size: 14px; }
  .card__meta { font-size: 13px; }
  .card__buy { flex-direction: column; gap: 6px; }
  .card__buy .btn { min-height: 36px; font-size: 13px; }
  .lead { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}
