/* ═══════════════════════════════════════════════════════
   CHECKOUT PAGE — Garnet Grid Consulting LLC
   Premium branded checkout experience
   ═══════════════════════════════════════════════════════ */

/* ── Layout ── */
.checkout-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.checkout-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

/* ── Background Grid Effect ── */
.checkout-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(10, 10, 15, 0.95), rgba(10, 10, 15, 0.85)),
        repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(170, 0, 0, 0.04) 59px, rgba(170, 0, 0, 0.04) 60px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(170, 0, 0, 0.04) 59px, rgba(170, 0, 0, 0.04) 60px);
    z-index: 0;
}

/* ── Ambient glow behind card ── */
.checkout-hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(170, 0, 0, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.checkout-container {
    max-width: 720px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* ── Breadcrumb ── */
.checkout-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    letter-spacing: 0.05em;
}

.checkout-breadcrumb a {
    color: var(--text-muted, #666);
    text-decoration: none;
    transition: color 0.2s;
}

.checkout-breadcrumb a:hover {
    color: var(--garnet-main);
}

.checkout-breadcrumb .sep {
    opacity: 0.4;
}

.checkout-breadcrumb .current {
    color: var(--text-primary, #fff);
}

/* ── Category Label ── */
.checkout-category {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--garnet-main);
    font-weight: 600;
}

.checkout-category .cat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    background: rgba(170, 0, 0, 0.15);
    border: 1px solid rgba(170, 0, 0, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* ── Main Card ── */
.checkout-card {
    background: linear-gradient(135deg,
            rgba(20, 20, 30, 0.9) 0%,
            rgba(15, 15, 22, 0.95) 100%);
    border: 1px solid rgba(170, 0, 0, 0.2);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    animation: cardReveal 0.6s ease-out both;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Accent bar at top */
.checkout-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--garnet-main), hsl(348, 90%, 60%), var(--garnet-main));
    z-index: 1;
}

/* Inner glow */
.checkout-card::after {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(170, 0, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Card Header ── */
.checkout-card-header {
    padding: 2.5rem 2.5rem 0;
    position: relative;
    z-index: 1;
}

.checkout-tier-badge {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--garnet-main);
    background: rgba(170, 0, 0, 0.1);
    border: 1px solid rgba(170, 0, 0, 0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.checkout-service-name {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.checkout-description {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary, #999);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* ── Price Block ── */
.checkout-price-block {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.checkout-currency {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: var(--garnet-main);
    font-weight: 600;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.checkout-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkout-period {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    margin-left: 0.25rem;
}

.checkout-billing-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted, #666);
    margin-top: 0.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.checkout-billing-note .recurring-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0, 200, 100, 0.08);
    border: 1px solid rgba(0, 200, 100, 0.2);
    color: #4ade80;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Features List ── */
.checkout-features {
    padding: 1.5rem 2.5rem;
    position: relative;
    z-index: 1;
}

.checkout-features h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted, #666);
    margin: 0 0 1rem;
    font-weight: 600;
}

.checkout-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.checkout-features li {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary, #ccc);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkout-features li .check {
    color: var(--garnet-main);
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ── What's Included (expandable) ── */
.checkout-included {
    padding: 0 2.5rem;
    position: relative;
    z-index: 1;
}

.checkout-included details {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.checkout-included summary {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: color 0.2s;
    list-style: none;
}

.checkout-included summary::-webkit-details-marker {
    display: none;
}

.checkout-included summary:hover {
    color: var(--garnet-main);
}

.checkout-included details[open] summary {
    color: var(--garnet-main);
    margin-bottom: 0.75rem;
}

.checkout-included ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkout-included li {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary, #999);
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.checkout-included li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--garnet-main);
    font-weight: 700;
}

/* ── CTA Section ── */
.checkout-cta-section {
    padding: 1.5rem 2.5rem 2.5rem;
    position: relative;
    z-index: 1;
}

.checkout-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, var(--garnet-main), hsl(348, 90%, 55%));
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.checkout-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.checkout-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(170, 0, 0, 0.4),
        0 0 60px rgba(170, 0, 0, 0.1);
}

.checkout-cta-btn:hover::before {
    transform: translateX(100%);
}

.checkout-cta-btn:active {
    transform: translateY(0);
}

.checkout-cta-btn .lock-icon {
    font-size: 1rem;
}

/* ── Trust Bar ── */
.checkout-trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted, #555);
    letter-spacing: 0.04em;
}

.trust-item .trust-icon {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ── Back Link ── */
.checkout-back {
    text-align: center;
    margin-top: 1.5rem;
}

.checkout-back a {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.checkout-back a:hover {
    color: var(--garnet-main);
}

/* ── Loading Overlay ── */
.checkout-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 10, 20, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
}

.checkout-loading-overlay.active {
    display: flex;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.checkout-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(170, 0, 0, 0.2);
    border-top-color: var(--garnet-main);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.checkout-loading-text {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

/* ── Error Toast ── */
.checkout-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    border: 1px solid var(--garnet-main);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 12px;
    z-index: 100000;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    box-shadow: 0 8px 32px rgba(170, 0, 0, 0.3);
    animation: toastSlideUp 0.4s ease;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ── Floating Particles ── */
.checkout-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(170, 0, 0, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .checkout-hero {
        padding: 5rem 1.25rem 3rem;
    }

    .checkout-card-header {
        padding: 2rem 1.5rem 0;
    }

    .checkout-service-name {
        font-size: 1.65rem;
    }

    .checkout-amount {
        font-size: 2.5rem;
    }

    .checkout-features {
        padding: 1.5rem 1.5rem;
    }

    .checkout-features ul {
        grid-template-columns: 1fr;
    }

    .checkout-included {
        padding: 0 1.5rem;
    }

    .checkout-cta-section {
        padding: 1.5rem;
    }

    .checkout-trust-bar {
        flex-wrap: wrap;
        gap: 0.75rem 1.5rem;
        justify-content: center;
    }

    .checkout-breadcrumb {
        font-size: 0.7rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 420px) {
    .checkout-service-name {
        font-size: 1.4rem;
    }

    .checkout-amount {
        font-size: 2rem;
    }

    .checkout-cta-btn {
        font-size: 0.95rem;
        padding: 1rem 1.5rem;
    }
}