/* =========================================
   CHECKOUT MODAL STYLES
   ========================================= */

/* --- Checkout Overlay --- */
.checkout-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(17, 17, 17, 0.9);
    z-index: 99999; /* Highest priority */
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.checkout-overlay.active { opacity: 1; visibility: visible; }

/* --- Modal Box --- */
.checkout-modal {
    background: #fff;
    width: 100%; max-width: 900px;
    height: auto; max-height: 90vh;
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    position: relative;
}

.checkout-overlay.active .checkout-modal { transform: scale(1); }

/* --- Left & Right Panels --- */
.checkout-summary {
    width: 40%; background: #f8f8f8; padding: 40px;
    display: flex; flex-direction: column; border-right: 1px solid #eee;
}

.checkout-payment {
    width: 60%; background: #fff; padding: 40px;
    display: flex; flex-direction: column; overflow-y: auto;
}

/* --- Order Items Scroll Area --- */
.order-items-scroll {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px; /* Space for scrollbar */
}

.summary-total-row {
    margin-top: auto;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
    color: #111;
    font-family: 'Montserrat', sans-serif;
}

/* --- Typography & Inputs --- */
.chk-title { 
    font-family: 'Playfair Display', serif; 
    margin-bottom: 20px; 
    font-weight: 700; 
    color: #111; 
}

.chk-subtitle { 
    font-size: 12px; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #888; 
    margin-bottom: 15px; 
    letter-spacing: 1px; 
}

.payment-form-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

.full-width { grid-column: span 2; }

.chk-group { display: flex; flex-direction: column; gap: 5px; }

.chk-group label { 
    font-size: 11px; 
    font-weight: 700; 
    color: #111; 
    text-transform: uppercase; 
}

.chk-input { 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-family: 'Montserrat', sans-serif; 
    font-size: 14px; 
    width: 100%;
}

.chk-input:focus { border-color: #C0A062; outline: none; }

/* --- Card Logos --- */
.card-logos {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 24px;
    color: #ccc;
}
.card-logos .active { color: #111; }

/* --- Buttons --- */
.pay-now-btn {
    margin-top: 25px; width: 100%; padding: 15px;
    background: #111; color: white; border: none;
    font-weight: 700; font-size: 14px; letter-spacing: 1px;
    cursor: pointer; transition: 0.3s;
}
.pay-now-btn:hover { background: #C0A062; }
.pay-now-btn:disabled { background: #ccc; cursor: not-allowed; }

.close-chk-btn {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; font-size: 20px;
    cursor: pointer; color: #999; z-index: 10;
}

/* --- Success State --- */
.checkout-success {
    display: none;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; height: 100%;
}
.success-icon-circle {
    width: 70px; height: 70px; background: #d1fae5; color: #10b981;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 30px; margin-bottom: 20px;
}
.success-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px; color: #111; margin-bottom: 10px;
}
.success-msg { color: #666; font-size: 14px; margin-bottom: 20px; }

.continue-btn {
    background: #111; color: white; padding: 12px 25px;
    border: none; cursor: pointer; font-weight: 700; margin-top: 20px;
    text-transform: uppercase; letter-spacing: 1px;
}

/* =========================================
   LOGIN WARNING MODAL STYLES (NEW)
   ========================================= */
.login-warning-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 100000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.login-warning-overlay.active { opacity: 1; visibility: visible; }

.warning-box {
    background: #fff; width: 90%; max-width: 400px;
    padding: 40px; border-radius: 8px; text-align: center;
    position: relative; transform: translateY(20px); transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.login-warning-overlay.active .warning-box { transform: translateY(0); }

.warning-icon {
    width: 60px; height: 60px; background: #111; color: #C0A062;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; font-size: 24px;
}

.warning-box h3 { 
    font-family: 'Playfair Display', serif; 
    margin-bottom: 10px; 
    font-size: 24px; 
    color: #111; 
}
.warning-box p { 
    color: #666; font-size: 14px; margin-bottom: 30px; line-height: 1.5; 
}

.btn-login-trigger {
    background: #111; color: #fff; width: 100%; padding: 12px;
    border: none; font-weight: 700; letter-spacing: 1px;
    cursor: pointer; text-transform: uppercase; transition: 0.3s;
    margin-bottom: 10px;
}
.btn-login-trigger:hover { background: #C0A062; }

.btn-continue-shopping {
    background: none; border: none; color: #888; font-size: 12px;
    text-decoration: underline; cursor: pointer;
}
.btn-continue-shopping:hover { color: #111; }

.close-warning-btn {
    position: absolute; top: 15px; right: 15px; background: none;
    border: none; font-size: 18px; color: #ccc; cursor: pointer;
}
.close-warning-btn:hover { color: #111; }

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    .checkout-modal { flex-direction: column-reverse; max-height: 95vh; overflow-y: auto; }
    .checkout-summary { width: 100%; padding: 20px; border-right: none; border-top: 1px solid #eee; }
    .checkout-payment { width: 100%; padding: 20px; }
}