/* Gift cards: live preview stage + purchase steps + balance check. */
.q-gc { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); }
.q-gc__shop { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(22px, 4vw, 44px); align-items: start; }
@media (min-width: 960px) {
	.q-gc__shop { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
	.q-gc__stage { position: sticky; top: 110px; }
}
/* One column (tablets): the preview at a card's size, centred, not the full width of the page. */
@media (min-width: 600px) and (max-width: 959.98px) {
	.q-gc__stage { width: min(560px, 100%); justify-self: center; }
}

/* ---- The card ---- */
.q-gc__stage { display: grid; gap: 18px; }
.q-gcard {
	position: relative; aspect-ratio: 1200 / 756; border-radius: clamp(14px, 2.2vw, 24px); overflow: hidden; isolation: isolate;
	background: var(--q-espresso);
	box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 30px 60px -22px color-mix(in srgb, var(--wp--preset--color--espresso) 55%, transparent), 0 14px 24px -14px color-mix(in srgb, var(--wp--preset--color--espresso) 40%, transparent);
	transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	transition: transform .5s var(--q-spring, cubic-bezier(.2,.8,.2,1)), box-shadow .3s;
}
.q-gcard__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .6s ease; }
.q-gcard.is-swapping .q-gcard__art, .q-gflip__card.is-swapping .q-gcard__art { opacity: .25; transform: scale(1.03); }
.q-gcard__shine {
	position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
	background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), rgba(255,255,255,.55), transparent 45%),
		linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 48%, transparent 60%);
	background-size: 100% 100%, 250% 100%; background-position: 0 0, 120% 0;
	animation: q-gc-sheen 7s ease-in-out infinite;
}
@keyframes q-gc-sheen { 0%, 70% { background-position: 0 0, 120% 0; } 100% { background-position: 0 0, -120% 0; } }
.q-gcard__amount {
	position: absolute; right: 5%; bottom: 7.5%; padding: .32em .7em; border-radius: 999px;
	font: 600 clamp(1.3rem, 3.6vw, 2.2rem)/1 var(--q-font-display); letter-spacing: -.01em; color: #fff;
	background: color-mix(in srgb, var(--wp--preset--color--espresso) 38%, transparent); border: 1px solid rgba(255,255,255,.35);
	-webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
	box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 20px rgba(0,0,0,.25);
	transition: transform .35s var(--q-spring, ease);
}
.q-gcard__amount.is-bump { transform: scale(1.08); }

