/* Лендинг мишуры «Хвойна лапа». Тёмная хвоя сверху (огоньки на фото светятся), светлый «иней» ниже. */
:root {
  --pine: #0E2A20;
  --pine-2: #17392C;
  --pine-3: #24503E;
  --frost: #EEF3EF;
  --frost-2: #E1EAE3;
  --ink: #13261D;
  --muted: #56695F;
  --on-pine: #F3F1E8;
  --on-pine-muted: #B4C2B9;
  --brass: #C9A14B;
  --glow: #FFC864;
  --danger: #B3261E;
  --wire: #2E6B3C;
  --r-s: 8px;
  --r-m: 14px;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* ---------- шапка ---------- */
.top { background: var(--pine); color: var(--on-pine); border-bottom: 1px solid var(--pine-3); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.top__hours { margin: 0; font-size: 14px; color: var(--on-pine-muted); }
.top__short { display: none; }
@media (max-width: 640px) { .top__long { display: none; } .top__short { display: inline; } }
.top__phone { text-decoration: none; font-weight: 500; color: var(--glow); white-space: nowrap; }

/* ---------- первый экран ---------- */
.hero { background: var(--pine); color: var(--on-pine); padding: 16px 0 40px; }
.hero__grid { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .hero { padding: 32px 0 64px; }
  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; align-items: start; }
  .gallery { position: sticky; top: 24px; }
}

.gallery { min-width: 0; position: relative; }
.gallery__count {
  position: absolute; right: 12px; top: 12px; background: rgba(14, 42, 32, .78); color: var(--on-pine);
  font-size: 13px; padding: 3px 10px; border-radius: 99px; pointer-events: none;
}
@media (min-width: 960px) { .gallery__count { display: none; } }
@media (max-width: 959px) { .thumb { flex-basis: 48px; height: 48px; } }
.gallery__nav {
  position: absolute; top: 0; margin-top: calc(50% - 22px); width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(14, 42, 32, .72); color: var(--on-pine);
  backdrop-filter: blur(4px);
}
.gallery__nav:hover { background: rgba(14, 42, 32, .9); border-color: var(--brass); }
.gallery__nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.thumb--anim { position: relative; }
.thumb--anim::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0;
  border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, .6));
}
/* смена варианта: картинка коротко проявляется — видно, что фото поменялось */
.gallery--pulse .gallery__track { animation: galPulse .45s ease-out; }
@keyframes galPulse { from { opacity: .35; } to { opacity: 1; } }
.gallery__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--r-m); background: var(--pine-2);
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / 1; position: relative; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__tag {
  position: absolute; left: 12px; bottom: 12px; background: rgba(14, 42, 32, .82); color: var(--on-pine);
  font-size: 13px; padding: 4px 10px; border-radius: 99px;
}
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: var(--r-s);
  overflow: hidden; background: var(--pine-2); opacity: .65;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--brass); opacity: 1; }

.buy__title { font: 700 clamp(24px, 6vw, 38px)/1.15 var(--display); margin: 4px 0 12px; letter-spacing: -.01em; }
.buy__lead { margin: 0 0 24px; color: var(--on-pine-muted); max-width: 46ch; }

