@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ═══════════════════════════════════════
   CHECKOUT PAGE
═══════════════════════════════════════ */
.checkout-page {
    background: #f7f5f2;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2.5rem 2rem 5rem;
    font-family: 'DM Sans', sans-serif;
}

.checkout-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 6px;
    font-weight: 600;
}

.checkout-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4rem;
    font-weight: 300;
    color: #111;
    margin-bottom: 2rem;
    line-height: 1;
    letter-spacing: 0.04em;
}


/* ── PROGRESS STEPS ── */
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2.5rem;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ccc;
}

.checkout-step.active { color: #111; }
.checkout-step.done   { color: #888; }

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #aaa;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.checkout-step.active .step-num {
    background: #111;
    color: #fff;
}

.checkout-step.done .step-num {
    background: #4caf50;
    color: #fff;
}

.step-divider {
    flex: 1;
    height: 1px;
    background: #e8e8e8;
    margin: 0 10px;
    max-width: 40px;
}


/* ── LAYOUT ── */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}


/* ── LEFT PANEL ── */
.checkout-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    padding: 2rem;
}

.checkout-section-title {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 0.5px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-section-title i {
    font-size: 13px;
    color: #ccc;
}

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

.checkout-field {
    display: flex;
    flex-direction: column;
}

.checkout-field.full { grid-column: 1 / -1; }

.checkout-field label {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 6px;
    font-weight: 600;
}

.checkout-form input,
.checkout-form textarea {
    background: #fafaf8;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #111;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    width: 100%;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17,17,17,.05);
}

.checkout-form textarea {
    resize: none;
    height: 88px;
    line-height: 1.5;
}

.checkout-divider {
    border: none;
    border-top: 0.5px solid #f0f0f0;
    margin: 1.5rem 0;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #111;
    padding: 14px 16px;
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}

.payment-method-option:hover { border-color: #aaa; background: #fafaf8; }
.payment-method-option.selected { border-color: #111; background: #fafaf8; }

.payment-method-option input[type="radio"] { accent-color: #111; }

.checkout-validation {
    margin-top: 12px;
    color: #e53935;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ── RIGHT PANEL ── */
.checkout-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-summary {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    padding: 1.75rem;
}

.checkout-summary-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #111;
    letter-spacing: 0.04em;
    padding-bottom: 14px;
    border-bottom: 0.5px solid #f0f0f0;
    margin-bottom: 4px;
}

.checkout-items {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    max-height: 260px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 0.5px solid #f5f3f0;
    gap: 12px;
}

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

.checkout-item-info { flex: 1; min-width: 0; }

.checkout-item-name {
    font-size: 13px;
    color: #111;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-variant {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
    letter-spacing: 0.03em;
}

.checkout-item-qty {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
    letter-spacing: 0.03em;
}

.checkout-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}

/* Totals */
.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1.5px solid #e8e8e8;
}

.checkout-total-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
}

.checkout-total-amount {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.7rem;
    font-weight: 400;
    color: #111;
}

.place-order-btn {
    width: 100%;
    padding: 16px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    margin-top: 4px;
}

.place-order-btn:not(:disabled):hover {
    background: #2a2a2a;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0,0,0,.22);
}

.place-order-btn:active { transform: scale(0.98); }

.place-order-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.checkout-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: #bbb;
    margin-top: 10px;
    letter-spacing: 0.03em;
}

.checkout-secure i { color: #4caf50; }


/* ── COUPON ── */
.checkout-coupon {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}

.checkout-coupon-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkout-coupon-row {
    display: flex;
    gap: 8px;
}

.checkout-coupon-input {
    flex: 1;
    background: #fafaf8;
    border: 1.5px solid #e8e8e8;
    border-radius: 100px;
    padding: 10px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #111;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.checkout-coupon-input::placeholder { text-transform: none; }

.checkout-coupon-input:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17,17,17,.05);
    background: #fff;
}

.checkout-coupon-btn {
    padding: 12px 20px;
    min-height: 44px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
    transition: background 0.18s;
}

.checkout-coupon-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.checkout-coupon-btn:hover:not(:disabled) { background: #2a2a2a; }

.checkout-coupon-msg {
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkout-coupon-msg.success { color: #2e7d32; }
.checkout-coupon-msg.error   { color: #e53935; }

.checkout-discount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: #555;
    padding: 8px 0;
    border-top: 0.5px solid #f0f0f0;
}

.checkout-discount-row .discount-value { color: #2e7d32; font-weight: 600; }


/* ── SAVED ADDRESSES ── */
.checkout-saved-addresses {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 0.5px solid #f0f0f0;
}

.saved-addresses-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 700;
    margin-bottom: 12px;
}

.saved-address-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.saved-address-option {
    padding: 14px 16px;
    border: 1.5px solid #e8e8e8;
    border-radius: 14px;
    background: #fafaf8;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.saved-address-option:hover {
    border-color: #aaa;
    background: #f4f2ef;
}

.saved-address-option.selected {
    border-color: #111;
    background: #f4f2ef;
}

.saved-address-name {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.saved-address-detail {
    font-size: 12px;
    color: #666;
}

.saved-address-phone {
    font-size: 12px;
    color: #aaa;
}


/* ── ACTION AREA (button + secure text) ── */
.checkout-action-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .checkout-page {
        padding: 1rem 12px calc(2rem + env(safe-area-inset-bottom));
        background: #f7f5f2;
    }

    .checkout-title { font-size: 1.8rem; margin-bottom: 1.5rem; }

    .checkout-form {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .checkout-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .checkout-summary { border-radius: 16px; }
    .checkout-coupon  { border-radius: 14px; }

    /* Payment methods — full width, generous tap targets */
    .payment-methods { gap: 8px; }

    .payment-method-option {
        width: 100%;
        box-sizing: border-box;
        font-size: 15px;
        padding: 16px;
        border-radius: 14px;
    }

    .payment-method-option input[type="radio"] {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    /* Action area: in-flow on mobile — user scrolls to it, no overlap risk */
    .checkout-action-area {
        background: #fff;
        border-radius: 16px;
        padding: 1.25rem;
    }

    .checkout-action-area .checkout-validation {
        background: #fff5f5;
        border: 1px solid #fecaca;
        border-radius: 10px;
        padding: 10px 14px;
        margin-bottom: 10px;
    }
}
