/* ============================================================
   Promocodes.info - Main Stylesheet
   ============================================================ */

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Color System */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    --accent-50: #fff7ed;
    --accent-100: #ffedd5;
    --accent-200: #fed7aa;
    --accent-300: #fdba74;
    --accent-400: #fb923c;
    --accent-500: #f97316;
    --accent-600: #ea580c;
    --accent-700: #c2410c;

    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;

    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-500: #ef4444;
    --error-600: #dc2626;

    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;

    --white: #ffffff;
    --dark: #0f172a;

    /* Typography */
    --font-family: Verdana, Geneva, Tahoma, sans-serif;
    --font-size-base: 16px;
    --line-height-body: 1.6;
    --line-height-heading: 1.2;

    /* Spacing (8px system) */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;
    --space-7: 4rem;

    /* Layout */
    --container-max: 1280px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    line-height: var(--line-height-body);
    color: var(--neutral-800);
    background: var(--neutral-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--line-height-heading);
    font-weight: 700;
    color: var(--neutral-900);
}

a { color: var(--primary-600); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-700); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-2); }

/* ============ Header ============ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--neutral-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}
.site-header.scrolled {
    box-shadow: var(--shadow-md);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    height: 68px;
}
/* Header spans full browser width; other sections keep the centered container */
.site-header .container { max-width: 100%; padding: 0 var(--space-3); }

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neutral-900);
    text-decoration: none;
    flex-shrink: 0;
}
.logo:hover { color: var(--neutral-900); }
.logo-tag {
    background: var(--primary-600);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
}
.logo-dot { color: var(--primary-600); }

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.main-nav > a {
    color: var(--neutral-700);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.main-nav > a:hover, .main-nav > a.active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 6px; }
.nav-link-icon { display: inline-flex; align-items: center; gap: 6px; }
.nav-icon { flex-shrink: 0; opacity: 0.85; }
.nav-dropdown-toggle:hover .nav-icon, .nav-dropdown.open .nav-dropdown-toggle .nav-icon { opacity: 1; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--neutral-700);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.nav-dropdown-toggle:hover { color: var(--primary-600); background: var(--primary-50); }
a.nav-dropdown-toggle { text-decoration: none; display: inline-block; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: var(--space-1);
    flex-direction: column;
    gap: 2px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
/* Wide dropdown: many subcategories flow into 2 columns instead of a tall list.
   Uses grid — column-count is ignored on flex containers. */
.nav-dropdown-menu-wide {
    min-width: 420px;
    display: none;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
}
.nav-dropdown:hover .nav-dropdown-menu-wide,
.nav-dropdown.open .nav-dropdown-menu-wide { display: grid; }
.nav-dropdown-menu-wide a {
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-dropdown-menu-wide a.view-all {
    grid-column: 1 / -1;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}
.nav-dropdown-menu a {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--neutral-700);
}
.nav-dropdown-menu a:hover { background: var(--primary-50); color: var(--primary-600); }
.nav-dropdown-menu a.view-all { color: var(--primary-600); font-weight: 600; border-top: 1px solid var(--neutral-200); margin-top: 4px; padding-top: 12px; }

.header-search {
    display: flex;
    align-items: center;
    background: var(--neutral-100);
    border-radius: var(--radius-xl);
    padding: 4px 4px 4px 16px;
    border: 1px solid transparent;
    transition: var(--transition);
    width: 260px;
}
.header-search:focus-within {
    border-color: var(--primary-400);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-100);
}
.header-search input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 0.875rem;
    flex: 1;
    color: var(--neutral-800);
}
.header-search button {
    background: var(--primary-600);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.header-search button:hover { background: var(--primary-700); }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}
.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--neutral-700);
    border-radius: 2px;
    transition: var(--transition);
}
.mobile-menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============ Hero ============ */
.hero {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 50%, var(--accent-500) 100%);
    color: var(--white);
    padding: var(--space-7) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero h1 { color: var(--white); font-size: 2.75rem; margin-bottom: var(--space-2); }
.hero p { font-size: 1.125rem; opacity: 0.95; margin-bottom: var(--space-3); }

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 6px;
    box-shadow: var(--shadow-lg);
}
.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--neutral-800);
    background: transparent;
}
.hero-search button {
    background: var(--primary-600);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.hero-search button:hover { background: var(--primary-700); }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-5);
    margin-top: var(--space-4);
    position: relative;
    z-index: 1;
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 2rem; font-weight: 700; }
.hero-stat-label { font-size: 0.875rem; opacity: 0.9; }

