:root {
  --bg: #f8f2eb;
  --surface: #ffffff;
  --surface-soft: #f1e6da;
  --text: #3a2520;
  --muted: #7d6a61;
  --line: #eadccf;
  --accent: #d2638c;
  --accent-dark: #b14c74;
  --danger: #c0392b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(58, 37, 32, 0.08);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.5; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section__title { text-align: center; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--accent-dark); margin-bottom: 0.5em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card { background: var(--surface); border-radius: var(--radius); padding: 18px 16px; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.hint { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
.hint--error { color: var(--danger); font-weight: 600; }
.link { border: 0; background: none; padding: 0; color: var(--accent-dark); text-decoration: underline; font-weight: 600; }
.round-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-soft); font-size: 1.6rem; line-height: 1; flex: none; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; text-decoration: none; transition: background 0.2s, transform 0.1s, opacity 0.2s; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn--ghost { background: transparent; border-color: var(--text); }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }
.btn--small { min-height: 38px; padding: 6px 14px; font-size: 0.9rem; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 20; background: rgba(248, 242, 235, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.header__logo { font-weight: 800; font-size: 1.15rem; text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 16px 0 40px; }
.hero__inner { display: grid; gap: 24px; }
.hero__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.hero__sub { font-size: 1.1rem; color: var(--muted); }
.hero__price { font-size: 2rem; font-weight: 800; margin-bottom: 20px; }

/* ---------- Переваги, кроки ---------- */
.benefits { padding-top: 0; }
.benefits__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.benefits__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-soft); font-size: 1.4rem; margin-bottom: 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps .card { display: flex; gap: 14px; }
.steps__num { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; }

/* ---------- Картка товару ---------- */
.catalog-error { background: #fdecea; color: var(--danger); font-weight: 600; padding: 12px 16px; border-radius: var(--radius-sm); }
.product__inner { display: grid; gap: 24px; }
.product__gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); }
.product__gallery img { flex: 0 0 88%; width: 88%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); scroll-snap-align: start; }
.product__gallery img:only-child { flex-basis: 100%; width: 100%; }
.product__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.price-old { font-size: 1.1rem; font-weight: 600; color: var(--muted); }
.badge { align-self: center; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.85rem; font-weight: 700; }
.product__sizes { margin: 16px 0 20px; font-weight: 600; }
.product__group { margin-bottom: 20px; }
.product__group legend { font-weight: 600; margin-bottom: 10px; padding: 0; width: 100%; }
.product__size-legend { display: flex; justify-content: space-between; align-items: baseline; }
.swatches, .sizes, .chips { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch input, .size input, .chip input { position: absolute; opacity: 0; }
.swatch__dot { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--swatch); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--text); }
.swatch input:focus-visible + .swatch__dot, .size input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.size span, .chip > span { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 64px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--surface); border: 2px solid var(--line); font-weight: 600; cursor: pointer; }
.size input:checked + span, .chip input:checked + span { border-color: var(--text); background: var(--text); color: #fff; }
.chip .swatch__dot { width: 20px; height: 20px; border-width: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.chip input:checked + span .swatch__dot { box-shadow: 0 0 0 2px #fff; }

/* ---------- Модальне вікно з розмірною сіткою ---------- */
.modal { width: min(640px, calc(100vw - 32px)); max-height: 85vh; border: 0; border-radius: var(--radius); padding: 20px; color: var(--text); }
.modal::backdrop { background: rgba(30, 20, 16, 0.5); }
.modal__head { display: flex; justify-content: space-between; align-items: center; }
.modal__caption { font-weight: 700; margin: 16px 0 6px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
th[scope='row'] { text-align: left; font-weight: 600; white-space: normal; min-width: 130px; }
thead th { background: var(--surface-soft); }

/* ---------- Мама + дитина, галерея, відгуки ---------- */
.mom, .reviews { background: var(--surface-soft); }
.mom__lead { max-width: 560px; }
.mom__pairs { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 24px -16px 0; padding: 0 16px 8px; }
.mom__pair { flex: 0 0 85%; scroll-snap-align: start; margin: 0; }
.mom__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mom__photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); }
.mom__pair figcaption { margin-top: 8px; font-weight: 700; text-align: center; }
.mom__cta { margin-top: 24px; }
.reviews__track { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 8px; max-width: 1200px; margin: 0 auto; }
.reviews__track img { flex: 0 0 auto; width: 260px; height: auto; scroll-snap-align: center; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* ---------- Форма замовлення ---------- */
.order { background: var(--surface-soft); }
.order__lead { text-align: center; max-width: 520px; margin: -12px auto 24px; }
.order__form, .order__success { max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: var(--radius); padding: 24px 16px; box-shadow: var(--shadow); }
.order__form .size span, .order__form .chip > span { background: var(--bg); }
.order__form .size input:checked + span, .order__form .chip input:checked + span { background: var(--text); }
.order__total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 20px 0 12px; font-size: 1.1rem; }
.order__total strong { font-size: 1.6rem; font-weight: 800; }
.order__success { text-align: center; }
.order__success-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 2rem; display: grid; place-items: center; }
.field { display: block; margin-bottom: 12px; }
.field > span:first-child { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.field input { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font: inherit; font-size: 16px; color: var(--text); }
.field input::placeholder { color: #c2b2a8; }
.field input:focus { border-color: var(--text); outline: none; }
.field input[aria-invalid='true'] { border-color: var(--danger); }
.field__error, .form-error { display: block; color: var(--danger); font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.field__error:empty, .form-error:empty { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- FAQ, футер ---------- */
.faq { max-width: 760px; }
.faq details { background: var(--surface); border-radius: var(--radius-sm); margin-bottom: 10px; }
.faq summary { padding: 16px 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }
.footer { padding: 32px 0 120px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.footer p { margin: 0 0 4px; }
.footer__name { font-weight: 800; color: var(--text); }

/* ---------- Нижня панель «Замовити» ---------- */
.floating { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(58, 37, 32, 0.08); transition: transform 0.25s, opacity 0.25s; }
.floating__inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.floating__price { margin: 0; font-size: 1.25rem; font-weight: 800; }
.floating .btn { flex: none; padding: 12px 28px; }
.floating--hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }

/* ---------- Десктоп ---------- */
@media (min-width: 900px) {
  .section { padding: 88px 0; }
  .hero { padding: 40px 0 72px; }
  .hero__inner { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 56px; }
  .product__inner { grid-template-columns: 1.1fr 1fr; align-items: start; gap: 56px; }
  .benefits__list { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .product__gallery { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .product__gallery img { width: 100%; }
  .product__gallery img:first-child { grid-column: 1 / -1; }
  .mom__pairs { overflow: visible; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
  .order__form, .order__success { padding: 32px; }
}
