*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #0A0A0A;
    --dark: #0F0F0F;
    --charcoal: #1A1A1A;
    --light-grey: #F4F4F4;
    --grey: #BEBEBE;
    --white: #FFFFFF;
    --mid: #2A2A2A;
    --navy: #1A1F2E;
    --gold: #C9A46F;
    --gold-pale: #E8D5B7;
    --red: hsl(0, 100%, 49%);
    --gold-light: #ffc107;
    --cream: #F8F4ED;
    --off-white: #EDE8E0;
    --muted: #9A9489;
    --border: rgba(201, 164, 111, 0.15);
    --border-light: rgba(201, 164, 111, 0.3);
    --grad: linear-gradient(135deg, #FFC107 5%, #FFE68A 50%, #E89B00 95%);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--light-grey);
    color: var(--black);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* HEADER */
header {
    padding: 22px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gold-light);
    background: var(--black);
}

.logo {
    font-family: 'Nunito Sans', serif;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
}

.logo span {
    color: var(--gold-light);
}

/* Desktop Navigation */
nav {
    display: flex;
    gap: 2.75rem;
    align-items: center;
}

nav a {
    color: var(--white) !important;
    text-decoration: none;
    font-size: 0.875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--black) !important;
    background: var(--grad);
    border-radius: 20px;
    padding: 5px 20px;
}

/* Nav CTA Button */
.nav-cta {
    color: var(--white) !important;
    padding: 5px 20px;
    border: 1px solid var(--gold-light);
    border-radius: 50px;
    background: transparent;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--grad) !important;
    color: var(--black) !important;
    border-color: var(--gold);
}

/* Scrolled State */
header.scrolled .logo {
    color: var(--black) !important;
}

header.scrolled .logo span {
    color: var(--gold-light) !important;
}

header.scrolled nav a {
    color: #444444 !important;
}

header.scrolled nav a:hover {
    color: var(--gold) !important;
}

header.scrolled .nav-cta {
    color: var(--black) !important;
}

/* LUXURY MOBILE NAV */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 200;
}

@media (max-width: 768px) {
    .nav-toggle { display: flex !important; }
    nav { display: none !important; }
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: var(--white);
    transition: all 0.4s ease;
}

header.scrolled .nav-toggle span {
    background: var(--black);
}

/* Luxury Mobile Drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 88vw;
    background: rgba(15, 15, 15, 0.96);
    backdrop-filter: blur(20px);
    z-index: 150;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 120px 40px 60px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    border-left: 1px solid rgba(212, 168, 67, 0.2);
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 400;
    padding: 18px 0;
    border-bottom: 1px solid rgba(212, 168, 67, 0.15);
    transition: all 0.4s ease;
    letter-spacing: 0.04em;
}

.mobile-nav a:hover {
    color: var(--gold-light);
    padding-left: 12px;
    border-bottom-color: var(--gold);
}

.mobile-nav a::after {
    content: '→';
    float: right;
    opacity: 0;
    transition: all 0.4s ease;
    color: var(--gold-light);
}

.mobile-nav a:hover::after {
    opacity: 1;
}

/* Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 168, 67, 0.2);
}

.mobile-close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.mobile-close-btn:hover {
    color: var(--gold-light);
    opacity: 1;
    transform: rotate(90deg);
}

/* MAIN */
.checkout-page {
    display: grid;
    grid-template-columns: 1fr 420px;
    min-height: calc(100vh - 76px);
}

/* LEFT PANEL */
.checkout-left {
    padding: 60px;
    border-right: 1px solid var(--gold-light);
}

.checkout-left h2 {
    font-family: 'Nunito Sans', serif;
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 40px;
}

.checkout-left h2 em {
    font-style: italic;
    color: var(--gold-light);
}

/* STEP INDICATOR */
.steps {
    display: flex;
    gap: 0;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--gold-light);
    padding-bottom: 28px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.step:not(:last-child)::after {
    content: '→';
    color: var(--black);
    margin: 0 12px;
}

.step-num {
    width: 30px;
    height: 30px;
    border: 1px solid var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--black);
}

.step.active .step-num {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--black);
    font-weight: 500;
}

.step-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
}

.step.active .step-label {
    color: var(--gold-light);
}

/* FORM */
.form-section {
    margin-bottom: 36px;
}

.form-section-title {
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--black);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gold-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--black);
}

.form-input {
    background: var(--white);
    border: 1px solid var(--muted);
    color: var(--black);
    padding: 14px 16px;
    font-size: 0.9rem;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--gold-light);
}

.form-input::placeholder {
    color: var(--muted);
    font-size: 1rem;
}

/* PAY BUTTON */
.pay-btn-wrap {
    margin-top: 40px;
}

