/* ==========================================================================
   Bloom Mama — gift pages (gift.html, gift-success.html, redeem.html)
   Normal look by default; html.gift-xmas (set by gift.js, 1 Nov – 26 Dec,
   never in Arabic) switches to the Christmas look.
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.gf { padding-top: 76px; --gf-accent: var(--primary-deep); --gf-ribbon: var(--blush); --gf-card: linear-gradient(150deg, #9F3F5F 0%, #7D2F49 100%); --gf-card-ink: #FFF8F1; }
html.gift-xmas .gf { --gf-accent: #A3262F; --gf-ribbon: #D6B26E; --gf-card: linear-gradient(150deg, #A3262F 0%, #6E1820 100%); }

.gf-wrap { max-width: 860px; }
.gf-center { text-align: center; }
.gf-h2 { font: 500 clamp(26px, 4vw, 36px)/1.15 var(--serif); letter-spacing: -0.02em; color: var(--text); margin-bottom: 18px; }
.gf-h3 { font: 500 22px/1.25 var(--serif); color: var(--text); margin-bottom: 12px; }
.gf-section { padding: clamp(44px, 7vw, 80px) 0; }
.gf-soft { background: var(--bg-warm); }

/* Hero */
.gf-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); background: radial-gradient(110% 80% at 80% 0%, var(--primary-soft) 0%, var(--bg) 65%); }
html.gift-xmas .gf-hero { background: radial-gradient(90% 70% at 85% 10%, #F7E3E1 0%, transparent 60%), radial-gradient(70% 60% at 5% 100%, #E5EFE6 0%, transparent 60%), var(--bg); }
.gf-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.gf-title { margin: 14px 0 16px; }
.gf-title .em { color: var(--gf-accent); }
.gf-hero .page-lead { max-width: 560px; }
.gf-center .page-lead { margin-inline: auto; }
.gf-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; padding: 0; }
.gf-trust li { font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; }
.gf-trust li::before { content: "✓"; color: var(--sage); font-weight: 700; margin-inline-end: 6px; }
.gf-jump { display: none; }
.gf-hero-visual { display: grid; place-items: center; }

/* The gift card: an app-style card with the season's photo */
.gc { position: relative; width: min(100%, 360px); border-radius: 28px; background: var(--bg-card); overflow: hidden; text-align: start;
  box-shadow: 0 30px 70px -28px rgba(32, 38, 36, .35), 0 0 0 1px var(--border-soft); transform: rotate(-2deg); transition: transform .4s var(--ease); }
.gc:hover { transform: rotate(0deg) translateY(-3px); }
[dir="rtl"] .gc { transform: rotate(2deg); }
.gc-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.gc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(32,20,24,.62) 100%); }
.gc-badge { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px;
  border-radius: 999px; background: rgba(255,255,255,.88); backdrop-filter: blur(6px); font: 600 12px/1 var(--sans); color: var(--text); }
