/* ============================================
   CHECKOUT PAGE
   ============================================ */

.checkout-main {
    padding: 40px 0 80px;
    background: var(--off-white);
    min-height: 70vh;
}

/* --- STEP INDICATOR --- */
.checkout-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.4;
}

.step.active,
.step.completed {
    opacity: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
}

.step.active .step-num,
.step.completed .step-num {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
}

.step-label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
}

/* --- TITLE --- */
.checkout-title {
    font-size: 32px;
    color: var(--navy);
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.checkout-subtitle {
    text-align: center;
    color: #64748B;
    font-size: 14px;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- EMPTY STATE --- */
.checkout-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 0;
    max-width: 500px;
    margin: 0 auto;
}

.checkout-empty svg {
    color: var(--border);
    margin-bottom: 20px;
}

.checkout-empty h2 {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 8px;
}

.checkout-empty p {
    color: #64748B;
    margin-bottom: 24px;
}

/* --- LAYOUT --- */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: flex-start;
}

/* ============================================
   FORM
   ============================================ */
.checkout-form-wrapper {
    background: var(--white);
    padding: 40px;
    box-shadow: 0 4px 20px rgba(11, 17, 32, 0.04);
}

.form-section {
    margin-bottom: 36px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
    margin-bottom: 20px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--gold);
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--navy);
    outline: none;
    transition: var(--transition);
    border-radius: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--navy);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-note {
    font-size: 12px;
    color: #64748B;
    margin-top: 12px;
    font-style: italic;
}

/* --- PAYMENT NOTICE --- */
.payment-notice {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: #FEF3C7;
    border-left: 4px solid var(--gold);
    margin-bottom: 24px;
}

.payment-notice svg {
    color: #B45309;
    flex-shrink: 0;
}

.payment-notice strong {
    display: block;
    font-size: 14px;
    color: #78350F;
    margin-bottom: 4px;
}

.payment-notice p {
    font-size: 13px;
    color: #92400E;
    line-height: 1.5;
    margin: 0;
}

/* --- PLACE ORDER BUTTON --- */
.place-order-btn {
    width: 100%;
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 18px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.place-order-btn:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.3);
}

.form-terms {
    font-size: 12px;
    color: #64748B;
    text-align: center;
    margin-top: 16px;
}

/* ============================================
   ORDER SUMMARY
   ============================================ */
.order-summary-wrapper {
    position: sticky;
    top: 110px;
}

.order-summary {
    background: var(--white);
    padding: 32px;
    box-shadow: 0 4px 20px rgba(11, 17, 32, 0.04);
}

.summary-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* --- SUMMARY ITEMS --- */
.summary-items {
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.summary-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: var(--off-white);
    flex-shrink: 0;
}

.summary-item-info {
    flex: 1;
    min-width: 0;
}

.summary-item-name {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.summary-item-meta {
    font-size: 11px;
    color: #64748B;
    margin-bottom: 4px;
}

.summary-item-price {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    color: var(--gold);
}

.summary-item-qty {
    font-size: 11px;
    color: #64748B;
    font-weight: 600;
}

/* --- TOTALS --- */
.summary-totals {
    padding-top: 20px;
    border-top: 2px solid var(--navy);
    margin-bottom: 24px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
    margin-bottom: 10px;
}

.total-row.grand {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--navy);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.total-row.grand .total-value {
    color: var(--gold);
}

.free-shipping-note {
    font-size: 11px;
    color: #16A34A;
    font-weight: 600;
    text-align: right;
    margin-top: -4px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- TRUST --- */
.summary-trust {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.trust-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #64748B;
    margin-bottom: 10px;
    font-weight: 500;
}

.trust-row svg {
    color: var(--gold);
    flex-shrink: 0;
}

/* ============================================
   SUCCESS MODAL
   ============================================ */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 32, 0.85);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.success-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white);
    padding: 48px 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.success-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.success-icon {
    color: #16A34A;
    margin-bottom: 20px;
}

