/* ==================================================
   Way by Hand — landing styles
   ================================================== */

:root {
  --font-serif: 'Playfair Display', 'PT Serif', Georgia, serif;
  --font-sans: 'Montserrat', 'PT Sans', Arial, sans-serif;

  --c-bg: #FBF7EF;
  --c-bg-alt: #F1E7D5;
  --c-bg-alt-2: #ECE0C9;
  --c-header: #F6F0E4;
  --c-dark: #2E2117;
  --c-dark-2: #3B2A1F;
  --c-muted: #78685A;
  --c-line: #E3D6BE;
  --c-line-soft: rgba(59,42,31,0.12);
  --c-cream: #FBF6EC;
  --c-white: #FFFFFF;
  --c-green: #3E6B52;
  --c-green-dark: #345A45;
  --c-accent: #8A7256;

  --shadow-card: 0 10px 30px rgba(59,42,31,0.08);
  --shadow-soft: 0 4px 16px rgba(59,42,31,0.06);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --container: 1320px;

  --ease: cubic-bezier(.4,0,.2,1);
  /* Stronger custom curves — built-in CSS easings read as flat/weak for
     deliberate entrance motion. ease-out-strong: fast start, confident
     settle (entrances). ease-in-out-strong: for things moving on-screen. */
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out-strong: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Every image the admin can pan/zoom/rotate carries this attribute.
   applyTransform() (content-model.js) writes the --wbh-* custom properties;
   this is the one place that turns them into an actual transform, so any
   element-specific rule (e.g. a card's :hover) only ever needs to touch
   --wbh-hover-scale instead of fighting over the whole transform value. */
[data-transform-field] {
  transform: translate(var(--wbh-x, 0%), var(--wbh-y, 0%)) rotate(var(--wbh-rotate, 0deg)) scale(calc(var(--wbh-scale, 1) * var(--wbh-hover-scale, 1)));
}
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--c-dark-2);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 40px;
}

.section { padding-block: 96px; }

/* Admin "Скрыть" toggle sets the plain hidden attribute, but several
   sections (.hero, .faq etc.) set their own display (flex/grid) which
   otherwise outranks the browser's default [hidden] rule at equal
   specificity — this wins regardless of what a given block's own display
   value is. */
[data-block][hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--c-dark-2);
  color: var(--c-cream);
  padding: 12px 20px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; color: var(--c-dark); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow--light { color: rgba(251,246,236,0.85); }

.section-title {
  font-size: clamp(28px, 3vw, 36px);
  text-align: center;
  position: relative;
  margin-bottom: 56px;
  line-height: 1.15;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  background: var(--c-accent);
  margin: 18px auto 0;
  opacity: 0.55;
  /* Draws in just after the heading fades in (.section-title carries
     .reveal — see below), like a line being underlined by hand. */
  transform: scaleX(0);
  transition: transform .6s var(--ease-out-strong) .15s;
}
.section-title.is-visible::after { transform: scaleX(1); }
.section-title--left { text-align: left; margin-bottom: 24px; }
.section-title--left::after { content: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 34px;
  font-size: 13px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform 160ms var(--ease-out-strong);
  white-space: nowrap;
}
/* A 1px nudge reads as barely-there; a scale confirms the interface felt
   the press. Subtle (0.97) and fast (160ms, top of the press-feedback
   budget) so it never feels laggy. */
.btn:active { transform: scale(0.97); }

.btn--outline-dark {
  border-color: var(--c-dark-2);
  color: var(--c-dark-2);
  background: transparent;
}
.btn--outline-dark:hover { background: var(--c-dark-2); color: var(--c-cream); }

.btn--outline-dark:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn--solid-dark { background: var(--c-dark-2); border-color: var(--c-dark-2); color: var(--c-cream); }
.btn--solid-dark:hover { background: var(--c-dark); border-color: var(--c-dark); }
.btn--solid-dark:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn--block { width: 100%; }
.btn--small { padding: 11px 22px; font-size: 12px; }

.btn.is-added {
  background: var(--c-dark-2);
  color: var(--c-cream);
  /* The label swaps to "Добавлено ✓" as a plain textContent change with
     nothing marking the moment — a quick confirm pulse turns a silent
     teleport into visible feedback that the click registered. */
  animation: addedPulse 320ms var(--ease-out-strong);
}
@keyframes addedPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ---------- Placeholder media blocks ---------- */
.ph {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #E9DBBB 0%, #CDA96F 48%, #A87E52 100%);
}
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 55%);
}
.ph__icon {
  width: 15%;
  min-width: 28px;
  max-width: 64px;
  aspect-ratio: 1;
  color: rgba(255,255,255,0.5);
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  position: relative;
  z-index: 1;
}
.ph__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.85);
  background: rgba(46,33,23,0.4);
  padding: 4px 9px;
  border-radius: 4px;
  z-index: 1;
  font-family: var(--font-sans);
}

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  /* Above .nav-overlay (150) so the mobile nav panel and its close button —
     both descendants of this header — aren't trapped below the overlay.
     .site-header creates its own stacking context (position: sticky), so a
     descendant's z-index (e.g. .main-nav's 200) is only ever compared
     against its *siblings inside this header*, never against .nav-overlay,
     which lives outside it as a separate body-level sibling. Without this,
     the overlay painted above the whole header on every screen where the
     mobile nav can open, silently swallowing clicks meant for the visible
     close button. */
  z-index: 210;
  border-bottom: 1px solid var(--c-line-soft);
  transition: border-color .25s var(--ease);
  isolation: isolate;
}
/* .site-header__bg carries the background/blur instead of .site-header
   itself: backdrop-filter makes the element it's set on a containing block
   for its position:fixed descendants (Chrome/Firefox/Safari). .main-nav
   (the mobile drawer) is one of those descendants, so with backdrop-filter
   on .site-header directly, opening the menu after any scroll (as soon as
   .is-scrolled applies) resized/repositioned the drawer against the
   header's own ~80px box instead of the viewport — the reported "page
   shrinks, menu becomes a separate column" bug — and even while the drawer
   was closed, its off-canvas position:fixed box was pulled into normal
   document flow for overflow purposes, adding phantom horizontal scroll
   width on every scrolled mobile page. Keeping the filter on this
   non-ancestor sibling avoids creating that containing block at all. */