.pick { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.pick__label { padding: 0; margin-bottom: 10px; color: var(--on-pine-muted); font-size: 15px; }
.pick__label b { color: var(--on-pine); font-weight: 500; }
.pick__intro { margin: 0 0 16px; font-weight: 500; color: var(--on-pine); }
.pick__about { margin: 8px 0 0; font-size: 14px; color: var(--on-pine-muted); min-height: 1.5em; }

/* цвета — кнопки с «лампочкой», как провод и длина: рамка, лампочка слева, название в одну строку */
.bulbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
@media (max-width: 380px) { .bulbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bulb {
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; padding: 8px 10px; text-align: left;
  border: 1px solid var(--pine-3); border-radius: var(--r-s); background: var(--pine-2); color: var(--on-pine); font-size: 14px; line-height: 1.2;
}
.bulb:hover { border-color: var(--on-pine-muted); }
.bulb__lamp {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff 0 8%, var(--c) 42%, color-mix(in srgb, var(--c) 55%, #000) 100%);
  opacity: .55; filter: saturate(.6);
  transition: opacity .2s, box-shadow .25s, filter .2s;
}
.bulb--ml .bulb__lamp { background: conic-gradient(#ff5d5d 0 25%, #57d36b 0 50%, #4f8bff 0 75%, #ffd05a 0); }
.bulb--fl .bulb__lamp { background: radial-gradient(circle at 70% 30%, #9fdcff 0 18%, transparent 19%), radial-gradient(circle at 38% 32%, #fff 0 8%, var(--c) 42%, #8a6a2c 100%); }
.bulb__name { min-width: 0; }   /* «Різно-кольорове» на узком экране переносится по мягкому переносу */
.bulb[aria-checked="true"] { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); background: var(--pine-3); }
.bulb[aria-checked="true"] .bulb__lamp {
  opacity: 1; filter: none;
  box-shadow: 0 0 10px 3px color-mix(in srgb, var(--c) 70%, transparent), 0 0 22px 6px color-mix(in srgb, var(--c) 30%, transparent);
}
.bulb--fl[aria-checked="true"] .bulb__lamp { animation: twinkle 2.4s infinite; }
@keyframes twinkle {
  0%, 62%, 100% { box-shadow: 0 0 10px 3px rgba(255, 200, 100, .7), 0 0 22px 6px rgba(255, 200, 100, .3); }
  70%, 78% { box-shadow: 0 0 12px 4px rgba(140, 205, 255, .9), 0 0 26px 8px rgba(140, 205, 255, .4); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery--pulse .gallery__track { animation: none; }
  .bulb--fl[aria-checked="true"] .bulb__lamp { animation: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--pine-3); border-radius: var(--r-s); background: var(--pine-2); color: var(--on-pine);
}
.seg__btn:hover { border-color: var(--on-pine-muted); }
.seg__btn[aria-checked="true"] { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); background: var(--pine-3); }
.seg--len .seg__btn { flex-direction: column; align-items: flex-start; gap: 0; padding: 7px 14px; min-width: 84px; }
@media (max-width: 520px) { .seg--len { flex-wrap: nowrap; } .seg--len .seg__btn { flex: 1 1 0; min-width: 0; padding: 7px 10px; } }
.seg__main { font-weight: 700; font-size: 16px; }
.seg__sub { font-size: 12px; color: var(--on-pine-muted); }
.wire-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--w); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }

.alert {
  margin: 0 0 20px; padding: 12px 14px; border-radius: var(--r-s); font-size: 14px;
  background: #1F4A2F; border-left: 3px solid #7BD389; color: var(--on-pine);
}

.price-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 14px; }
.price { display: flex; align-items: baseline; gap: 10px; }
.price__now { font: 700 34px/1 var(--display); color: var(--on-pine); }
.price__old { color: var(--on-pine-muted); font-size: 17px; }
.stock { font-size: 14px; color: #9ED9A8; }
.stock::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }

.order-row { display: flex; gap: 10px; }
.qty { display: flex; align-items: stretch; border: 1px solid var(--pine-3); border-radius: var(--r-s); background: var(--pine-2); }
.qty__btn { width: 42px; border: 0; background: none; color: var(--on-pine); font-size: 22px; line-height: 1; }
.qty__val {
  width: 40px; border: 0; background: none; text-align: center; color: var(--on-pine); font-weight: 700; -moz-appearance: textfield; appearance: textfield;
}
.qty__val::-webkit-outer-spin-button, .qty__val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cta {
  flex: 1; min-height: 54px; padding: 0 22px; border: 0; border-radius: var(--r-s);
  background: var(--glow); color: var(--pine); font: 700 17px/1 var(--body);
  box-shadow: 0 6px 24px -8px rgba(255, 200, 100, .55);
  transition: transform .15s, box-shadow .15s;
}
.cta:hover { box-shadow: 0 8px 30px -6px rgba(255, 200, 100, .75); }
.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: .6; cursor: progress; }
.cta--small { flex: 0 0 auto; min-height: 46px; font-size: 16px; }
.cta--wide { width: 100%; }

.perks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; font-size: 14px; color: var(--on-pine-muted); }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- разделы ниже ---------- */
.sect { padding: 44px 0; }
.sect--alt { background: var(--frost-2); }
.sect__grid { display: grid; gap: 18px; }
@media (min-width: 960px) {
  .sect { padding: 64px 0; }
  .sect__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
}
.sect__title { font: 700 clamp(22px, 4.6vw, 28px)/1.2 var(--display); margin: 0 0 8px; letter-spacing: -.01em; }
.sect__intro { margin: 0; color: var(--muted); max-width: 40ch; }

.lens { display: grid; gap: 8px; }
.lens__row {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 4px 14px; align-items: center; text-align: left;
  width: 100%; padding: 12px 14px; border: 1px solid #CBD8CF; border-radius: var(--r-s); background: #fff; color: var(--ink);
}
.lens__row:hover { border-color: var(--pine-3); }
.lens__row[aria-current="true"] { border-color: var(--pine); box-shadow: inset 0 0 0 1px var(--pine); }
.lens__len { font: 700 18px/1.1 var(--display); }
.lens__len small { display: block; font: 500 12px/1.3 var(--body); color: var(--muted); margin-top: 3px; }
.lens__fit { font-size: 14px; color: var(--muted); }
.lens__fit b { color: var(--ink); font-weight: 500; }
.lens__price { font-weight: 700; white-space: nowrap; }

.specs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); margin: 0; border-top: 1px solid #C9D6CD; }
.specs dt, .specs dd { margin: 0; padding: 11px 0; border-bottom: 1px solid #C9D6CD; }
.specs dt { color: var(--muted); padding-right: 12px; }
.specs dd { font-weight: 500; }

.terms { display: grid; gap: 22px; }
@media (min-width: 720px) { .terms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.terms h3 { margin: 0 0 6px; font-size: 17px; }
.terms p { margin: 0; color: var(--muted); font-size: 15px; }

/* карточки наборов «Як світять різні кольори» */
.sect--colors .sect__intro { margin-bottom: 18px; }
.colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .colors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1100px) { .colors { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.color-card {
  display: flex; flex-direction: column; padding: 0; text-align: left; overflow: hidden;
  border: 1px solid #CBD8CF; border-radius: var(--r-m); background: #fff; color: var(--ink);
}
.color-card:hover { border-color: var(--pine-3); }
.color-card[aria-current="true"] { border-color: var(--pine); box-shadow: inset 0 0 0 2px var(--pine); }
.color-card__pic { display: block; aspect-ratio: 1 / 1; background: var(--pine-2); }
.color-card__pic img { width: 100%; height: 100%; object-fit: cover; }
.color-card__txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; font-size: 14px; color: var(--muted); }
.color-card__txt b { color: var(--ink); font-size: 15px; font-weight: 700; }
.color-card__price { color: var(--ink); font-weight: 500; margin-top: 4px; }

.care { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); max-width: 70ch; }

/* ---------- подвал ---------- */
.foot { background: var(--pine); color: var(--on-pine-muted); padding: 32px 0 calc(96px + env(safe-area-inset-bottom)); font-size: 14px; }
@media (min-width: 960px) { .foot { padding-bottom: 40px; } }
.foot__in { display: grid; gap: 18px; }
@media (min-width: 720px) { .foot__in { grid-template-columns: 1fr 1fr; } }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--on-pine); }

