/*
Theme Name: GeneratePress Child
Description: Lightweight child theme for coupon affiliate landing pages. Optimized for paid traffic, PageSpeed 80+.
Template: generatepress
Version: 1.0.0
Author: ScaleIt
*/

/* ============================================================
   BASE RESETS & PERFORMANCE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fa;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: #e63946; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   LAYOUT
   ============================================================ */
.site-container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.site-header {
    background: #1a1a2e;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.site-header .site-branding a,
.site-header .site-title a {
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
}

.site-footer {
    background: #1a1a2e;
    color: #adb5bd;
    text-align: center;
    padding: 24px 16px;
    font-size: .85rem;
    margin-top: 40px;
}
.site-footer a { color: #adb5bd; }

/* ============================================================
   COUPON HERO
   ============================================================ */
.coupon-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    color: #fff;
    padding: 48px 20px 40px;
    text-align: center;
}
.coupon-hero .brand-logo {
    max-height: 72px;
    width: auto;
    margin: 0 auto 20px;
    display: block;
    filter: brightness(0) invert(1);
}
.coupon-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.25;
}
.coupon-hero .hero-sub {
    font-size: 1.1rem;
    opacity: .85;
    margin: 0 0 24px;
}
.coupon-hero .trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: .85rem;
    opacity: .75;
}
.coupon-hero .trust-badges span::before { content: "✓ "; color: #4caf50; }

/* ============================================================
   STATS BAR
   ============================================================ */
.coupon-stats {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 20px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    text-align: center;
    font-size: .9rem;
}
.coupon-stats .stat-item strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #e63946;
}

/* ============================================================
   COUPON SECTION
   ============================================================ */
.coupon-section {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}
.coupon-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    border-left: 4px solid #e63946;
    padding-left: 12px;
}

/* ============================================================
   COUPON CARD
   ============================================================ */
.coupon-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: stretch;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .2s ease, transform .2s ease;
}
.coupon-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transform: translateY(-2px);
}
.coupon-card .card-discount {
    background: #e63946;
    color: #fff;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px 10px;
    text-align: center;
    flex-shrink: 0;
}
.coupon-card .card-discount .discount-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}
.coupon-card .card-discount .discount-type {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    opacity: .85;
    margin-top: 4px;
}
.coupon-card .card-body { flex: 1; padding: 16px 20px; }
.coupon-card .card-title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 6px;
    color: #1a1a2e;
}
.coupon-card .card-desc {
    font-size: .875rem;
    color: #6c757d;
    margin: 0 0 12px;
    line-height: 1.45;
}
.coupon-card .card-meta {
    font-size: .78rem;
    color: #adb5bd;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.coupon-card .card-meta .expiry.expiring-soon { color: #e63946; font-weight: 600; }
.coupon-card .card-action { display: flex; align-items: center; padding: 16px; flex-shrink: 0; }

/* ============================================================
   CLICK-TO-REVEAL
   ============================================================ */
.reveal-coupon-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.reveal-coupon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e63946;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s;
    letter-spacing: .02em;
}
.reveal-coupon-btn:hover { background: #c1121f; }
.reveal-coupon-btn:focus { outline: 3px solid #ffd700; outline-offset: 2px; }

.coupon-code-revealed { display: none; flex-direction: column; align-items: center; gap: 6px; }
.coupon-code-revealed.active { display: flex; }

.coupon-code-box {
    display: flex;
    align-items: center;
    border: 2px dashed #e63946;
    border-radius: 6px;
    overflow: hidden;
    background: #fff8f8;
}
.coupon-code-text {
    padding: 8px 14px;
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #e63946;
    letter-spacing: .08em;
    user-select: all;
    background: transparent;
    border: none;
}
.copy-code-btn {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 8px 12px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .05em;
    transition: background .15s;
    white-space: nowrap;
}
.copy-code-btn:hover { background: #c1121f; }
.copy-code-btn.copied { background: #4caf50; }
.coupon-code-revealed .go-to-store { font-size: .8rem; color: #6c757d; }
.coupon-code-revealed .go-to-store a { color: #0077b6; font-weight: 600; }

.no-code-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4caf50;
    color: #fff !important;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s;
}
.no-code-btn:hover { background: #388e3c; }

/* ============================================================
   CATEGORY FILTER TABS
   ============================================================ */
.coupon-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.coupon-filter-tabs .tab-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
    color: #495057;
    font-weight: 500;
}
.coupon-filter-tabs .tab-btn:hover,
.coupon-filter-tabs .tab-btn.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

/* ============================================================
   BRAND ABOUT BOX
   ============================================================ */
.brand-about-box {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}
.brand-about-box h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6c757d;
    font-weight: 600;
}
.brand-about-box p { margin: 0 0 12px; font-size: .9rem; line-height: 1.6; }
.rating-stars { color: #ffc107; font-size: 1.1rem; }
.rating-label { font-size: .85rem; color: #6c757d; margin-left: 6px; }

/* ============================================================
   RELATED STORES
   ============================================================ */
.related-stores { padding: 32px 20px 40px; max-width: 900px; margin: 0 auto; }
.related-stores h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.store-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    font-size: .82rem;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    transition: box-shadow .2s;
}
.store-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    text-decoration: none;
    color: #e63946;
}

/* ============================================================
   BADGES & UTILITIES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.badge-verified { background: #e8f5e9; color: #2e7d32; }
.badge-exclusive { background: #fff3e0; color: #e65100; }
.badge-hot { background: #fce4ec; color: #c62828; }
.badge-new { background: #e3f2fd; color: #1565c0; }

.text-muted { color: #6c757d; }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.coupon-breadcrumb {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 20px;
    font-size: .82rem;
    color: #6c757d;
}
.coupon-breadcrumb a { color: #0077b6; }
.coupon-breadcrumb span { margin: 0 6px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .coupon-card { flex-direction: column; }
    .coupon-card .card-discount {
        min-width: unset;
        flex-direction: row;
        gap: 8px;
        padding: 10px 16px;
        justify-content: flex-start;
    }
    .coupon-card .card-action { padding: 0 16px 16px; justify-content: flex-start; }
    .coupon-stats { gap: 20px; }
    .coupon-hero { padding: 32px 16px 28px; }
}

@media print {
    .site-header, .site-footer, .coupon-filter-tabs,
    .reveal-coupon-btn, .copy-code-btn, .related-stores { display: none; }
}