.site-header__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--c-header);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
  pointer-events: none;
}
.site-header.is-scrolled {
  border-bottom-color: rgba(59, 42, 31, 0.1);
}
.site-header.is-scrolled .site-header__bg {
  background-color: rgba(246, 240, 228, 0.72);
  box-shadow: 0 8px 28px rgba(59,42,31,0.09);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  height: 92px;
}

.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo__title { font-family: var(--font-serif); font-size: 24px; color: var(--c-dark); }
.logo__subtitle { font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--c-muted); margin-top: 2px; }

.main-nav ul { display: flex; justify-content: center; gap: 34px; }
.main-nav a { font-size: 14.5px; color: var(--c-dark-2); position: relative; padding-bottom: 4px; }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--c-dark-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.main-nav a:hover::after,
.main-nav a.is-active::after { transform: scaleX(1); }

.nav-close, .nav-toggle { display: none; }

/* grid-column: 3 pins this to the header's last track even when .nav-toggle
   (moved in here on mobile) leaves only 2 items in flow, since auto-placement
   would otherwise drop it into the middle (1fr) column instead. */
.site-header__actions { display: flex; align-items: center; gap: 18px; justify-self: end; grid-column: 3; }
.icon-btn { display: flex; padding: 4px; }
.icon-btn .icon { width: 20px; height: 20px; }
.nav-toggle { padding: 4px; }
.nav-toggle .icon { width: 20px; height: 20px; }

/* ---- Search bar ---- */
.search-bar {
  position: sticky;
  top: 92px;
  z-index: 99;
  background: var(--c-header);
  border-bottom: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease), border-color .3s var(--ease);
}
.search-bar.is-open { max-height: 90px; border-bottom-color: var(--c-line-soft); }
.search-bar__inner { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.search-bar__inner > .icon { color: var(--c-muted); flex-shrink: 0; }
.search-bar__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--c-dark-2);
  outline: none;
}
.search-bar__input::placeholder { color: var(--c-muted); }
.search-bar__count { font-size: 13px; color: var(--c-muted); white-space: nowrap; flex-shrink: 0; }
.search-bar__nav, .search-bar__close {
  display: flex;
  padding: 4px;
  color: var(--c-muted);
  flex-shrink: 0;
  transition: color .2s var(--ease);
}
.search-bar__nav:hover, .search-bar__close:hover { color: var(--c-dark-2); }
.search-bar__nav:disabled { opacity: 0.3; pointer-events: none; }

mark.site-search__mark { background: var(--c-accent); color: var(--c-cream); border-radius: 2px; padding: 0 1px; }
mark.site-search__mark.is-current { background: var(--c-dark-2); color: var(--c-cream); }

.icon-btn--cart { position: relative; }
.cart-badge {
  position: absolute;
  top: -3px; right: -6px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--c-dark-2);
  color: var(--c-cream);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.nav-overlay { display: none; }

/* ---- Cart drawer ---- */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(30,21,14,0.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 92vw);
  background: var(--c-cream);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  box-shadow: -10px 0 30px rgba(59,42,31,0.15);
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--c-line);
  flex-shrink: 0;
}
.cart-drawer__header h2 { font-family: var(--font-serif); font-size: 21px; font-weight: 500; color: var(--c-dark); }
.cart-drawer__close { display: flex; padding: 4px; color: var(--c-muted); transition: color .2s var(--ease); }
.cart-drawer__close:hover { color: var(--c-dark-2); }
.cart-drawer__close .icon { width: 20px; height: 20px; }

.cart-drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cart-empty { font-size: 14px; color: var(--c-muted); text-align: center; padding-block: 40px; }

.cart-items { display: flex; flex-direction: column; gap: 20px; }
.cart-item { display: flex; gap: 14px; align-items: flex-start; }
.cart-item__img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; background: var(--c-bg-alt); flex-shrink: 0; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-size: 14px; color: var(--c-dark-2); margin-bottom: 4px; }
.cart-item__price { font-size: 13px; color: var(--c-muted); margin-bottom: 8px; }
.cart-item__qty { display: flex; align-items: center; gap: 10px; }
.cart-item__qty button {
  width: 24px; height: 24px;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; color: var(--c-dark-2);
  transition: background-color .2s var(--ease);
}
.cart-item__qty button:hover { background: var(--c-bg-alt); }
.cart-item__qty span { font-size: 13.5px; min-width: 14px; text-align: center; }
.cart-item__remove { flex-shrink: 0; color: var(--c-muted); padding: 4px; transition: color .2s var(--ease); }
.cart-item__remove:hover { color: var(--c-dark-2); }
.cart-item__remove .icon { width: 14px; height: 14px; }

.cart-drawer__footer {
  border-top: 1px solid var(--c-line);
  padding: 20px 24px 24px;
  flex-shrink: 0;
}
.cart-drawer__view-link { margin-bottom: 10px; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; font-size: 15px; color: var(--c-dark-2); }
.cart-total strong { font-family: var(--font-serif); font-size: 22px; color: var(--c-dark); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--c-dark-2);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  /* Hidden until content-loader.js confirms which photo is actually saved
     (is-ready, added once /api/content resolves or fails either way) —
     otherwise the static fallback photo baked into this HTML flashes for
     a moment before the admin's real one swaps in. */
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.hero.is-ready { opacity: 1; }
.hero.is-dragging { cursor: grabbing; }
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide { opacity: 0; transition: opacity .4s ease-out; will-change: opacity, transform; }
.hero__slide.is-active { opacity: 1; }
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgb(20, 16, 12);
  opacity: 0.3; /* overridden inline from hero.overlayOpacity when set in the admin */
}
.hero__gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, 0.6) 100%);
  opacity: 0.5; /* overridden inline from hero.gradientOpacity when set in the admin */
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-block: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__slide-text { display: none; }
.hero__slide-text.is-active { display: flex; flex-direction: column; align-items: center; animation: heroTextIn .7s var(--ease); }
@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__title {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  color: var(--c-cream);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  margin-bottom: 18px;
}
.hero__text {
  color: rgba(251,246,236,0.88);
  font-size: 16px;
  line-height: 1.45;
  max-width: 420px;
  margin-bottom: 34px;
}

