/* ───────── Tipografías ─────────
   Títulos: "The Seasons" (licencia web de Fontspring).
   Cuerpo: Poppins. Cormorant Garamond queda solo como respaldo por si la fuente no carga. */
@font-face {
  font-family: "The Seasons";
  src: url("../fonts/the-seasons-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --pink: #d47f92;
  --pink-line: rgba(212, 127, 146, 0.6);
  --pink-soft: #f8e3e8;
  --pink-bar: #e8a5b5;
  --cream: #faf6f1;
  --font-title: "The Seasons", "Cormorant Garamond", Georgia, serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream) url("../img/fondo.jpg") repeat;
  background-size: 1080px auto;
  color: var(--pink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }

[hidden] { display: none !important; }

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

/* ───────── Encabezado ───────── */
.hero {
  position: relative;
  text-align: center;
  padding-top: 28px;
}

.hero__cloud {
  position: absolute;
  top: 6px;
  left: 0;
  width: 84px;
  height: auto;
  opacity: 0.95;
}

.hero__kicker {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero__name {
  margin: 2px 0 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 2.9rem);
  line-height: 1.1;
}

.hero__title { margin: 6px auto 0; max-width: 560px; }

.hero__title svg { display: block; width: 100%; height: auto; overflow: visible; }

.hero__title text {
  fill: var(--pink);
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 70px;
}

.hero__mouse { display: block; margin: -34px auto 0; width: clamp(150px, 42vw, 190px); }

.hero__text { max-width: 440px; margin: 14px auto 0; font-size: 0.95rem; }

.hero__text strong { font-weight: 600; }

.demo-note {
  margin: 18px auto 0;
  max-width: 520px;
  padding: 8px 14px;
  border: 1.5px dashed var(--pink-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 0.8rem;
}

/* ───────── Lista ───────── */
main { margin-top: 26px; }

.status, .error { text-align: center; text-wrap: balance; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  align-items: start;
}

.gift {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 18px;
  background: #fff;
  border: 3px solid var(--pink-line);
  border-radius: 30px;
  box-shadow: 0 8px 22px rgba(212, 127, 146, 0.14);
}

.gift::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid var(--pink-soft);
  border-radius: 24px;
  pointer-events: none;
}

.gift__photo {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

/* La foto se muestra completa, con su proporción real (sin recortes ni franjas vacías) */
.gift__zoom {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.gift__zoom img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; }

.gift__zoom:focus-visible { outline: 3px solid var(--pink-bar); outline-offset: -3px; border-radius: 20px; }

.viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.viewer[open] { display: grid; place-items: center; }

.viewer::backdrop { background: rgba(60, 30, 40, 0.85); }

.viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
}

.viewer__close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--pink);
  font-size: 1.2rem;
  cursor: pointer;
}

.gift__photo--empty { min-height: 190px; background: var(--pink-soft); align-content: center; gap: 6px; }

.gift__photo--empty img { width: 40px; height: auto; }

.gift__photo--empty span {
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.gift__title {
  margin: 0;
  text-align: center;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.65rem;
  line-height: 1.15;
}

.gift__title mark {
  display: inline-block;
  margin-top: 4px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.gift__sub { margin: -6px 0 0; text-align: center; font-size: 0.85rem; }

.gift__facts {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
  font-size: 0.85rem;
}

.gift__facts b { font-weight: 600; }

.gift__note { margin: 0; text-align: center; font-size: 0.8rem; font-style: italic; }

/* Cada línea reservable (un regalo puede tener varias, ej. tallas) */
.lines { display: flex; flex-direction: column; gap: 10px; }

.line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--pink-line);
  text-align: center;
}

.line:only-child { border-top: 0; padding-top: 0; }

.line__label { font-weight: 600; font-size: 0.95rem; }

.line__left { font-size: 0.82rem; }

.line__who {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}

.line__who li { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px; }

.line__who .lead { font-weight: 600; }

.undo {
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--pink);
  font: inherit;
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}

.badge-full {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--pink-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ───────── Botones (pastilla con borde, como en la tarjeta) ───────── */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 26px;
  border: 2.5px solid var(--pink);
  border-radius: 999px;
  background: transparent;
  color: var(--pink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn:hover, .btn:focus-visible { background: var(--pink); color: #fff; }

.btn:focus-visible, .undo:focus-visible, input:focus-visible, .stepper button:focus-visible {
  outline: 3px solid var(--pink-bar);
  outline-offset: 3px;
}

.btn[disabled] { opacity: 0.55; cursor: progress; }

.btn--ghost { border-color: var(--pink-line); text-decoration: none; }

/* ───────── Ventana de reserva ───────── */
.dialog {
  width: min(92vw, 420px);
  padding: 26px 22px 22px;
  border: 3px solid var(--pink-line);
  border-radius: 30px;
  background: #fff;
  color: var(--pink);
  font-family: var(--font-body);
  box-shadow: 0 20px 50px rgba(212, 127, 146, 0.35);
}

.dialog::backdrop { background: rgba(212, 127, 146, 0.35); }

.dialog__eyebrow {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dialog__title {
  margin: 2px 0 0;
  text-align: center;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.15;
}

.dialog__sub { margin: 4px 0 0; text-align: center; font-size: 0.85rem; }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }

.field > span { font-weight: 600; font-size: 0.9rem; }

.field small { font-size: 0.78rem; }

.field input {
  min-height: 46px;
  padding: 8px 16px;
  border: 2px solid var(--pink-line);
  border-radius: 999px;
  background: #fff;
  color: var(--pink);
  font: inherit;
  font-weight: 500;
}

.field input::placeholder { color: rgba(212, 127, 146, 0.55); }

.stepper { display: flex; align-items: center; gap: 14px; }

.stepper button {
  width: 44px;
  height: 44px;
  border: 2px solid var(--pink-line);
  border-radius: 50%;
  background: #fff;
  color: var(--pink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.stepper button:disabled { opacity: 0.4; cursor: default; }

.stepper output { min-width: 2ch; text-align: center; font-weight: 600; font-size: 1.3rem; }

.dialog__error {
  margin: 14px 0 0;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--pink-soft);
  font-size: 0.85rem;
  text-align: center;
}

.dialog__actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }

/* ───────── Aviso ───────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  max-width: min(92vw, 420px);
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--pink-bar);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(212, 127, 146, 0.4);
}

/* ───────── Pie ───────── */
.footer { margin-top: 44px; text-align: center; }

.footer__bow { display: block; margin: 0 auto 6px; width: 56px; height: auto; }

.footer__title {
  margin: 0 auto;
  max-width: 380px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.2;
}

.footer__mouse { display: block; margin: 8px auto 0; width: 170px; height: auto; }

.footer__names { margin: 0; font-size: 0.85rem; letter-spacing: 0.08em; }

@media (min-width: 720px) {
  .page { padding: 0 24px 40px; }
  .hero { padding-top: 36px; }
  .hero__cloud { left: 8%; top: 20px; width: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