/* ============ Sections ============ */
.section { padding: var(--space-6) 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
}
.section-title { font-size: 1.75rem; }
.section-title .accent { color: var(--primary-600); }
.section-link { font-weight: 600; font-size: 0.9375rem; }

/* ============ Coupon Cards ============ */
.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-3);
}

/* ============ Coupon List (store page) ============ */
.coupons-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.coupons-list .coupon-card {
    flex-direction: column;
    padding: var(--space-3);
    gap: 0;
}
@media (max-width: 768px) {
    .coupons-list .coupon-card {
        padding: var(--space-2);
    }
}
.coupon-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.coupon-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.coupon-card.coupon-expired {
    opacity: 0.7;
    border-color: var(--neutral-300);
}
.coupon-card.coupon-expired:hover {
    border-color: var(--neutral-400);
    box-shadow: var(--shadow-sm);
    transform: none;
}
.coupon-expired-banner {
    background: var(--error-600);
    color: var(--white);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 0;
    margin: calc(-1 * var(--space-3)) calc(-1 * var(--space-3)) var(--space-2);
}

.expired-section-divider {
    margin: var(--space-6) 0 var(--space-4);
    padding: var(--space-4) 0 var(--space-2);
    border-top: 2px dashed var(--neutral-300);
}
.expired-section-divider h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-600);
    margin: 0 0 4px;
}
.expired-section-divider p {
    font-size: 0.875rem;
    color: var(--neutral-500);
    margin: 0;
}
.expired-coupons-grid .coupon-card {
    opacity: 0.65;
}

.coupon-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.coupon-card-top {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.coupon-left {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.coupon-store-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-600);
    font-size: 1.75rem;
    overflow: hidden;
}
.coupon-store-logo img { width: 100%; height: 100%; object-fit: cover; }

.coupon-discount-box {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--error-500), var(--error-600));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
}
.coupon-discount-box .discount-percent {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1;
}
.coupon-discount-box .discount-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.coupon-type-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neutral-500);
}
.coupon-type-label.deal-label { color: var(--success-600); }

.coupon-free-shipping-box {
    background: linear-gradient(135deg, var(--success-500), var(--success-600)) !important;
}
.free-shipping-icon { color: var(--white); }
.free-shipping-label { color: var(--white) !important; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-code { background: var(--primary-100); color: var(--primary-700); }
.badge-deal { background: var(--success-100); color: var(--success-700); }
.badge-exclusive { background: var(--accent-100); color: var(--accent-700); }
.badge-verified { background: var(--success-50); color: var(--success-600); }
.badge-featured { background: var(--warning-100); color: var(--warning-600); }

.coupon-center {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.coupon-title { font-size: 1.0625rem; font-weight: 600; margin: 0; color: var(--neutral-900); line-height: 1.3; }
.coupon-description { font-size: 0.875rem; color: var(--neutral-600); margin: 0; }
.coupon-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.coupon-meta-row .expiry { font-size: 0.8125rem; color: var(--warning-600); font-weight: 500; }
.coupon-meta-row .expiry.urgent { color: var(--error-600); }
.coupon-meta-row .expiry.expired-text { color: var(--error-600); font-weight: 600; }
.coupon-meta-row .expiry.ongoing { color: var(--success-600); }
.time-left-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--error-600);
    background: var(--error-50);
    border: 1px solid var(--error-100);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    line-height: 1.2;
    white-space: nowrap;
    animation: pulse-urgent 2s ease-in-out infinite;
}
.time-left-label svg { flex-shrink: 0; }
@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.coupon-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: var(--space-2);
}

/* Action buttons — white text on red */
.btn-action {
    background: var(--error-600);
    color: var(--white) !important;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-family: inherit;
}
.btn-action:hover {
    background: var(--white);
    color: var(--neutral-900) !important;
    border: 2px solid var(--error-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}
.btn-action:active { transform: translateY(0); }
.btn-action.deal-btn svg { width: 16px; height: 16px; }

.btn-expired {
    background: var(--neutral-300);
    color: var(--neutral-600) !important;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: not-allowed;
}

/* "View all X offers" link under the CTA */
.coupon-store-link {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-600);
    text-decoration: none;
    margin-top: 6px;
    line-height: 1.4;
}
.coupon-store-link:hover { text-decoration: underline; color: var(--primary-700); }
.coupon-right { flex-wrap: wrap; }

