/* ---------- Токены ---------- */
:root {
  --bg: #FFF6F4;
  --surface: #FFFFFF;
  --blush: #FCE4E8;
  --blush-2: #F5C6D0;
  --rose: #E48A9E;
  --rose-deep: #C25A75;
  --ink: #4B2F39;
  --ink-soft: #8F6E78;
  --paper: #FBF3E6;
  --line: #F1D9DE;
  --shadow: 0 10px 30px rgba(194, 90, 117, 0.10);
  --radius: 22px;
  --display: 'Fraunces', 'Georgia', serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--rose-deep); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
@media (max-width: 600px) { .wrap { width: min(1120px, 100% - 28px); } }

/* ---------- Шапка-герой ---------- */
.hero {
  position: relative;
  padding: 72px 0 84px;
  background:
    radial-gradient(60% 80% at 100% 0%, #FDE1E7 0%, transparent 70%),
    radial-gradient(50% 60% at 0% 100%, #FBEBEF 0%, transparent 70%),
    var(--blush);
  overflow: hidden;
}
.hero::after { /* фестончатый край, как у детского пледа */
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 22px;
  background: radial-gradient(circle at 22px 22px, var(--bg) 22px, transparent 23px) 0 0 / 44px 44px repeat-x;
}
.hero .wrap { max-width: 720px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rose-deep);
}
.eyebrow::before, .eyebrow::after { content: '✿'; font-size: 12px; opacity: .8; }
h1 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 16px 0 20px;
}
.intro { font-size: 18px; color: var(--ink-soft); margin: 0 auto; max-width: 560px; }
.hero-meta {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
  font-size: 15px; color: var(--ink-soft);
}
.hero-meta strong { color: var(--ink); font-weight: 800; }

/* Вес и рост — отдельными карточками под заголовком */
.birth-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 20px; }
.birth-facts[hidden] { display: none; }
.birth-facts > div {
  display: flex; align-items: baseline; gap: 8px;
  background: var(--surface); border-radius: 999px;
  box-shadow: 0 3px 12px rgba(194, 90, 117, .09);
  padding: 6px 16px;
}
.birth-facts dt {
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rose-deep);
}
/* Основной шрифт, а не декоративный: цифры и подпись рядом остаются одинаковыми. */
.birth-facts dd { margin: 0; font-weight: 800; font-size: 16px; line-height: 1.4; color: var(--ink); }
/* На узких экранах три плашки в ряд не влезают из-за длинной даты.
   Сетка вместо flex: дата занимает первую строку целиком,
   вес и рост встают парой во вторую. Ширина у плашек остаётся своя. */
@media (max-width: 600px) {
  .birth-facts {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 6px 8px;
  }
  .birth-facts > div:first-child { grid-column: 1 / -1; justify-self: center; }
}

/* ---------- Фильтры ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 34px 0 22px;
}
.filters { display: inline-flex; gap: 6px; padding: 5px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); }
.filters button {
  border: 0; background: transparent; color: var(--ink-soft);
  padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: background .2s, color .2s;
}
.filters button[aria-pressed="true"] { background: var(--blush); color: var(--rose-deep); }
.hint { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* ---------- Сетка карточек ---------- */
.grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding-bottom: 60px;
}
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
  .card:not(.is-reserved):hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(194, 90, 117, 0.16); }
}
.card-media { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #FDEDF0, #F9D6DD); position: relative; }
.card-media:has(img) { background: #FFFDFC; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: filter .3s, opacity .3s; }
.card-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--rose); }
.card-media:has(.slides) { background: #FFFDFC; }
.slides {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .85); color: var(--rose-deep);
  font-size: 22px; line-height: 1; padding: 0 0 2px;
  box-shadow: 0 2px 8px rgba(75, 47, 57, .15);
  opacity: 0; transition: opacity .2s, background .2s;
}
.slide-nav.prev { left: 10px; }
.slide-nav.next { right: 10px; }
.slide-nav:hover { background: #fff; }
.card-media:hover .slide-nav, .slide-nav:focus-visible { opacity: 1; }
@media (hover: none) { .slide-nav { opacity: 1; } }
.dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; z-index: 2; pointer-events: none; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(194, 90, 117, .3); transition: background .2s, transform .2s; }
.dots span.is-active { background: var(--rose-deep); transform: scale(1.2); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; margin: 0; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--rose-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
/* pre-line, чтобы строка с цветом стояла отдельно от остального описания. */
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; white-space: pre-line; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.price.is-empty { color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.shop-link { font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 1.5px solid var(--blush-2); }
.shop-link:hover { border-color: var(--rose-deep); }

.btn {
  border: 0; border-radius: 999px; padding: 12px 22px;
  font-weight: 800; font-size: 15px; letter-spacing: .01em;
  background: var(--rose); color: #fff;
  box-shadow: 0 6px 16px rgba(228, 138, 158, .35);
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--rose-deep); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--rose-deep); box-shadow: none; border: 2px solid var(--blush-2); }
.btn-ghost:hover { background: var(--blush); }
.btn-primary-full { width: 100%; }