.success-title {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.success-message {
    font-size: 14px;
    color: var(--navy);
    line-height: 1.6;
    margin-bottom: 16px;
}

.success-message strong {
    color: var(--gold);
    font-weight: 700;
}

.success-sub {
    font-size: 12px;
    color: #64748B;
    line-height: 1.6;
    margin-bottom: 24px;
}

.success-btn {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 14px 32px;
    transition: var(--transition);
}

.success-btn:hover {
    background: var(--gold-hover);
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .order-summary-wrapper {
        position: static;
        order: -1;
    }

    .checkout-form-wrapper {
        padding: 30px;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
    .checkout-main { padding: 24px 0 60px; }

    .checkout-steps { gap: 20px; margin-bottom: 24px; }
    .step-label { font-size: 10px; }
    .step-num { width: 28px; height: 28px; font-size: 12px; }

    .checkout-title { font-size: 22px; }
    .checkout-subtitle { font-size: 13px; margin-bottom: 24px; }

    .checkout-layout { gap: 24px; }

    .checkout-form-wrapper {
        padding: 20px;
    }

    .form-section { margin-bottom: 24px; padding-bottom: 24px; }

    .form-section-title { font-size: 13px; margin-bottom: 16px; }
    .section-number { width: 22px; height: 22px; font-size: 11px; }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 12px;
        font-size: 15px; /* prevents zoom on iOS */
    }

    .payment-notice { padding: 16px; gap: 10px; flex-direction: column; }
    .payment-notice strong { font-size: 13px; }
    .payment-notice p { font-size: 12px; }

    .place-order-btn { padding: 16px; font-size: 14px; letter-spacing: 1.5px; }

    .order-summary { padding: 20px; }
    .summary-title { font-size: 14px; margin-bottom: 16px; padding-bottom: 12px; }
    .summary-item { padding: 12px 0; gap: 10px; }
    .summary-item-img { width: 52px; height: 52px; }
    .summary-item-name { font-size: 12px; }
    .summary-item-price { font-size: 13px; }

    .success-modal { padding: 32px 20px; }
    .success-title { font-size: 20px; }
}
/* ============================================
   SHIPPING NOTICE (dynamic — 25+ vs under 25)
   ============================================ */
.shipping-notice {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border-left: 4px solid var(--gold);
    background: #FEF3C7;
    align-items: flex-start;
    transition: var(--transition);
}

.shipping-notice.free-shipping {
    border-left-color: #16A34A;
    background: #DCFCE7;
}

.shipping-notice-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #B45309;
}

.shipping-notice.free-shipping .shipping-notice-icon {
    color: #16A34A;
}

.shipping-notice-content h4 {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #78350F;
    margin-bottom: 6px;
}

.shipping-notice.free-shipping .shipping-notice-content h4 {
    color: #166534;
}

.shipping-notice-content p {
    font-size: 13px;
    color: #92400E;
    line-height: 1.6;
    margin: 0;
}

.shipping-notice.free-shipping .shipping-notice-content p {
    color: #166534;
}

/* ============================================
   SUMMARY TITLE + COUNT BADGE
   ============================================ */
.summary-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.summary-count {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold);
    background: rgba(245, 158, 11, 0.1);
    padding: 3px 8px;
    white-space: nowrap;
}

/* ============================================
   SHIPPING LINE IN TOTALS
   ============================================ */
.total-row.shipping-line .total-value {
    font-weight: 700;
}

.total-row.shipping-line.free .total-value {
    color: #16A34A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-row.shipping-line.quoted .total-value {
    color: #B45309;
    font-style: italic;
    font-weight: 600;
    font-size: 12px;
}

.shipping-note-below {
    font-size: 11px;
    color: #64748B;
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-style: italic;
}

/* ============================================
   MOBILE — shipping notice stacking
   ============================================ */
@media (max-width: 768px) {
    .shipping-notice {
        padding: 16px 18px;
        gap: 12px;
    }

    .shipping-notice-content h4 {
        font-size: 12px;
    }

    .shipping-notice-content p {
        font-size: 12px;
    }

    .summary-title {
        flex-wrap: wrap;
        gap: 8px;
    }
}
/* --- MINI QUANTITY CONTROLS (checkout summary) --- */
.qty-mini {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    background: var(--white);
}

.qty-mini button {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-mini button:hover {
    color: var(--gold);
}

.qty-mini span {
    min-width: 24px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    padding: 0 3px;
}