.hero__cta {
  background: var(--c-cream);
  color: var(--c-dark-2);
  border-color: var(--c-cream);
  border-radius: 999px;
  padding: 16px 40px;
}
.hero__cta:hover { background: transparent; color: var(--c-cream); border-color: rgba(251,246,236,0.75); }

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(251,246,236,0.5);
  background: rgba(20,16,12,0.15);
  color: var(--c-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.hero__arrow:hover { background: rgba(20,16,12,0.4); border-color: var(--c-cream); }
.hero__arrow--prev { left: 20px; }
.hero__arrow--next { right: 20px; }
@media (max-width: 640px) {
  .hero__arrow { width: 36px; height: 36px; }
  .hero__arrow--prev { left: 10px; }
  .hero__arrow--next { right: 10px; }
}

.dots { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.dots--static { position: static; transform: none; justify-content: center; margin-top: 40px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(59,42,31,0.25);
  /* Explicit properties, not "all" — the pill-morph on .is-active needs
     width/border-radius to actually animate (transform can't interpolate
     border-radius), but "all" risks quietly transitioning anything a
     future rule adds here too. */
  transition: background-color .25s var(--ease), width .25s var(--ease), border-radius .25s var(--ease);
  padding: 0;
}
.hero .dot { background: rgba(251,246,236,0.4); }
.dot.is-active { background: var(--c-accent); width: 22px; border-radius: 4px; }
.hero .dot.is-active { background: var(--c-cream); }

/* ================= PRODUCTS ================= */
.products { background: var(--c-bg); }
.catalog-page > .catalog-page__section:first-child {
  padding-top: 38px;
}
.catalog-page .legal-page__back {
  margin-bottom: 14px;
}
.catalog-page .section-title {
  margin-bottom: 36px;
}
.catalog-page__section--decor {
  border-top: 1px solid var(--c-line-soft);
  padding-top: 72px;
}
.products__grid {
  display: grid;
  /* minmax(0, 1fr), not plain 1fr: a card's gallery track sets its slides'
     width in pixels (content-loader.js), and a plain 1fr column has no
     upper bound on its own min-width — it grows to fit that pixel width
     instead of clipping it, and every card after the first compounds the
     effect since they all share the now-inflated column tracks. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.product-card { display: flex; flex-direction: column; }
.product-card__image {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
  background: var(--c-bg-alt);
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease), opacity .18s ease-out;
}

/* Sold-out state: toggled by content-loader.js's applyStockState() when
   an item's inStock is explicitly false. */
.product-card.is-sold-out .product-card__image::after {
  content: 'Продано';
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--c-dark-2);
  color: var(--c-white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.product-card.is-sold-out .product-card__img { opacity: .55; }
.product-card.is-sold-out .card-cart-row { display: none; }

/* The HTML contains fallback photos, while the current admin-managed photos
   arrive from /api/content. Keep those visual slots stable and concealed
   until content-loader has the current files decoded; this prevents an old
   photo or an empty white card flashing during refresh. */
html.content-loading .product-card__img,
html.content-loading .about__img,
html.content-loading .process__img { opacity: 0; }
html.content-loading .product-card__image::before,
html.content-loading .about__media::before,
html.content-loading .process__media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--c-bg-alt) 20%, var(--c-cream) 45%, var(--c-bg-alt) 70%);
  background-size: 220% 100%;
  animation: contentPlaceholder 1.1s linear infinite;
}
@keyframes contentPlaceholder { to { background-position-x: -220%; } }
/* Hover-zoom composes with the admin's pan/zoom/rotate instead of fighting
   it: applyTransform() writes --wbh-* custom properties rather than the
   transform itself, [data-transform-field] below builds the real transform
   from them, and hover only ever nudges --wbh-hover-scale — so an inline
   style can never silently outrank this the way a plain hover rule would.
   Single-photo cards: the only image zooms directly (child combinator
   keeps this from also matching gallery slides, which sit two levels
   deeper). Multi-photo cards: only inside .is-active-slide (content-
   loader.js) zooms — if every slide zoomed, an off-screen neighbour's own
   zoom would push its edge past its slot and bleed into the visible frame. */
/* Gated to real pointers — touch fires a "hover" on tap with no way to
   leave it, so an ungated zoom would look stuck until the next tap. */
@media (hover: hover) and (pointer: fine) {
  .product-card:hover > .product-card__image > .product-card__img { --wbh-hover-scale: 1.06; }
  .product-card:hover .card-gallery__slide.is-active-slide .product-card__img { --wbh-hover-scale: 1.06; }
}

/* Per-card photo gallery (js/content-loader.js wraps the single <img> in
   this when an item has extra photos) — arrows + drag, looping via a
   clone-of-first/clone-of-last on each end of the track. */
.card-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.card-gallery__track {
  display: flex;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  transition: transform .3s var(--ease);
}
.card-gallery__slide {
  /* Its own clipping box, separate from the shared .card-gallery one — a
     photo can be zoomed up to 2.5x in the admin, and without this, that
     zoom (visually much wider than the slide) only had the outer
     .card-gallery boundary clipping it, shared with every other slide at
     once; a hairline of it could still show past its own slot. Width is
     set in pixels by JS to match the translateX step exactly — percentages
     here would round independently of that translate and could leave a
     hairline of the next slide visible at the edge regardless. */
  flex: 0 0 auto;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.card-gallery__slide .product-card__img {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.card-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--c-dark-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity .2s var(--ease), background .2s var(--ease);
}
.card-gallery__arrow .icon { width: 16px; height: 16px; }
.card-gallery__arrow:hover { background: #fff; }
.card-gallery__arrow--prev { left: 8px; }
.card-gallery__arrow--next { right: 8px; }
.product-card__image:hover .card-gallery__arrow { opacity: 1; }
@media (hover: none) {
  .card-gallery__arrow { opacity: 1; }
}
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-dark-2);
  z-index: 2;
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.wishlist-btn:hover { transform: scale(1.08); }
.wishlist-btn .icon { width: 16px; height: 16px; }
.wishlist-btn[aria-pressed="true"] { color: #b5493f; }
.wishlist-btn[aria-pressed="true"] .icon {
  fill: currentColor;
  /* Plays once, exactly when aria-pressed starts matching (i.e. on the
     like), not on every re-render — a keyframe restart needs the rule to
     stop and re-start matching, which only the state change does. */
  animation: heartPop 380ms var(--ease-out-strong);
}
@keyframes heartPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  60% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* Reserved to a fixed 2-line height (clamped, not just capped) so a short
   one-line name and a long two-line name leave price/button starting at
   the same y in every card of a row — otherwise the grid's row-stretch
   only equalizes total card height, not where the button sits inside it. */
.product-card__name {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 4px;
  height: calc(1.2em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.product-card__name:hover { color: var(--c-accent); }
.product-card__image { cursor: pointer; }
.product-card__desc {
  font-size: 13.5px;
  color: var(--c-muted);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card__price { font-family: var(--font-serif); font-size: 19px; color: var(--c-dark-2); margin-bottom: 16px; }

/* ---- Qty stepper + add-to-cart pill (product cards & product-detail page) ---- */
.card-cart-row { display: flex; align-items: center; gap: 10px; }
.qty-stepper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-bg-alt);
  padding: 4px;
}
.qty-stepper__btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--c-dark-2);
  transition: background-color .2s var(--ease);
}
.qty-stepper__btn:hover { background: var(--c-white); }
.qty-stepper__value { min-width: 22px; text-align: center; font-size: 14px; font-weight: 600; color: var(--c-dark-2); }
.btn-cart-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--c-dark-2);
  color: var(--c-cream);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  transition: background-color .25s var(--ease), transform 160ms var(--ease-out-strong);
}
.btn-cart-pill:hover { background: var(--c-dark); }
.btn-cart-pill:active { transform: scale(0.97); }
.btn-cart-pill .icon { width: 16px; height: 16px; flex-shrink: 0; }
.btn-cart-pill.is-added { background: var(--c-green); animation: addedPulse 320ms var(--ease-out-strong); }

