/* ===== Змінні (кольори й розміри) ===== */
:root {
  --green-900: #0f2b23;
  --green-800: #14342b;
  --green-700: #1f4d3d;
  --green-500: #2f7a5c;
  --amber-500: #ff9f1c;
  --amber-600: #f08a00;
  --amber-700: #e8590c;
  --cream: #fbf6ec;
  --cream-2: #f3ead9;
  --ink: #1b2420;
  --muted: #5d6b65;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 43, 35, 0.12);
  --shadow-lg: 0 18px 50px rgba(15, 43, 35, 0.2);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

/* Плашка помилки для того, хто редагує сайт (тільки на локальному комп'ютері) */
.dev-warning {
  padding: 12px 20px; text-align: center; font-weight: 700; color: #fff; background: #b3261e;
}

/* ===== Базові ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }

/* Захист від дуже довгих слів і текстів: нічого не вилазить за межі екрана */
body { overflow-x: clip; }
h1, h2, h3, p, li, .card__title, .card__desc, .card__price, .card__pack, .contacts__list .big {
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero__text, .card__body, .contacts > div, .callout, .feature { min-width: 0; }
.logo { min-width: 0; }
.logo__text { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header__call { max-width: 260px; }
.header__call span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .75em 1.3em; border-radius: 999px; font-weight: 700; font-size: .98rem;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--call {
  color: #2a1700;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  box-shadow: 0 8px 22px rgba(240, 138, 0, .38);
}
.btn--call:hover { box-shadow: 0 12px 28px rgba(240, 138, 0, .5); }
.btn--ghost { color: var(--white); border-color: rgba(255,255,255,.55); background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { color: var(--green-800); border-color: var(--green-800); background: transparent; }
.btn--outline:hover { background: var(--green-800); color: var(--white); }
.btn--lg { padding: .95em 1.7em; font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 3px; }

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 43, 35, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: var(--white);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; }
.logo__text { font-family: "Palatino Linotype", Palatino, Georgia, serif; font-style: italic; font-weight: 700; font-size: 1.45rem; letter-spacing: .01em; }
.logo__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  color: #2a1700; background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
}
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: .5em .9em; border-radius: 999px; font-weight: 600; color: rgba(255,255,255,.82); transition: background .2s, color .2s; }
.nav a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.header__call { padding: .6em 1.1em; font-size: .95rem; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; margin-left: auto; padding: 10px; }
.burger span { display: block; height: 2px; background: var(--white); margin: 6px 0; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Перший екран ===== */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(255,159,28,.22), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(47,122,92,.5), transparent 60%),
    linear-gradient(160deg, var(--green-900), var(--green-700));
}
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 30px; padding: 70px 0 80px; }
.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: .35em .9em; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  font-size: .85rem; font-weight: 600; letter-spacing: .04em; color: #ffd9a0;
}
.lead { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 34px; }
.hero__stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 1.25rem; color: var(--amber-500); }
.hero__stats span { font-size: .88rem; color: rgba(255,255,255,.7); }

.hero__art { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero__glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,159,28,.45), transparent 65%);
  filter: blur(8px); animation: pulse 3.6s ease-in-out infinite;
}
.flame { position: relative; width: 210px; filter: drop-shadow(0 20px 30px rgba(232,89,12,.4)); animation: flicker 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.pellets { position: absolute; bottom: 6px; display: flex; gap: 6px; }
.pellets span {
  width: 26px; height: 12px; border-radius: 6px;
  background: linear-gradient(180deg, #c8955a, #8d5a2b);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);
}
.pellets span:nth-child(odd) { transform: translateY(-6px) rotate(-8deg); }
.pellets span:nth-child(3n) { transform: translateY(-2px) rotate(10deg); }

@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  35% { transform: scale(1.04, 1.08) rotate(1.2deg); }
  65% { transform: scale(.98, 1.03) rotate(-.6deg); }
}
@keyframes pulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* ===== Секції ===== */
.section { padding: 84px 0; }
.section--soft { background: var(--cream-2); }
.section--dark { background: linear-gradient(160deg, var(--green-900), var(--green-800)); color: var(--white); }
.section__head { max-width: 640px; margin-bottom: 30px; }
.section__head p { color: var(--muted); font-size: 1.05rem; }

/* ===== Категорії ===== */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  padding: .6em 1.2em; border-radius: 999px; font-weight: 700; font-size: .95rem; cursor: pointer;
  border: 2px solid var(--green-800); background: transparent; color: var(--green-800);
  transition: background .2s, color .2s, transform .15s;
}
.chip:hover { transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--green-800); color: var(--white); }

