/* ========== THEMES ========== */
/* Перемикання схеми: атрибут data-theme у тегу <html> */
:root,
[data-theme="emerald"] {
  --bg: #f1f6f3;
  --card: #ffffff;
  --text: #10261c;
  --muted: #56685f;
  --line: #dde8e2;
  --brand: #0b5d3b;
  --brand-2: #10b981;
  --soft: #e5f5ed;
  --cta-1: #12c98a;
  --cta-2: #0b8f5c;
  --cta-text: #ffffff;
  --cta-glow: 18, 201, 138;
  --price: #0b5d3b;
  --sale: #ef3b3b;
  --hero-bg: linear-gradient(160deg, #0b5d3b 0%, #0e7a4e 55%, #12a56c 100%);
  --hero-text: #ffffff;
  --hero-muted: rgba(255, 255, 255, 0.82);
  --topbar: rgba(255, 255, 255, 0.92);
}

[data-theme="graphite"] {
  --bg: #eef1f5;
  --card: #ffffff;
  --text: #121821;
  --muted: #5b6573;
  --line: #e0e5ec;
  --brand: #121821;
  --brand-2: #38bdf8;
  --soft: #e6f4fc;
  --cta-1: #ffb020;
  --cta-2: #f27a0c;
  --cta-text: #1a1203;
  --cta-glow: 255, 160, 30;
  --price: #121821;
  --sale: #ef3b3b;
  --hero-bg: linear-gradient(160deg, #0f141c 0%, #1b2532 60%, #24364a 100%);
  --hero-text: #ffffff;
  --hero-muted: rgba(225, 235, 245, 0.8);
  --topbar: rgba(255, 255, 255, 0.92);
}

[data-theme="frost"] {
  --bg: #eef4fb;
  --card: #ffffff;
  --text: #0f2440;
  --muted: #566a82;
  --line: #dbe5f1;
  --brand: #12325c;
  --brand-2: #2f80ed;
  --soft: #e5effc;
  --cta-1: #ff7a1a;
  --cta-2: #e8480c;
  --cta-text: #ffffff;
  --cta-glow: 255, 110, 30;
  --price: #12325c;
  --sale: #e8480c;
  --hero-bg: linear-gradient(160deg, #12325c 0%, #1d4f8f 60%, #3b7fd4 100%);
  --hero-text: #ffffff;
  --hero-muted: rgba(235, 243, 255, 0.85);
  --topbar: rgba(255, 255, 255, 0.92);
}

/* ========== BASE ========== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.page { width: 100%; max-width: 520px; margin: 0 auto; }

h1, h2, h3 { color: var(--text); letter-spacing: -0.02em; }
h1 { margin: 10px 0 10px; font-size: clamp(28px, 8vw, 36px); line-height: 1.05; font-weight: 800; }
h2 { margin: 6px 0 8px; font-size: clamp(22px, 6.4vw, 27px); line-height: 1.15; font-weight: 800; }
h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
p { margin: 0 0 12px; line-height: 1.55; color: var(--muted); font-size: 15px; }

/* ========== TOPBAR ========== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--topbar);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 16px; font-weight: 800; color: var(--brand); }
.brand-text small { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ========== BUTTONS ========== */
.btn {
  display: block; width: 100%;
  text-align: center; text-decoration: none;
  border: none; cursor: pointer;
  margin-top: 16px; padding: 17px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--cta-1), var(--cta-2));
  color: var(--cta-text);
  font: inherit; font-size: 18px; font-weight: 800; letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(var(--cta-glow), 0.35);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:hover { filter: brightness(1.05); }
.btn-sm { width: auto; margin: 0; padding: 10px 16px; font-size: 14px; border-radius: 12px; box-shadow: none; }
.btn-light { margin-top: 0; width: auto; padding: 14px 22px; white-space: nowrap; }

.btn-pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0%   { transform: scale(1);    box-shadow: 0 10px 24px rgba(var(--cta-glow), 0.35), 0 0 0 0 rgba(var(--cta-glow), 0.55); }
  50%  { transform: scale(1.03); box-shadow: 0 10px 24px rgba(var(--cta-glow), 0.35), 0 0 0 12px rgba(var(--cta-glow), 0); }
  100% { transform: scale(1);    box-shadow: 0 10px 24px rgba(var(--cta-glow), 0.35), 0 0 0 0 rgba(var(--cta-glow), 0); }
}
@media (prefers-reduced-motion: reduce) { .btn-pulse { animation: none; } }

/* ========== HERO ========== */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 14px 14px 22px;
  border-radius: 0 0 28px 28px;
}
.hero-media { position: relative; }
.hero-media img, .order-image img { width: 100%; height: auto; border-radius: 20px; }
.hero-sticker {
  position: absolute; right: 12px; bottom: 12px;
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sale); color: #fff;
  font-weight: 800; font-size: 22px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: rotate(-10deg);
  border: 3px solid #fff;
}
.hero-season {
  position: absolute; left: 12px; bottom: 12px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.95); color: var(--brand);
  font-weight: 800; font-size: 13px;
}
.hero-body { padding: 6px 4px 0; }
.hero h1 { color: var(--hero-text); }
.hero .lead { color: var(--hero-muted); font-size: 15.5px; }
.eyebrow {
  display: inline-block; margin-top: 14px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--hero-text);
  font-size: 12.5px; font-weight: 700;
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 4px 0 0; }
.chips li {
  padding: 8px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13.5px; font-weight: 700;
}
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--hero-muted); }

