/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #F9F9F7;
    /* Soft Ayurvedic Cream/White */
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --text-main: #2C2C2C;
    /* Dark Charcoal Text */
    --text-muted: #666666;
    --gold-main: #D4AF37;
    --gold-light: #F4E095;
    --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F4E095 100%);
    --border-color: #E0E0E0;
    --border-Gold: #D4AF37;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    --shadow-glow: 0 0 15px rgba(212, 175, 55, 0.15);
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
select,
textarea {
    font-family: inherit;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Header */
.checkout-header {
    background: #111111;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-main);
    font-size: 0.9rem;
    font-weight: 500;
}

.header-icons {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.85rem;
    color: #e0e0e0;
}

.header-icon-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-icon-item i {
    color: var(--gold-main);
}

/* Layout Grid */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

/* Section Titles */
.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.section-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}





.form-input:focus {
    outline: none;
    border-color: var(--gold-main);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
    background: #FAFAFA;
}

.form-input.valid {
    border-color: #4CAF50;
}

.form-input.error {
    border-color: #FF5252;
}

.form-helper {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-row.pincode-city {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Payment Section */
.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--gold-main);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.payment-radio {
    margin-top: 4px;
    accent-color: var(--gold-main);
    transform: scale(1.2);
}

.payment-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.payment-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.courier-trust {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--gold-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Quantity Selector */
.quantity-section {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.qty-selector {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    width: fit-content;
    margin-bottom: 12px;
}

.qty-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--gold-main);
    font-size: 1.2rem;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.qty-input {
    width: 50px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.1rem;
    pointer-events: none;
    /* Controlled by buttons */
}

.value-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.value-pill {
    font-size: 0.85rem;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.value-pill.active {
    background: var(--gold-main);
    color: #000;
    border-color: var(--gold-main);
    font-weight: 500;
}

/* Order Summary (Sticky) */
.order-summary-wrapper {
    position: sticky;
    top: 90px;
    /* Adjust based on header height */
}

.product-card {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.product-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-bullets {
    list-style: none;
}

.product-bullets li {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-bullets li i {
    color: var(--gold-main);
    font-size: 0.7rem;
}

/* Pricing */
.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.price-row.total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-main);
}

.price-note {
    font-size: 0.8rem;
    text-align: center;
    color: #4CAF50;
    margin-top: 8px;
    background: rgba(76, 175, 80, 0.1);
    padding: 6px;
    border-radius: var(--radius-sm);
}

/* Primary CTA */
.btn-cta {
    width: 100%;
    padding: 18px;
    background: var(--gold-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: var(--spacing-md);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-subtext {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Trust Icons Below CTA */
.trust-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: var(--spacing-md);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.trust-item i {
    color: var(--gold-main);
    font-size: 1rem;
}

/* Timeline */
.timeline-section {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: var(--spacing-md);
}

.timeline-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 18%;
}

.step-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 2px solid var(--gold-main);
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--gold-main);
}

.step-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Footer */
.checkout-footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-lg);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        display: flex;
        flex-direction: column;
    }

    .order-summary-wrapper {
        position: relative;
        top: 0;
    }

    .checkout-left {
        order: 1;
        /* First */
    }

    .checkout-right {
        order: 2;
        /* Last */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Reduce Card Padding */
    .card {
        padding: 20px;
    }

    /* Header Adjustments */
    .checkout-header {
        padding: 10px 0;
    }

    .header-logo img {
        height: 32px;
        /* Smaller Logo */
    }

    .trust-badge {
        font-size: 0.8rem;
    }

    .header-icons span {
        display: none;
    }

    /* Timeline Optimization - Horizontal Scroll/Fit */
    .timeline-steps {
        flex-direction: row;
        /* Keep horizontal */
        gap: 5px;
        justify-content: space-between;
    }

    .timeline-steps::before {
        top: 12px;
        /* Align line */
        display: block;
        /* Keep line */
    }

    .step {
        width: auto;
        flex: 1;
        display: block;
        /* Stack icon/text */
        text-align: center;
        padding: 0 2px;
    }

    .step-icon {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
        /* Smaller icon */
        margin: 0 auto 5px;
        background: var(--bg-card);
        /* Ensure line goes behind */
        position: relative;
        z-index: 2;
    }

    .step-text {
        font-size: 0.65rem;
        /* Smaller text */
        line-height: 1.1;
        display: block;
    }

    /* Form Adjustments */
    .form-row,
    .form-row.pincode-city {
        grid-template-columns: 1fr;
        /* Stack inputs vertical */
        gap: 15px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* Payment Option */
    .payment-option {
        flex-direction: column;
        gap: 8px;
    }

    .payment-radio {
        margin-top: 0;
        margin-bottom: 5px;
    }

    /* Mobile Sticky CTA Placeholder (Optional) */
    /* 
    .mobile-sticky-cta {
        display: block;
        padding: 15px;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
        z-index: 999;
    } 
    */
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gold-main);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: var(--spacing-md);
}

.modal-content h2 {
    color: var(--gold-main);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.order-id {
    font-family: monospace;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px;
    border-radius: var(--radius-sm);
    margin: 15px 0;
    display: inline-block;
    width: 100%;
}