.products__more { text-align: center; margin-top: 52px; }

/* ================= MARQUEE ================= */
.marquee {
  background: var(--c-dark-2);
  overflow: hidden;
  padding-block: 17px;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee__group span:not(.marquee__sep) {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--c-cream);
  white-space: nowrap;
  padding-inline: 22px;
}
.marquee__sep {
  color: var(--c-accent);
  font-size: 15px;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ================= BRAND DIVIDER ================= */
.brand-divider { display: flex; justify-content: center; padding-block: 28px; background: var(--c-bg); }
.brand-divider__logo { width: min(420px, 60vw); height: auto; opacity: 0.4; }

/* ================= FEATURES ================= */
.features { background: var(--c-bg-alt); padding-block: 72px; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
@media (hover: hover) and (pointer: fine) {
  .feature:hover .feature__icon { transform: scale(1.06); }
}
.feature__icon {
  width: 68px;
  height: 68px;
  stroke: var(--c-dark-2);
  stroke-width: 1.1;
  fill: none;
  flex-shrink: 0;
  transition: transform .5s var(--ease);
  will-change: transform;
}
.feature__title {
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--c-dark);
}
.feature p { font-size: 14.5px; line-height: 1.65; max-width: 250px; color: var(--c-muted); }

/* ================= PROCESS ================= */
.process { background: var(--c-bg); }
.process .section-title { margin-bottom: 16px; }
.process__lead { text-align: center; max-width: 560px; margin: 0 auto 56px; color: var(--c-muted); font-size: 15px; line-height: 1.75; }
.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.process__step { display: flex; flex-direction: column; }
.process__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--c-bg-alt);
  box-shadow: var(--shadow-soft);
}
.process__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease), opacity .18s ease-out; }
@media (hover: hover) and (pointer: fine) {
  /* --wbh-hover-scale, not a direct transform: .process__img also carries
     [data-transform-field] for the admin's pan/zoom, and that rule already
     composes scale/translate/rotate from these custom properties — setting
     transform directly here would silently fight it. */
  .process__step:hover .process__img { --wbh-hover-scale: 1.06; }
}
.process__number {
  position: absolute;
  top: 14px; left: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--c-dark-2);
  color: var(--c-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 14px;
  z-index: 2;
}
.process__title { font-size: 16px; font-weight: 600; letter-spacing: 0.02em; color: var(--c-dark); margin-bottom: 8px; }
.process__text { font-size: 14px; line-height: 1.65; color: var(--c-muted); }

/* ================= ABOUT ================= */
.about { background: var(--c-bg); }
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3.4; box-shadow: var(--shadow-card); }
.about__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .18s ease-out; }
.about__text { font-size: 15.5px; line-height: 1.8; color: var(--c-muted); margin-bottom: 20px; max-width: 460px; }
.about__content .btn { margin-top: 8px; }

/* ================= REVIEWS ================= */
.reviews { background: var(--c-bg-alt); }
.reviews-carousel { display: flex; align-items: center; gap: 18px; }
.reviews-carousel__viewport {
  flex: 1;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.reviews-carousel__viewport.is-dragging { cursor: grabbing; }
.reviews-carousel__track {
  display: flex;
  gap: 32px;
  transition: transform .4s var(--ease);
  will-change: transform;
}
.review-card {
  flex: 0 0 calc((100% - 32px) / 2);
  background: var(--c-cream);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: var(--shadow-card);
  min-height: 260px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .review-card:hover {
    transform: scale(1.04);
    box-shadow: 0 18px 40px rgba(59,42,31,0.16);
  }
}
.chat-bubble {
  max-width: 92%;
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 17px;
  line-height: 1.55;
  position: relative;
}
.chat-bubble p { margin-bottom: 8px; }
.chat-bubble__time { display: block; font-size: 13px; color: var(--c-muted); text-align: right; }
.chat-bubble--in { align-self: flex-start; background: var(--c-white); border-bottom-left-radius: 4px; }
.chat-bubble--out { align-self: flex-end; background: var(--c-bg-alt-2); border-bottom-right-radius: 4px; }
.chat-bubble__photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chat-bubble__photo {
  width: 56px; height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}
.chat-bubble__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .chat-bubble__photo:hover img { --wbh-hover-scale: 1.1; }
}

