/* ============================================================================
   Wishlist de cumpleaños — hoja de estilos principal
   Paleta: crema + amarillo dorado + terracota + menta + azul cielo
   Tipografía: "Fraunces" (display, con carácter) + "Quicksand" (cuerpo, redonda)
   ============================================================================ */

:root {
  --cream: #fffcf3;
  --cream-deep: #fdf3d9;
  --blush: #ffe9a3;
  --blush-deep: #f6cd45;
  --lavender: #cfeee1;
  --lavender-deep: #8fd3ba;
  --sky: #cfe6f3;
  --sage: #d9ecd1;
  --ink: #4a3f28;
  --ink-soft: #8b7f63;
  --white: #ffffff;
  --rose-accent: #e2703a;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-soft: 0 10px 30px rgba(196, 154, 60, 0.16);
  --shadow-hover: 0 16px 40px rgba(196, 154, 60, 0.26);

  --font-display: "Fraunces", "Playfair Display", serif;
  --font-body: "Quicksand", "Poppins", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, var(--blush) 0%, transparent 40%),
    radial-gradient(circle at 88% 12%, var(--lavender) 0%, transparent 42%),
    radial-gradient(circle at 50% 100%, var(--sky) 0%, transparent 45%),
    var(--cream);
  min-height: 100vh;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

a { color: var(--rose-accent); }

.page-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  min-height: 100vh;
}

/* ---------- ribbon / brand mark (signature element) ---------- */
.ribbon-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-accent);
  background: var(--white);
  padding: 6px 16px 6px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.ribbon-mark::before { content: "⭐"; font-size: 1rem; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  min-height: 48px;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blush-deep), var(--rose-accent));
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.btn-ghost:hover { transform: translateY(-2px); }
.btn-danger {
  background: #c0392b;
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-danger:hover { transform: translateY(-2px); background: #a5301f; }
.manage-box .btn-manage {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  background: #8f8878;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(74, 63, 40, 0.18);
}

.manage-box .btn-manage:hover {
  transform: translateY(-2px);
  background: #797263;
  box-shadow: 0 12px 26px rgba(74, 63, 40, 0.25);
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; min-height: auto; }
.btn-text {
  background: none; border: none; color: var(--ink-soft);
  font-family: var(--font-body); font-weight: 600; cursor: pointer;
  padding: 8px 4px;
}
.btn-text:hover { color: var(--rose-accent); }

/* ---------- hero (index) ---------- */
.hero { text-align: center; padding-top: 40px; }
.hero .display { font-size: 2.1rem; margin: 20px 0 14px; line-height: 1.15; }
.hero p { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; margin-bottom: 32px; }
.hero-emoji {
  font-size: 3rem;
  animation: float 3.2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}
.fade-in { animation: fadeIn 0.7s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- progress bar ---------- */
.progress-track {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 28px;
}
.progress-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--lavender-deep);
  transition: all 0.25s ease;
}
.progress-dot.done { background: var(--rose-accent); border-color: var(--rose-accent); }
.progress-dot.current { background: var(--blush-deep); border-color: var(--rose-accent); transform: scale(1.3); }
.progress-line { flex: 1; height: 2px; background: var(--lavender-deep); border-radius: 2px; }
.progress-line.done { background: var(--rose-accent); }

/* ---------- question step ---------- */
.step-title { font-size: 1.5rem; margin: 4px 0 6px; }
.step-sub { color: var(--ink-soft); margin: 0 0 24px; }

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.option-card {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.option-card .opt-emoji { display: block; font-size: 1.7rem; margin-bottom: 8px; }
.option-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.option-card.selected { border-color: var(--rose-accent); background: var(--blush); }
.option-card.disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.option-grid.single-col { grid-template-columns: 1fr; }

.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }

/* ---------- gift cards ---------- */
.gift-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 620px) { .gift-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .gift-grid { grid-template-columns: 1fr 1fr 1fr; } }