.noscript { padding: 16px 20px; border-radius: var(--radius); background: var(--cream-2); font-weight: 600; }

/* ===== Картки товарів ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: rise .5s ease both;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--cream-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.badge {
  position: absolute; top: 12px; left: 12px; padding: .3em .8em; border-radius: 999px;
  background: var(--amber-500); color: #2a1700; font-size: .78rem; font-weight: 800; letter-spacing: .03em;
}
.card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.card__cat { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green-500); margin-bottom: 6px; }
.card__title { font-size: 1.15rem; margin-bottom: .4em; }
.card__desc { color: var(--muted); font-size: .95rem; flex: 1; }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 6px 0 14px; }
.card__pack { font-size: .85rem; color: var(--muted); }
.card__price { font-weight: 800; font-size: 1.05rem; color: var(--green-800); }
.card__price.ask { font-weight: 700; font-size: .95rem; color: var(--amber-700); }
.card .btn { width: 100%; text-align: center; }
.card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card__actions .btn { width: 100%; box-sizing: border-box; min-width: 0; padding: .75em .5em; font-size: .92rem; white-space: nowrap; text-align: center; justify-content: center; }
.card__media { display: block; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--green-500); }
.card__meta { align-items: flex-start; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ===== Переваги ===== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.feature { background: var(--white); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); }
.feature__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px;
  color: var(--green-800); background: linear-gradient(135deg, #ffe3b0, #ffc46a);
}
.feature p { color: var(--muted); margin: 0; }

/* ===== Чому обирають нас: карта + переваги ===== */
.why { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: stretch; }
.why__map {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; overflow: hidden;
  padding: 26px 26px 24px; border-radius: 24px; color: var(--white);
  background: radial-gradient(120% 90% at 20% 0%, var(--green-700), var(--green-900)); box-shadow: var(--shadow-lg);
}
.why__map::before { content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: radial-gradient(circle, #fff 1px, transparent 1.4px); background-size: 22px 22px; }
.map { position: relative; width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.map__land { stroke: rgba(255,255,255,.55); stroke-width: 1.5; stroke-linejoin: round; }
.map__routes path { stroke-dasharray: 5 7; animation: route 1.6s linear infinite; }
.map__dot { fill: var(--amber-500); stroke: #fff; stroke-width: 2; }
.map text { fill: #fff; font: 600 14px var(--font); paint-order: stroke; stroke: rgba(15,43,35,.7); stroke-width: 3px; }
.map__hub { fill: var(--amber-600); stroke: #fff; stroke-width: 3; }
.map__hubtext { font-size: 16px !important; font-weight: 800 !important; }
.map__pulse { fill: none; stroke: var(--amber-500); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
.map__pulse--2 { animation-delay: 1.2s; }
@keyframes route { to { stroke-dashoffset: -24; } }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.why__mapcap { position: relative; display: grid; gap: 2px; }
.why__mapcap strong { font-size: 1.25rem; }
.why__mapcap span { color: rgba(255,255,255,.78); }
.why__list { display: grid; gap: 16px; }
.why__list .feature { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border: 1px solid transparent; transition: transform .25s ease, border-color .25s ease; }
.why__list .feature:hover { transform: translateX(4px); border-color: var(--amber-500); }
.why__list .feature__icon { flex: none; margin: 0; }
.why__list h3 { margin-bottom: .25em; }

/* ===== Як замовити ===== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; left: 16%; right: 16%; top: 62px; border-top: 3px dashed rgba(240,138,0,.45); }
.step { position: relative; z-index: 1; display: grid; gap: 6px; justify-items: center; text-align: center; padding: 34px 24px 28px; background: var(--white); border-radius: 22px; box-shadow: var(--shadow); transition: transform .25s ease; }
.step:hover { transform: translateY(-5px); }
.step__num { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--green-700); border: 3px solid var(--cream); }
.step__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; margin-bottom: 8px; color: #2a1700; background: linear-gradient(135deg, var(--amber-500), var(--amber-700)); box-shadow: 0 8px 20px rgba(232,89,12,.35); }
.step strong { font-size: 1.2rem; }
.step span:last-child { color: var(--muted); }
.callout {
  padding: 30px; border-radius: 24px; color: var(--white);
  background: linear-gradient(160deg, var(--green-700), var(--green-900)); box-shadow: var(--shadow-lg);
}
.callout p { color: rgba(255,255,255,.8); margin: 0; }
.callout--wide { margin-top: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.callout--wide h3 { margin-bottom: .2em; }

/* ===== Контакти ===== */
.contacts { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.contacts__lead { color: rgba(255,255,255,.78); max-width: 32em; }
.contacts__list { list-style: none; margin: 26px 0; padding: 0; display: grid; gap: 18px; }
.contacts__list .label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #ffd9a0; margin-bottom: 4px; }
.contacts__list .big { font-size: 1.35rem; font-weight: 700; }
.contacts__list a.big:hover { color: var(--amber-500); }
.contacts__list a.big { display: block; }
.contacts__list a.big + a.big { margin-top: 6px; }
.messengers { display: flex; flex-wrap: wrap; gap: 12px; }
.contacts__card { padding: 30px; border-radius: 24px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.contacts__card p { color: rgba(255,255,255,.78); }
.note { font-size: .85rem; margin-top: 14px; margin-bottom: 0; opacity: .8; }

/* ===== Футер ===== */
.footer { background: var(--green-900); color: rgba(255,255,255,.7); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 22px 0; }

.footer__link { text-decoration: underline; text-underline-offset: 3px; }
.footer__link:hover { color: var(--amber-500); }

/* Сторінка «Джерела фото» */
.page { padding: 60px 0 80px; }
.page table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.page th, .page td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--cream-2); vertical-align: top; }
.page th { background: var(--green-800); color: var(--white); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.page a { color: var(--green-500); text-decoration: underline; }

/* ===== Кнопка дзвінка (мобільна) ===== */
.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; display: none; place-items: center;
  width: 58px; height: 58px; border-radius: 50%; color: #2a1700;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 10px 26px rgba(232,89,12,.5);
}

/* ===== Адаптив ===== */
@media (max-width: 880px) {
  .hero__inner, .contacts, .why { grid-template-columns: 1fr; }
  .hero__art { min-height: 240px; order: -1; }
  .flame { width: 150px; }
  .hero__glow { width: 260px; height: 260px; }
  .header__call { display: none; }
  .burger { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px 20px 18px;
    background: var(--green-900); border-bottom: 1px solid rgba(255,255,255,.1);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: .8em .4em; border-radius: 10px; }
  .section { padding: 60px 0; }
  .fab { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Вирівнювання тексту ===== */
h1, h2, h3, .card__title, .section__head p { text-wrap: balance; }
p, li, .card__desc, .lead { text-wrap: pretty; }

/* ===== Сторінка товару ===== */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.crumbs { margin-bottom: 22px; font-size: .95rem; color: var(--muted); }
.crumbs a { color: var(--green-800); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.gallery__main { display: block; border-radius: var(--radius); overflow: hidden; background: var(--cream-2); box-shadow: var(--shadow); }
.gallery__main img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: cover; }
.gallery__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb { width: 84px; height: 84px; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--cream-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-pressed="true"] { border-color: var(--amber-500); }
.product__info h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: .2em 0 .5em; }
.product__text p { margin-bottom: 1em; }
.facts { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.facts li { position: relative; padding: 12px 16px 12px 44px; background: var(--cream-2); border-radius: 12px; font-weight: 600; }
.facts li::before { content: ""; position: absolute; left: 16px; top: 50%; width: 14px; height: 8px; margin-top: -7px; border-left: 3px solid var(--green-500); border-bottom: 3px solid var(--green-500); transform: rotate(-45deg); }
.product__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 24px; }
.product__buy .card__price { font-size: 1.4rem; }
@media (max-width: 820px) { .product { grid-template-columns: 1fr; gap: 24px; } }

/* ===== Телефони (головний пріоритет) ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: rgba(255, 159, 28, .25); touch-action: manipulation; }
.fab { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }

@media (max-width: 880px) {
  .header__inner { height: 60px; gap: 12px; }
  .nav { top: 60px; }
  html { scroll-padding-top: 66px; }
  .logo__text { font-size: 1.25rem; }
  .logo__mark { width: 34px; height: 34px; }
  .nav a { padding: .95em .5em; font-size: 1.05rem; }   /* зручно натискати пальцем */
}

@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .footer { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }  /* місце під кнопку дзвінка всередині футера, без світлої смуги внизу */

  /* Перший екран: одразу текст і кнопка, без великого малюнка зверху */
  .hero__art { display: none; }
  .hero__inner { padding: 34px 0 40px; gap: 0; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
  .lead { font-size: 1.05rem; }
  .hero__actions { flex-direction: column; margin: 22px 0 0; gap: 12px; }
  .hero__actions .btn { width: 100%; }
  .btn--lg { padding: 1em 1.2em; font-size: 1.05rem; }

  .section { padding: 44px 0; }
  .section__head { margin-bottom: 20px; }

  /* Категорії: один рядок, гортається пальцем, великі кнопки */
  .chips { flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 0 -16px 20px; padding: 2px 16px 8px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: .7em 1.1em; font-size: 1rem; }

  /* Картки: одна колонка, фото ширше за висотою */
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .card__media { aspect-ratio: 16 / 11; }
  .card__body { padding: 16px 16px 18px; }
  .card__desc { font-size: 1rem; }
  .card__actions .btn { padding: .9em .4em; font-size: 1rem; }

  .why__map { padding: 20px 16px; }
  .why__list .feature { padding: 18px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { display: none; }
  .callout--wide { flex-direction: column; align-items: stretch; }
  .callout, .contacts__card { padding: 22px; }
  .contacts__list .big { font-size: 1.25rem; }
  .contacts .btn, .callout .btn { width: 100%; }

  /* Сторінка товару */
  .crumbs a { display: inline-block; padding: 10px 0; }
  .crumbs { margin-bottom: 6px; }
  .gallery__main img { max-height: 70vw; min-height: 220px; }
  .gallery__thumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .gallery__thumbs::-webkit-scrollbar { display: none; }
  .thumb { flex: 0 0 auto; width: 76px; height: 76px; }
  .product__info h1 { font-size: 1.7rem; }
  .product__text p { font-size: 1.02rem; }
  .product__buy { flex-direction: column; align-items: stretch; gap: 12px; }
  .product__buy .btn { width: 100%; }
  .product__buy .card__price { text-align: center; }
}


/* ===== Збільшення фото на сторінці товару ===== */
.gallery__main { position: relative; }
.gallery__main img { transition: transform .18s ease-out; }
.gallery__main.zoomable { cursor: zoom-in; }
.gallery__main.zoomable::after {
  content: "Наведіть, щоб збільшити"; position: absolute; left: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff;
  font-size: .78rem; pointer-events: none; transition: opacity .2s;
}
.gallery__main.zoomable:hover::after { opacity: 0; }

/* ===== ТЕСТ: інші товари ===== */
.related { margin-top: 56px; }
.related h2 { margin-bottom: 18px; }
.related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.related__item { display: block; border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .25s ease; }
.related__item:hover { transform: translateY(-4px); }
.related__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.related__item span { display: block; padding: 12px 14px; font-weight: 700; font-size: .95rem; }

/* ===== ТЕСТ: вогники та поява блоків ===== */
.embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.embers span {
  position: absolute; bottom: 18%; left: var(--x); width: var(--sz); height: var(--sz);
  border-radius: 50%; background: #ffb703; box-shadow: 0 0 8px 2px rgba(255,159,28,.7);
  opacity: 0; animation: ember var(--d) ease-out var(--delay) infinite;
}
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  15% { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--dx), -260px) scale(.3); }
}
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ===== Сертифікати якості ===== */
.certs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; max-width: 880px; margin-inline: auto; }
.cert { display: flex; flex-direction: column; gap: 22px; }

/* Рамка: подвійна золота лінія, «паспарту» і куточки */
.cert__frame {
  position: relative; display: block; padding: 16px; border-radius: 16px; background: var(--white);
  border: 1px solid #e3c586;
  box-shadow: 0 0 0 7px var(--cream), 0 0 0 8px #e3c586, var(--shadow-lg);
  transition: transform .35s ease, box-shadow .35s ease;
}
.cert__frame::before, .cert__frame::after {
  content: ""; position: absolute; width: 26px; height: 26px; pointer-events: none; border: 3px solid var(--amber-500);
}
.cert__frame::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; border-top-left-radius: 16px; }
.cert__frame::after { right: -4px; bottom: -4px; border-left: 0; border-top: 0; border-bottom-right-radius: 16px; }
.cert__frame:hover { transform: translateY(-6px); box-shadow: 0 0 0 7px var(--cream), 0 0 0 8px var(--amber-500), 0 24px 56px rgba(15, 43, 35, .28); }
.cert__frame:focus-visible { outline: 3px solid var(--amber-600); outline-offset: 12px; }
.cert__frame img { display: block; width: 100%; height: auto; aspect-ratio: 929 / 1280; object-fit: contain; border-radius: 6px; border: 1px solid #ece4d4; background: #fff; }

/* Печатка «перевірено» */
.cert__seal {
  position: absolute; top: -16px; right: -16px; z-index: 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  color: var(--white); background: linear-gradient(135deg, var(--green-500), var(--green-800));
  box-shadow: 0 0 0 4px var(--cream), 0 8px 18px rgba(15, 43, 35, .35);
}
.cert__zoom {
  position: absolute; left: 50%; bottom: 28px; transform: translate(-50%, 8px); padding: 8px 18px; border-radius: 999px;
  font-weight: 700; font-size: .9rem; color: #2a1700; background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 8px 20px rgba(232, 89, 12, .45); opacity: 0; transition: opacity .25s ease, transform .25s ease; pointer-events: none;
}
.cert__frame:hover .cert__zoom, .cert__frame:focus-visible .cert__zoom { opacity: 1; transform: translate(-50%, 0); }

.cert__info h3 { margin: 0 0 6px; }
.cert__issuer { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.cert__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cert__facts li { padding: 7px 12px; border-radius: 999px; background: var(--white); border: 1px solid #ecdcb9; font-size: .88rem; color: var(--ink); }
.cert__facts b { color: var(--green-700); }

/* Великий перегляд */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 24, 19, .86); backdrop-filter: blur(3px); }
.lightbox img { display: block; max-width: min(92vw, 820px); max-height: 92vh; width: auto; height: auto; border-radius: 10px; background: #fff; box-shadow: var(--shadow-lg); }
.lightbox__close {
  position: absolute; top: -14px; right: -14px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%;
  font-size: 1.6rem; line-height: 1; cursor: pointer; color: #2a1700; background: var(--amber-500); box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
}
.lightbox__close:hover { background: var(--amber-600); }

@media (max-width: 720px) {
  .certs { grid-template-columns: 1fr; gap: 44px; max-width: 420px; }
  .cert__zoom { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .cert__frame, .cert__zoom { transition: none; }
}

/* ===== Підказка після натискання «Подзвонити» ===== */
.callnote {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  width: min(440px, calc(100% - 32px)); display: flex; gap: 14px; align-items: center;
  padding: 16px 44px 16px 16px; border-radius: 18px; color: var(--white);
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  border: 1px solid rgba(255,159,28,.45); box-shadow: var(--shadow-lg);
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: transform .35s ease, opacity .35s ease;
}
.callnote.is-open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.callnote__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #2a1700; background: linear-gradient(135deg, var(--amber-500), var(--amber-700)); }
.callnote__text { margin: 0; line-height: 1.35; font-size: .98rem; }
.callnote__text strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.callnote__close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.7); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.callnote__close:hover { color: var(--amber-500); }
@media (max-width: 600px) { .callnote { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .callnote { transition: none; } }

/* ===== Дрібні виправлення після тест-драйву ===== */
.callnote { visibility: hidden; transition: transform .35s ease, opacity .35s ease, visibility 0s .35s; }
.callnote.is-open { visibility: visible; transition-delay: 0s; }
@media (hover: none) { .gallery__main.zoomable::after { display: none; } }
@media (max-width: 600px) {
  .map text { font-size: 20px; stroke-width: 4px; }
  .map__hubtext { font-size: 24px !important; }
}

/* «Інші товари»: завжди рівні ряди (4 в ряд, на планшеті й телефоні по 2) */
.related__grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .related__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .related__grid { gap: 12px; } .related__item span { padding: 10px 12px; font-size: .9rem; } }
