* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Urbanist', sans-serif;
    background-color: #FAFAF7; 
    color: #171717;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.main-container {
    max-width: 1100px;
    width: 100%;
}

.header-section { margin-bottom: 30px; }
.brand {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'Urbanist', sans-serif; font-weight: 700; font-size: 1.2rem;
    margin-bottom: 10px;
}
.logo-dot { width: 8px; height: 8px; background-color: #D99A3D; border-radius: 50%; }
.title { font-family: 'Urbanist', sans-serif; font-weight: 800; font-size: 2.5rem; margin-bottom: 5px; }
.subtitle { color: #6B6B6B; font-weight: 500; }

.checkout-layout {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 30px;
    align-items: start;
}

.card {
    background: #FFFFFF;
    padding: 35px;
    border-radius: 20px;
    border: 1px solid #EAEAE5;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.sticky-summary {
    position: sticky;
    top: 20px;
    padding: 25px;
}

.summary-title { font-family: 'Urbanist', sans-serif; font-weight: 700; font-size: 1.2rem; margin-bottom: 20px; border-bottom: 1px solid #EAEAE5; padding-bottom: 10px; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 12px; color: #6B6B6B; font-size: 1rem; font-weight: 500; }
.discount-line { color: #22c55e; font-weight: 600; }
.total-line { border-top: 1px solid #EAEAE5; padding-top: 15px; margin-top: 10px; font-weight: 700; color: #171717; font-size: 1.15rem; }

.coupon-section { display: flex; gap: 10px; margin-top: 20px; margin-bottom: 5px; }
.coupon-section input { flex: 1; margin-bottom: 0; padding: 10px 14px; }
.secondary-btn {
    font-family: 'Urbanist', sans-serif;
    background: #EAEAE5; color: #171717; border: none; border-radius: 10px;
    padding: 0 20px; font-weight: 700; cursor: pointer; transition: 0.3s;
}
.secondary-btn:hover { background: #D99A3D; color: #fff; }
.coupon-msg { font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; min-height: 15px; }

.payment-box {
    text-align: center; background: #FAFAF7; padding: 20px;
    border-radius: 12px; margin-bottom: 20px; border: 1px dashed #D99A3D;
}

/* --- New Breakdown Inside Payment Box --- */
.payment-breakdown {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #EAEAE5;
}
.breakdown-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #6B6B6B;
    font-weight: 600;
}
.breakdown-line.discount-text {
    color: #22c55e;
}
.breakdown-line.total-text {
    font-weight: 800;
    color: #171717;
    font-size: 1.1rem;
    margin-top: 10px;
}

.payment-method-box {
    background: #FAFAF7;
    border: 1px solid #EAEAE5;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
}
.qr-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.qr-header-row h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #171717;
}
.small-btn {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
}
.qr-preview-box,
.qr-modal-box {
    background: #FFFFFF;
    border: 1px solid #EAEAE5;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}
#payment-qr-image,
#modal-qr-image {
    display: none;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}
.upi-id-line {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #6B6B6B;
    font-weight: 600;
}
.modal-upi-line {
    margin-top: 18px;
    margin-bottom: 8px;
}
.transaction-field { margin-top: 8px; }

/* --- Form --- */
.form-section-title { font-family: 'Urbanist', sans-serif; font-weight: 700; font-size: 1.15rem; color: #171717; margin: 25px 0 15px 0; padding-bottom: 5px; border-bottom: 1px dashed #EAEAE5; }
.form-section-title:first-child { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.input-group { margin-bottom: 15px; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: #171717; }
input, select {
    width: 100%; padding: 12px 14px; border: 1px solid #EAEAE5; border-radius: 10px;
    font-family: 'Urbanist', sans-serif; font-weight: 500; font-size: 1rem; background: #FAFAF7; transition: border 0.3s ease;
}
input:focus, select:focus { outline: none; border-color: #D99A3D; }

.primary-btn {
    font-family: 'Urbanist', sans-serif;
    width: 100%; padding: 16px; margin-top: 10px; background: #171717; color: #FFFFFF;
    border: none; border-radius: 30px; font-weight: 700; font-size: 1.05rem; cursor: pointer; transition: 0.3s;
}
.primary-btn:hover { background: #D99A3D; transform: translateY(-2px); }
/* --- Modal Popup Styles --- */
/* --- Professional Modal Popup Styles --- */

/* The dark background behind the popup */
.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px); /* Premium glass blur effect */
    justify-content: center; 
    align-items: center; 
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

/* The white box itself */
.modal-box {
    background: #FFFFFF; 
    padding: 40px; 
    border-radius: 24px;
    max-width: 420px; 
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out;
}

/* Centering the content inside */
.modal-content-center { 
    text-align: center; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Typography for Modal */
.modal-title { 
    font-family: 'Urbanist', sans-serif; 
    font-weight: 800; 
    font-size: 1.8rem; 
    color: #171717; 
    margin-bottom: 20px; 
}
.modal-subtitle { 
    color: #6B6B6B; 
    font-weight: 500; 
    font-size: 1rem; 
    line-height: 1.5; 
    margin-bottom: 30px; 
}

/* Success Animation Elements */
.success-icon-wrapper { margin-bottom: 10px; }
.success-icon { 
    font-size: 65px; 
    display: inline-block;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.success-text { color: #22c55e; margin-bottom: 12px; }
.modal-close-btn { width: 100%; padding: 14px; font-size: 1.05rem; }

/* --- Smooth Keyframe Animations --- */
@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}
@keyframes slideUp { 
    from { transform: translateY(40px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}
@keyframes popIn { 
    0% { transform: scale(0.5); opacity: 0; } 
    100% { transform: scale(1); opacity: 1; } 
}
/* --- Professional Loading Spinner --- */
.custom-spinner {
    width: 65px;
    height: 65px;
    border: 6px solid #EAEAE5; /* Light grey track */
    border-top: 6px solid #D99A3D; /* Brand golden color */
    border-radius: 50%;
    animation: spinLoader 1s linear infinite;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 850px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .sticky-summary { position: static; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}
/* --- WhatsApp Button Styling --- */
.whatsapp-btn {
    display: inline-block;
    background: #25D366; /* Official WhatsApp Green */
    color: #FFFFFF;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
}

.whatsapp-btn:hover {
    background: #128C7E; /* Darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(37, 211, 102, 0.3);
}