/* Reveal code box */
.coupon-reveal-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.coupon-reveal-box .code-hint {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--neutral-400);
    letter-spacing: 0.05em;
}
.coupon-reveal-box .code-revealed-text {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--error-600);
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .coupon-card-top {
        flex-direction: column;
        gap: var(--space-2);
    }
    .coupon-left {
        flex-direction: row;
        align-items: center;
        gap: var(--space-2);
    }
    .coupon-store-logo, .coupon-discount-box {
        width: 56px;
        height: 56px;
    }
    .coupon-discount-box .discount-percent { font-size: 1.0625rem; }
    .coupon-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    .btn-action { width: 100%; justify-content: center; }
    .coupon-store-link { text-align: left; }
    .coupon-reveal-box { width: 100%; align-items: center; }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}
.btn-primary { background: var(--primary-600); color: var(--white); }
.btn-primary:hover { background: var(--primary-700); color: var(--white); }
.btn-success { background: var(--success-600); color: var(--white); }
.btn-success:hover { background: var(--success-700); color: var(--white); }
.btn-accent { background: var(--accent-500); color: var(--white); }
.btn-accent:hover { background: var(--accent-600); color: var(--white); }
.btn-outline { background: transparent; border: 2px solid var(--neutral-300); color: var(--neutral-700); }
.btn-outline:hover { border-color: var(--primary-500); color: var(--primary-600); }
.btn-danger { background: var(--error-500); color: var(--white); }
.btn-danger:hover { background: var(--error-600); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============ Store Cards ============ */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-2);
}
.store-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.store-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}
.store-card-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-600);
    margin-bottom: var(--space-2);
    overflow: hidden;
}
.store-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-card-name { font-weight: 600; font-size: 0.9375rem; color: var(--neutral-900); margin-bottom: 4px; }
.store-card-count { font-size: 0.8125rem; color: var(--neutral-500); }

/* ============ Store Page ============ */
.store-header {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.store-header-logo {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-lg);
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--primary-600);
    flex-shrink: 0;
    overflow: hidden;
}
.store-header-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-header-info h1 { font-size: 1.75rem; margin-bottom: 4px; }
.logo-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.logo-slogan {
    display: block;
    font-size: 0.7rem !important;
    font-weight: 400 !important;
    color: var(--neutral-500) !important;
    letter-spacing: 0.03em;
    line-height: 1.35;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .logo-slogan { display: none; }
}
.store-current-month {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-600);
    margin-bottom: var(--space-1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.store-current-month::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-500);
    flex-shrink: 0;
}
.store-affiliate-link { margin: var(--space-2) 0; }
.store-affiliate-link a {
    display: inline-flex;
    align-items: center;
    background: var(--primary-600);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
}
.store-affiliate-link a:hover { background: var(--primary-700); transform: translateY(-1px); }
.store-last-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--neutral-500);
    font-size: 0.85rem;
    margin-top: var(--space-1);
}
.store-last-updated svg { flex-shrink: 0; }
.store-header-info p { color: var(--neutral-600); }
.store-header-stats { display: flex; gap: var(--space-3); margin-top: var(--space-1); }
.store-stat { font-size: 0.875rem; color: var(--neutral-500); }
.store-stat strong { color: var(--neutral-900); font-size: 1.125rem; display: block; }

/* ============ Star Rating ============ */
.store-rating { display: flex; align-items: center; gap: var(--space-1); margin-top: var(--space-1); }
.star-rating { display: flex; gap: 2px; }
.star {
    font-size: 1.5rem;
    color: var(--neutral-300);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
    line-height: 1;
}
.star:hover { transform: scale(1.15); }
.star.filled { color: var(--warning-500); }
.star.hover { color: var(--accent-400); }
.rating-text { font-size: 0.8125rem; color: var(--neutral-500); font-weight: 500; }

/* ============ Store Custom Content ============ */
.store-custom-content {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-top: var(--space-4);
    line-height: 1.7;
    color: var(--neutral-700);
}
.store-custom-content h2 { font-size: 1.5rem; margin: var(--space-3) 0 var(--space-2); color: var(--neutral-900); }
.store-custom-content h2:first-child { margin-top: 0; }
.store-custom-content h3 { font-size: 1.25rem; margin: var(--space-2) 0 var(--space-1); color: var(--neutral-900); }
.store-custom-content p { margin-bottom: var(--space-2); }
.store-custom-content ul, .store-custom-content ol { margin: var(--space-2) 0; padding-left: var(--space-3); }
.store-custom-content li { margin-bottom: var(--space-1); }
.store-custom-content blockquote {
    border-left: 3px solid var(--primary-600);
    padding-left: var(--space-2);
    margin: var(--space-2) 0;
    color: var(--neutral-600);
    font-style: italic;
}
.store-custom-content a { color: var(--primary-600); text-decoration: underline; }
.store-custom-content a:hover { color: var(--primary-700); }