.carousel-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.carousel-arrow:hover { background: var(--c-dark-2); color: var(--c-cream); border-color: var(--c-dark-2); }

/* ================= FAQ ================= */
.faq { background: var(--c-bg); }
.faq__inner {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: start;
}
.faq__intro { position: sticky; top: 140px; }
.faq__intro .section-title { margin-bottom: 20px; }
.faq__lead {
  max-width: 360px;
  color: var(--c-muted);
  font-size: 15px;
  line-height: 1.8;
}
.faq__list { border-top: 1px solid var(--c-line); }
.faq-item { border-bottom: 1px solid var(--c-line); }
.faq-item__heading { font-family: var(--font-sans); }
.faq-item__trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  gap: 18px;
  align-items: center;
  padding: 24px 2px;
  text-align: left;
  color: var(--c-dark-2);
}
.faq-item__number {
  color: var(--c-accent);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.faq-item__question {
  font-size: 16px;
  line-height: 1.55;
  font-weight: 500;
  transition: color 180ms var(--ease);
}
.faq-item__icon {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  color: var(--c-dark-2);
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease);
}
.faq-item__icon span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.faq-item__icon span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 200ms var(--ease-in-out-strong), opacity 200ms var(--ease-out-strong);
}
.faq-item.is-open .faq-item__icon {
  background: var(--c-dark-2);
  border-color: var(--c-dark-2);
  color: var(--c-cream);
}
.faq-item.is-open .faq-item__icon span:last-child {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(180deg);
}
.faq-item__content {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 200ms var(--ease-out-strong), opacity 200ms var(--ease-out-strong);
}
.faq-item.is-open .faq-item__content { opacity: 1; }
.faq-item__content-inner {
  padding: 0 48px 24px 56px;
  color: var(--c-muted);
  font-size: 14.5px;
  line-height: 1.8;
}
@media (hover: hover) and (pointer: fine) {
  .faq-item__trigger:hover .faq-item__question { color: var(--c-accent); }
  .faq-item__trigger:hover .faq-item__icon { border-color: var(--c-accent); }
}

/* ================= FOOTER ================= */
.site-footer { background: var(--c-bg-alt-2); padding-top: 80px; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 64px;
}
.footer__title { font-size: 18px; margin-bottom: 20px; }
.footer__label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-muted); margin-bottom: 10px; }
.footer__label--spaced { margin-top: 18px; }
.footer__text { font-size: 13.5px; line-height: 1.7; color: var(--c-muted); margin-bottom: 12px; }
.footer__text strong { display: block; color: var(--c-dark-2); font-weight: 600; margin-bottom: 2px; }
.footer__contact { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; color: var(--c-dark-2); }
.footer__note { font-size: 12.5px; color: var(--c-muted); margin-bottom: 16px; }

.pay-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pay-badge {
  height: 26px;
  padding-inline: 10px;
  border-radius: 4px;
  background: var(--c-white);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--c-dark-2);
  border: 1px solid var(--c-line);
}
.pay-badge--visa { color: #1a1f71; font-style: italic; font-family: Georgia, serif; }
.pay-badge--mc { padding-inline: 8px; }
.mc-circles { display: inline-flex; }
.mc-circles i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.mc-circles i:first-child { background: #eb001b; margin-right: -4px; }
.mc-circles i:last-child { background: #f79e1b; opacity: 0.85; }

.social-row { display: flex; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.social-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--c-line);
  font-size: 12.5px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.social-pill:hover { background: var(--c-dark-2); color: var(--c-cream); }
.social-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.social-circle:hover { background: var(--c-dark-2); color: var(--c-cream); }

/* ---- CTA bar ---- */
.cta-bar { display: grid; grid-template-columns: 1fr 1fr; }
.cta-block {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px 48px;
  color: var(--c-cream);
  position: relative;
  overflow: hidden;
}
.cta-block--telegram { background: var(--c-dark-2); }
.cta-block--whatsapp { background: var(--c-green); }
.cta-block__icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cta-block__icon .icon { width: 22px; height: 22px; color: var(--c-cream); }
.cta-block__text { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cta-block__text strong { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.cta-block__text em { font-style: normal; font-size: 12.5px; opacity: 0.8; }
.cta-block__arrow { color: var(--c-cream); opacity: 0.8; transition: transform .25s var(--ease); flex-shrink: 0; }
.cta-block:hover .cta-block__arrow { transform: translateX(6px); }

/* ---- Legal links bar ---- */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--c-dark-2);
}
.footer__legal-link {
  font-size: 12.5px;
  color: var(--c-cream);
  opacity: 0.5;
  transition: opacity .2s var(--ease);
}
.footer__legal-link:hover, .footer__legal-link:focus-visible { opacity: 0.9; }
.footer__legal-divider { color: var(--c-cream); opacity: 0.3; font-size: 12.5px; }

/* ================= Legal pages (privacy policy, public offer) ================= */
.legal-page { padding-block: 64px 100px; }
.legal-page__container { max-width: 800px; margin-inline: auto; }
.legal-page__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--c-muted);
  margin-bottom: 28px;
  transition: color .2s var(--ease);
}
.legal-page__back:hover { color: var(--c-dark-2); }
.legal-page__back .icon { width: 16px; height: 16px; }
.legal-page__updated { font-size: 13px; color: var(--c-muted); margin-bottom: 10px; }
.legal-page h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 4vw, 40px); color: var(--c-dark); margin-bottom: 16px; }
.legal-page__intro { font-size: 15px; line-height: 1.75; color: var(--c-muted); max-width: 640px; margin-bottom: 52px; }
.legal-page section { margin-bottom: 34px; }
.legal-page section:last-of-type { margin-bottom: 0; }
.legal-page h2 { font-family: var(--font-serif); font-weight: 500; font-size: 21px; color: var(--c-dark); margin-bottom: 12px; }
.legal-page p { font-size: 15px; line-height: 1.75; color: var(--c-dark-2); margin-bottom: 12px; }
.legal-page p:last-child { margin-bottom: 0; }
.legal-page ul { margin: 0 0 12px; padding-left: 20px; }
.legal-page li { font-size: 15px; line-height: 1.75; color: var(--c-dark-2); margin-bottom: 6px; }
.legal-page a { color: var(--c-accent); text-underline-offset: 3px; }
.legal-page table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13.5px; }
.legal-page th, .legal-page td { text-align: left; padding: 10px 14px; border: 1px solid var(--c-line); }
.legal-page th { background: var(--c-bg-alt); font-weight: 600; color: var(--c-dark-2); }
.legal-page__note {
  font-size: 13.5px; line-height: 1.7; color: var(--c-muted);
  background: var(--c-bg-alt); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-top: 44px;
}

