/* =========================
   CHECKOUT / OFFERS MODALS
========================= */

.checkout-modal{
    display:none;
    position:fixed;
    inset:0;
    z-index:9999;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:rgba(15,23,42,.58);
    backdrop-filter:blur(6px);
}

.checkout-box{
    width:min(680px, 100%);
    background:#ffffff;
    border:1px solid #e2e8f0;
    border-radius:28px;
    box-shadow:
        0 25px 80px rgba(15,23,42,.22),
        0 8px 24px rgba(15,23,42,.10);
    padding:28px;
    position:relative;
    animation:checkoutPop .18s ease-out;
}

.offers-box{
    width:min(860px, 100%);
}

@keyframes checkoutPop{
    from{
        opacity:0;
        transform:translateY(8px) scale(.98);
    }
    to{
        opacity:1;
        transform:translateY(0) scale(1);
    }
}

.checkout-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
}

.checkout-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:32px;
    padding:0 12px;
    border-radius:999px;
    background:#eef2ff;
    color:#4f46e5;
    font-size:12px;
    font-weight:800;
    letter-spacing:.02em;
    margin-bottom:12px;
}

.checkout-header h2{
    margin:0;
    color:#0f172a;
    font-size:18px;
    line-height:1.2;
    font-weight:900;
    letter-spacing:-.02em;
}

.checkout-header p{
    margin:8px 0 0;
    color:#64748b;
    font-size:13px;
    line-height:1.55;
}

.modal-close-btn{
    width:42px;
    height:42px;
    border:none;
    outline:none;
    border-radius:14px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    color:#0f172a;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:.18s ease;
    flex-shrink:0;
}

.modal-close-btn:hover{
    background:#eef2f7;
    transform:translateY(-1px);
}

.checkout-form{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.input-group{
    display:flex;
    flex-direction:column;
}

.input-group.full{
    grid-column:1 / -1;
}

.input-group label{
    font-size:13px;
    font-weight:800;
    color:#334155;
    margin-bottom:8px;
}

.input-group input{
    width:100%;
    height:50px;
    border:1px solid #dbe2ea;
    background:#f8fafc;
    border-radius:16px;
    padding:0 16px;
    font-size:14px;
    color:#0f172a;
    outline:none;
    transition:.18s ease;
}

.input-group input::placeholder{
    color:#94a3b8;
}

.input-group input:focus{
    background:#fff;
    border-color:#6366f1;
    box-shadow:0 0 0 4px rgba(99,102,241,.12);
}

.checkout-actions{
    display:flex;
    gap:12px;
    margin-top:22px;
    flex-wrap:wrap;
}

.checkout-btn{
    min-height:50px;
    padding:0 18px;
    border:none;
    border-radius:16px;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    transition:.18s ease;
}

.checkout-btn-light{
    background:#f8fafc;
    border:1px solid #dbe2ea;
    color:#0f172a;
}

.checkout-btn-light:hover{
    background:#eef2f7;
}

.checkout-btn-primary{
    background:linear-gradient(135deg,#6366f1 0%, #4f46e5 100%);
    color:#fff;
    box-shadow:0 12px 28px rgba(79,70,229,.22);
}

.checkout-btn-primary:hover{
    transform:translateY(-1px);
    box-shadow:0 16px 34px rgba(79,70,229,.28);
}

.offers-modal-list{
    margin-top:8px;
    display:grid;
    gap:14px;
}

.offer-card{
    border:1px solid #e2e8f0;
    background:#f8fafc;
    border-radius:20px;
    padding:18px;
}

.offer-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}

.offer-title{
    margin:0;
    font-size:16px;
    font-weight:900;
    color:#0f172a;
}

.offer-message{
    margin:6px 0 0;
    font-size:13px;
    color:#64748b;
    line-height:1.5;
}

.offer-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:34px;
    padding:0 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

.offer-badge.best{
    background:#ede9fe;
    color:#5b21b6;
}

.offer-badge.alt{
    background:#e0f2fe;
    color:#0369a1;
}

.offer-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:12px;
    margin-top:16px;
}

.offer-stat{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:14px;
}

.offer-stat small{
    display:block;
    color:#64748b;
    font-size:12px;
    font-weight:700;
    margin-bottom:6px;
}

.offer-stat strong{
    color:#0f172a;
    font-size:15px;
    font-weight:900;
}

.offer-actions{
    margin-top:16px;
    display:flex;
    justify-content:flex-end;
}

.offer-select-btn{
    min-height:46px;
    padding:0 16px;
    border:none;
    border-radius:14px;
    background:linear-gradient(135deg,#6366f1 0%, #4f46e5 100%);
    color:#fff;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:8px;
}

@media (max-width: 720px){
    .checkout-modal{
        padding:14px;
    }

    .checkout-box{
        padding:18px;
        border-radius:22px;
    }

    .checkout-form{
        grid-template-columns:1fr;
    }

    .checkout-actions{
        flex-direction:column;
    }

    .checkout-btn{
        width:100%;
    }

    .offer-grid{
        grid-template-columns:1fr;
    }

    .offer-top{
        flex-direction:column;
    }
}
/* =========================
   EXTRA STYLES (FOR NEW MODAL)
========================= */

.offers-box{
    max-width:700px;
}

.offers-modal-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
}

.modal-close-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:12px;
    background:#f1f5f9;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:15px;
}

