:root {
  --gift-ink: #222;
  --gift-brown: #785d18;
  --gift-caramel: #b8891f;
  --gift-gold: #cf9e25;
  --gift-cream: #fff;
  --gift-paper: #fff;
  --gift-line: #e2e2e2;
  --gift-muted: #555;
  --gift-success: #21633f;
}

body { margin: 0; background: var(--gift-cream); color: var(--gift-ink); font-family: "Playfair Display", serif; }
main, .processing-overlay { font-family: "DM Sans", sans-serif; }
button, input, textarea { font: inherit; }
[hidden] { display: none !important; }

.icon-btn.giftcard-current {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #fff6d8;
  text-decoration: none;
  box-shadow: 0 0 0 3px rgba(207,158,37,.18), 0 0 18px rgba(207,158,37,.72);
  animation: gift-card-glow 2.2s ease-in-out infinite;
}
.icon-btn.giftcard-current .material-icons { color: #a77916; }
.icon-btn.giftcard-current::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(207,158,37,.48);
  border-radius: 50%;
  pointer-events: none;
}
@keyframes gift-card-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(207,158,37,.16), 0 0 14px rgba(207,158,37,.5); }
  50% { box-shadow: 0 0 0 5px rgba(207,158,37,.2), 0 0 25px rgba(207,158,37,.86); }
}
@media (prefers-reduced-motion: reduce) {
  .icon-btn.giftcard-current { animation: none; }
}

.gift-hero {
  min-height: 500px;
  padding: 40px max(5vw, 28px);
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(320px, .8fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1)),
    url("images/IMG_giftcards_2.jpg") center 62%/cover no-repeat;
}

