:root {
    --primary: #0A0A0A;
    --secondary: #1A1A1A;
    --accent: #D4AF37;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --text-white: #FFFFFF;
    --text-muted: #A0A0A0;
    --checkout-bg: #f8fafc;
    --card-shadow: 0 10px 40px rgba(0,0,0,0.04);
    --input-border: #e2e8f0;
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --success: #10b981;
}

body {
    background-color: var(--checkout-bg) !important;
    color: #334155;
}

/* Checkout Hero */
.checkout-hero {
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(78, 77, 77, 0.7)), url('/assets/images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    border-bottom: 1px solid var(--accent-glow);
    overflow: hidden;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Main Layout */
.checkout-page-wrapper {
    padding: 60px 0 80px 0;
}

/* Guest Status Banner */
.guest-status-banner {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.status-pill {
    background: white;
    padding: 14px 28px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.status-pill:hover {
    transform: translateY(-2px);
}

.status-pill i {
    color: var(--primary-blue);
    width: 20px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: var(--success);
    opacity: 0.4;
    animation: pulse-out 2s infinite;
}

@keyframes pulse-out {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(3); opacity: 0; }
}

.checkout-modern-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.checkout-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.head-icon {
    color: var(--primary-blue);
    width: 28px;
    height: 28px;
}

.card-head h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Form Styling */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-item {
    margin-bottom: 25px;
}

.form-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-item label i {
    width: 16px;
    color: #94a3b8;
}

.required-star {
    color: #ef4444; /* Danger Red */
    margin-left: -5px;
    font-size: small;
}

.form-item input, 
.form-item select, 
.form-item textarea {
    width: 100%;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-item input:focus, 
.form-item select:focus,
.form-item textarea:focus {
    background: white;
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-item textarea {
    resize: none;
}

/* Order Summary */
.order-items-list {
    margin-bottom: 30px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.order-item-row:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 600;
    color: #1e293b;
    display: block;
    font-size: 0.95rem;
}

.item-qty {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
}

.item-price {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.order-totals {
    background: #f8fafc;
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 500;
    color: #64748b;
}

.total-line:last-of-type {
    margin-bottom: 0;
}

.total-line.shipping .free {
    color: var(--success);
    font-weight: 800;
}

.total-line.grand-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 1.3rem;
    font-weight: 800;
}

/* Coupon */
.mini-coupon {
    display: flex;
    gap: 12px;
}

.mini-coupon input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.95rem;
}

.mini-coupon button {
    background: #1e293b;
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mini-coupon button:hover {
    background: #000;
}

/* Applied Promo Badge */
.applied-promo-badge {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.promo-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-icon {
    color: #10b981;
    width: 20px;
}

.promo-text {
    display: flex;
    flex-direction: column;
}

.promo-code-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.promo-status {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
}

.remove-promo-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-promo-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
    transform: rotate(90deg);
}

.remove-promo-btn i {
    width: 14px;
}

.discount-value {
    color: #10b981 !important;
    font-weight: 700 !important;
}

/* Shake Animation for Validation */
.shake-error {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ef4444 !important;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 35px;
}

.payment-method-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-method-box:hover {
    border-color: #cbd5e1;
}

.payment-method-box input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary-blue);
}

.payment-method-box:has(input:checked) {
    border-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.03);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.method-title {
    display: block;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.method-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.card-icons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* Place Order Button */
.btn-submit-order {
    width: 100%;
    background: var(--primary-blue);
    color: var(--border);
    border: none;
    padding: 12px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.25);
}

.btn-submit-order:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.35);
}

.btn-submit-order i {
    transition: transform 0.3s ease;
}

.btn-submit-order:hover i {
    transform: translateX(5px);
}

.security-text {
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Professional Responsive System */
@media (max-width: 1100px) {
    .checkout-modern-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .checkout-page-wrapper .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    .checkout-page-wrapper {
        padding: 5px 0 0 0;
        position: relative;
    }

    .guest-status-banner {
        margin-top: 35px;
        margin-bottom: -32px; /* Overlap slightly with card */
        position: relative;
        z-index: 10; /* Ensure it stays above the card */
    }

    .checkout-hero {
        height: 160px;
    }




    .checkout-card {
        padding: 45px 20px 30px 20px; /* Increased top padding to 45px */
        border-radius: 24px;
        margin-bottom: 20px;
        margin-left: 0;
        margin-right: 0;
        border-left: none;
        border-right: none;
    }


    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-item {
        margin-bottom: 20px;
    }

    .card-head {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }

    .card-head h3 {
        font-size: 1.2rem;
    }

    .status-pill {
        padding: 10px 18px;
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .checkout-hero {
        height: 150px;
    }

    .checkout-card {
        padding: 25px 15px;
        border-radius: 12px;
        margin-left: 0;
        margin-right: 0;
        border-top-right-radius: 30px;
        border-top-left-radius: 30px;
    }

    .form-item input, 
    .form-item select, 
    .form-item textarea {
        font-size: 16px;
        padding: 14px 16px;
        border-radius: 12px;
    }

    .order-totals {
        padding: 18px;
        border-radius: 15px;
    }

    .total-line.grand-total {
        font-size: 1.15rem;
    }

    .mini-coupon {
        flex-direction: column;
    }

    .mini-coupon button {
        padding: 14px;
        width: 100%;
    }

    .payment-method-box {
        padding: 15px;
        border-radius: 15px;
    }

    .btn-submit-order {
        padding: 12px 14px;
        font-size: 1rem;
        border-radius: 4px;
    }
}


/* Premium Enhancements */
.btn-submit-order {
    position: relative;
    overflow: hidden;
}

.btn-submit-order::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.btn-submit-order:hover::after {
    opacity: 1;
}

.checkout-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.checkout-card:hover {
    box-shadow: 0 15px 45px rgba(0,0,0,0.06);
}

/* Entrance Animation */
.checkout-card {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.checkout-card:nth-child(1) { animation-delay: 0.05s; }
.checkout-card:nth-child(2) { animation-delay: 0.15s; }
.checkout-card:nth-child(3) { animation-delay: 0.25s; }

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}


/* Professional Auth Toast Notification */
.auth-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 24px;
    transform: translateX(120%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.auth-toast.active {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.toast-icon {
    width: 50px;
    height: 50px;
    background: #fff1f2;
    color: #e11d48;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-body h4 {
    margin: 0 0 5px 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 800;
}

.toast-body p {
    margin: 0 0 20px 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.toast-actions {
    display: flex;
    gap: 12px;
}

.toast-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.toast-btn.primary {
    background: #1e293b;
    color: white;
}

.toast-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
}

.toast-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #e11d48;
    width: 100%;
}

.auth-toast.active .toast-progress {
    animation: toastProgress 10s linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@media (max-width: 480px) {
    .auth-toast {
        top: 12px;
        right: 12px;
        width: 300px;
        max-width: calc(100vw - 24px);
        padding: 15px;
        border-radius: 14px;
    }

    .toast-content {
        gap: 10px;
    }

    .toast-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .toast-icon i {
        width: 18px !important;
    }

    .toast-body h4 {
        font-size: 0.9rem;
    }

    .toast-body p {
        font-size: 0.78rem;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .toast-actions {
        gap: 6px;
    }

    .toast-btn {
        padding: 7px 12px;
        font-size: 0.75rem;
        border-radius: 8px;
    }
}