/* ============ Category Cards ============ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-2);
}
.category-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.category-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}
.category-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    flex-shrink: 0;
    overflow: hidden;
}
.category-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-info h3 { font-size: 1rem; margin-bottom: 2px; }
.category-info span { font-size: 0.8125rem; color: var(--neutral-500); }

/* ============ Breadcrumbs ============ */
.breadcrumbs {
    padding: var(--space-2) 0;
    font-size: 0.875rem;
    color: var(--neutral-500);
}
.breadcrumbs a { color: var(--neutral-600); }
.breadcrumbs a:hover { color: var(--primary-600); }
.breadcrumbs span { margin: 0 6px; color: var(--neutral-400); }

/* ============ Filter Bar ============ */
.filter-bar {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}
.filter-chip {
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid var(--neutral-300);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}
.filter-chip:hover { border-color: var(--primary-400); color: var(--primary-600); }
.filter-chip.active { background: var(--primary-600); border-color: var(--primary-600); color: var(--white); }

/* ============ Alphabetical Index ============ */
.alpha-index {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: var(--space-3);
}
.alpha-index a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--white);
    border: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-700);
    transition: var(--transition);
}
.alpha-index a:hover { background: var(--primary-600); color: var(--white); border-color: var(--primary-600); }
.alpha-index a.active { background: var(--primary-600); color: var(--white); border-color: var(--primary-600); }
.alpha-index a.empty { opacity: 0.4; pointer-events: none; }

/* ============ Pagination ============ */
.pagination { margin-top: var(--space-4); display: flex; justify-content: center; }
.pagination ul { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.pagination li a, .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--white);
    border: 1px solid var(--neutral-200);
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    text-decoration: none;
    transition: var(--transition);
}
.pagination li a:hover { border-color: var(--primary-400); color: var(--primary-600); }
.pagination li.active span { background: var(--primary-600); color: var(--white); border-color: var(--primary-600); }
.pagination li.ellipsis span { border: none; background: transparent; }

/* ============ Content Pages ============ */
.content-page { padding: var(--space-5) 0; }
.content-page h1 { font-size: 2rem; margin-bottom: var(--space-3); }
.content-page h2 { font-size: 1.5rem; margin: var(--space-3) 0 var(--space-2); }
.content-page p { margin-bottom: var(--space-2); color: var(--neutral-700); }
.content-page ul { margin: var(--space-2) 0 var(--space-2) var(--space-3); }
.content-page li { margin-bottom: var(--space-1); color: var(--neutral-700); }

/* ============ Forms ============ */
.form-group { margin-bottom: var(--space-2); }
.form-group label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; color: var(--neutral-700); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--neutral-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px var(--primary-100);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .hint { font-size: 0.8125rem; color: var(--neutral-500); margin-top: 4px; }
.form-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

/* ============ Alerts ============ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    font-size: 0.9375rem;
}
.alert-success { background: var(--success-50); color: var(--success-700); border: 1px solid var(--success-100); }
.alert-error { background: var(--error-50); color: var(--error-600); border: 1px solid var(--error-100); }
.alert-info { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-100); }
.alert-warning { background: var(--warning-50); color: var(--warning-600); border: 1px solid var(--warning-100); }

/* ============ Footer ============ */
.site-footer {
    background: var(--neutral-900);
    color: var(--neutral-400);
    padding: var(--space-6) 0 var(--space-3);
    margin-top: var(--space-6);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.footer-col h4, .footer-col h5 { color: var(--white); margin-bottom: var(--space-2); font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--neutral-400); font-size: 0.875rem; }
