:root {
  --rose: #b85c83;
  --rose-deep: #9e4a6e;
  --sage: #8a9b7e;
  --sage-deep: #6f8163;
  --blush: #f5e3e6;
  --cream: #fbf8f4;
  --paper: #f6f2ec;
  --ink: #4a4440;
  --ink-soft: #7d7670;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(74, 68, 64, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "Jost", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-eyebrow {
  font-family: "Cormorant Garamond", serif;
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(245, 227, 230, 0.9), transparent 55%),
    radial-gradient(ellipse at 90% 20%, rgba(138, 155, 126, 0.18), transparent 50%),
    var(--paper);
  border-bottom: 1px solid rgba(138, 155, 126, 0.25);
  padding: 72px 24px 88px;
  text-align: center;
}

.hero-inner { max-width: 640px; margin: 0 auto; }

.monogram {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(138, 155, 126, 0.4);
  box-shadow: var(--shadow);
  background: var(--white);
}

.monogram-small { width: 110px; height: 110px; margin-bottom: 12px; }

.hero-eyebrow {
  margin-top: 28px;
  font-size: 15px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.hero-title {
  margin-top: 12px;
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
}

.hero-title em {
  font-style: italic;
  font-weight: 600;
  color: var(--rose);
}

.hero-text {
  margin: 22px auto 0;
  max-width: 480px;
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-soft);
}

.hero-cta {
  display: inline-block;
  margin-top: 34px;
  padding: 13px 34px;
  border-radius: 999px;
  background: var(--rose);
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover { background: var(--rose-deep); transform: translateY(-2px); }

/* ---------- Sections ---------- */

.section { max-width: 1080px; margin: 0 auto; padding: 72px 24px 24px; }

.section-head { text-align: center; max-width: 560px; margin: 0 auto 44px; }

.section-head h2 {
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 500;
  color: var(--sage-deep);
}

.section-head p { margin-top: 10px; font-weight: 300; color: var(--ink-soft); }

/* ---------- Gift grid ---------- */

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.gift-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 18px 22px;
  background: var(--white);
  border: 1.5px solid rgba(138, 155, 126, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.gift-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.gift-card.selected {
  border-color: var(--rose);
  box-shadow: 0 8px 30px rgba(184, 92, 131, 0.18);
  background: linear-gradient(180deg, #fff 0%, #fdf4f6 100%);
}

.gift-emoji { font-size: 40px; line-height: 1; }

.gift-name { font-family: "Cormorant Garamond", serif; font-size: 21px; font-weight: 600; }

.gift-desc { font-size: 13px; font-weight: 300; color: var(--ink-soft); }

.gift-price {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
  color: var(--sage-deep);
}

.gift-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(138, 155, 126, 0.5);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: transparent;
  background: var(--white);
  transition: all 0.2s ease;
}

.gift-card.selected .gift-check {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--white);
}

.gift-card.regalado {
  cursor: not-allowed;
  background: var(--paper);
  border-style: dashed;
  opacity: 0.8;
}

.gift-card.regalado:hover { transform: none; box-shadow: none; }

.gift-card.regalado .gift-emoji { filter: grayscale(1); opacity: 0.6; }

.gift-card.regalado .gift-name,
.gift-card.regalado .gift-desc,
.gift-card.regalado .gift-price { color: var(--ink-soft); }

.gift-card.regalado .gift-name {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(111, 129, 99, 0.7);
}

.gift-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100% - 40px);
  padding: 14px 26px;
  background: var(--white);
  border: 1.5px solid var(--rose);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 14.5px;
  color: var(--rose-deep);
  text-align: center;
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Custom amount ---------- */

.section-note { padding-top: 36px; padding-bottom: 72px; }

.note-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 32px;
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(184, 92, 131, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.note-card h3 { font-size: 28px; font-weight: 500; color: var(--rose); }

.note-card p { margin-top: 8px; font-weight: 300; color: var(--ink-soft); }

.custom-amount {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.custom-amount .currency { font-size: 22px; color: var(--sage-deep); }

.custom-amount input {
  width: 160px;
  padding: 12px 16px;
  font-family: "Jost", sans-serif;
  font-size: 16px;
  border: 1.5px solid rgba(138, 155, 126, 0.4);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
}

.custom-amount input:focus { outline: 2px solid var(--rose); border-color: transparent; }

/* ---------- Buttons ---------- */

.btn {
  font-family: "Jost", sans-serif;
  font-size: 15px;
  letter-spacing: 0.05em;
  padding: 13px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary { background: var(--rose); color: var(--white); }
.btn-primary:hover { background: var(--rose-deep); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-outline {
  background: transparent;
  color: var(--rose);
  border: 1.5px solid var(--rose);
}
.btn-outline:hover { background: var(--blush); }

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); }

/* ---------- Selection bar ---------- */

.selection-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 14px 12px 26px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(138, 155, 126, 0.35);
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: rise 0.3s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.selection-info { display: flex; align-items: baseline; gap: 12px; }

#selection-count { font-size: 14px; color: var(--ink-soft); }
#selection-total { font-size: 20px; color: var(--rose-deep); }

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(74, 68, 64, 0.45);
  backdrop-filter: blur(6px);
  animation: fade 0.25s ease;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 34px 32px;
  background: var(--cream);
  border-radius: 24px;
  border: 1px solid rgba(138, 155, 126, 0.3);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  animation: pop 0.3s ease;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal h2 { font-size: 30px; font-weight: 600; color: var(--rose); }

.modal-sub { margin-top: 4px; font-size: 14px; font-weight: 300; color: var(--ink-soft); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  color: var(--ink-soft);
  cursor: pointer;
}

.modal-close:hover { background: var(--blush); color: var(--rose-deep); }

.summary-list { margin-top: 22px; list-style: none; }

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 15px;
  border-bottom: 1px dashed rgba(138, 155, 126, 0.35);
}

.summary-list li span:last-child { color: var(--sage-deep); font-weight: 500; }

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid rgba(184, 92, 131, 0.35);
  font-size: 17px;
}

.summary-total strong { font-size: 26px; color: var(--rose-deep); }

#checkout-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }

#checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

#checkout-form .optional { font-weight: 300; color: var(--ink-soft); }

#checkout-form input,
#checkout-form textarea {
  padding: 12px 16px;
  font-family: "Jost", sans-serif;
  font-size: 15px;
  font-weight: 400;
  border: 1.5px solid rgba(138, 155, 126, 0.4);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}

#checkout-form input:focus,
#checkout-form textarea:focus { outline: 2px solid var(--rose); border-color: transparent; }

.form-error { font-size: 14px; color: #b23b3b; }

.secure-note { font-size: 12.5px; font-weight: 300; color: var(--ink-soft); text-align: center; }

.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.modal-thanks { text-align: center; }
.modal-thanks p { margin: 14px 0 24px; font-weight: 300; color: var(--ink-soft); }
.modal-thanks .monogram { margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */

.footer {
  padding: 56px 24px 120px;
  text-align: center;
  border-top: 1px solid rgba(138, 155, 126, 0.25);
  background: var(--paper);
  font-size: 13.5px;
  font-weight: 300;
  color: var(--ink-soft);
}

.footer-monogram {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 14px;
  opacity: 0.9;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .hero { padding: 52px 20px 64px; }
  .monogram { width: 140px; height: 140px; }
  .selection-bar { width: calc(100% - 32px); justify-content: space-between; gap: 10px; padding-left: 18px; }
  .modal { padding: 32px 22px 26px; }
}