/* ---- The card turns over: the design on the front, the note (To, message, From) on the back ---- */
.q-gflip { position: relative; container-type: inline-size; perspective: 1600px; }
.q-gflip__card {
	position: relative; z-index: 1; aspect-ratio: 1200 / 756; cursor: pointer;
	-webkit-transform-style: preserve-3d; transform-style: preserve-3d;
	transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--side, 0deg)));
	transition: transform .5s var(--q-spring, cubic-bezier(.2,.8,.2,1));
}
.q-gflip.is-back .q-gflip__card { --side: 180deg; }
.q-gflip.is-turning .q-gflip__card { transition-duration: 1s; transition-timing-function: cubic-bezier(.25,.8,.2,1.06); }
.q-gflip .q-gcard { position: absolute; inset: 0; transform: none; transition: box-shadow .3s; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.q-gflip .q-gcard--back { transform: rotateY(180deg); }
/* Lifted off the table while it turns; its shadow shrinks underneath. */
.q-gflip.is-turning { animation: q-gflip-lift 1s cubic-bezier(.3,.7,.3,1); }
.q-gflip.is-turning .q-gflip__floor { animation: q-gflip-floor 1s cubic-bezier(.3,.7,.3,1); }
@keyframes q-gflip-lift { 45% { transform: translateY(-16px) scale(1.035); } }
@keyframes q-gflip-floor { 45% { transform: translateY(16px) scaleX(.5); opacity: .45; } }
.q-gflip__floor {
	position: absolute; z-index: 0; left: 8%; right: 8%; bottom: -16px; height: 28px; border-radius: 50%; pointer-events: none;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--wp--preset--color--espresso, #2a1a10) 38%, transparent), transparent);
	filter: blur(5px);
}
/* A hint, once, that the card has another side. */
.q-gflip.is-peek .q-gflip__card { animation: q-gflip-peek 1.5s ease-in-out; }
@keyframes q-gflip-peek { 35% { transform: rotateX(3deg) rotateY(-34deg); } 72% { transform: rotateY(7deg); } }

/* The back: the same design, softly blurred, so both sides match; the note is written on the card itself */
.q-gcard--back { color: #fff; }
.q-gback__art { position: absolute; inset: -14%; width: 128%; height: 128%; max-width: none; object-fit: cover; transform: scaleX(-1); filter: blur(26px) saturate(1.45) brightness(.52); transition: opacity .35s ease; }
.q-gflip__card.is-swapping .q-gback__art { opacity: .25; }
.q-gback__veil {
	position: absolute; inset: 0;
	background: radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.08), transparent 55%),
		linear-gradient(165deg, rgba(15,8,5,.18), rgba(15,8,5,.55)),
		repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px);
}
.q-gcard--back::after { content: ""; position: absolute; z-index: 3; inset: 3.2%; border: 1px solid rgba(255,255,255,.22); border-radius: clamp(9px, 1.6vw, 17px); pointer-events: none; }
.q-gback__body {
	position: absolute; z-index: 2; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 2.4cqw;
	padding: 5.6cqw 7cqw 5cqw;
}
.q-gback__head { margin: 0; display: flex; align-items: center; gap: 2.2cqw; }
.q-gback__logo { display: block; width: 13.5cqw; min-width: 52px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.q-gback__head span { font-size: clamp(8px, 1.7cqw, 12px); font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--q-gback-gold); }
.q-gback__head strong { margin-left: auto; font: 600 clamp(15px, 4.4cqw, 28px)/1 var(--q-font-display); letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.q-gcard--back { --q-gback-gold: color-mix(in srgb, var(--wp--preset--color--brass-light, #e8c98a) 80%, white); }
/* A darker pane of the card's own colours – no paper stuck on top. */
.q-gback__note {
	position: relative; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-items: center;
	padding: 2.2cqw 3.4cqw 2cqw; border-radius: clamp(8px, 1.6cqw, 13px);
	background: linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.28));
	box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.08);
	text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.q-gback__note p { margin: 0; min-width: 0; }
.q-gback__note span { font-size: clamp(8px, 1.55cqw, 11.5px); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--q-gback-gold); margin-right: .6em; }
.q-gback__note strong { font: 600 clamp(12px, 3cqw, 20px)/1.2 var(--q-font-display); color: #fff; overflow-wrap: anywhere; }
.q-gback__to { padding-bottom: 1.2cqw; border-bottom: 1px solid color-mix(in srgb, var(--q-gback-gold) 35%, transparent); }
.q-gback__from { text-align: right; padding-top: 1.2cqw; border-top: 1px solid color-mix(in srgb, var(--q-gback-gold) 35%, transparent); }
.q-gback__msg {
	align-self: center; max-height: 100%; overflow: hidden; margin: 1.4cqw 0 !important;
	font: italic 400 var(--msg-size, clamp(12px, 3.2cqw, 19px))/1.42 var(--q-font-display); color: #fbf3e6; white-space: pre-line; overflow-wrap: anywhere;
}
/* Still too long at the smallest writing (a phone and a 300-letter message): it scrolls inside the note. */
.q-gback__msg.is-scroll { align-self: stretch; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.q-gback__msg.is-empty { color: rgba(255,255,255,.6); }
.q-gback__fine { margin: 0; text-align: center; font-size: clamp(8px, 1.55cqw, 11.5px); letter-spacing: .05em; color: rgba(255,255,255,.78); }
/* A pale design (Wedding, Raksha Bandhan, Holi…): a light back with dark writing and the dark logo, like its front. */
.q-gcard--back.is-light { --q-gback-gold: #8a6420; color: #2a211c; }
.q-gcard--back.is-light .q-gback__art { filter: blur(26px) saturate(1.25) brightness(1.03); }
.q-gcard--back.is-light .q-gback__veil {
	background: radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.35), transparent 60%),
		linear-gradient(165deg, rgba(255,250,240,.32), rgba(255,246,232,.12)),
		repeating-linear-gradient(135deg, rgba(60,40,20,.035) 0 1px, transparent 1px 7px);
}
.q-gcard--back.is-light::after { border-color: rgba(110,80,40,.25); }
.q-gcard--back.is-light .q-gback__logo { filter: drop-shadow(0 1px 3px rgba(255,255,255,.5)); }
.q-gcard--back.is-light .q-gback__head strong { color: #2a211c; text-shadow: none; }
.q-gcard--back.is-light .q-gback__note {
	background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.42));
	box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 0 0 1px rgba(110,80,40,.12); text-shadow: none;
}
.q-gcard--back.is-light .q-gback__note strong { color: #2a211c; }
.q-gcard--back.is-light .q-gback__msg { color: #3d3029; }
.q-gcard--back.is-light .q-gback__msg.is-empty { color: rgba(61,48,41,.55); }
.q-gcard--back.is-light .q-gback__fine { color: rgba(42,33,28,.72); }
/* A small card (phones): no small print, tighter spacing – more room for the message. */
@container (max-width: 470px) {
	.q-gback__body { grid-template-rows: auto minmax(0, 1fr); gap: 2cqw; padding: 4.4cqw 5.4cqw 4.6cqw; }
	.q-gback__fine { display: none; }
	.q-gback__head span { letter-spacing: .2em; }
	.q-gback__logo { width: 11.5cqw; min-width: 38px; }
	.q-gback__note { padding: 1.8cqw 3cqw 1.6cqw; }
	.q-gback__to { padding-bottom: .8cqw; }
	.q-gback__from { padding-top: .8cqw; }
	.q-gback__msg { margin: .8cqw 0 !important; line-height: 1.3; }
}

/* Front / Back switch */
.q-gflip__ctl { justify-self: center; display: inline-flex; gap: 4px; margin-top: 10px; padding: 4px; border-radius: 999px; background: var(--q-surface); border: 1px solid var(--q-line); box-shadow: 0 6px 16px -12px rgba(0,0,0,.4); }
.q-gflip__btn { appearance: none; border: 0; border-radius: 999px; padding: 8px 18px; background: transparent; color: var(--q-muted); font-family: inherit; font-weight: 600; font-size: .9rem; line-height: 1; cursor: pointer; transition: background .25s, color .25s; }
.q-gflip__btn small { font-weight: 500; font-size: .82em; opacity: .8; }
.q-gflip__btn:hover { color: var(--q-text); }
.q-gflip__btn[aria-pressed="true"] { background: var(--wp--preset--color--espresso, #2a1a10); color: #fff; }
.q-gflip__btn:focus-visible { outline: 2px solid var(--q-accent); outline-offset: 2px; }

.q-gc__perks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; color: var(--q-muted); }
.q-gc__perks li { display: flex; gap: 10px; align-items: center; }
.q-gc__perks svg { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; color: #fff; background: var(--q-sage, #5f7055); }

/* ---- Steps ---- */
.q-gc__buy { display: grid; gap: 26px; }
.q-gc__step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; }
.q-gc__step legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px; font: 600 1.2rem/1.2 var(--q-font-display); }
.q-gc__num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--q-espresso); color: var(--q-cream); font: 700 .8rem/1 system-ui, sans-serif; }

.q-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.q-design { position: relative; display: grid; gap: 6px; cursor: pointer; }
.q-design input { position: absolute; opacity: 0; pointer-events: none; }
.q-design__img { position: relative; display: block; aspect-ratio: 1200 / 756; border-radius: 10px; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--wp--preset--color--espresso) 50%, transparent); transition: transform .25s var(--q-spring, ease), outline-color .2s, box-shadow .25s; }
.q-design__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-design:hover .q-design__img { transform: translateY(-3px); box-shadow: 0 12px 20px -10px color-mix(in srgb, var(--wp--preset--color--espresso) 55%, transparent); }
.q-design input:checked + .q-design__img { outline-color: var(--q-accent); }
.q-design input:focus-visible + .q-design__img { outline: 3px solid color-mix(in srgb, var(--q-accent) 60%, transparent); }
.q-design__tick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--q-accent); color: #fff; transform: scale(0); transition: transform .3s var(--q-spring, ease); }
.q-design__tick svg { width: 14px; height: 14px; }
.q-design input:checked + .q-design__img .q-design__tick { transform: scale(1); }
.q-design__label { font-size: .8rem; font-weight: 600; text-align: center; color: var(--q-muted); line-height: 1.25; }
.q-design input:checked ~ .q-design__label { color: var(--q-text); }

