/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ── Brand Palette ── */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --secondary: #4F46E5;
    --secondary-light: #EEF2FF;

    /* ── Semantic ── */
    --success: #16A34A;
    --success-light: #DCFCE7;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --error: #DC2626;
    --error-light: #FEE2E2;

    /* ── Neutral Scale ── */
    --neutral-50: #F8FAFC;
    --neutral-100: #F1F5F9;
    --neutral-200: #E2E8F0;
    --neutral-300: #CBD5E1;
    --neutral-400: #94A3B8;
    --neutral-500: #64748B;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1E293B;
    --neutral-900: #0F172A;

    /* ── Surfaces (aliased for theming) ── */
    --surface-bg: #FFFFFF;
    --surface-raised: #F8FAFC;
    --surface-sunken: #F1F5F9;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --bg-white: #FFFFFF;
    --bg-gray: #F8FAFC;
    --border: #E2E8F0;

    /* ── Shadows ── */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.10), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.10), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);

    /* ── Border Radius ── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* ── Spacing Scale (8px grid) ── */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* ── Gradients ── */
    --gradient-brand: linear-gradient(135deg, #2563EB, #4F46E5);
    --gradient-cashback: linear-gradient(135deg, #16A34A, #059669);
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #1E293B 60%, #0F172A 100%);

    /* ── Transitions ── */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent transitions during theme switch */
[data-theme-changing] *,
[data-theme-changing] *::before,
[data-theme-changing] *::after {
    transition: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
    white-space: nowrap;
    align-items: center;
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--bg-gray);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.theme-icon {
    position: absolute;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle {
    background: var(--background-tertiary);
    border-color: var(--border);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--background-secondary);
    border-color: var(--primary);
}

[data-theme="dark"] .theme-icon {
    color: var(--text-primary);
}


/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
    border: 2px solid var(--border);
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #2563EB 0%, #193db5 100%);
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.hero.hero-compact {
    padding: 5rem 0 3rem;
}

.hero.hero-compact .hero-cta {
    margin-bottom: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(79, 70, 229, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    padding: 0.625rem 1.5rem;
    border-radius: 2rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: white;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn-hero-primary {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    padding: 1.25rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-info {
    text-align: left;
}

.stat-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

/* Mobile Only Navigation Links */
.mobile-only-link {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-only-link {
        display: block !important;
    }
}

.stat-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Category Section */
.category-section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.category-header .section-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.category-header .section-description {
    margin-bottom: 0;
}

/* Section Common */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.section-action {
    text-align: center;
    margin-top: 2rem;
}

.btn-view-all {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--bg-page);
    color: var(--primary);
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.btn-view-all:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Top Cashback Deals */
.top-deals {
    padding: 4rem 0;
}

.deals-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding-bottom: 0.5rem;
}

.deals-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.deals-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.deals-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.deals-grid {
    display: flex;
    gap: 12px;
    min-width: min-content;
}

/* ============================================================
   UNIFIED BRAND CARD — Mobile-first, fixed height, never breaks
   ============================================================ */
.deal-card {
    /* Fixed width in horizontal scroll context */
    flex: 0 0 150px;
    /* Structural */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    overflow: hidden;
    /* Appearance */
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 12px 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    /* Transitions */
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
    cursor: pointer;
    /* Prevent text selection on tap */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Hover — desktop only */
@media (hover: hover) {
    .deal-card:hover {
        border-color: var(--primary);
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
}

/* Press animation — all devices */
.deal-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-xs);
}

/* ── Logo Container ── */
.deal-logo {
    width: 56px;
    height: 56px;
    /* Default fallback gradient; overridden by admin per brand via inline var */
    background: var(--logo-bg, var(--surface-raised));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-secondary);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    flex-shrink: 0;
}

.deal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    border-radius: inherit;
}

/* ── Brand Name ── */
.deal-info h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

/* ── Cashback Badge ── */
.deal-cashback {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--gradient-cashback);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    /* Prevent overflow on small cards */
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* ── Card CTA ── */
.deal-card-cta {
    display: block;
    width: 100%;
    padding: 6px 0;
    background: var(--gradient-brand);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity var(--transition-fast);
    margin-top: 4px;
}

.deal-card-cta:hover {
    opacity: 0.9;
}

/* ── Ribbon Tag (Top Deal / Trending) ── */
.deal-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--gradient-brand);
    color: white;
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 3px 8px 3px 6px;
    border-radius: 0 0 var(--radius-sm) 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
}