.gift-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeIn 0.5s ease both;
}
.gift-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.gift-card .gift-img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--cream-deep);
}
.gift-card .gift-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gift-card .gift-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rose-accent); font-weight: 700; }
.gift-card h3 { font-size: 1.1rem; margin: 0; }
.gift-card .gift-price { font-weight: 700; color: var(--ink); }
.gift-card .gift-desc { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45; flex: 1; }
.gift-card .gift-priority { font-size: 0.85rem; color: var(--rose-accent); font-weight: 700; }
.gift-card .gift-actions { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.gift-card.reserved { opacity: 0.65; }
.gift-card .locked-badge {
  background: var(--lavender);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}
.featured-badge {
  position: relative;
  display: inline-block;
  background: var(--blush-deep);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

/* ---------- filters bar ---------- */
.filters-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
}
.filter-field {
  position: relative;
  flex: 0 0 auto;
}
.filters-bar select {
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid var(--white);
  background: var(--white);
  padding: 10px 34px 10px 16px;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
}
.filter-field::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

@media (max-width: 800px) {
  .filters-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    overflow-x: visible;
    padding-bottom: 0;
  }
  .filter-field { width: 100%; }
  .filter-field:first-child { grid-column: 1 / -1; }
  .filters-bar select {
    min-height: 48px;
    font-size: 0.95rem;
    padding: 10px 34px 10px 16px;
    border-radius: var(--radius-md);
    text-overflow: ellipsis;
  }
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(74, 63, 40, 0.35);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100; padding: 0;
  animation: fadeIn 0.2s ease both;
}
@media (min-width: 620px) { .modal-backdrop { align-items: center; } }
.modal-card {
  background: var(--cream);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-hover);
  animation: slideUp 0.25s ease both;
}
@media (min-width: 620px) { .modal-card { border-radius: var(--radius-lg); } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-card h3 { margin-top: 0; }
.modal-card label { font-weight: 700; font-size: 0.9rem; display: block; margin: 16px 0 6px; }
.modal-card input, .modal-card textarea {
  width: 100%; border-radius: var(--radius-sm); border: 2px solid var(--lavender);
  padding: 12px 14px; font-family: var(--font-body); font-size: 1rem;
  background: var(--white); color: var(--ink);
}
.modal-card input:focus, .modal-card textarea:focus { outline: none; border-color: var(--rose-accent); }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--white); padding: 14px 22px;
  border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-hover); z-index: 200; max-width: 90vw; text-align: center;
  animation: fadeIn 0.25s ease both;
}

/* ---------- success page ---------- */
.success-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 36px 26px; text-align: center; box-shadow: var(--shadow-soft);
  margin-top: 24px;
}
.success-card .secret-note {
  margin-top: 18px;
  margin-bottom: 28px;
}

.success-card .btn-primary {
  display: block;
  width: fit-content;
  margin: 0 auto;
}
.success-card .big-emoji { font-size: 2.6rem; margin-bottom: 10px; }
.success-card .gift-name { font-family: var(--font-display); font-size: 1.4rem; margin: 10px 0; color: var(--rose-accent); }
.secret-note { background: var(--lavender); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.9rem; margin-top: 18px; }

/* ---------- manage-my-gift section ---------- */
.manage-box {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 20px 24px;
  box-shadow: var(--shadow-soft);
  margin: 24px 0;
}
.manage-box summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.manage-box summary::-webkit-details-marker { display: none; }
.manage-box[open] summary { margin-bottom: 14px; }

/* ---------- confetti canvas ---------- */
#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* ---------- misc ---------- */
.center { text-align: center; }
.mt-lg { margin-top: 32px; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--lavender); border-top-color: var(--rose-accent);
  animation: spin 0.8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; color: var(--ink-soft); padding: 40px 20px; }

.top-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.top-nav .btn-text { padding-left: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- botón flotante de scroll (wishlist) — solo móvil ---------- */
.scroll-fab {
  display: none;
}

@media (max-width: 800px) {
  .scroll-fab {
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    z-index: 25;
    transition: background 0.2s ease;
  }
  .scroll-fab:hover { background: rgba(0, 0, 0, 0.4); }
  .scroll-fab .arrow {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
  }
}