.q-gc__amounts .q-chip span { min-width: 3.2em; text-align: center; font-weight: 700; }
.q-money { position: relative; }
.q-money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--q-muted); }
.q-money input { padding-left: 28px; }
.q-gc__count { justify-self: end; font-variant-numeric: tabular-nums; }


.q-gc__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--q-line); }
.q-gc__total span { font-weight: 600; color: var(--q-muted); }
.q-gc__total strong { font: 600 1.8rem/1 var(--q-font-display); }

/* ---- Balance ---- */
.q-gc__balance {
	display: grid; gap: clamp(18px, 4vw, 40px); align-items: center; padding: clamp(22px, 4vw, 44px);
	border-radius: var(--q-radius); color: var(--q-cream);
	background: radial-gradient(120% 140% at 0% 0%, #4a3528 0%, color-mix(in srgb, var(--wp--preset--color--contrast) 83%, black) 55%, color-mix(in srgb, var(--wp--preset--color--contrast) 47%, black) 100%);
	box-shadow: var(--q-shadow);
}
@media (min-width: 700px) { .q-gc__balance { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.q-gc__balance-art img { width: 100%; max-width: 420px; height: auto; border-radius: 16px; transform: rotate(-6deg); box-shadow: 0 30px 50px -20px rgba(0,0,0,.7); display: block; margin-inline: auto; }
.q-gc__balance h2 { margin: 0 0 6px; font-family: var(--q-font-display); font-size: clamp(1.5rem, 3vw, 2rem); color: #fff; }
.q-gc__balance .q-muted { color: var(--wp--preset--color--on-dark-muted); }
.q-gc__balance label { color: var(--wp--preset--color--line); }
.q-gc__balance input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; letter-spacing: .12em; text-transform: uppercase; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.q-gc__balance input::placeholder { color: rgba(255,255,255,.4); }
.q-gc__result { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; padding: 18px 20px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); animation: q-gc-in .45s var(--q-spring, ease); }
.q-gc__result strong { grid-row: span 2; font: 600 2.4rem/1 var(--q-font-display); color: #fff; }
.q-gc__result span { font-size: .9rem; color: var(--wp--preset--color--line); }
.q-gc__result em { font-style: normal; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #3f6b4e; color: #fff; }
.q-gc__result.is-off em { background: #8f2a1e; }
@keyframes q-gc-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
	.q-gcard, .q-gcard__art, .q-design__img, .q-design__tick, .q-gcard__amount, .q-gflip .q-gflip__card, .q-gflip.is-turning .q-gflip__card { transition: none; }
	.q-gflip.is-turning, .q-gflip.is-turning .q-gflip__floor, .q-gflip.is-peek .q-gflip__card { animation: none; }
	.q-gcard__shine, .q-gc__result { animation: none; }
}
.q-gc__send input { max-width: 220px; }
/* With the date widget (au-date.js) the 220 px goes on its wrapper, so the calendar button stays inside the box. */
.q-gc__send .q-date { max-width: 220px; }
.q-gc__send .q-date > .q-date__text { max-width: none; }
.q-gc__balance-form { display: grid; gap: 12px; } .q-gc__balance-btn { justify-self: start; } .q-gc__balance .q-captcha { max-width: 420px; }
