/* ULTRA PREMIUM GRID */
/* ULTRA CLEAN & BALANCED PREMIUM CARD */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* BASE CARD */
.coupon-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    height: 230px; /* FIXED Height, nicer and compact */
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    position: relative;
    transition: all .25s ease;
}

.coupon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* TYPE BADGE (Top Left) */
.type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #2563eb;
    color: #fff;
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 50px;
    font-weight: 600;
}

.type-badge.deal {
    background: #0d9488;
}

/* LOGO */
.coupon-logo {
    max-width: 85px;
    max-height: 40px;
    object-fit: contain;
    border-radius: 5px;
    margin: 20px auto 10px auto; /* Space for badge */
}

/* TITLE */
.coupon-title {
    font-size: 14px;
    font-weight: 700;
    min-height: 38px;
    max-height: 38px;
    overflow: hidden;
    color: #111;
    text-align: left;
    margin-top: 10px
}

/* META */
/* META (Two-column layout) */
.coupon-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #555;
    margin-bottom: 10px;
}

/* Icons */
.meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.meta-verified {
    color: #22c55e;
    font-weight: 600;
    margin-top: 10px
}

.meta-working {
    color: #1d72f3;
    font-weight: 600;
    margin-top: 10px
    
}

/* BUTTON */
.btn-coupon {
    background: #d62828;
    color: white;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 0;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.btn-coupon:hover { background: #b61e1e; }

.btn-coupon .fake-code { opacity: 0.2; }

.btn-coupon .btn-text {
    position: absolute;
    inset: 0;
    display:flex;
    justify-content:center;
    align-items:center;
    font-weight:700;
    color: #fff;
}

.btn-deal {
    border-radius: 8px;
    font-weight: 700;
    padding: 8px 0;
    margin-top: auto;
}

.store-header {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    border: 1px solid #ececec;
}

.store-header-logo {
    max-width: 140px;
    max-height: 60px;
    object-fit: contain;
    background: #f9fafb;
    padding: 10px;
    border-radius: 12px;
}

.store-header h2 {
    margin: 0;
    font-weight: 700;
    font-size: 26px;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e6f6e7;
    color: #16a34a;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.store-meta {
    font-size: 14px;
    color: #666;
    margin-top: 3px;
}

.store-visit-btn {
    padding: 10px 18px;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    margin-left: auto;
}

.store-visit-btn:hover {
    background: #1d4ed8;
}

/* ============================
   FULL MODAL POPUP OVERLAY
   ============================ */

#coupon-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 999998;
    display: none;
}

/* ============================
   MODAL BOX
   ============================ */

#coupon-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    z-index: 999999;
    display: none;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    animation: fadeIn .25s ease-out;
    font-family: inherit;
}

/* Close button */
#coupon-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: none;
    background: none;
    font-size: 26px;
    cursor: pointer;
}

/* Header */
.modal-header {
    text-align: center;
}

#modal-store-logo {
    width: 90px;
    height: auto;
    margin-bottom: 12px;
}

#modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    margin-bottom: 22px;
}

/* Code box */
#modal-code-box {
    border: 2px dashed #4b5563;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#modal-copy-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* Store link */
#modal-store-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    font-weight: 600;
    color: #2563eb;
    font-size: 16px;
}

/* spinner keyframe already injected by JS but these classes help style */
.btn.loading { pointer-events: none; opacity: 0.95; }
.btn .btn-spinner { display:inline-block; vertical-align:middle; }

/* Modal tweaks (big modal style) */
#coupon-modal { transition: transform .18s ease, opacity .18s ease; }
#coupon-modal[style*="display: block"] { transform: translate(-50%,-50%) scale(1); opacity: 1; }

/* Copied animation (just in case) */
#copied-animation { transition: opacity .18s ease; }

/* Optional: make the button text visually hidden when spinner active */
.btn.loading .btn-text { visibility: hidden; }