.gc-lotus { width: 16px; height: 16px; color: var(--primary); }
.gc-over { position: absolute; inset-inline: 18px; bottom: 14px; z-index: 1; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.gc-premium { font: 600 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.gc-months { font: 500 34px/1.05 var(--serif); letter-spacing: -0.02em; }
.gc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.gc-row { font-size: 14px; color: var(--text-2); }
.gc-row small { font-size: 12px; color: var(--text-3); margin-inline-end: 4px; }
.gc-row b { font-weight: 600; color: var(--text); }
.gc-to b { font: 500 22px/1.15 var(--serif); letter-spacing: -0.01em; }
.gc-msg { margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--primary-soft); color: var(--text-2); font-size: 14px; line-height: 1.45; max-height: 4.4em; overflow: hidden; }
.gc-msg::before { content: "“"; color: var(--primary); font: 500 20px/0 var(--serif); margin-inline-end: 2px; }
.gc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--border); }
.gc-code-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin-inline-start: auto; }
.gc-code-wrap small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.gc-code { font: 600 14px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .1em; color: var(--primary-deep); background: var(--primary-soft); border: 1px dashed var(--primary); border-radius: 8px; padding: 6px 8px; }
.gc-code:empty { display: none; }
.gc-row[hidden] { display: none; }
/* Christmas: a thin gold frame and a warmer badge, nothing loud */
html.gift-xmas .gc { box-shadow: 0 30px 70px -28px rgba(110, 24, 32, .35), 0 0 0 1px #E8D3A6; }
html.gift-xmas .gc-badge::after { content: "🎄"; font-size: 11px; margin-inline-start: 2px; }
html.gift-xmas .gc-photo { border-bottom: 3px solid #D6B26E; }

/* Form */
.gf-buy { padding: 8px 0 clamp(40px, 6vw, 72px); }
.gf-buy-wrap { max-width: 720px; }
.gf-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 26px; padding: clamp(20px, 4vw, 36px); box-shadow: 0 24px 60px -30px rgba(32, 38, 36, .25); }
.gf-plans { border: 0; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gf-plan { position: relative; cursor: pointer; }
.gf-plan input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.gf-plan-in { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 16px 16px; border: 1.5px solid var(--border); border-radius: 18px; background: var(--bg); transition: border-color .2s, box-shadow .2s, background .2s; }
.gf-plan input:checked + .gf-plan-in { border-color: var(--gf-accent); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(159, 63, 95, .14); }
.gf-plan input:focus-visible + .gf-plan-in { outline: 3px solid var(--gf-accent); outline-offset: 2px; }
.gf-plan-name { font: 500 22px/1.1 var(--serif); color: var(--text); }
.gf-plan-note { font-size: 13px; color: var(--text-3); }
.gf-plan-price { margin-top: 8px; font-size: 22px; color: var(--text); }
.gf-plan-price b { font-weight: 600; }
.gf-was { color: var(--text-3); font-size: 15px; margin-inline-end: 4px; }
.gf-per { font-size: 12px; color: var(--text-3); }
.gf-badge, .gf-promo { position: absolute; top: -10px; inset-inline-end: 12px; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; background: var(--sage); color: #fff; }
.gf-promo { inset-inline-end: auto; inset-inline-start: 12px; background: var(--text); }
.gf-promo[hidden] { display: none; }

.gf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gf-row2[hidden] { display: none; }
.gf-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 500; color: var(--text); }
.gf-field small { font-weight: 400; color: var(--text-3); font-size: 12px; line-height: 1.4; }
.gf-count { align-self: flex-end; }
.gf-notice { background: var(--sage-soft); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.gf-error { color: #A3262F; background: #FDF0F0; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 12px 0 0; }
.gf-error[hidden], .gf-notice[hidden] { display: none; }

.gf-send { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gf-send-btn { text-align: start; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
.gf-send-btn b { font-weight: 600; font-size: 14px; }
.gf-send-btn small { font-size: 12px; color: var(--text-3); font-weight: 400; line-height: 1.35; }
.gf-send-btn[aria-pressed="true"] { border-color: var(--gf-accent); background: var(--primary-soft); }
.gf-chip { display: inline-block; margin-top: 6px; font: 600 12px/1 var(--sans); color: var(--gf-accent); background: var(--primary-soft); border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.gf-chip[hidden] { display: none; }

.gf-pay-row { display: flex; gap: 10px; align-items: stretch; margin-top: 8px; }
.gf-pay { flex: 1; gap: 6px; flex-wrap: wrap; min-height: 54px; font-size: 16px; border: 0; cursor: pointer; background: var(--gf-accent); }
.gf-pay.is-loading { opacity: .7; cursor: progress; }
.gf-paynote { margin-top: 12px; font-size: 12px; color: var(--text-3); text-align: center; }

/* Steps, list, FAQ */
.gf-how { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 0; text-align: start; }
.gf-how li { counter-increment: s; background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 18px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.gf-how li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gf-accent); color: #fff; font-weight: 600; margin-bottom: 10px; }
.gf-how-sm { grid-template-columns: 1fr; gap: 8px; }
.gf-how-sm li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.gf-how-sm li::before { margin: 0; flex: none; width: 28px; height: 28px; font-size: 13px; }
.gf-what { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 22px; max-width: 760px; margin: 0 auto; }
.gf-what li { position: relative; padding-inline-start: 30px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.gf-what li::before { content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23496B5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.gf-faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.gf-faq summary { cursor: pointer; font: 500 17px/1.35 var(--sans); color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.gf-faq summary::-webkit-details-marker { display: none; }
.gf-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--gf-accent); transition: transform .2s; }
.gf-faq details[open] summary::after { transform: rotate(45deg); }
.gf-faq details p { margin-top: 10px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.gf-redeem-link { margin-top: 26px; font-size: 15px; }
.gf-redeem-link a { color: var(--gf-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Success & redeem */
.gf-ok .gf-title, .gf-rd .gf-title { margin-top: 6px; }
.gf-ok-card { display: grid; place-items: center; margin: 30px 0 34px; }
.gf-status { font-size: 15px; color: var(--text-2); margin-top: 8px; }
.gf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0; }
.gf-actions .btn-primary { background: var(--gf-accent); border: 0; cursor: pointer; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text); font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: border-color .2s; }
.btn-ghost:hover { border-color: var(--gf-accent); }
.btn-ghost[hidden] { display: none; }
.is-done { background: var(--sage) !important; }
.gf-steps-card { max-width: 520px; margin: 24px auto 0; text-align: start; background: var(--bg-card); border: 1px solid var(--border); border-radius: 22px; padding: 22px; }
.gf-stores { justify-content: center; margin-top: 16px; }
.gf-tip { font-size: 13px; color: var(--text-3); margin-top: 14px; text-align: center; }
.gf-codebox { max-width: 520px; margin: 18px auto 0; display: grid; gap: 10px; justify-items: center; background: var(--primary-soft); border: 2px dashed var(--border); border-radius: 20px; padding: 18px; }
.gf-codebox small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.gf-codebox-code { font: 600 clamp(22px, 6vw, 30px)/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .1em; color: var(--text); word-break: break-all; }
.gf-codebox .btn-primary { background: var(--gf-accent); border: 0; cursor: pointer; }
.gf-rd-form { max-width: 460px; margin: 22px auto 0; text-align: start; }
.gf-rd-form .btn-primary { width: 100%; border: 0; min-height: 52px; cursor: pointer; background: var(--gf-accent); }
.gf-code-input { font: 600 20px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.gf-spinner { width: 44px; height: 44px; margin: 10px auto 18px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--gf-accent); animation: gf-spin 0.9s linear infinite; }
@keyframes gf-spin { to { transform: rotate(360deg); } }
[data-state][hidden] { display: none !important; }

@media (max-width: 860px) {
  .gf-hero-grid { grid-template-columns: 1fr; }
  .gf-hero-visual { order: -1; }
  .gc { width: min(100%, 340px); }
}
@media (max-width: 560px) {
  .gf-plans, .gf-row2, .gf-send { grid-template-columns: 1fr; }
  .gf-plans { gap: 16px; }
  .gf-pay-row { flex-direction: column; }
  .gf-actions > * { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .gc, .gc:hover { transition: none; } .gf-spinner { animation-duration: 3s; } }

/* Printing the gift card: just the card, the code and the steps */
@media print {
  @page { margin: 14mm; }
  .site-nav, .site-footer, .xmas-banner, .xmas-snow, .gf-actions, .gf-stores, .gf-codebox .btn-primary,
  .gf-hero .kicker, .gf-title, .gf .page-lead, .gf-status, .gf-redeem-link, .gf-tip, .gf-error, #rd-form { display: none !important; }
  .gf { padding: 0; }
  .gf-hero { background: none; padding: 0; }
  .gc { transform: none; box-shadow: none; border: 1px solid #ddd; margin: 0 auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; width: 110mm; }
  .gf-steps-card { border: 0; }
}

.gf-pay-amt { display: inline-block; background: rgba(255,255,255,.16); border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.gf-form.is-pricing .gf-price, .gf-form.is-pricing .gf-per, .gf-form.is-pricing .gf-pay-amt { color: transparent; background: linear-gradient(90deg, var(--border-soft), var(--border), var(--border-soft)); background-size: 200% 100%; border-radius: 8px; animation: gf-shimmer 1.2s linear infinite; }
.gf-form.is-pricing .gf-price { display: inline-block; min-width: 88px; }
@keyframes gf-shimmer { to { background-position: -200% 0; } }
.gf-pay-amt:empty { display: none; }
.gf-country { margin-top: 4px; }