/* ================= Reveal on scroll ================= */
/* translateY comes from --wbh-reveal-y rather than being hardcoded so an
   element can also set --wbh-hover-scale on hover without the two effects
   fighting over the whole transform value. */
.reveal { opacity: 0; transform: translateY(var(--wbh-reveal-y, 24px)) scale(var(--wbh-hover-scale, 1)); transition: opacity .7s var(--ease-out-strong), transform .7s var(--ease-out-strong); }
.reveal.is-visible { opacity: 1; --wbh-reveal-y: 0px; }

/* This informational row should never shift or animate on refresh. Its
   content is short and fixed-height, so motion adds noise rather than useful
   orientation feedback. */
.features .reveal,
.features .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: none;
}
.features .section-title::after {
  transform: scaleX(1);
  transition: none;
}

/* Cards in the same row cascade in rather than popping together — the
   30-80ms/step range keeps it feeling quick, not slow. Position-based,
   not per-section, so candles/decor (both .products__grid) and features
   share one rule. */
.products__grid .reveal:nth-child(2),
.features__grid .reveal:nth-child(2) { transition-delay: 60ms; }
.products__grid .reveal:nth-child(3),
.features__grid .reveal:nth-child(3) { transition-delay: 120ms; }
.products__grid .reveal:nth-child(4),
.features__grid .reveal:nth-child(4) { transition-delay: 180ms; }

/* Reduced motion means fewer/gentler animations, not zero — opacity fades
   stay (they aid comprehension of what's appearing), position/scale
   movement goes. Covers scroll-reveal, the underline draw-in, and the
   hero/card/review carousels, which otherwise slide on every interaction. */
@media (prefers-reduced-motion: reduce) {
  .site-header { transition-duration: .01ms; }
  .reveal, .reveal.is-visible {
    transform: none;
    transition: opacity .3s ease;
  }
  .section-title::after {
    transition: opacity .3s ease;
    transform: none;
  }
  .hero__slide,
  .card-gallery__track,
  .reviews-carousel__track {
    transition-duration: 0.01ms !important;
  }
  .faq-item__content { transition: height 0ms, opacity 120ms ease; }
  .faq-item__icon span:last-child { transition: opacity 120ms ease; }
  .product-accordion__panel { transition: height 0ms, opacity 120ms ease; }
  .product-accordion__icon span:last-child { transition: opacity 120ms ease; }
  .star-rating__btn { transition: none; }
}

/* ================= PRODUCT DETAIL PAGE ================= */
.product-detail { padding-block: 48px 100px; }
.product-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.product-detail__gallery {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--c-bg-alt);
}
.product-detail__gallery .card-gallery__arrow { opacity: 1; width: 40px; height: 40px; }
.product-detail__gallery .card-gallery__arrow .icon { width: 20px; height: 20px; }
.product-detail__dots { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.product-detail__dots .dot { background: rgba(255,255,255,0.6); }
.product-detail__dots .dot.is-active { background: #fff; width: 20px; border-radius: 4px; }

.product-detail__tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-accent);
  background: var(--c-bg-alt);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.product-detail__name { font-family: var(--font-serif); text-transform: uppercase; font-weight: 500; font-size: clamp(28px, 3vw, 38px); color: var(--c-dark); margin-bottom: 14px; }

/* ---- Rating (average display + optional personal 1-5 star input) ---- */
/* Stacked rather than inline: the average-rating summary and the personal
   "Оценить товар" input read as two distinct pieces of information, and
   sitting on one row made them run into each other at this column's width. */
.product-detail__rating { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 18px; }
.product-detail__rating-summary { display: flex; align-items: center; gap: 10px; }
.product-detail__rating-text { font-size: 13.5px; color: var(--c-muted); }
.star-rating { display: inline-flex; align-items: center; gap: 2px; }
.star-rating__icon { width: 16px; height: 16px; fill: none; stroke: var(--c-line); stroke-width: 1.4; }
.star-rating__star.is-filled .star-rating__icon,
.star-rating__btn.is-filled .star-rating__icon { fill: var(--c-accent); stroke: var(--c-accent); }
.star-rating__btn {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  color: inherit;
  transition: transform 120ms var(--ease-out-strong);
}
.star-rating__btn .star-rating__icon { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .star-rating__btn:hover { transform: scale(1.12); }
}
.star-rating__btn:focus-visible { transform: scale(1.12); outline: 1px solid var(--c-accent); outline-offset: 2px; }
.product-detail__rate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-detail__rate-label { font-size: 13px; color: var(--c-muted); }
.product-detail__rate-result { font-size: 13px; color: var(--c-accent); font-weight: 600; }

.product-detail__price { font-family: var(--font-serif); font-size: 26px; color: var(--c-dark-2); margin-bottom: 28px; }

/* ---- Purchase block: qty + add to cart + buy now + delivery note ---- */
.product-detail__purchase { margin-bottom: 36px; max-width: 420px; }
.product-detail__cart-row { margin-bottom: 14px; max-width: none; }
.product-detail__cart-row .qty-stepper { padding: 6px; }
.product-detail__cart-row .qty-stepper__btn { width: 30px; height: 30px; }
.product-detail__cart-row .btn-cart-pill { padding: 15px 24px; font-size: 13px; }
.qty-stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.product-detail__buy-now { margin-bottom: 14px; }
.product-detail__delivery-note { font-size: 13px; line-height: 1.6; color: var(--c-muted); }
.product-detail__terms-link { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; transition: color .2s var(--ease); }
.product-detail__terms-link:hover, .product-detail__terms-link:focus-visible { color: var(--c-dark-2); }

.product-detail__sold-note {
  display: inline-block;
  margin-bottom: 36px;
  padding: 12px 18px;
  background: var(--c-bg-alt);
  color: var(--c-dark-2);
  font-size: 14px;
  border-radius: var(--radius);
}
/* Same fix as [data-block][hidden] above: an own `display` beats the
   browser's default [hidden] rule at equal specificity, so the sold-out
   note stayed visible for in-stock items no matter what its `hidden`
   property was set to. The extra [hidden] attribute here raises this
   selector's specificity past the plain class above, so no !important
   is needed. */
.product-detail__sold-note[hidden] { display: none; }

.product-detail__desc-wrap { margin-bottom: 32px; max-width: 520px; }
.product-detail__desc { font-size: 15px; line-height: 1.75; color: var(--c-dark-2); }
/* Long-description collapse: line-clamp instead of a fixed pixel height so
   it adapts to however much text a given product actually has. */
.product-detail__desc.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
}
.product-detail__desc-toggle {
  display: inline-block;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s var(--ease);
}
.product-detail__desc-toggle:hover,
.product-detail__desc-toggle:focus-visible { color: var(--c-dark-2); }
.product-detail__specs { list-style: none; margin-bottom: 40px; display: flex; flex-direction: column; gap: 12px; }
.product-detail__specs li { font-size: 14.5px; line-height: 1.7; color: var(--c-dark-2); }
.product-detail__specs strong { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.product-detail__packaging {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--c-muted);
  background: var(--c-bg-alt);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  max-width: 520px;
  margin-bottom: 8px;
}