/* ========== PRICE (наша нова ціна виділена) ========== */
.price-box {
  margin: 16px 0 0; padding: 14px 16px 14px;
  background: #fff; color: var(--text);
  border-radius: 20px;
  border: 2px solid var(--sale);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.price-label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.price-new {
  font-size: clamp(40px, 12vw, 50px); line-height: 1; font-weight: 800;
  color: var(--sale); letter-spacing: -0.03em; white-space: nowrap;
}
.price-new span { font-size: 0.42em; font-weight: 800; letter-spacing: 0; }
.price-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.price-old { font-size: 17px; color: #8a948f; text-decoration: line-through; text-decoration-color: var(--sale); text-decoration-thickness: 2px; font-weight: 700; white-space: nowrap; }
.discount { padding: 6px 11px; border-radius: 10px; background: var(--sale); color: #fff; font-weight: 800; font-size: 16px; }
.price-save { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.price-save b { color: var(--text); }

/* ========== SECTIONS ========== */
.section { padding: 26px 16px 4px; }
.section-title { margin-bottom: 14px; }
.kicker {
  display: inline-block; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-2);
}
[data-theme="emerald"] .kicker { color: #0c8a57; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 38, 28, 0.08);
}
.image-block img { width: 100%; height: auto; }

.check-list, .steps { list-style: none; margin: 0; padding: 14px; display: grid; gap: 9px; }
.check-list li {
  position: relative; padding: 11px 12px 11px 40px;
  background: var(--bg); border-radius: 14px;
  font-size: 14.5px; font-weight: 600; line-height: 1.4;
}
.check-list li::before {
  content: "✓"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--brand-2); color: #fff;
}
.steps { counter-reset: s; }
.steps li {
  counter-increment: s; position: relative;
  padding: 11px 12px 11px 46px; background: var(--bg); border-radius: 14px;
  font-size: 14.5px; line-height: 1.4;
}
.steps li::before {
  content: counter(s); position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px;
}

/* Winter use cases */
.use-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.use-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; box-shadow: 0 6px 18px rgba(16, 38, 28, 0.06);
}
.use-card p { font-size: 13.5px; margin: 0; line-height: 1.45; }
.use-card--wide {
  grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start;
  background: var(--hero-bg); border: none;
}
.use-card--wide h3 { color: #fff; font-size: 18px; }
.use-card--wide p { color: var(--hero-muted); font-size: 14px; }
.use-ico {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 22px;
  background: var(--soft); margin-bottom: 8px;
}
.use-card--wide .use-ico { background: rgba(255, 255, 255, 0.15); margin: 0; }

/* Mid CTA */
.cta-card {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 16px; border-radius: 20px; background: var(--hero-bg); color: #fff;
}
.cta-card-text { display: flex; flex-direction: column; gap: 4px; }
.cta-card-text b { font-size: 17px; }
.cta-card-text span { font-size: 13.5px; color: var(--hero-muted); }
.cta-card-text s { opacity: 0.75; }
.cta-card-text strong { color: #fff; font-size: 16px; }

/* Specs */
.spec-table {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.spec-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.spec-row:nth-child(even) { background: var(--bg); }
.spec-row:last-child { border-bottom: none; }
.spec-row span { color: var(--muted); }
.spec-row b { text-align: right; }

/* Video */
.video-wrap { border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.video-wrap video { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Reviews */
.review-list { display: grid; gap: 12px; }
.review {
  padding: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 6px 18px rgba(16, 38, 28, 0.06);
}
.review p { margin: 0; color: var(--text); font-size: 14.5px; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); color: var(--brand); font-weight: 800;
}
.review-name { font-weight: 800; font-size: 15px; flex: 1; }
.stars { color: #f5a623; letter-spacing: 1px; font-size: 15px; }
.review-photo { width: 100%; max-height: 240px; object-fit: cover; border-radius: 14px; margin-bottom: 10px; }

/* How to order */
.how { display: grid; gap: 10px; }
.how-step {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.how-step span {
  flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cta-1), var(--cta-2)); color: var(--cta-text); font-weight: 800;
}
.how-step p { margin: 0; color: var(--text); font-weight: 600; font-size: 14.5px; }

/* Order */
.order-section { padding-bottom: 10px; }
.order-card {
  background: var(--card); border: 2px solid var(--brand-2); border-radius: 24px;
  padding: 14px; box-shadow: 0 14px 40px rgba(16, 38, 28, 0.12);
}
.order-image { position: relative; }
.order-body { padding: 16px 2px 2px; }
.order-body .price-box { box-shadow: none; margin-bottom: 14px; }

#order_form { scroll-margin-top: 80px; display: grid; gap: 10px; }
#order_form input[type="text"],
#order_form input[type="tel"] {
  width: 100%; padding: 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg);
  font: inherit; font-size: 16px; /* 16px — щоб iOS не зумив поле */
  color: var(--text); outline: none;
}
#order_form input:focus { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 4px var(--soft); }
.hint { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.4; }

/* Footer */
.footer {
  margin-top: 26px; padding: 22px 18px 26px;
  background: var(--brand); color: rgba(255, 255, 255, 0.82);
  border-radius: 28px 28px 0 0;
}
.footer p { color: rgba(255, 255, 255, 0.78); font-size: 13px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.footer-brand b { display: block; color: #fff; font-size: 17px; }
.footer-brand small { font-size: 12px; }
.footer-links { display: grid; gap: 6px; font-size: 13px; }

/* Sticky bar */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  max-width: 520px; margin: 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(110%); transition: transform 0.3s ease;
}
.sticky-bar.is-visible { transform: translateY(0); }
.sticky-price { display: flex; flex-direction: column; line-height: 1.1; }
.sticky-price s { font-size: 13px; color: #8a948f; }
.sticky-price b { font-size: 22px; color: var(--sale); font-weight: 800; white-space: nowrap; }
.sticky-bar .btn { margin: 0; padding: 14px; font-size: 17px; }

/* Desktop: центральна «мобільна» колонка */
@media (min-width: 560px) {
  body { background: var(--line); }
  .page { background: var(--bg); box-shadow: 0 0 40px rgba(0, 0, 0, 0.08); }
}
@media (max-width: 360px) {
  .use-grid { grid-template-columns: 1fr; }
  .cta-card { flex-direction: column; align-items: stretch; }
  .btn-light { width: 100%; }
}