.gift-hero__content {
  grid-column: 2;
  grid-row: 1;
  max-width: 420px;
  width: 100%;
  min-width: 0;
  padding: 30px 28px;
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  backdrop-filter: blur(3px);
}
.eyebrow { margin: 0 0 9px; color: #a77916; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.gift-hero h1 { margin: 0 0 16px; color: #222; font: 700 clamp(2.25rem, 4.2vw, 3.25rem)/1.08 "Playfair Display", serif; }
.gift-hero__content > p:last-child { margin: 0; color: #444; font-size: 1.08rem; line-height: 1.6; }

.gift-card-art {
  grid-column: 1;
  grid-row: 1;
  max-width: 500px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-self: center;
  position: relative;
  transform: rotate(-3deg);
  filter: drop-shadow(0 24px 26px rgba(0,0,0,.24));
}
.gift-card-art img { display: block; width: 100%; height: auto; }
.gift-card-art__amount {
  position: absolute;
  top: 12%;
  right: 9%;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #9c7010;
  box-shadow: 0 5px 14px rgba(0,0,0,.13);
  font: 700 clamp(1rem, 2.4vw, 1.35rem)/1 "DM Sans", sans-serif;
}

.gift-purchase { width: min(1120px, calc(100% - 32px)); margin: 70px auto 80px; position: relative; z-index: 2; }
.stepper { width: min(580px, 100%); margin: 0 auto 22px; display: flex; align-items: center; justify-content: center; }
.stepper__item { display: flex; align-items: center; gap: 9px; color: #888; white-space: nowrap; }
.stepper__item span { display: grid; place-items: center; width: 29px; height: 29px; border: 2px solid currentColor; border-radius: 50%; }
.stepper__item strong { font-size: .85rem; }
.stepper__item.is-active, .stepper__item.is-complete { color: #785d18; }
.stepper__item.is-active span { background: var(--gift-gold); border-color: var(--gift-gold); color: white; }
.stepper__item.is-complete span { background: var(--gift-success); border-color: var(--gift-success); font-size: 0; }
.stepper__item.is-complete span::after { content: "✓"; font-size: 15px; }
.stepper__line { width: 80px; height: 2px; margin: 0 16px; background: #ddd; }

.form-panel, .order-summary, .success-panel {
  background: var(--gift-paper);
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.form-panel { padding: clamp(25px, 5vw, 52px); }
.form-panel h2, .order-summary h2, .success-panel h2 { margin: 0 0 12px; color: var(--gift-brown); font: 700 clamp(1.8rem, 3.5vw, 2.65rem)/1.1 "Playfair Display", serif; }
.payment-intro { color: var(--gift-muted); line-height: 1.6; margin: 0 0 26px; }

.amount-fieldset { padding: 0; margin: 32px 0; border: 0; }
.amount-fieldset legend, .card-entry-label { margin-bottom: 12px; font-weight: 700; }
.amount-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.amount-option { padding: 14px 10px; border: 1px solid var(--gift-line); border-radius: 12px; background: white; color: var(--gift-brown); font-weight: 700; cursor: pointer; transition: .16s ease; }
.amount-option:hover { border-color: var(--gift-caramel); transform: translateY(-1px); }
.amount-option.is-selected { border-color: var(--gift-gold); background: var(--gift-gold); color: white; box-shadow: 0 5px 14px rgba(207,158,37,.25); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; color: var(--gift-ink); font-size: .92rem; font-weight: 700; }
.field small { margin-left: 4px; color: var(--gift-muted); font-size: .75rem; font-weight: 500; }
.field input, .field textarea { width: 100%; box-sizing: border-box; padding: 13px 14px; border: 1px solid #d9c9bb; border-radius: 11px; outline: 0; background: white; color: var(--gift-ink); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus { border-color: var(--gift-caramel); box-shadow: 0 0 0 3px rgba(184,111,54,.12); }
.field textarea { resize: vertical; line-height: 1.5; }
.field--wide { grid-column: 1 / -1; }
.custom-amount { max-width: 260px; margin-top: 16px; }
.currency-input { display: flex; align-items: center; border: 1px solid #d9c9bb; border-radius: 11px; background: white; }
.currency-input > span { padding-left: 14px; color: var(--gift-muted); }
.currency-input input { border: 0; box-shadow: none !important; }
.field-hint { margin: 7px 0 0; color: var(--gift-muted); font-size: .8rem; }
.character-count { align-self: flex-end; color: var(--gift-muted); font-size: .75rem; font-weight: 500; }

.primary-action { width: 100%; margin-top: 30px; padding: 15px 22px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 10px; background: var(--gift-gold); color: white; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 3px 10px rgba(207,158,37,.3); transition: transform .15s, box-shadow .15s, opacity .15s, background .15s; }
.primary-action:hover:not(:disabled) { background: #b8891f; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(207,158,37,.3); }
.primary-action:disabled { opacity: .5; cursor: not-allowed; }
.primary-action--link { width: auto; display: inline-flex; padding-inline: 35px; }
.text-button { margin: 0 0 25px; padding: 0; display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--gift-brown); font-weight: 700; cursor: pointer; }
.text-button:disabled { opacity: .45; cursor: not-allowed; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 24px; align-items: start; }
.postal-field { max-width: 220px; margin: 20px 0; }
.card-container { min-height: 96px; padding: 16px; border: 1px solid #d9c9bb; border-radius: 12px; background: white; }
.secure-note { display: flex; align-items: center; gap: 6px; color: var(--gift-muted); font-size: .8rem; }
.secure-note .material-icons { font-size: 16px; }

.order-summary { padding: 32px; position: sticky; top: 20px; }
.order-summary h2 { font-size: 1.8rem; }
.order-summary dl { margin: 26px 0; }
.order-summary dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--gift-line); }
.order-summary dt { color: var(--gift-muted); }
.order-summary dd { margin: 0; font-weight: 700; }
.order-summary__total { border-bottom: 0 !important; font-size: 1.12rem; color: var(--gift-ink); }
.order-summary__total dt { color: var(--gift-ink); font-weight: 700; }
.recipient-summary { display: flex; gap: 12px; padding: 15px; border-radius: 12px; background: #fff6db; color: var(--gift-brown); }
.recipient-summary div { min-width: 0; display: flex; flex-direction: column; }
.recipient-summary span:last-child { overflow-wrap: anywhere; font-size: .84rem; }
.summary-note { color: var(--gift-muted); font-size: .8rem; line-height: 1.5; }

.notice { margin: 0 0 18px; padding: 14px 18px; border-radius: 12px; background: #fff0ed; border: 1px solid #e9b8ae; color: #8d2e20; font-weight: 600; }
.notice.is-info { background: #eef5ff; border-color: #bdd5f2; color: #24527b; }
.notice.is-success { background: #edf8f1; border-color: #b9dec7; color: var(--gift-success); }

.success-panel { padding: clamp(35px, 7vw, 75px); text-align: center; }
.success-panel__icon { color: var(--gift-success); font-size: 70px; }
.success-panel > p:not(.eyebrow):not(.success-panel__order) { max-width: 580px; margin: 14px auto; color: var(--gift-muted); line-height: 1.6; }
.success-panel__order { color: var(--gift-brown); }

.gift-story {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  overflow: hidden;
  border: 1px solid var(--gift-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.07);
}
.gift-story__image { min-height: 320px; overflow: hidden; }
.gift-story__image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.gift-story__content { align-self: center; padding: clamp(34px, 5vw, 62px); }
.gift-story__content h2 { margin: 0 0 15px; color: #222; font: 700 clamp(2rem, 3.5vw, 2.8rem)/1.12 "Playfair Display", serif; }
.gift-story__content > p:last-child { margin: 0; color: var(--gift-muted); font-size: 1.05rem; line-height: 1.7; }

.gift-facts { width: min(1120px, calc(100% - 32px)); margin: 0 auto 90px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gift-facts article { padding: 26px; border: 1px solid var(--gift-line); border-radius: 12px; background: #fff; box-shadow: 0 3px 14px rgba(0,0,0,.05); }
.gift-facts .material-icons { color: var(--gift-gold); font-size: 34px; }
.gift-facts h3 { margin: 10px 0 6px; color: var(--gift-brown); font-family: "Playfair Display", serif; }
.gift-facts p { margin: 0; color: var(--gift-muted); line-height: 1.55; }

.processing-overlay { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 20px; background: rgba(31,18,13,.7); backdrop-filter: blur(6px); }
.processing-card { max-width: 420px; padding: 38px; border-radius: 20px; background: white; text-align: center; box-shadow: 0 25px 70px rgba(0,0,0,.3); }
.processing-card h2 { color: var(--gift-brown); font-family: "Playfair Display", serif; }
.processing-card p { color: var(--gift-muted); }
.spinner { display: inline-block; width: 42px; height: 42px; border: 4px solid #eadfd4; border-top-color: var(--gift-brown); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  .gift-hero { grid-template-columns: 1fr; gap: 20px; padding: 42px 24px; text-align: center; }
  .gift-hero__content { grid-column: 1; grid-row: 1; margin: auto; }
  .gift-card-art { grid-column: 1; grid-row: 2; max-width: 380px; transform: rotate(-1.5deg); }
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .gift-story { grid-template-columns: 1fr; }
  .gift-story__image { min-height: 280px; max-height: 440px; }
  .gift-facts { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .gift-hero { min-height: 0; padding: 34px 18px 28px; background-position: center 28%; }
  .gift-hero__content { padding: 22px 18px; }
  .gift-hero__content > p:last-child { font-size: 1rem; }
  .gift-purchase { margin-top: 48px; }
  .stepper__item strong { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .amount-options { grid-template-columns: repeat(2, 1fr); }
  .form-panel, .order-summary { padding: 24px 20px; border-radius: 12px; }
  .gift-story__image { min-height: 245px; }
  .gift-story__content { padding: 30px 24px 34px; text-align: center; }
}