.empty { padding: 64px 16px; }

/* ---------- нижняя панель на телефоне ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(14, 42, 32, .96);
  border-top: 1px solid var(--pine-3); color: var(--on-pine); backdrop-filter: blur(6px);
}
.sticky__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sticky__price { font: 700 19px/1.2 var(--display); }
.sticky__what { font-size: 13px; color: var(--on-pine-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 960px) { .sticky { display: none !important; } }

/* ---------- окно заказа ---------- */
.sheet {
  border: 0; padding: 0; width: 100%; max-width: 100%; max-height: 94vh; margin: auto 0 0; border-radius: 18px 18px 0 0;
  background: #fff; color: var(--ink); overflow: auto;
}
.sheet::backdrop { background: rgba(8, 24, 18, .62); }
@media (min-width: 640px) {
  .sheet { max-width: 500px; margin: auto; border-radius: 18px; }
}
.sheet[open] { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__form, .sheet__done { padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet__title { font: 700 20px/1.25 var(--display); margin: 0; }
.sheet__close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--frost); font-size: 24px; line-height: 1; }

.summary { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-s); background: var(--frost); margin-bottom: 16px; }
.summary__img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: var(--frost-2); flex: 0 0 64px; }
.summary__name { margin: 0 0 4px; font-size: 14px; line-height: 1.35; }
.summary__total { margin: 0; font-weight: 700; }

.field { display: block; margin-bottom: 12px; position: relative; }
.field > span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.field i { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #BFCDC4; border-radius: var(--r-s); background: #fff;
  font-size: 16px;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(36, 80, 62, .18); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.ac {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5; margin: 4px 0 0; padding: 4px; list-style: none;
  max-height: 240px; overflow: auto; background: #fff; border: 1px solid #BFCDC4; border-radius: var(--r-s);
  box-shadow: 0 12px 30px -10px rgba(10, 30, 20, .3);
}
.ac li { padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1.35; }
.ac li[aria-selected="true"], .ac li:hover { background: var(--frost); }
.ac li small { display: block; color: var(--muted); font-size: 12px; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pine); flex: 0 0 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sheet__pay { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.sheet__err { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
.sheet .cta { box-shadow: none; background: var(--pine); color: var(--on-pine); }
.sheet .cta:hover { background: var(--pine-3); }

.sheet__done { text-align: center; padding-top: 32px; }
.sheet__done p { color: var(--muted); margin: 10px 0 22px; }
.done__lamp {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff 0 8%, var(--glow) 45%, #b98a2a 100%);
  box-shadow: 0 0 22px 6px rgba(255, 200, 100, .6);
}