.footer-col ul li a:hover { color: var(--primary-400); }
.footer-about p { font-size: 0.875rem; margin-bottom: var(--space-2); line-height: 1.5; }
.footer-logo { font-size: 1.25rem; font-weight: 700; color: var(--white); margin-bottom: var(--space-2); display: flex; align-items: center; gap: 6px; }
.footer-logo .logo-tag { background: var(--primary-600); color: var(--white); width: 28px; height: 28px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.footer-logo .logo-dot { color: var(--primary-400); }
.footer-social { display: flex; gap: var(--space-1); }
.footer-social a {
    color: var(--neutral-400);
    font-size: 0.8125rem;
    padding: 4px 12px;
    border: 1px solid var(--neutral-700);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.footer-social a:hover { color: var(--white); border-color: var(--primary-500); }

.footer-bottom {
    border-top: 1px solid var(--neutral-800);
    padding-top: var(--space-3);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-1);
}
.footer-bottom p { font-size: 0.8125rem; }
.footer-disclaimer { color: var(--neutral-600); font-size: 0.75rem; }

/* ============ Back to Top ============ */
#backToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-600);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 900;
    box-shadow: var(--shadow-md);
}
#backToTop.visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: var(--primary-700); transform: translateY(-2px); }

/* ============ Toast Notifications ============ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--neutral-900);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--success-600); }
.toast.error { background: var(--error-600); }

/* ============ Modal ============ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: var(--space-2);
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); }
.modal-header h3 { font-size: 1.25rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--neutral-400); line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--neutral-700); }
.modal-body { margin-bottom: var(--space-3); }
.modal-code-display {
    background: var(--neutral-50);
    border: 2px dashed var(--primary-400);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: center;
    margin: var(--space-2) 0;
}
.modal-code-display .code {
    font-family: 'Courier New', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-700);
    letter-spacing: 0.08em;
}
.modal-footer { display: flex; gap: var(--space-1); justify-content: flex-end; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-col.footer-about { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .header-inner { height: auto; padding: var(--space-1) 0; flex-wrap: wrap; }
    .header-search { width: 100%; order: 3; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--neutral-200);
        flex-direction: column;
        padding: var(--space-2);
        gap: 0;
        box-shadow: var(--shadow-md);
    }
    .main-nav.open { display: flex; align-items: stretch; }
    .main-nav > a, .nav-dropdown-toggle {
        padding: 12px 16px;
        width: 100%;
        text-align: left;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .nav-dropdown { width: 100%; }
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: var(--space-1) 0 var(--space-1) var(--space-3);
    }
    .nav-dropdown-menu-wide {
        min-width: 0;
        grid-template-columns: 1fr;
        padding: var(--space-1) 0 var(--space-1) var(--space-3);
    }
    .nav-dropdown-menu-wide a {
        width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    .mobile-menu-toggle { display: flex; }

    .hero { padding: var(--space-5) 0; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: 1rem; }
    .hero-stats { gap: var(--space-2); flex-wrap: wrap; }
    .hero-stat-num { font-size: 1.5rem; }

    .section { padding: var(--space-4) 0; }
    .section-title { font-size: 1.375rem; }

    .coupons-grid { grid-template-columns: 1fr; }
    .stores-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .store-header { flex-direction: column; text-align: center; }
    .store-header-stats { justify-content: center; }
    .store-rating { justify-content: center; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .filter-bar { overflow-x: auto; flex-wrap: nowrap; }
    .filter-chip { white-space: nowrap; }
}

@media (max-width: 480px) {
    .stores-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.5rem; }
    .hero-search { flex-direction: column; border-radius: var(--radius-lg); }
    .hero-search input { padding: 10px 16px; }
    .hero-search button { width: 100%; border-radius: var(--radius-md); }
}

/* ============ Code Reveal Popup ============ */
.code-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: var(--space-2);
}
.code-popup-overlay.open {
    display: flex;
}
.code-popup {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: popupIn 0.25s ease-out;
}
@keyframes popupIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.code-popup-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
}
.code-popup-store {
    font-size: 0.875rem;
    color: var(--neutral-500);
    margin-bottom: var(--space-3);
}
.code-popup-code-box {
    border: 2px dashed var(--error-400);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--error-600);
    letter-spacing: 0.08em;
}
.code-popup-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    flex-wrap: wrap;
}
.code-popup-copy {
    background: var(--error-600);
    color: var(--white);
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.code-popup-copy:hover {
    background: var(--white);
    color: var(--neutral-900);
    border: 2px solid var(--error-600);
}
.code-popup-copy.copied {
    background: var(--success-600);
    color: var(--white);
}
.code-popup-close {
    background: transparent;
    color: var(--neutral-500);
    border: 2px solid var(--neutral-300);
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.code-popup-close:hover {
    border-color: var(--neutral-400);
    color: var(--neutral-700);
}