.modal-close-btn:hover{
    background:#e2e8f0;
}

.form-label{
    font-size:13px;
    font-weight:700;
    color:#334155;
    margin-bottom:6px;
    display:block;
}

.form-control{
    width:100%;
    height:46px;
    border:1px solid #e8edf7;
    background:#f8faff;
    border-radius:14px;
    padding:0 14px;
    outline:none;
}

.form-control:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.offers-modal-list{
    margin-top:16px;
    display:grid;
    gap:12px;
}

/* =========================
   GUEST AUTH INVITE MODAL
========================= */

.auth-invite-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.58);
    backdrop-filter:blur(6px);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
    padding:20px;
}

.auth-invite-overlay.show{
    display:flex;
}

.auth-invite-modal{
    width:min(520px,100%);
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    border:1px solid rgba(148,163,184,.18);
    border-radius:28px;
    box-shadow:0 30px 80px rgba(15,23,42,.25);
    overflow:hidden;
    animation:authInviteUp .22s ease;
}

@keyframes authInviteUp{
    from{
        transform:translateY(10px) scale(.98);
        opacity:0;
    }
    to{
        transform:translateY(0) scale(1);
        opacity:1;
    }
}

.auth-invite-top{
    padding:22px 22px 14px;
    background:linear-gradient(135deg,#1d4ed8 0%,#4f46e5 55%,#06b6d4 100%);
    color:#fff;
    position:relative;
}

.auth-invite-close{
    position:absolute;
    top:14px;
    right:14px;
    width:38px;
    height:38px;
    border:none;
    border-radius:999px;
    background:rgba(255,255,255,.16);
    color:#fff;
    cursor:pointer;
    font-size:16px;
}

.auth-invite-icon{
    width:62px;
    height:62px;
    border-radius:20px;
    background:rgba(255,255,255,.18);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    margin-bottom:14px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.2);
}

.auth-invite-top h3{
    margin:0 0 8px;
    font-size:28px;
    line-height:1.1;
    font-weight:900;
    letter-spacing:-.03em;
}

.auth-invite-top p{
    margin:0;
    font-size:14px;
    line-height:1.7;
    color:rgba(255,255,255,.92);
}

.auth-invite-body{
    padding:20px 22px 22px;
}

.auth-invite-points{
    display:grid;
    gap:10px;
    margin-bottom:18px;
}

.auth-invite-point{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:12px 14px;
    border:1px solid rgba(226,232,240,.95);
    border-radius:16px;
    background:#fff;
    color:#334155;
}

.auth-invite-point i{
    color:#2563eb;
    margin-top:2px;
}

.auth-invite-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.auth-invite-btn{
    min-height:50px;
    border-radius:16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    font-weight:900;
    font-size:14px;
    text-decoration:none;
    transition:transform .18s ease, box-shadow .18s ease;
}

.auth-invite-btn:hover{
    transform:translateY(-1px);
}

.auth-invite-btn.primary{
    background:linear-gradient(90deg,#1d4ed8 0%,#2563eb 45%,#4f46e5 100%);
    color:#fff;
    box-shadow:0 14px 28px rgba(37,99,235,.22);
}

.auth-invite-btn.secondary{
    background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
    color:#0f172a;
    border:1px solid rgba(203,213,225,.95);
}

/* =========================
   OFFERS MODAL
========================= */

.offers-box{
    width:min(920px,100%);
    max-height:85vh;
    overflow:auto;
}

.offers-modal-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
}

.offers-modal-list{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px;
}

.offer-card{
    border:1px solid #e6ecf5;
    border-radius:20px;
    background:#fff;
    box-shadow:0 10px 24px rgba(15,23,42,.05);
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.offer-card.is-best{
    border-color:#4f46e5;
    box-shadow:0 14px 30px rgba(79,70,229,.12);
}

.offer-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}

.offer-title{
    font-size:18px;
    font-weight:900;
    color:#0f172a;
    margin:0 0 6px;
}

.offer-message{
    font-size:13px;
    line-height:1.6;
    color:#64748b;
    margin:0;
}

.offer-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:7px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}

.offer-badge.best{
    background:#eef2ff;
    color:#4f46e5;
    border:1px solid #dbe4ff;
}

.offer-badge.alt{
    background:#ecfdf5;
    color:#059669;
    border:1px solid #d1fae5;
}

.offer-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
}

.offer-stat{
    border:1px solid #edf2f7;
    background:#f8fbff;
    border-radius:14px;
    padding:10px 12px;
}

.offer-stat small{
    display:block;
    color:#94a3b8;
    font-size:11px;
    font-weight:700;
    margin-bottom:6px;
}

.offer-stat strong{
    display:block;
    color:#0f172a;
    font-size:15px;
    font-weight:900;
}

.offer-actions{
    display:flex;
    gap:10px;
    margin-top:2px;
}

.offer-actions .action-btn,
.offer-actions .add-cart-btn{
    flex:1;
    justify-content:center;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width:760px){
    .offers-modal-list{
        grid-template-columns:1fr;
    }

    .offers-modal-head{
        flex-direction:column;
        align-items:stretch;
    }

    .offer-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width:640px){
    .auth-invite-top h3{
        font-size:24px;
    }

    .auth-invite-actions{
        grid-template-columns:1fr;
    }
}