/* ---- Info accordion: care (candles only) + delivery/payment/return ---- */
/* Visual language borrowed from .faq-item (same tokens, spacing rhythm,
   plus/rotate icon) but built standalone — this list has no numbering
   column and must never share DOM/selectors with the homepage FAQ. */
.product-accordion { border-top: 1px solid var(--c-line); margin-top: 8px; }
.product-accordion__item { border-bottom: 1px solid var(--c-line); }
.product-accordion__heading { font-family: var(--font-sans); }
.product-accordion__trigger {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 14px;
  padding: 18px 2px;
  text-align: left;
  color: var(--c-dark-2);
}
.product-accordion__question-icon { color: var(--c-accent); flex-shrink: 0; }
.product-accordion__question { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; line-height: 1.5; transition: color 180ms var(--ease); }
.product-accordion__icon {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  color: var(--c-dark-2);
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease);
}
.product-accordion__icon span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.product-accordion__icon span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 200ms var(--ease-in-out-strong), opacity 200ms var(--ease-out-strong);
}
.product-accordion__item.is-open .product-accordion__icon {
  background: var(--c-dark-2);
  border-color: var(--c-dark-2);
  color: var(--c-cream);
}
.product-accordion__item.is-open .product-accordion__icon span:last-child {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(180deg);
}
.product-accordion__panel {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 200ms var(--ease-out-strong), opacity 200ms var(--ease-out-strong);
}
.product-accordion__item.is-open .product-accordion__panel { opacity: 1; }
.product-accordion__panel-inner { padding: 0 32px 18px 2px; color: var(--c-muted); font-size: 14px; line-height: 1.75; }
.product-accordion__panel-inner p { margin-bottom: 10px; }
.product-accordion__panel-inner p:last-of-type { margin-bottom: 0; }
.product-accordion__link { display: inline-block; margin-top: 4px; color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; transition: color .2s var(--ease); }
.product-accordion__link:hover, .product-accordion__link:focus-visible { color: var(--c-dark-2); }
@media (hover: hover) and (pointer: fine) {
  .product-accordion__trigger:hover .product-accordion__question { color: var(--c-accent); }
  .product-accordion__trigger:hover .product-accordion__icon { border-color: var(--c-accent); }
}

/* ================= CART PAGE ================= */
.cart-page { padding-block: 56px 100px; }
.cart-page__container { max-width: 760px; margin-inline: auto; }
.cart-page__list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
.cart-page .cart-item { padding-bottom: 24px; border-bottom: 1px solid var(--c-line); }
.cart-page .cart-item:last-child { border-bottom: none; padding-bottom: 0; }
.cart-page .cart-item__img { width: 96px; height: 96px; }
.cart-page__footer { border-top: 1px solid var(--c-line); padding-top: 28px; max-width: 420px; margin-left: auto; }

/* ================= CHECKOUT PAGE ================= */
.checkout-page { padding-block: 56px 100px; }
.checkout-page__container { max-width: 980px; margin-inline: auto; }
.checkout-page__grid { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }

.checkout-form { display: flex; flex-direction: column; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label, .form-field__label { font-size: 13px; font-weight: 600; color: var(--c-dark-2); }
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--c-dark);
  background: var(--c-cream);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s var(--ease);
  resize: vertical;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--c-accent); }
.form-field textarea { min-height: 44px; }

.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--c-dark-2); cursor: pointer; }
.radio-option input { accent-color: var(--c-dark-2); width: 16px; height: 16px; }