/* ---------- Забронированные: бирка на верёвочке ---------- */
.is-reserved .card-media img { filter: saturate(.5); opacity: .7; }
.is-reserved .card-media::after { content: ''; position: absolute; inset: 0; background: rgba(255, 246, 244, .35); }
.tag {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 14px 9px 24px;
  border-radius: 6px 10px 10px 6px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(75, 47, 57, .18);
  transform: rotate(-5deg);
  transform-origin: 8px 50%;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  animation: swing .9s ease-out both;
}
.tag::before { /* дырочка, через которую продета нитка */
  content: ''; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px;
  margin-top: -3px; border-radius: 50%; background: var(--rose-deep); box-shadow: inset 0 0 0 1.5px var(--paper);
}
.tag::after { /* нитка */
  content: ''; position: absolute; left: -14px; top: 50%; width: 22px; height: 2px;
  background: var(--rose-deep); transform: rotate(-30deg); transform-origin: right;
}
.tag em { font-style: normal; color: var(--rose-deep); }
@keyframes swing {
  0% { transform: rotate(-14deg); }
  50% { transform: rotate(-1deg); }
  100% { transform: rotate(-5deg); }
}
.reserved-note { font-size: 14px; color: var(--ink-soft); }
.reserved-note.is-mine { color: var(--rose-deep); font-weight: 700; }
.link-btn { background: none; border: 0; padding: 0; color: var(--rose-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Пустое состояние ---------- */
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty h2 { font-family: var(--display); font-weight: 500; color: var(--ink); margin: 0 0 6px; }

/* ---------- Футер ---------- */
footer { padding: 30px 0 40px; text-align: center; color: var(--ink-soft); font-size: 15px; }
footer .signature { font-family: var(--display); font-style: italic; font-size: 22px; color: var(--ink); margin-bottom: 6px; }
footer a { color: inherit; opacity: .6; text-decoration: none; font-size: 13px; }
footer a:hover { opacity: 1; }

/* ---------- Модальное окно ---------- */
dialog {
  border: 0; border-radius: 26px; padding: 0;
  width: min(460px, calc(100% - 32px));
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px rgba(75, 47, 57, .25);
}
dialog::backdrop { background: rgba(75, 47, 57, .35); backdrop-filter: blur(3px); }
dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-width: 600px) {
  .hero { padding: 48px 0 64px; }
  .dialog-inner { padding: 22px 18px 18px; }
  dialog h2 { font-size: 24px; }
}
.dialog-inner { padding: 28px 28px 24px; }
dialog h2 { font-family: var(--display); font-weight: 500; font-size: 28px; margin: 0 0 4px; line-height: 1.15; }
dialog .sub { color: var(--ink-soft); margin: 0 0 20px; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  border: 2px solid var(--line); border-radius: 14px; padding: 11px 14px;
  background: #FFFBFB; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose); }
.field textarea { min-height: 84px; resize: vertical; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.form-error { color: var(--rose-deep); font-weight: 700; font-size: 14px; min-height: 1.4em; margin: 0 0 6px; }

/* ---------- Уведомление ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
