/* Gift cards: the card face (Pages/Shared/_GiftCardFace.cshtml) plus the store, buy and card pages.
   Text sizes use container units so the face scales as one picture at any width. */

.gc-face {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 8 / 5;
    width: 100%;
    /* % radii (not cqi: container units on the container itself resolve against its parent). */
    border-radius: 4.5% / 7.2%;
    overflow: hidden;
    background: var(--gc-bg);
    color: var(--gc-text);
    box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.45), 0 2px 6px rgb(0 0 0 / 0.08);
    isolation: isolate;
}

.gc-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    user-select: none;
    pointer-events: none;
}

.gc-content {
    position: absolute;
    inset: 0;
    padding: 6.4cqi 45% 6.4cqi 7.2cqi;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* The unchanged site logo on a cornflower tag, like the site header. Sizes match GiftCardPdf
   (LogoWidth, LogoTagPadding). The PNG has its own transparent margin, so the tag padding is small. */
.gc-logo-tag {
    display: inline-block;
    padding: 0.4cqi 1.2cqi;
    border-radius: 999px;
    line-height: 0;
}

.gc-logo {
    display: block;
    width: 30cqi;
    height: auto;
}

.gc-eyebrow {
    font-family: var(--font-body), sans-serif;
    font-size: 1.7cqi;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gc-accent);
    margin-top: 0.6cqi;
}

.gc-headline {
    font-family: var(--font-headline-1), sans-serif;
    font-size: 6.4cqi;
    line-height: 1.02;
    overflow-wrap: anywhere;
}

.gc-goodfor {
    font-family: var(--font-body), sans-serif;
    font-weight: 700;
    font-size: 2.25cqi;
    color: var(--gc-accent);
    margin-top: 1.1cqi;
    overflow-wrap: anywhere;
}

.gc-goodfor:empty { display: none; }

.gc-for {
    font-family: var(--font-body), sans-serif;
    font-size: 2.6cqi;
    margin-top: 1.4cqi;
    min-height: 1em;
    overflow-wrap: anywhere;
}

.gc-amount {
    font-family: var(--font-headline-1), sans-serif;
    font-size: 7.3cqi;
    line-height: 1;
    color: var(--gc-accent);
    min-height: 1em;
}

/* A light sheen that sweeps across on hover, and an optional mouse tilt (scripts on the Buy and GiftCard pages). */
.gc-face::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 0.28) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.9s ease;
    pointer-events: none;
}

.gc-face:hover::after,
.gc-face.gc-shine::after {
    transform: translateX(120%);
}

.gc-tilt {
    transform: perspective(900px) rotateX(var(--gc-rx, 0deg)) rotateY(var(--gc-ry, 0deg));
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .gc-face::after { display: none; }
    .gc-tilt { transform: none !important; }
}

/* ---- Store listing ---- */

.gc-hero {
    position: relative;
    overflow: hidden;
}

.gc-hero-stack {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
    aspect-ratio: 8 / 6.2;
}

.gc-hero-stack .gc-face {
    position: absolute;
    width: 82%;
    transition: transform 0.4s ease;
}

.gc-hero-stack .gc-face:nth-child(1) { left: 0; top: 18%; transform: rotate(-9deg); }
.gc-hero-stack .gc-face:nth-child(2) { right: 0; top: 0; transform: rotate(7deg); }
.gc-hero-stack .gc-face:nth-child(3) { left: 9%; top: 34%; transform: rotate(-1deg); }
.gc-hero-stack:hover .gc-face:nth-child(1) { transform: rotate(-13deg) translateX(-4%); }
.gc-hero-stack:hover .gc-face:nth-child(2) { transform: rotate(11deg) translateX(4%); }

.gc-design-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease;
}

.gc-design-card:hover {
    transform: translateY(-4px);
    color: inherit;
}

.gc-design-card h3 {
    margin: 1rem 0 0.25rem;
    font-size: 1.2rem;
}

.gc-design-card .gc-price-hint {
    font-size: 0.9rem;
    color: var(--text-light);
}

.gc-season-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--color-sunshine);
    color: var(--text-dark);
    margin-left: 0.4rem;
    vertical-align: middle;
}

.gc-steps {
    counter-reset: gc-step;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gc-steps li {
    counter-increment: gc-step;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.gc-steps li::before {
    content: counter(gc-step);
    flex: 0 0 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ---- Buy page ---- */

.gc-preview-sticky {
    position: sticky;
    top: 6rem;
}

.gc-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.gc-amount-btn {
    min-width: 5.25rem;
    padding: 0.7rem 1.1rem;
    border: 2px solid #ddd6ca;
    border-radius: var(--radius);
    background: #fff;
    font-family: var(--font-headline-1), sans-serif;
    font-size: 1.25rem;
    color: var(--text-dark);
    transition: all 0.15s ease;
}

.gc-amount-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.gc-amount-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px -6px var(--primary);
}

.gc-custom-amount {
    max-width: 11rem;
}

.gc-delivery-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 2px solid #e7e1d6;
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 0.6rem;
    background: #fff;
}

.gc-delivery-option:has(input:checked) {
    border-color: var(--primary);
    background: #f4f8fd;
}

.gc-delivery-option input {
    margin-top: 0.3rem;
}

.gc-other-designs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.gc-other-designs a {
    width: 88px;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.85;
    outline: 2px solid transparent;
    transition: all 0.15s ease;
}

.gc-other-designs a:hover { opacity: 1; }
.gc-other-designs a.active { outline-color: var(--primary); opacity: 1; }
.gc-other-designs img { width: 100%; display: block; }

/* ---- Card page (/GiftCard/{token}) ---- */

.gc-code {
    font-family: "Courier New", ui-monospace, monospace;
    font-size: clamp(1.4rem, 5vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-dark);
}

.gc-code-box {
    background: #f6f3ee;
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.gc-message {
    font-style: italic;
    font-size: 1.1rem;
    border-left: 4px solid var(--gc-accent, var(--secondary));
    padding: 0.5rem 0 0.5rem 1rem;
    white-space: pre-line;
}

.gc-print-only { display: none; }

@media print {
    @page { margin: 0.5in; }

    body { background: #fff !important; }
    nav, header, footer, .navbar, .site-footer, .no-print, .page-header, .alert { display: none !important; }
    .section { padding: 0 !important; }
    .gc-print-only { display: block; }

    .gc-printable {
        max-width: 6.75in;
        margin: 0 auto;
        border: 1.5px dashed #999;
        padding: 0.2in;
        box-shadow: none !important;
        background: #fff !important;
    }

    .gc-face {
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .gc-face::after { display: none; }
    .gc-code-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