.checkout-note { font-size: 13px; line-height: 1.5; color: var(--c-muted); background: var(--c-bg-alt); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: -8px; }
.checkout-error { font-size: 13px; color: #B23A3A; margin: 0; }

.checkout-summary { background: var(--c-bg-alt); border-radius: var(--radius); padding: 24px; position: sticky; top: 100px; }
.checkout-summary__title { font-family: var(--font-serif); font-weight: 500; font-size: 19px; color: var(--c-dark); margin-bottom: 16px; }
.checkout-summary__list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.checkout-summary__item { display: flex; gap: 12px; align-items: center; }
.checkout-summary__item img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.checkout-summary__item-info { display: flex; flex-direction: column; gap: 2px; }
.checkout-summary__item-info p { font-size: 13.5px; color: var(--c-dark-2); }
.checkout-summary__item-price { color: var(--c-muted) !important; font-size: 12.5px !important; }
.checkout-summary .cart-total { margin-bottom: 0; padding-top: 14px; border-top: 1px solid var(--c-line); }

.checkout-success { text-align: center; max-width: 440px; margin: 40px auto 0; padding: 48px 24px; }
.checkout-success__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-green); color: var(--c-cream); margin-bottom: 20px;
}
.checkout-success__icon .icon { width: 26px; height: 26px; }
.checkout-success h2 { font-family: var(--font-serif); font-weight: 500; font-size: 26px; color: var(--c-dark); margin-bottom: 10px; }
.checkout-success p { font-size: 14.5px; line-height: 1.6; color: var(--c-muted); margin-bottom: 24px; }

@media (max-width: 900px) {
  .checkout-page__grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; order: -1; }
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1180px) {
  .container { padding-inline: 28px; }
  .products__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .about__inner { gap: 48px; }
}

@media (max-width: 900px) {
  .section { padding-block: 64px; }
  .site-header__inner { height: 76px; }
  .search-bar { top: 76px; }
  .main-nav {
    position: fixed;
    /* top/right + an explicit height instead of inset's bottom:0 stretch:
       .site-header gets backdrop-filter once scrolled (.is-scrolled), and
       backdrop-filter makes an element a containing block for its
       position:fixed descendants (Chrome/Firefox/Safari) — so a bottom:0
       stretch would size this drawer against the ~80px header box instead
       of the viewport, collapsing it into a small band pinned under the
       logo with the page showing through underneath. 100dvh is a viewport
       unit, unaffected by which ancestor ends up as the containing block,
       so the drawer covers the full screen regardless. */
    top: 0;
    right: 0;
    left: auto;
    height: 100dvh;
    width: min(340px, 84vw);
    background: var(--c-cream);
    padding: 100px 32px 32px;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    z-index: 200;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 22px; align-items: flex-start; }
  .main-nav a { font-size: 17px; }
  .nav-toggle { display: flex; }
  .nav-close {
    display: flex;
    position: absolute;
    top: 28px; right: 28px;
  }
  .nav-overlay {
    position: fixed; inset: 0;
    background: rgba(30,21,14,0.4);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
  }
  .nav-overlay.is-open { display: block; opacity: 1; pointer-events: auto; }

  .about__inner { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 16/10; }

  .faq__inner { grid-template-columns: 1fr; gap: 36px; }
  .faq__intro { position: static; }
  .faq__lead { max-width: 600px; }

  .product-detail__grid { grid-template-columns: 1fr; gap: 32px; }
  .product-detail__gallery { aspect-ratio: 1 / 1; }
  .product-detail__purchase { max-width: none; }
  .cart-page__footer { max-width: none; }

  .features__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .process__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }

  .footer__grid { grid-template-columns: repeat(2, 1fr); }

  .cta-bar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding-inline: 20px; }
  .hero { min-height: 560px; }
  .hero__content { padding-block: 40px; }
  .hero__title { font-size: 40px; }
  .products__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .process__grid { grid-template-columns: minmax(0, 1fr); max-width: 360px; margin-inline: auto; gap: 36px; }

  /* Compact card content to fit two per row instead of the desktop card's
     full-width layout — same info, smaller type and a stacked cart row
     (stepper + button side by side no longer has room to breathe once the
     card itself is ~150px wide). */
  .products__grid .product-card__image { margin-bottom: 10px; }
  .products__grid .wishlist-btn { width: 28px; height: 28px; top: 8px; right: 8px; }
  .products__grid .wishlist-btn .icon { width: 14px; height: 14px; }
  .products__grid .card-gallery__arrow { width: 24px; height: 24px; }
  .products__grid .card-gallery__arrow .icon { width: 13px; height: 13px; }
  .products__grid .product-card__name { font-size: 14px; height: calc(1.2em * 2); line-height: 1.2; margin-bottom: 2px; }
  .products__grid .product-card__desc { font-size: 12px; margin-bottom: 8px; }
  .products__grid .product-card__price { font-size: 15px; margin-bottom: 10px; }
  .products__grid .card-cart-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .products__grid .qty-stepper { align-self: center; }
  .products__grid .btn-cart-pill { width: 100%; padding: 11px 12px; font-size: 11px; }
  .review-card { flex-basis: 100%; padding: 22px; }
  .reviews-carousel { gap: 0; }
  .carousel-arrow { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 40px; }
  .cta-block { padding: 26px 24px; }
  .logo__title { font-size: 20px; }
  .section-title { margin-bottom: 40px; }
  .catalog-page > .catalog-page__section:first-child { padding-top: 24px; }
  .catalog-page .legal-page__back { margin-bottom: 12px; }
  .catalog-page .section-title { margin-bottom: 30px; }
  .catalog-page__section--decor { padding-top: 56px; }
  .faq-item__trigger { grid-template-columns: 28px minmax(0, 1fr) 32px; gap: 10px; padding-block: 20px; }
  .faq-item__question { font-size: 15px; }
  .faq-item__icon { width: 32px; height: 32px; }
  .faq-item__content-inner { padding: 0 38px 20px 38px; font-size: 14px; }

  .product-detail__rating { margin-bottom: 14px; }
  .product-accordion__trigger { gap: 10px; padding-block: 16px; }
  .product-accordion__question { font-size: 14px; }
  .product-accordion__icon { width: 28px; height: 28px; }
  .product-accordion__panel-inner { padding: 0 28px 16px 2px; font-size: 13.5px; }
}
