:root {
  --gift-focus: rgba(95, 68, 102, 0.28);
}

.gift-page {
  background: radial-gradient(circle at top, rgba(231, 208, 180, 0.22), transparent 34%), var(--bg);
}

.gift-hero {
  padding: 56px 0 20px;
}

.gift-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.gift-hero-copy,
.gift-summary-card,
.gift-form-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(95, 68, 102, 0.12);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.gift-hero-copy {
  padding: 34px;
}

.gift-summary-card {
  padding: 28px;
  align-self: center;
}

.gift-summary-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.gift-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.gift-hero-pills span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(95, 68, 102, 0.08);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.88rem;
}

.gift-countdown {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(95, 68, 102, 0.1), rgba(177, 143, 122, 0.14));
  border: 1px solid rgba(95, 68, 102, 0.14);
}

.gift-countdown-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.gift-countdown strong {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--brand-primary);
}

.gift-section {
  padding: 18px 0 72px;
}

.gift-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.gift-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(95, 68, 102, 0.14);
  background: linear-gradient(180deg, #fff, #fbf8f5);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.gift-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.gift-card-body {
  padding: 22px;
}

.gift-card-price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(177, 143, 122, 0.12);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.gift-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.gift-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gift-card.selected {
  border-color: rgba(95, 68, 102, 0.42);
  box-shadow: 0 18px 50px rgba(95, 68, 102, 0.18);
  transform: translateY(-4px);
}

.gift-card.selected:not(.celebrating) {
  animation: selected-card-float 2.2s ease-in-out infinite;
}

.gift-card.selected::after {
  content: "Selecionado";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.gift-card:focus-within {
  outline: 3px solid var(--gift-focus);
  outline-offset: 2px;
}

.gift-form-card {
  position: sticky;
  top: 92px;
  padding: 28px;
}

.gift-form {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span,
.selection-fieldset legend {
  font-weight: 700;
  color: var(--brand-primary);
}

.form-field input {
  width: 100%;
  border: 1px solid rgba(95, 68, 102, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus {
  outline: none;
  border-color: rgba(95, 68, 102, 0.46);
  box-shadow: 0 0 0 4px rgba(95, 68, 102, 0.1);
}

.selection-fieldset {
  margin: 4px 0 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(95, 68, 102, 0.16);
}

.selection-fieldset legend {
  padding: 0 6px;
}

.selection-fieldset p {
  margin: 8px 0 0;
  color: var(--muted);
}

.gift-submit {
  width: 100%;
}

.gift-feedback {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gift-feedback.is-error {
  color: #a33d4a;
}

.gift-feedback.is-success {
  color: #2e7d5a;
}

/* ---- Animações festivas na seleção ---- */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 18px 50px rgba(95, 68, 102, 0.18);
    transform: scale(1) translateY(-4px);
  }
  50% {
    box-shadow: 0 24px 60px rgba(95, 68, 102, 0.28);
    transform: scale(1.02) translateY(-6px);
  }
}

@keyframes selected-card-float {
  0%,
  100% {
    transform: translateY(-4px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes sparkle {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(0);
  }
}

.gift-card.celebrating {
  animation: pulse-glow 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gift-card.celebrating::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand-primary);
  animation: sparkle 1.2s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}

/* ---- Mobile arrow cue ---- */
.gift-mobile-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 10px;
  padding: 12px 16px;
  width: fit-content;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(95, 68, 102, 0.12), rgba(177, 143, 122, 0.18));
  border: 1px solid rgba(95, 68, 102, 0.16);
  color: var(--brand-primary);
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: mobileArrowFloat 1.8s ease-in-out infinite;
}

.gift-mobile-arrow strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  animation: mobileArrowPulse 1.8s ease-in-out infinite;
}

@keyframes mobileArrowFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes mobileArrowPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

#presentes-disponiveis {
  scroll-margin-top: 104px;
}

@media (max-width: 980px) {
  #presentes-disponiveis {
    scroll-margin-top: 88px;
  }

  .gift-hero-grid,
  .gift-layout,
  .gift-grid {
	grid-template-columns: 1fr;
  }

  .gift-hero-grid {
    justify-items: center;
  }

  .gift-hero-copy,
  .gift-summary-card,
  .gift-form-card {
	padding: 24px;
  }

  .gift-mobile-arrow {
    display: inline-flex;
    justify-self: center;
    margin: 6px auto 14px;
  }

  .gift-summary-card {
    width: 100%;
  }

  .gift-hero-copy {
    width: 100%;
  }

  .gift-form-card {
	position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gift-card.selected:not(.celebrating),
  .gift-mobile-arrow,
  .gift-mobile-arrow strong {
    animation: none;
  }
}
