@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #431407;
    --accent: #ea580c;
    --bg: #f3f4f6;
    --white: #ffffff;
    --border: #e5e7eb;
    --text-main: #111827;
    --text-sub: #6b7280;
    --green: #059669;
    --phonepe: #5f259f;
    --paytm: #00baf2;
}

body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); margin: 0; padding-bottom: 100px; color: var(--text-main); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }

/* HEADER & LAYOUT */
.brand-header { background: var(--white); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.logo { font-weight: 800; font-size: 18px; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.secure-tag { font-size: 11px; font-weight: 700; color: var(--green); background: #dcfce7; padding: 4px 8px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
.container { max-width: 600px; margin: 20px auto; padding: 0 16px; }

/* CARDS */
.section-card { background: var(--white); border-radius: 16px; padding: 20px; margin-bottom: 16px; border: 1px solid var(--border); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.section-head { font-size: 14px; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }

/* PRODUCT */
.product-box { display: flex; gap: 15px; }
.prod-img { width: 70px; height: 70px; border-radius: 8px; border: 1px solid #f3f4f6; object-fit: cover; }
.prod-info h3 { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.price-tag { font-size: 18px; font-weight: 800; color: var(--text-main); }
.old-price { text-decoration: line-through; color: var(--text-sub); font-size: 13px; margin-left: 5px; }
.discount-badge { background: #fee2e2; color: #ef4444; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 5px; }

/* INPUTS */
.input-group { position: relative; margin-bottom: 12px; }
.icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-sub); }
.field { width: 100%; padding: 14px 14px 14px 42px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: #f9fafb; transition: 0.2s; font-family: inherit; }
.field:focus { background: var(--white); border-color: var(--accent); outline: none; }

/* DELIVERY */
.delivery-options { display: grid; gap: 10px; }
.delivery-card { border: 1px solid var(--border); border-radius: 10px; padding: 15px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: 0.2s; background: var(--white); }
.delivery-card.active { border: 2px solid var(--accent); background: #fff7ed; }
.d-left { display: flex; align-items: center; gap: 12px; }
.d-icon { width: 36px; height: 36px; background: #f3f4f6; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-main); font-size: 18px; }
.d-title { font-weight: 700; font-size: 14px; display: block; }
.d-desc { font-size: 11px; color: var(--text-sub); }
.d-price { font-weight: 700; font-size: 14px; }
.d-free { color: var(--green); }

/* PAYMENT */
.pay-option { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 10px; cursor: pointer; position: relative; transition: 0.2s; display: flex; align-items: center; gap: 12px; background: white; }
.pay-option:hover { border-color: #d1d5db; }
.pay-option.selected { background: #fff7ed; border-color: var(--accent); }
.radio-circle { width: 20px; height: 20px; border: 2px solid #d1d5db; border-radius: 50%; position: relative; flex-shrink: 0; }
.pay-option.selected .radio-circle { border-color: var(--accent); }
.pay-option.selected .radio-circle::after { content: ''; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.pay-meta { flex: 1; }
.pay-title { font-weight: 700; font-size: 14px; display: block; color: var(--text-main); }
.pay-sub { font-size: 11px; color: var(--text-sub); }
.cod-alert { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 10px; margin-top: 10px; font-size: 12px; color: #1e40af; display: none; }
.cod-alert.show { display: block; }

/* STICKY FOOTER */
.sticky-footer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--white); padding: 15px 20px; box-shadow: 0 -4px 20px rgba(0,0,0,0.06); display: flex; align-items: center; justify-content: space-between; z-index: 100; }
.total-label { font-size: 12px; color: var(--text-sub); }
.total-amount { font-size: 20px; font-weight: 800; color: var(--text-main); }
.pay-btn { background: var(--primary); color: white; border: none; padding: 14px 24px; border-radius: 50px; font-weight: 700; font-size: 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(67, 20, 7, 0.3); }

/* --- NEW OVERLAY STYLES --- */
.overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(255,255,255,0.98); z-index: 200; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    text-align: center; padding: 20px; overflow-y: auto;
}
.loader { 
    width: 60px; height: 60px; border: 5px solid #e5e7eb; 
    border-top-color: var(--accent); border-radius: 50%; 
    animation: spin 1s linear infinite; margin-bottom: 20px; 
}
.timer-text { font-size: 32px; font-weight: 800; color: var(--accent); margin: 10px 0; }
.status-text { font-size: 16px; color: #111; font-weight: 700; }
.sub-status { font-size: 13px; color: #666; margin-bottom: 30px; }

/* RETRY SECTION IN OVERLAY */
.retry-section {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    padding: 20px; width: 100%; max-width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    animation: slideUp 0.5s ease-out;
}
.retry-head { font-size: 14px; font-weight: 700; color: #dc2626; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.retry-btn {
    width: 100%; padding: 14px; border-radius: 10px; border: none;
    font-weight: 700; font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 10px; transition: transform 0.2s;
}
.retry-btn:active { transform: scale(0.96); }
.rb-phonepe { background: #5f259f; color: white; }
.rb-paytm { background: #00baf2; color: white; }
.safe-msg { font-size: 11px; color: #059669; font-weight: 600; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 5px; }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hidden { display: none !important; }