.deal-ribbon.ribbon-trending {
    background: linear-gradient(135deg, #D97706, #F59E0B);
}

.deal-ribbon.ribbon-exclusive {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
}

/* ── Secondary Tag (Sale Live / New / Expiring) ── */
.deal-secondary-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.deal-secondary-tag.tag-sale {
    background: var(--warning-light);
    color: var(--warning);
}

.deal-secondary-tag.tag-new {
    background: var(--success-light);
    color: var(--success);
}

.deal-secondary-tag.tag-expiry {
    background: var(--error-light);
    color: var(--error);
}

.deal-secondary-tag.tag-excl {
    background: var(--secondary-light);
    color: var(--secondary);
}

/* ============================================================
   SKELETON LOADING CARDS
   ============================================================ */
.skeleton-card {
    flex: 0 0 150px;
    height: 160px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg,
            var(--surface-raised) 25%,
            var(--surface-sunken) 50%,
            var(--surface-raised) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s infinite;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Skeleton for grid layout (brands page) */
.brands-skeleton-card {
    height: 168px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg,
            var(--surface-raised) 25%,
            var(--surface-sunken) 50%,
            var(--surface-raised) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s infinite;
    border: 1.5px solid var(--border);
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem;
    width: 100%;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   SEARCH SUGGESTION DROPDOWN
   ============================================================ */
.header-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 220px;
    margin-right: 0.5rem;
    min-width: 140px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
    min-width: 0;
}

.search-input-wrapper input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

/* Dropdown container */
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
    /* Animation */
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.search-suggestions--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Individual suggestion item */
.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.1s ease;
    border-bottom: 1px solid var(--border);
}

.search-suggestion-item:last-of-type {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.keyboard-active {
    background: var(--bg-page);
}

.search-suggestion-item.keyboard-active {
    background: var(--primary-light, #DBEAFE);
}

/* Logo inside suggestion */
.suggestion-logo {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid var(--border);
    padding: 3px;
    background: var(--bg-page);
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.suggestion-cashback {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--success, #16A34A);
}

/* "View all" footer link */
.search-view-all {
    display: block;
    padding: 0.625rem 0.875rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    background: var(--bg-page);
    border-top: 1px solid var(--border);
    transition: background 0.1s ease;
}

.search-view-all:hover {
    background: var(--primary-light, #DBEAFE);
}



/* How It Works V2 (Timeline) */
.how-it-works-v2 {
    padding: 4rem 0;
    background: var(--bg-page);
}

.steps-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 0.5rem;
}

.step-icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    position: relative;
    z-index: 2;
}

.step-line {
    position: absolute;
    top: 32px;
    left: calc(50% + 32px);
    width: calc(100% - 64px);
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.3;
    z-index: 1;
}

.timeline-step:last-child .step-line {
    display: none;
}

.timeline-step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.timeline-step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Today's Top Offers */
.top-offers {
    padding: 4rem 0;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.offer-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.offer-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.offer-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.offer-card .deal-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
}

.offer-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.offer-tag {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.offer-action {
    margin-top: 1rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Trust Section */
.trust-section {
    padding: 4rem 0;
    background: var(--bg-page);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.trust-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.25s ease;
}

.trust-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.trust-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(79, 70, 229, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary);
}

.trust-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.trust-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Stores Section */
.stores {
    padding: 6rem 0;
    background: var(--bg-page);
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.store-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.store-logo {
    font-size: 4rem;
    text-align: center;
}

.store-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cashback-rate {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    background: rgba(37, 99, 235, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

@media (min-width: 768px) {
    .cashback-rate {
        font-size: 0.8125rem;
    }
}

.btn-shop {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-shop:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-sm);
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 0;
}

.steps {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    flex: 1;
    text-align: center;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
}

.step-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.cta-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.cta-content .btn-primary {
    background: white;
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer .logo {
    color: white;
    margin-bottom: 1rem;
}

.footer .logo span {
    color: white;
}

.footer-column>p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE DESIGN — ALL BREAKPOINTS
   ============================================ */

/* ---- TABLET (≤1024px) ---- */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .steps {
        gap: 2rem;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .step-content h3 {
        font-size: 1.25rem;
    }

    .cta {
        padding: 4rem 0;
    }
}

/* ---- MOBILE (≤768px) ---- */
@media (max-width: 768px) {

    /* --- Navigation --- */
    .nav-links,
    .nav-actions {
        display: none;
    }

    .desktop-only {
        display: none !important;
    }

    .theme-toggle {
        display: none !important;
    }

    .header-search {
        display: none;
    }

    .logo span {
        display: block;
        font-size: 1.1rem;
    }

    .mobile-theme-item {
        display: block !important;
        padding-top: 0.25rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .navbar.mobile-menu-open .nav-content {
        flex-wrap: wrap;
    }

    .navbar.mobile-menu-open .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        order: 3;
        gap: 0;
        padding: 0 0 1rem 0;
        border-top: 1px solid var(--border);
        margin-top: 1rem;
    }

    .navbar.mobile-menu-open .nav-links li a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1rem;
    }

    .navbar.mobile-menu-open .nav-actions {
        display: flex;
        width: 100%;
        order: 4;
        padding: 0.75rem 0 0.5rem;
        border-top: 1px solid var(--border);
    }

    .navbar.mobile-menu-open .nav-actions button {
        flex: 1;
    }

    /* --- Hero Section --- */
    .hero {
        padding: 3rem 0 2rem;
    }

    .hero.hero-compact {
        padding: 2.5rem 0 1.5rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.625rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-description {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
    }

    .hero-cta {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .hero-cta button {
        padding: 0.625rem 1.125rem;
        font-size: 0.8125rem;
    }

    .btn-large {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    /* --- Hero Stats --- */
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 0.625rem;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        border-radius: 0.5rem;
    }

    .stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.6875rem;
    }

    /* --- Section Common --- */
    .section-header {
        margin-bottom: 1.25rem;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .section-description {
        font-size: 0.75rem;
    }

    /* --- Category Sections --- */
    .category-section {
        padding: 1.25rem 0;
    }

    .category-header {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .category-header .section-title {
        font-size: 1.0625rem;
    }

    .category-header .section-description {
        font-size: 0.7rem;
    }

    .btn-view-all {
        padding: 0.4rem 0.875rem;
        font-size: 0.75rem;
        border-radius: 0.5rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* --- Top Deals --- */
    .top-deals {
        padding: 1.5rem 0;
    }

    .deals-grid {
        gap: 0.75rem;
    }

    .deal-card {
        flex: 0 0 130px;
        padding: 0.75rem;
        border-radius: 0.75rem;
        border-width: 1.5px;
    }

    /* Cashback badge — constrain to card width at this breakpoint */
    .deal-cashback {
        font-size: 0.5625rem;
        padding: 2px 6px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        text-align: center;
    }

    .deal-logo {
        width: 44px;
        height: 44px;
        margin: 0 auto 0.375rem;
        font-size: 0.875rem;
        border-radius: 0.625rem;
    }

    .deal-info h4 {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
    }

    .deal-cashback {
        font-size: 0.625rem;
    }

    /* --- How It Works Timeline --- */
    .how-it-works-v2 {
        padding: 2rem 0;
    }

    .steps-timeline {
        flex-direction: column;
        gap: 1.25rem;
    }

    .step-line {
        display: none;
    }

    .step-icon-wrap {
        width: 48px;
        height: 48px;
        margin: 0 auto 0.5rem;
    }

    .step-icon-wrap svg {
        width: 22px;
        height: 22px;
    }

    .timeline-step h3 {
        font-size: 0.875rem;
    }

    .timeline-step p {
        font-size: 0.75rem;
    }

    /* --- How It Works (legacy steps) --- */
    .how-it-works {
        padding: 3rem 0;
    }

    .steps {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .step-number {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
        margin: 0 auto 1rem;
    }

    .step-content h3 {
        font-size: 1.125rem;
    }

    .step-content p {
        font-size: 0.875rem;
    }

    /* --- Offers Grid --- */
    .top-offers {
        padding: 2rem 0;
    }

    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .offer-card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .offer-card .deal-logo {
        width: 48px;
        height: 48px;
        margin: 0 auto 0.5rem;
    }

    .offer-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
        margin-bottom: 0.5rem;
    }

    .offer-info h4 {
        font-size: 0.875rem;
    }

    .offer-tag {
        font-size: 0.7rem;
    }

    .offer-action {
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }

    /* --- Trust Section --- */
    .trust-section {
        padding: 2rem 0;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .trust-card {
        padding: 1.25rem 1rem;
        border-radius: 0.75rem;
    }

    .trust-icon {
        width: 40px;
        height: 40px;
        margin: 0 auto 0.5rem;
    }

    .trust-icon svg {
        width: 20px;
        height: 20px;
    }

    .trust-card h3 {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }

    .trust-card p {
        font-size: 0.75rem;
    }

    /* --- Stores Section --- */
    .stores {
        padding: 2rem 0;
    }

    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .store-card {
        padding: 1rem;
        gap: 0.5rem;
    }

    .store-logo {
        font-size: 2rem;
    }

    .store-info h3 {
        font-size: 1rem;
    }

    /* --- CTA Section --- */
    .cta {
        padding: 3rem 0;
    }

    .cta-content h2 {
        font-size: 1.375rem;
    }

    .cta-content p {
        font-size: 0.875rem;
    }

    /* --- Footer --- */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-column h4 {
        font-size: 0.9375rem;
        margin-bottom: 0.625rem;
    }

    .footer-column ul li {
        margin-bottom: 0.5rem;
    }

    .footer-column a {
        font-size: 0.8125rem;
    }

    .footer-column>p {
        font-size: 0.8125rem;
    }

    .footer-bottom {
        padding-top: 1rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
    }

    /* --- Page Header (All inner pages) --- */
    .page-header {
        padding: 1.5rem 0 1.25rem;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .page-header p {
        font-size: 0.8125rem;
    }
}

/* ---- SMALL MOBILE (≤480px) ---- */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero-title {
        font-size: 1.375rem;
    }

    .hero-description {
        font-size: 0.8125rem;
    }

    .hero-badge {
        font-size: 0.6875rem;
        padding: 0.35rem 0.75rem;
    }

    .hero-cta button {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    /* Stats: stack vertically on very small screens */
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        flex-direction: row;
        text-align: left;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    /* Section Common */
    .section-title {
        font-size: 1rem;
    }

    .section-description {
        font-size: 0.6875rem;
    }

    /* Category Sections */
    .category-section {
        padding: 1rem 0;
    }

    .category-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .category-header .section-title {
        font-size: 0.9375rem;
    }

    .btn-view-all {
        padding: 0.3rem 0.625rem;
        font-size: 0.6875rem;
        border-width: 1px;
    }

    /* Deal Cards */
    .deals-grid {
        gap: 0.5rem;
    }

    .deal-card {
        flex: 0 0 110px;
        padding: 0.625rem;
        border-radius: var(--radius-md);
    }

    .deal-logo {
        width: 38px;
        height: 38px;
        margin: 0 auto 0.25rem;
        font-size: 0.75rem;
    }

    .deal-info h4 {
        font-size: 0.6875rem;
    }

    /* Cashback badge — prevent overflow on tiny cards */
    .deal-cashback {
        font-size: 0.5rem;
        padding: 2px 5px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }

    /* How It Works */
    .how-it-works-v2 {
        padding: 1.25rem 0;
    }

    .steps-timeline {
        gap: 0.75rem;
    }

    .step-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .timeline-step h3 {
        font-size: 0.8125rem;
    }

    .timeline-step p {
        font-size: 0.6875rem;
    }

    /* Offers, Trust: single column */
    .top-offers {
        padding: 1.25rem 0;
    }

    .offers-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .offer-card {
        padding: 0.75rem;
    }

    .trust-section {
        padding: 1.25rem 0;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .trust-card {
        padding: 1rem 0.75rem;
    }

    .trust-card h3 {
        font-size: 0.8125rem;
    }

    .trust-card p {
        font-size: 0.6875rem;
    }

    .stores-grid {
        grid-template-columns: 1fr;
    }

    /* CTA */
    .cta {
        padding: 2rem 0;
    }

    .cta-content h2 {
        font-size: 1.125rem;
    }

    .cta-content p {
        font-size: 0.75rem;
    }

    /* Footer: single column */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .footer-column h4 {
        font-size: 0.875rem;
    }

    .footer-column a,
    .footer-column>p {
        font-size: 0.75rem;
    }

    .footer-bottom p {
        font-size: 0.6875rem;
    }

    .page-header h1 {
        font-size: 1.125rem;
    }

    .page-header p {
        font-size: 0.75rem;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 0.9375rem;
    opacity: 0.9;
}

/* Brands Section */
.brands-section {
    padding: 1.5rem 0 3rem;
}

/* Search and Filter Bar */
.search-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    width: 100%;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.category-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.category-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.results-info {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================================
   BRANDS PAGE GRID — Mobile-first responsive
   ============================================================ */
.brands-grid {
    display: grid;
    /* Mobile: 2 columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 480px) {
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

@media (min-width: 1024px) {
    .brands-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1280px) {
    .brands-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }
}

/* ============================================================
   BRAND CARD (Brands Page Grid) — Unified system
   ============================================================ */
.brand-card {
    /* Structural */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    /* Sizing — enforced height so grid never breaks */
    min-height: 164px;
    padding: 14px 10px 12px;
    /* Appearance */
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    /* Transitions */
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Hover — desktop only */
@media (hover: hover) {
    .brand-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary);
    }
}

/* Press — all devices */
.brand-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-xs);
}

/* Ribbon on brand-card (same system as deal-card) */
.brand-card .deal-ribbon {
    position: absolute;
    top: 0;
    left: 0;
}

/* Logo Container — inside brand-card */
.brand-logo-styled {
    width: 56px;
    height: 56px;
    background: var(--logo-bg, var(--surface-raised));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.brand-logo-styled img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.brand-logo-styled span {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-secondary);
}

/* Brand Info */
.brand-info {
    width: 100%;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.brand-info h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    color: var(--text-primary);
}

.brand-category {
    font-size: 0.625rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Cashback rate chip on brand-card */
.brand-cashback-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--gradient-cashback);
    color: white;
    font-size: 0.5625rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Get Cashback button */
.brand-cta-btn {
    display: block;
    width: 100%;
    padding: 7px 0;
    background: var(--gradient-brand);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity var(--transition-fast);
    pointer-events: none;
    /* card itself is the link */
    margin-top: auto;
}

/* ============================================================
   CATEGORY STRIP — Horizontal scroll, mobile-first
   ============================================================ */
.category-strip {
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--border);
}

.category-strip-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    /* Ensure scroll starts from left edge */
    padding-left: 0;
}

.category-strip-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    min-width: 80px;
}

.category-chip:hover,
.category-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.category-chip:active {
    transform: scale(0.95);
}

.category-chip-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    overflow: hidden;
}

.category-chip-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.category-chip-label {
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-secondary);
    text-align: center;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-secondary);
}

/* Active nav link */
.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Search filter bar responsive */
@media (max-width: 768px) {
    .search-filter-bar {
        gap: 0.75rem;
    }
}

/* Similar Brands Section (Brand Detail) - Premium Compact */
.similar-brands-section {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.similar-brands-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.similar-brands-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.similar-brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

@media (min-width: 640px) {
    .similar-brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
}

.similar-brand-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 0.375rem;
}

.similar-brand-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.similar-brand-logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 0.25rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .similar-brand-logo {
        width: 52px;
        height: 52px;
    }
}

.similar-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.similar-brand-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
    color: var(--text-secondary);
    font-weight: 700;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.similar-brand-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-brand-cashback {
    /* Green gradient badge — explicit values to prevent dark mode override */
    display: inline-block;
    padding: 3px 8px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #16A34A, #059669) !important;
    color: #ffffff !important;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Category Badge (Brand Detail) */
.category-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-page);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    margin-top: 0.25rem;
}

.category-badge-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   MOBILE RESPONSIVE: All Content Pages
   About, FAQ, Contact, Terms, Privacy, Login
   ============================================ */
@media (max-width: 768px) {

    /* About Page */
    .about-content {
        padding: 2rem 1rem;
    }

    .about-section {
        margin-bottom: 2rem;
    }

    .about-section h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .about-section p {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .stats-grid {
        gap: 0.75rem;
        margin: 1.5rem 0;
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-box {
        padding: 1rem 0.5rem;
        border-radius: 0.625rem;
    }

    .stat-box .number {
        font-size: 1.375rem;
    }

    .stat-box .label {
        font-size: 0.6875rem;
    }

    /* FAQ Page */
    .faq-content {
        padding: 1.5rem 1rem;
    }

    .faq-section {
        margin-bottom: 1.5rem;
    }

    .faq-section h2 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .faq-question {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .faq-answer-content {
        padding: 0 1rem 1rem;
        font-size: 0.8125rem;
        line-height: 1.6;
    }

    .faq-icon {
        width: 18px;
        height: 18px;
    }

    /* Contact Page */
    .contact-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .contact-form {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }

    .contact-form h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .contact-info h2 {
        font-size: 1.25rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.8125rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .submit-btn {
        padding: 0.75rem;
        font-size: 0.9375rem;
        border-radius: 0.625rem;
    }

    .info-item {
        padding: 1rem;
        border-radius: 0.625rem;
        gap: 0.75rem;
    }

    .info-icon {
        width: 36px;
        height: 36px;
        border-radius: 0.5rem;
    }

    .info-details h3 {
        font-size: 0.875rem;
    }

    .info-details p {
        font-size: 0.8125rem;
    }

    /* Terms & Privacy Pages */
    .terms-content,
    .privacy-content {
        padding: 1.5rem 1rem;
    }

    .terms-section,
    .privacy-section {
        margin-bottom: 1.5rem;
    }

    .terms-section h2,
    .privacy-section h2 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .terms-section h3 {
        font-size: 1rem;
        margin: 1rem 0 0.5rem;
    }

    .terms-section p,
    .terms-section li,
    .privacy-section p {
        font-size: 0.8125rem;
        line-height: 1.6;
    }

    .privacy-intro {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .last-updated {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        font-size: 0.8125rem;
    }

    /* Login Page */
    .login-container {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 24px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .logo-text {
        font-size: 22px;
    }

    .google-btn {
        padding: 12px 20px;
        font-size: 14px;
    }


}

/* Rich Content / SEO Fallback Section */
.rich-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid var(--border);
    margin-top: 2rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .rich-content {
    background: var(--background-secondary);
    border-color: var(--border);
}

.rich-content h2,
.rich-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.rich-content h2:first-child {
    margin-top: 0;
}

.rich-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

[data-theme="dark"] .rich-content p {
    color: var(--text-secondary);
}

.rich-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.rich-content li {
    margin-bottom: 0.5rem;
}

/* ============================================================
   Skeleton Loaders & UI Badges
   ============================================================ */

/* Deal Badge Ribbon */
.deal-badge-ribbon {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white !important;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

[data-theme="dark"] .deal-badge-ribbon {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.skeleton-card {
    border-color: var(--border) !important;
    background: var(--bg-card) !important;
    pointer-events: none;
    box-shadow: none !important;
}

.skeleton-logo,
.skeleton-text,
.skeleton-btn {
    background: #e2e8f0;
    background-image: linear-gradient(90deg, #e2e8f0 0px, #f8fafc 40px, #e2e8f0 80px);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .skeleton-logo,
[data-theme="dark"] .skeleton-text,
[data-theme="dark"] .skeleton-btn {
    background: #1e293b;
    background-image: linear-gradient(90deg, #1e293b 0px, #334155 40px, #1e293b 80px);
}

.skeleton-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    margin: 0 auto;
}

.skeleton-text {
    height: 12px;
}

.skeleton-btn {
    height: 28px;
    width: 100%;
    border-radius: var(--radius-sm);
    margin-top: auto;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    max-width: 260px;
    z-index: 100;
}

@media (max-width: 768px) {
    .header-search {
        flex: 1;
        justify-content: flex-end;
        margin: 0 0.5rem 0 auto;
    }
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.35rem 0.75rem;
    width: 140px;
    max-width: 100%;
    transition: width 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 768px) {
    .search-input-wrapper {
        width: 180px;
    }
}

@media (min-width: 1024px) {
    .search-input-wrapper {
        width: 220px;
    }
}

.search-input-wrapper:focus-within {
    width: 180px;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (min-width: 768px) {
    .search-input-wrapper:focus-within {
        width: 240px;
    }
}

@media (min-width: 1024px) {
    .search-input-wrapper:focus-within {
        width: 280px;
    }
}

.search-input-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    padding-left: 2rem;
    width: 100%;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.search-suggestion-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: var(--bg-page);
}

.suggestion-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: white;
    padding: 2px;
    border: 1px solid var(--border);
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suggestion-name {
    font-size: 0.8125rem;
    font-weight: 600;
}

.suggestion-cashback {
    font-size: 0.6875rem;
    color: var(--secondary);
    font-weight: 700;
}