.pay-btn {
    width: 100%;
    background: var(--grad);
    color: var(--black);
    border: none;
    padding: 20px;
    font-size: 1.25rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 1000;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.pay-btn:hover {
    background: var(--grad);
    transform: translateY(-2px);
}

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

/* LOADING STATE */
.pay-btn.loading {
    pointer-events: none;
    background: var(--mid);
}

.pay-btn .btn-text {
    transition: opacity 0.3s ease;
}

.pay-btn.loading .btn-text {
    opacity: 0;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px solid rgba(201, 164, 111, 0.3);
    border-top-color: var(--gold-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pay-btn.loading .spinner {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* SUCCESS OVERLAY */
.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.success-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.success-ring {
    width: 100px;
    height: 100px;
    border: 1px solid var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    animation: pulseRing 2s ease infinite;
}

@keyframes pulseRing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 164, 111, 0.2); }
    50% { box-shadow: 0 0 0 20px rgba(201, 164, 111, 0); }
}

.success-check {
    font-size: 2.5rem;
    color: var(--gold-light);
}

.success-overlay h2 {
    font-family: 'Nunito Sans', serif;
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 12px;
    text-align: center;
    color: var(--white);
}

.success-overlay h2 em {
    font-style: italic;
    color: var(--gold-light);
}

.success-overlay p {
    color: var(--white);
    font-family: 'Nunito Sans', serif;
    font-size: 1.3rem;
    margin-bottom: 40px;
    text-align: center;
    max-width: 360px;
    line-height: 1.8;
}

.success-redirect {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
}

.redirect-bar {
    width: 200px;
    height: 2px;
    background: var(--black);
    margin: 16px auto 0;
    overflow: hidden;
}

.redirect-progress {
    height: 100%;
    background: var(--gold-light);
    width: 0%;
    animation: progress 3s ease forwards;
    animation-play-state: paused;
}

.redirect-progress.run {
    animation-play-state: running;
}

@keyframes progress {
    to { width: 100%; }
}

/* RIGHT PANEL */
.checkout-right {
    padding: 60px 40px;
    background: var(--white);
    position: sticky;
    top: 88px;
    align-self: start;
}

.order-title {
    font-family: 'Nunito Sans', serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gold-light);
    color: var(--black);
}

.order-items {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 28px;
}

.order-items::-webkit-scrollbar {
    width: 5px;
}

.order-items::-webkit-scrollbar-track {
    background: var(--white);
}

.order-items::-webkit-scrollbar-thumb {
    background: var(--gold-light);
}

.order-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--muted);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-img {
    width: 56px;
    height: 68px;
    object-fit: cover;
    filter: brightness(0.8);
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-family: 'Nunito Sans', serif;
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 3px;
    color: var(--black);
}

.order-item-size {
    font-size: 0.7rem;
    color: var(--black);
}

.order-item-qty {
    font-size: 0.7rem;
    color: var(--black);
    margin-top: 2px;
}

.order-item-price {
    font-family: 'Nunito Sans', serif;
    font-size: 1.2rem;
    color: var(--black);
    white-space: nowrap;
}

.order-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.order-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.order-row.muted {
    color: var(--black);
    font-size: 0.9rem;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-family: 'Nunito Sans', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--muted);
}

.order-total-amount {
    color: var(--black);
}

.trust-section {
    margin-top: 36px;
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

.trust-image {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.yoco-image {
    width: 100px;
    height: 70px;
    object-fit: contain;
    justify-content: center;
}

.accepted-payments {
    width: 220px;
    height: 80px;
    object-fit: contain;
    justify-content: center;
}

.trust-label {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.trust-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    color: var(--muted);
}

.trust-icon {
    color: var(--gold);
    font-size: 0.9rem;
    width: 16px;
    flex-shrink: 0;
}

.powered-by {
    margin-top: 28px;
    border: 1px solid var(--border);
    padding: 16px;
    text-align: center;
    background: rgba(201, 164, 111, 0.03);
}

.powered-text {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

.powered-name {
    font-family: 'Nunito Sans', serif;
    font-size: 1.3rem;
    color: var(--gold);
    font-style: italic;
}

.powered-sub {
    font-size: 0.58rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    display: block;
    margin-top: 4px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: var(--black);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--gold-light);
}

/* ─── MOBILE FIXES FOR IPHONE SE (375px) ─── */
@media (max-width: 768px) {
    .checkout-page {
        grid-template-columns: 1fr !important;
    }

    .checkout-left,
    .checkout-right {
        padding: 32px 20px !important;
        border-right: none !important;
    }

    .checkout-right {
        position: static !important;
        order: -1;
    }

    header {
        padding: 16px 20px !important;
    }

    .steps {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding-bottom: 16px;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .checkout-left,
    .checkout-right {
        padding: 24px 16px !important;
    }

    body {
        font-size: 15px;
    }

    .checkout-left h2 {
        font-size: 1.7rem;
        margin-bottom: 28px;
    }

    .form-section {
        margin-bottom: 24px;
    }

    .form-section-title {
        font-size: 0.78rem;
    }

    .form-label {
        font-size: 0.78rem;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .pay-btn {
        padding: 16px 20px;
        font-size: 1.05rem;
    }

    .pay-btn-wrap {
        margin-top: 28px;
    }

    .order-title {
        font-size: 1.65rem;
    }

    .order-items {
        max-height: 240px;
    }
}

@media (max-width: 375px) {
    .checkout-left,
    .checkout-right {
        padding: 20px 14px !important;
    }

    .form-input {
        padding: 11px 12px;
    }

    .checkout-left h2 {
        font-size: 1.6rem;
    }
}