/* 99Coupon Premium Design System */
/* Elegant, Professional, Trustworthy */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;800&family=JetBrains+Mono:wght@700;800&display=swap');

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Professional Color Palette */
:root {
    /* Primary - Deep Navy Blue (Professional & Trustworthy) */
    --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;
    --primary-rgb: 37, 99, 235;

    /* Accent - Warm Orange (Action & Energy) */
    --accent-400: #fb923c;
    --accent-500: #f97316;
    --accent-600: #ea580c;

    /* Success - Professional Green */
    --success-400: #4ade80;
    --success-500: #22c55e;
    --success-600: #16a34a;

    /* Neutral Surfaces */
    --surface-50: #fafafa;
    --surface-100: #f5f5f5;
    --surface-200: #e5e5e5;
    --surface-300: #d4d4d4;
    --surface-400: #a3a3a3;
    --surface-500: #737373;
    --surface-600: #525252;
    --surface-700: #404040;
    --surface-800: #262626;
    --surface-900: #171717;

    /* Text */
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #737373;
    --text-inverse: #fafafa;

    /* Professional Gradients */
    --gradient-header: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    --gradient-success: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    --gradient-dark: linear-gradient(135deg, #171717 0%, #262626 100%);

    /* Shadows - Clean & Professional */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.2);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;
    --header-height: 72px;
    --transition-ios: cubic-bezier(0.4, 0, 0.2, 1);

    /* Transitions */
    --transition-slow: 250ms ease;
    --transition-base: 150ms ease;
    --container-max-width: 1280px;
}

@view-transition {
    navigation: auto;
}

/* Base Styles */
html {
    background: #2f59bf;
    /* Reducing base font-size to resolve "too large" desktop feel */
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 1024px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #fbfbfb;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

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

@media (max-width: 480px) {
    .container {
        padding: 5px var(--space-4);
    }
}

/* ========================================
   HEADER - Glassmorphism Evolution
======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    border-top: 1px solid transparent;
    padding: 1.25rem 0;
    box-shadow: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.is-scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0.85rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.is-hero-page .site-header {
    background: transparent;
    border-bottom-color: transparent;
    border-top-color: transparent;
    box-shadow: none;
}

/* Force solid only on pages with NO hero (unlikely now) */
body:not(.is-hero-page) .site-header {
    background: #0f172a !important;
    backdrop-filter: none !important;
}

/* Scrolled/Active Hub Transition */
.site-header.is-scrolled {
    background: #2f59bf !important;
    box-shadow: 0 10px 30px rgba(47, 89, 191, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
}

.site-header.is-scrolled::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/backgrounds/shopping-pattern.png');
    background-size: 300px;
    background-repeat: repeat;
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: -1;
}

/* Remove Absolute/Sticky jump from is-at-top */
.site-header.is-at-top {
    /* Maintained at top by fixed position, just style differences */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.is-country-page .main-content,
.is-store-page .main-content,
.is-root-page .main-content {
    padding-top: 0 !important;
}


.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.logo a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    transition: var(--transition-base);
}

.logo a:hover {
    opacity: 0.9;
}

.header-logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-base);
    position: relative;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.header-logo-icon::after {
    content: '';
    position: absolute;
    inset: 10px;
    background: var(--gradient-primary);
    mask: url('/images/99coupon-logo.svg') no-repeat center;
    -webkit-mask: url('/images/99coupon-logo.svg') no-repeat center;
    mask-size: contain;
    -webkit-mask-size: contain;
}

.logo a:hover .header-logo-icon {
    transform: scale(1.1);
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text-inverse) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    margin: 0;
}

.logo-suffix {
    font-size: 0.65em;
    opacity: 0.85;
    font-weight: 600;
    display: inline-block;
}

/* Burger Menu (Core Styles) */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    z-index: 6000;
    /* Higher than nav overlay */
    transition: all 0.3s ease;
}

.burger-menu:hover {
    opacity: 0.8;
}

.burger-menu span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: white;
    border-radius: 2px;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.burger-menu span:nth-child(2) {
    margin: 6px 0;
}

.burger-open .burger-menu {
    border-color: rgba(255, 255, 255, 0.2);
}

.burger-open .burger-menu span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.burger-open .burger-menu span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-open .burger-menu span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Header Navigation (Standardized) */
.header-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

@media (min-width: 769px) {
    .header-nav {
        flex-grow: 1;
        justify-content: flex-end;
    }

    .header-nav .header-actions {
        margin-inline-start: 1rem;
    }
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link-btn {
    color: var(--text-inverse);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    /* Perfect Pill */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-badge {
    background: white;
    color: var(--primary-800);
    /* Premium Navy Blue text */
    font-size: 0.8rem;
    font-weight: 900;
    min-width: 20px;
    height: 20px;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: initial;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    animation: badge-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1;
}

[dir="rtl"] .wallet-badge {
    margin-right: -4px;
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.nav-link-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.nav-link-btn.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-link-btn.active svg {
    stroke-width: 2.5;
}

.lang-switch-btn,
.country-current {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    padding: 0.45rem 1.25rem;
    /* More breathing room on edges */
    color: var(--text-inverse);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
    white-space: nowrap;
    height: 36px;
    /* Explicit height for perfect match */
    box-sizing: border-box;
}

.lang-switch-btn:hover,
.country-current:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flag-circle {
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-1.5px);
    /* Correct for English/Inter baseline */
    pointer-events: none;
}

[dir="rtl"] .flag-circle {
    transform: translateY(1px);
    /* Adjustment for Tajawal/Arabic baseline - sits lower */
}

.mobile-wallet-btn {
    display: none; /* Hidden on desktop */
}

/* ========================================
   MOBILE HEADER & RESPONSIVE LOGIC
======================================== */
@media (max-width: 768px) {
    .site-header {
        height: 64px !important;
        padding: 0;
    }

    .header-content {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        padding: 0 var(--space-4) !important;
        gap: 0.75rem !important;
        margin-top: -4px;
    }

    .burger-menu {
        display: flex !important;
        order: 1;
    }

    .logo {
        order: 2;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-grow: 0;
    }

    .logo a {
        justify-content: flex-start;
        gap: var(--space-2);
    }

    .logo h1 {
        font-size: 1.25rem !important;
        justify-content: flex-start;
    }

    .header-logo-icon {
        width: 32px;
        height: 32px;
    }

    .header-actions {
        display: none !important;
        /* Hide the old class if any remains */
    }

    /* Mobile Nav Overlay (Elevated) */
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        width: 100vw;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px) saturate(200%);
        -webkit-backdrop-filter: blur(20px) saturate(200%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 4rem 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 5000;
        display: flex !important;
        gap: 1.5rem;
    }

    [dir="rtl"] .header-nav {
        transform: translateY(-100%);
    }

    .burger-open .header-nav {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .burger-open {
        overflow: hidden;
        /* Lock scroll */
    }

    .nav-link-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 1.25rem 2rem;
        background: rgba(255, 255, 255, 0.05);
        font-size: 1.25rem;
        font-weight: 600;
        border-radius: 100px;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link-btn.active {
        background: var(--gradient-primary) !important;
        box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
        border: none;
    }

    .header-nav .header-actions {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 280px;
        margin-top: 1rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header-nav .country-selector,
    .header-nav .language-selector {
        width: 100%;
    }

    .header-nav .country-current,
    .header-nav .lang-switch-btn {
        width: 100%;
        justify-content: center !important;
        height: 52px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 100px;
        font-size: 1.1rem;
    }

    .nav-link-btn.active::after {
        display: none !important;
    }

    /* Directional Alignments */
    [dir="ltr"] .logo {
        text-align: left;
        margin-left: 0.5rem;
    }

    [dir="rtl"] .logo {
        text-align: right;
        margin-right: 0.5rem;
    }

    /* Hide selector text on mobile */
    .country-current span:not(.flag-circle),
    .lang-switch-btn span:not(.lang-code) {
        display: none;
    }

    .desktop-wallet-link {
        display: none !important;
    }

    .mobile-wallet-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        color: var(--text-inverse);
        margin-inline-start: auto;
        order: 3;
        z-index: 6000;
        text-decoration: none;
        padding: 0.25rem;
        transition: transform 0.2s;
    }

    .mobile-wallet-btn.active {
        color: #fff;
    }

    .mobile-wallet-btn .wallet-badge {
        position: absolute;
        top: -4px;
        right: -6px;
        margin: 0;
        --badge-scale: 1.15;
        transform: scale(var(--badge-scale));
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    [dir="rtl"] .mobile-wallet-btn .wallet-badge {
        right: auto;
        left: -6px;
        margin: 0;
    }
}

.store-hero-premium {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background-color: var(--store-brand-color, var(--primary-600));
    padding: 7.5rem var(--space-6) 4rem;
    margin-bottom: 0;
    overflow: hidden;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

}

@media (max-width: 768px) {
    .store-hero-premium {
        padding-top: 5rem !important;
        margin-bottom: 0 !important;
    }
}

.store-hero-pattern {
    position: absolute;
    top: calc(64px - 24px);
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--store-logo-url);
    background-repeat: repeat;
    background-size: 120px;
    opacity: 0.08;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, black 10%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, black 10%, transparent 90%);
}

.store-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: right;
    gap: var(--space-8);
    max-width: var(--container-max-width);
    width: 100%;
    padding: 0 var(--space-6);
    margin: 0 auto;
}

[dir="ltr"] .store-hero-content {
    text-align: left;
}

.store-hero-logo {
    width: 150px;
    height: 150px;
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.store-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.store-hero-meta {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
    margin: 0;
}

.store-hero-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .store-hero-premium {
        padding: var(--space-8) 0;
        margin-bottom: var(--space-8);
    }

    .store-hero-content {
        flex-direction: row;
        align-items: center;
        gap: var(--space-5);
        text-align: right;
        justify-content: flex-start;
    }

    [dir="ltr"] .store-hero-content {
        text-align: left;
    }

    .store-hero-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 0;
        flex-shrink: 0;
        padding: var(--space-3);
        border-radius: var(--radius-xl);
    }

    .store-hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .store-hero-meta {
        font-size: 0.875rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;

        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .store-hero-text {
        display: flex;
        flex-direction: column;
        gap: var(--space-1);
    }

    .store-hero-badge {
        display: none;
    }
}



/* ========================================
   MAIN CONTENT
======================================== */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 80px 0 var(--space-10) 0;
    /* Default padding to clear fixed header */
}

/* Ensure hero pages start at the very top to blend with transparent header */
.is-hero-page .main-content {
    padding-top: 0 !important;
}

.is-country-page .main-content .container,
.is-store-page .main-content .container {
    padding-top: 0 !important;
}

/* ========================================
   FILTERS SECTION - Clean Card
======================================== */
.filters-section {
    background: white;
    border: 1px solid var(--surface-200);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-10);
    box-shadow: var(--shadow-md);
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-6);
    color: var(--primary-900);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}


.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-5);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.filter-group label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--surface-300);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    background: white;
    transition: var(--transition-base);
    cursor: pointer;
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: var(--primary-400);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-box {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--surface-200);
}

.search-box .filter-group input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: var(--space-3) center;
    padding-left: var(--space-10);
}

/* ========================================
   COUPONS GRID
======================================== */
.coupons-section {
    margin-top: var(--space-6);
}

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}

/* ========================================
   COUPON CARD - Professional Design
======================================== */
/* Premium Coupon Card */
.coupon-card {
    height: 300px;
    /* Increased to ensure content visibility with the brand info and verified badge */
    perspective: 1500px;
    margin-bottom: var(--space-6);
}

.coupon-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.coupon-card.is-flipped .coupon-card-inner {
    transform: rotateY(180deg);
}

.coupon-card-front,
.coupon-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--surface-200);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    background: white;
}

.coupon-card-front {
    display: flex;
    overflow: hidden;
    z-index: 2;
}

.coupon-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
    border: 1px solid #ced4da;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.5);
    /* Inner metallic glow */
    cursor: pointer;
    /* Click to unflip */
}

.back-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1.5px solid var(--surface-100);
}

.back-header-start {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.back-header-start:hover {
    color: var(--primary-600);
}

.back-chevron-icon {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.back-header-start:hover .back-chevron-icon {
    color: var(--primary-600);
    transform: translateX(-2px);
}

[dir="rtl"] .back-header-start:hover .back-chevron-icon {
    transform: translateX(2px);
}

.back-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: inherit;
}

.back-close-btn {
    background: var(--surface-200);
    border: 1px solid var(--surface-300);
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.back-close-btn:hover {
    color: var(--error-600);
    background: var(--error-50);
    border-color: var(--error-200);
    transform: rotate(90deg) scale(1.1);
}

.coupon-card-back .meta-inner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px; /* Row and column gap optimized */
    flex: 1;
}

.back-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.back-flip-btn {
    background: var(--surface-100);
    color: var(--text-primary);
    border: 1px solid var(--surface-200);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.back-flip-btn:hover {
    background: var(--surface-200);
    color: var(--primary-700);
}

/* Vertical Offer Sidebar */
.coupon-offer-side {
    background: linear-gradient(145deg, #FFD700, #FDB931, #FF9900);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    /* 80% of 65px */
    flex-shrink: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    padding: var(--space-4) 0;
}

[dir="rtl"] .coupon-offer-side {
    border-right: none;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.discount-amount {
    font-size: 1.85rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    word-spacing: 0.3rem;
    /* Extra space between value and unit */
    letter-spacing: 1px;
    /* Improved readability */
}

.coupon-details-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.coupon-main {
    display: flex;
    border-bottom: 2px dashed var(--surface-200);
    position: relative;
    background: white;
}

/* Content Cell */
.coupon-content-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-5);
    /* Tightened from space-6 for better internal fit */
    gap: var(--space-2);
}

.coupon-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.stars {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #FFB800;
}

.rating-number {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.reviews-count {
    color: var(--surface-700);
    font-weight: 500;
    font-size: 0.75rem;
}

.coupon-status {
    display: flex;
    gap: var(--space-2);
    margin-bottom: -4px;
}

.status-verified {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success-700);
    background: var(--success-50);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.coupon-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
    /* Limit to 2 lines to prevent pushing bottom row out */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Added for standard compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coupon-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    /* Limit to 1 line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.coupon-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: none;
    margin-top: 8px;
    transition: all var(--transition-base);
}

.coupon-brand-row:hover {
    background: transparent;
}

.brand-logo-mini {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.brand-logo-mini img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.coupon-brand-row:hover .brand-name {
    color: var(--primary-700);
}

.coupon-meta {
    display: flex;
    gap: var(--space-4);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Action Area */
.coupon-action-area {
    padding: var(--space-4) var(--space-6);
    background: var(--surface-50);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.action-top {
    display: flex;
    align-items: center;
    width: 100%;
}

.action-meta-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-5);
    /* More compact padding */
    background: var(--surface-25);
    cursor: pointer;
    /* Whole row flips card */
}

.expand-meta-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-600);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    /* Keep الشروط والتفاصيل on one line */
}

.expand-meta-btn:hover {
    color: var(--primary-600);
}

.expand-meta-btn .chevron-icon {
    transition: transform 0.3s ease;
}

.expand-meta-btn.is-expanded .chevron-icon {
    transform: rotate(180deg);
}

/* Expandable meta logic (Superseded by Flip card) */
.expand-meta-btn.is-flipped .chevron-icon {
    transform: rotate(180deg);
}

.meta-inner-grid {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Denser grid */
}

.meta-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px; /* Close gap between label and value */
    font-size: 0.85rem;
}

.meta-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem; /* Slightly smaller label */
}

.meta-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem; /* Balanced value size */
    padding-inline-start: 20px; /* Align with label text */
}

.success-highlight {
    color: var(--success-700);
    font-weight: 850;
}

.trust-row {
    background: var(--success-50);
    border-radius: 8px;
    padding: 8px 10px; /* Denser padding */
    margin: 2px 0;
    border: 1px dashed var(--success-200);
}

/* Coupon Feedback Area */
.coupon-feedback-area {
    margin-top: 12px;
    padding: 12px; /* Denser padding */
    background: var(--surface-100);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--surface-200);
}

.feedback-question {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.feedback-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.feedback-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px; /* Denser padding */
    border-radius: var(--radius-full);
    border: 1.5px solid var(--surface-300);
    background: white;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: var(--text-secondary);
}

.feedback-btn:hover {
    background: var(--surface-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.feedback-btn.btn-yes:hover {
    border-color: var(--success-500);
    color: var(--success-700);
    background: var(--success-50);
}

.feedback-btn.btn-no:hover {
    border-color: var(--error-500);
    color: var(--error-700);
    background: var(--error-50);
}

.feedback-btn.active-yes {
    background: var(--success-600) !important;
    color: white !important;
    border-color: var(--success-600) !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.feedback-btn.active-no {
    background: var(--error-600) !important;
    color: white !important;
    border-color: var(--error-600) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.terms-row {
    margin-top: var(--space-1);
    padding-top: var(--space-2);
    border-top: 1px dashed var(--surface-200);
}

/* Base Code Display */
.code-box-wrapper {
    display: flex;
    width: 100%;
    border: 2px dashed var(--primary-200);
    border-radius: var(--radius-lg);
    background: white;
    overflow: visible;
    position: relative;
}

.scissors-icon-wrapper {
    position: absolute;
    top: -12px;
    left: 20px;
    background: white;
    padding: 0 4px;
    color: var(--primary-400);
    transform: rotate(-10deg);
}

[dir="rtl"] .scissors-icon-wrapper {
    left: auto;
    right: 20px;
    transform: scaleX(-1) rotate(-10deg);
}

.code-placeholder-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--primary-25);
    padding-right: var(--space-2);
}

[dir="rtl"] .code-placeholder-wrapper {
    padding-right: 0;
    padding-left: var(--space-2);
}

.code-placeholder {
    flex: 1;
    padding: 0.75rem var(--space-4);
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-800);
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: font-size 0.2s ease;
}

.code-placeholder.long-code {
    font-size: 1.05rem;
    letter-spacing: 1px;
}

.speak-code-btn {
    background: transparent;
    border: none;
    color: var(--primary-400);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.speak-code-btn:hover {
    color: var(--primary-600);
    background: rgba(var(--primary-rgb), 0.05);
    transform: scale(1.1);
}

.speak-code-btn.is-speaking {
    color: var(--primary-600);
    animation: speakPulse 1s infinite alternate;
}

@keyframes speakPulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

.copy-btn-premium {
    background: var(--primary-600);
    color: white;
    border: none;
    padding: 0 0.75rem;
    cursor: pointer;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    min-width: 65px;
}

.copy-btn-text {
    font-size: 0.6rem;
    /* Minimalist label */
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.9;
}

.copy-icon-btn {
    width: 18px;
    /* Increased visual prominence */
    height: 18px;
    opacity: 1;
}

[dir="rtl"] .copy-btn-premium {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.copy-btn-premium:hover {
    background: var(--primary-700);
}

.details-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-600);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.details-link:hover {
    color: var(--primary-800);
}

.details-link:hover .arrow-icon {
    transform: translateX(3px);
}

[dir="rtl"] .details-link:hover .arrow-icon {
    transform: translateX(-3px);
}

/* Get Offer Button (No Code) */
.get-offer-btn-premium {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.get-offer-btn-premium:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.no-code-msg {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

@media (max-width: 640px) {
    .coupons-grid {
        gap: var(--space-4) !important;
    }

    .coupon-main {
        display: flex !important;
    }

    .coupon-offer-side {
        width: 40px !important;
        /* 80% of 50px */
        padding: var(--space-4) 0 !important;
        background: linear-gradient(145deg, #FFD700, #FDB931) !important;
    }

    .discount-amount {
        font-size: 1.35rem !important;
        font-weight: 500 !important;
        color: white !important;
        writing-mode: vertical-rl !important;
        transform: rotate(180deg) !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
    }

    .coupon-content-side {
        padding: var(--space-3) !important;
        gap: var(--space-2) !important;
    }

    .coupon-title {
        font-size: 1.05rem !important;
    }

    .code-placeholder.long-code {
        font-size: 0.9rem !important;
        letter-spacing: 0.5px !important;
    }

    .coupon-status,
    .coupon-meta {
        justify-content: flex-start !important;
    }

    .coupon-action-area {
        flex-direction: column !important;
        padding: var(--space-4) !important;
        gap: var(--space-3) !important;
    }

    .action-meta-toggle {
        padding: 0 !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: var(--surface-25) !important;
    }

    .coupon-rating {
        padding: 0 var(--space-3) !important;
        /* Slightly reduced padding */
        gap: 6px !important;
    }

    .rating-number {
        font-size: 0.75rem !important;
        /* Smaller font on mobile */
    }

    .reviews-count {
        font-size: 0.65rem !important;
        /* Smaller reviews text */
        opacity: 0.8 !important;
    }

    .expand-meta-btn {
        width: auto !important;
        padding: var(--space-3) var(--space-4) !important;
        font-size: 0.75rem !important;
    }
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--surface-200);
}

.website-logo {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: contain;
    background: transparent;
    padding: var(--space-2);
    border: none;
    transition: var(--transition-base);
    display: block;
}

.coupon-card:hover .website-logo {
    border-color: var(--primary-300);
}

.website-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Coupon Code Box */
.coupon-code {
    background: var(--primary-50);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin: var(--space-4) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    border: 2px dashed var(--primary-300);
}

.coupon-code-large {
    max-width: 450px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-6);
    border-radius: var(--radius-lg);
    background: var(--primary-50);
    border-width: 3px;
    box-shadow: var(--shadow-sm);
}

.code-text {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-700);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.code-text-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-900);
}

.copy-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: var(--transition-base);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.copy-btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-md);
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: var(--gradient-success);
}

.coupon-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.6;
    font-size: 0.9375rem;
    flex-grow: 1;
}

.coupon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--surface-200);
    margin-bottom: var(--space-4);
    gap: var(--space-3);
}

.discount-badge {
    background: var(--gradient-accent);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9375rem;
}

.expiry-date {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

.view-deal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
    width: 100%;
    text-align: center;
    font-size: 0.9375rem;
}

.view-deal-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* ========================================
   EMPTY STATE
======================================== */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-8);
    color: var(--text-secondary);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-200);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-5);
    opacity: 0.6;
}

.empty-state h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.375rem;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-weight: 600;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* ========================================
   FOOTER - Professional Dark
======================================== */
.site-footer {
    background: var(--gradient-dark);
    color: var(--text-inverse);
    padding: 6rem 0 3rem;
    margin-top: 6rem;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 2.5rem 0 1.5rem;
        margin-top: 3rem;
    }
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.is-root-page {
    padding-top: 0.5rem !important;
}

.is-root-page .site-header {
    background: transparent !important;
    box-shadow: none !important;
}


.is-root-page .site-footer {
    background: transparent !important;
    padding: 1.5rem 0;
    margin-top: 0;
    color: var(--text-primary);
}

.is-root-page .site-footer .footer-grid,
.is-root-page .site-footer .footer-disclaimer {
    display: none;
}

.is-root-page .countries-container {
    margin-bottom: 1rem;
}

.is-root-page .section-title {
    justify-content: center;
    text-align: center;
}

.is-root-page .site-footer .footer-bottom {
    border-top-color: var(--surface-200);
    opacity: 0.5;
}

.is-root-page .site-footer p {
    color: var(--text-secondary);
}

/* Root Backdrop */
.root-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    /* Adds the spacing between rows */
    opacity: 0.08;
    /* Increased visibility */
    filter: grayscale(100%) blur(0.75px);
    /* Sharper logos */
    background: var(--surface-50);
    padding: 2vh 0;
    /* Extra safety padding top/bottom */

    /* Spherical Fade Mask (Tighter for total edge transparency) */
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 90%);
}

/* Immersive Root Overlay */
.root-background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(var(--primary-rgb), 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* Premium Hero Typography */
.gradient-text-animate {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 25%, var(--primary-400) 50%, var(--primary-600) 75%, var(--primary-800) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 15s linear infinite;
    display: inline-block;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.floating-hero {
    animation: heroFloat 12s ease-in-out infinite;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Glassmorphism Components */
.glass-pill {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07) !important;
}

.glass-pill:hover {
    background: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15), 0 0 15px rgba(var(--primary-rgb), 0.1) !important;
    transform: translateY(-5px) scale(1.05) !important;
    border-color: var(--primary-200) !important;
}

.backdrop-marquee-row {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 0;
    height: 80px;
    /* Fixed height to allow gaps */
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.backdrop-marquee {
    display: inline-flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
}

.backdrop-logo {
    width: 80px;
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 5px;
}

.backdrop-logo img {
    max-width: 60px;
    max-height: 6vh;
    /* Scale relative to row */
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .backdrop-logo {
        width: 60px;
    }

    .backdrop-logo img {
        max-width: 45px;
    }
}

.backdrop-marquee-row.forward .backdrop-marquee {
    animation: stores-marquee-forward 60s linear infinite;
}

.backdrop-marquee-row.reverse .backdrop-marquee {
    animation: stores-marquee-reverse 80s linear infinite;
}

.backdrop-marquee-row.diagonal .backdrop-marquee {
    animation: stores-marquee-forward 70s linear infinite;
    transform: rotate(-5deg);
}

@media (max-width: 768px) {
    .backdrop-logo {
        width: 80px;
        height: 80px;
    }

    .backdrop-marquee {
        gap: 2rem;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0.35rem 5rem;
    text-align: start;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-inline: auto;
    align-items: start;
}

.about-col {
    grid-column: 1;
    grid-row: 1 / 4;
    padding-inline-end: 2rem;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.05);
}

.links-col {
    grid-column: 2;
    grid-row: 1;
}

.stores-col {
    grid-column: 2;
    grid-row: 2;
}

.countries-col {
    grid-column: 2;
    grid-row: 3;
}

.footer-col h3,
.footer-col h4 {
    color: white;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.footer-title {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.footer-sub-title {
    font-size: 1.1rem;
    color: var(--primary-300) !important;
}

.about-col p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
}

.footer-col:not(.about-col) {
    line-height: 1.4;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.footer-col:not(.about-col) h4 {
    display: inline !important;
    margin-bottom: 0 !important;
    font-size: 1rem;
    color: var(--primary-300) !important;
}

.footer-col:not(.about-col) h4::after {
    content: ": ";
}

.footer-col ul {
    display: inline !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    display: inline !important;
    margin: 0;
}

.footer-col ul li a {
    display: inline !important;
    color: var(--text-inverse);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: var(--transition-base);
}

.footer-col ul li:not(:last-child)::after {
    content: " \2022\0020";
    opacity: 0.3;
    font-size: 0.8rem;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--primary-300);
}

@media (max-width: 768px) {
    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

    .about-col {
        grid-column: auto;
        grid-row: auto;
        padding-inline-end: 0;
        border-inline-end: none;
        text-align: center !important;
    }

    .links-col,
    .stores-col,
    .countries-col {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .footer-col {
        text-align: center !important;
    }

    .footer-col:not(.about-col) {
        display: block !important;
        line-height: 1.6;
        margin-bottom: 0.5rem;
    }

    .footer-col h4 {
        display: inline !important;
        margin-bottom: 0 !important;
        font-size: 0.9rem;
        color: var(--primary-300) !important;
        font-weight: 800;
    }

    .footer-col h4::after {
        content: ": ";
    }

    .footer-col ul {
        display: inline !important;
        padding: 0;
        margin: 0;
    }

    .footer-col ul li {
        display: inline !important;
        margin: 0;
    }

    .footer-col ul li a {
        display: inline !important;
        font-size: 0.85rem;
        opacity: 0.8;
    }

    .footer-col ul li:not(:last-child)::after {
        content: " \2022\0020";
        opacity: 0.3;
        font-size: 0.75rem;
    }

    .footer-col h3 {
        margin-bottom: 0.4rem;
        font-size: 1rem;
        color: white;
    }

    .about-col p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    .social-links {
        margin-top: 1rem !important;
        gap: 0.75rem;
        justify-content: center !important;
    }

    .social-link {
        width: 32px;
        height: 32px;
    }

    .social-link svg {
        width: 16px;
        height: 16px;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: white;
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.1);
    /* Unitone default */
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-link.facebook:hover {
    background-color: #1877F2;
}

.social-link.x:hover {
    background-color: #000000;
}

.social-link.instagram:hover {
    background-color: #E4405F;
}

.social-link.tiktok:hover {
    background-color: #010101;
}

.social-link.youtube:hover {
    background-color: #FF0000;
}

/* ========================================
   RTL SUPPORT
======================================== */
[dir="rtl"] .header-content,
[dir="rtl"] .main-nav ul,
[dir="rtl"] .coupon-code,
[dir="rtl"] .coupon-footer {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}



[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .section-title,
[dir="rtl"] .website-name,
[dir="rtl"] .main-nav a,
[dir="rtl"] .filter-group label,
[dir="rtl"] .empty-state h3,
[dir="rtl"] .logo h1,
[dir="rtl"] .expand-meta-btn,
[dir="rtl"] .back-title,
[dir="rtl"] .meta-label,
[dir="rtl"] .meta-value {
    font-family: 'Tajawal', sans-serif;
}

[dir="rtl"] .search-box .filter-group input {
    background-position: right var(--space-3) center;
    padding-left: var(--space-4);
    padding-right: var(--space-10);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

    .logo h1 {
        font-size: 1.375rem;
    }

    .filters-section {
        padding: var(--space-5);
        border-radius: var(--radius-lg);
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .coupons-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .coupon-code {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }

    .code-text {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .coupon-card {
        padding: 0;
        border-radius: var(--radius-xl);
        overflow: hidden;
    }

    .coupon-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
}

@media (max-width: 480px) {
    .is-scrolled .container {
        padding: 0 var(--space-4);
    }

    .main-content {
        padding: var(--space-6) 0;
    }

    .is-country-page .main-content,
    .is-store-page .main-content {
        padding-top: 0 !important;
    }

    .featured-stores-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem !important;
        /* Tighter on mobile */
        padding: 0;
    }

    .store-card-logo-box {
        width: 100% !important;
        /* Full width of column */
        max-width: 72px !important;
        height: auto !important;
        aspect-ratio: 1/1;
        border-radius: 12px !important;
        padding: 0.5rem !important;
    }

    .store-coupon-badge {
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    [dir="rtl"] .store-coupon-badge {
        left: -4px;
        right: auto;
    }



    .category-pills-row {
        margin-top: 0 !important;
        margin-bottom: 0.25rem !important;
        padding-bottom: 0.75rem !important;
    }

    .expandable-search-wrapper.is-expanded .hub-search-input-elegant {
        width: 140px !important;
    }

    .hub-search-container {
        margin-top: -0.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    .section-header {
        margin-bottom: 0.75rem !important;
    }

    section {
        margin-bottom: 1.5rem !important;
        /* Drastically reduced gaps */
    }

    .about-section {
        padding: 1rem !important;
        margin-bottom: 2rem !important;
    }


    .store-card-premium {
        padding: 0.5rem 0.25rem !important;
    }

    .store-card-logo-box {
        margin-bottom: 0.4rem !important;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .website-name {
        font-size: 1rem;
    }

    .website-logo {
        width: 44px;
        height: 44px;
    }
}

/* ========================================
   UTILITIES
======================================== */
::selection {
    background: var(--primary-500);
    color: white;
}

*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.loading {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-secondary);
}

.country-tag,
.website-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--surface-100);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px solid var(--surface-200);
}

/* ========================================
   COUNTRY SELECTOR - Compact & Professional
======================================== */
.countries-container {
    margin-bottom: 4rem;
}

.countries-grid-compact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: flex-start;
}

.country-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-2);
    width: 100px;
    background: white;
    border: 1px solid var(--surface-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-xs);
    text-align: center;
}

.country-pill:hover {
    border-color: var(--primary-400);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: var(--primary-600);
}

.country-pill .flag-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: var(--space-1);
}

@media (max-width: 640px) {
    .countries-grid-compact {
        justify-content: center;
        gap: var(--space-2);
    }

    .country-pill {
        width: 85px;
        padding: var(--space-3) var(--space-1);
        font-size: 0.75rem;
    }

    .country-pill .flag-icon {
        font-size: 1.5rem;
    }
}

/* ========================================
   COUNTRY HUB - Premium Page Components
   ======================================== */

.hub-hero {
    position: relative;
    padding: 7.5rem 1.5rem 2.5rem;
    background-image: none;
    background-color: #1a3a8a;
    /* Slightly brighter navy for better pattern contrast */
    color: white;
    margin-bottom: 0;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Master Pattern Overlay - Custom Icons */
.hub-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/backgrounds/shopping-pattern.png');
    background-size: 400px;
    /* Dramatic large-scale icon motifs */
    background-repeat: repeat;
    opacity: 0.15;
    /* Perfect sweet spot for visibility */
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

/* Master Overlay Tint & Vignette */
.hub-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, var(--primary-500) 0%, var(--primary-900) 100%);
    opacity: 0.85;
    /* Deeper navy contrast */
    z-index: 0;
}

@media (min-width: 769px) {
    .hub-hero {
        text-align: center;
    }
}





.hub-hero h1 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hub-hero p {
    font-size: 0.95rem;
    opacity: 0.85;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .hub-hero {
        padding: 4rem 1rem 1.5rem;
        /* Compact mobile clearance */
    }

    .hub-hero h1 {
        font-size: 1.45rem !important;
        /* Force smaller size on mobile */
    }

    .hub-hero p {
        font-size: 0.825rem !important;
        padding: 0 0.5rem;
    }
}





.hub-hero-flag {
    font-size: 5rem;
    margin-bottom: 2rem;
    display: inline-block;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.hub-stats-row {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 3rem;
}

.hub-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hub-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-400);
}

.hub-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.featured-stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-bottom: 6rem;
}

.store-card-premium {
    background: transparent;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    position: relative;
    gap: 0.5rem;
    animation: card-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.store-card-premium:nth-child(1) {
    animation-delay: 0.05s;
}

.store-card-premium:nth-child(2) {
    animation-delay: 0.1s;
}

.store-card-premium:nth-child(3) {
    animation-delay: 0.15s;
}

.store-card-premium:nth-child(4) {
    animation-delay: 0.2s;
}

.store-card-premium:nth-child(5) {
    animation-delay: 0.25s;
}

.store-card-premium:nth-child(6) {
    animation-delay: 0.3s;
}

.store-card-premium:nth-child(7) {
    animation-delay: 0.35s;
}

.store-card-premium:nth-child(8) {
    animation-delay: 0.4s;
}


.store-card-premium:hover {
    transform: translateY(-8px);
    border-color: var(--primary-400);
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.08);
}

.store-card-logo-box {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    /* App icon curvature */
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Slight outer ring */
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 0.85rem;
    position: relative;
    overflow: visible;
    /* Allow badge to overflow */
}

.store-card-logo-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.15));
    /* High quality glass reflect */
    pointer-events: none;
    border-radius: inherit;
    /* Matches parent squircle */
}

.store-card-premium:hover .store-card-logo-box {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.store-card-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.coupon-title {
    font-size: 1.15rem;
    font-weight: 850;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

.coupon-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 4px;
}

.coupon-content-side {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.store-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-900);
    line-height: 1.3;
    text-align: center;
    overflow-wrap: break-word;
    /* Better wrapping than break-all */
    text-transform: capitalize;
}

.store-coupon-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF3B30;
    /* iOS Red */
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 24px;
    height: 24px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

[dir="rtl"] .store-coupon-badge {
    right: auto;
    left: -8px;
}

/* FAQ Section */
.faq-grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Tighter vertical density */
}

.faq-details {
    background: white;
    border-radius: 10px !important;
    /* Sharper, technical corners */
    border: 1px solid var(--surface-200);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.faq-details:hover {
    border-color: var(--surface-200);
    /* Fallback to default border color */
}

.faq-details[open] {
    box-shadow: var(--shadow-lg);
}

.faq-summary {
    padding: 1.15rem 1.5rem;
    /* Reduced from 1.5rem */
    font-size: 1.1rem;
    /* Slightly smaller for density */
    font-weight: 700;
    color: var(--primary-900);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    /* Hide default arrow */
    user-select: none;
    transition: background 0.2s ease;
}

.faq-summary svg {
    width: 20px;
    height: 20px;
    opacity: 0.4;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-details[open] .faq-summary svg {
    opacity: 0.8;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.faq-details.is-active .faq-content-wrapper {
    grid-template-rows: 1fr;
}

.faq-content {
    overflow: hidden;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    transition: padding 0.4s ease;
}

.faq-details.is-active .faq-content {
    padding-top: 0.25rem;
    padding-bottom: 1.25rem;
    border-top: 1px solid var(--surface-100);
}

.faq-details[open] .faq-summary svg {
    opacity: 0.4;
}

.faq-details.is-active .faq-summary svg {
    opacity: 0.8;
}

/* FAQ Expand Functionality */
.faq-expand-container {
    position: relative;
    margin-bottom: 2rem;
}

.faq-expand-container:not(.is-expanded) .faq-details:nth-child(n+4) {
    display: none;
}

.faq-fade-overlay {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.98) 85%, #ffffff 100%);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.4s ease, transform 0.3s ease;
    opacity: 1;
}

.faq-expand-container.is-expanded .faq-fade-overlay {
    opacity: 0;
    transform: translateY(20px);
}

.faq-show-more-btn {
    background: white;
    border: 1px solid var(--primary-100);
    padding: 0.7rem 1.75rem;
    border-radius: 40px;
    color: var(--primary-600);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Outfit', sans-serif;
    position: relative;
    z-index: 10;
}

.faq-show-more-btn:hover {
    background: var(--primary-50);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.18);
    border-color: var(--primary-200);
}

.faq-show-more-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-expand-container.is-expanded+.btn-container-elegant .faq-show-more-btn svg {
    transform: rotate(180deg);
}

.btn-container-elegant {
    transition: margin-top 0.4s ease;
}

.faq-expand-container.is-expanded+.btn-container-elegant {
    margin-top: 1rem !important;
}

/* Trust Badges Styles */
.trust-badges-premium {
    padding: 2rem;
    background: var(--surface-50);
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid var(--surface-100);
}

.trust-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.trust-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.trust-badge-icon {
    width: 44px;
    height: 44px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    border: 1px solid var(--surface-200);
    transition: all 0.3s ease;
}

.trust-badge-item:hover .trust-badge-icon {
    transform: translateY(-4px) scale(1.05);
    border-color: var(--primary-200);
    color: var(--primary-700);
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.15);
}

.trust-badge-icon svg {
    width: 24px;
    height: 24px;
}

.trust-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.trust-label {
    font-weight: 800;
    color: var(--primary-900);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
}

[dir="rtl"] .trust-label {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.05rem;
}

.trust-sub {
    font-size: 0.8rem;
    color: var(--surface-600);
    line-height: 1.4;
    max-width: 200px;
}

@media (max-width: 768px) {
    .trust-badges-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Ultra-Premium Hub Enhancements */
/* Expandable Hub Search */
.expandable-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 20;
    flex-shrink: 0;
}

.search-trigger-btn {
    cursor: pointer;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 0.4rem 0.8rem !important;
    border-color: var(--surface-200);
}

.search-btn-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-600);
}

.hub-search-input-elegant {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    transition: all 0.4s ease;
    font-size: 1rem;
    pointer-events: none;
    color: #1a1a1a !important;
    /* Force visible dark color */
    visibility: hidden;
}


.expandable-search-wrapper.is-expanded {
    background: white;
    border: 1px solid var(--surface-200);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    padding-right: 2rem;
    padding-left: 0.25rem;
}

[dir="rtl"] .expandable-search-wrapper.is-expanded {
    padding-right: 0.25rem;
    padding-left: 2rem;
}

.expandable-search-wrapper.is-expanded .hub-search-input-elegant {
    width: 220px;
    opacity: 1;
    padding: 0.4rem 0.75rem;
    pointer-events: auto;
    visibility: visible;
}

.expandable-search-wrapper.is-expanded .search-trigger-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    pointer-events: none;
}

.search-close-btn {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[dir="rtl"] .search-close-btn {
    right: auto;
    left: 0.6rem;
}

.expandable-search-wrapper.is-expanded .search-close-btn {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 640px) {
    .expandable-search-wrapper.is-expanded .hub-search-input-elegant {
        width: 160px;
    }
}

/* Category Scroll Sandbox */
.category-scroll-container {
    overflow: hidden;
    /* Use calc to perfectly offset the container padding */
    margin-left: calc(var(--space-6) * -1);
    margin-right: calc(var(--space-6) * -1);
    padding: 0 var(--space-6);
}

@media (max-width: 480px) {
    .category-scroll-container {
        margin-left: calc(var(--space-4) * -1);
        margin-right: calc(var(--space-4) * -1);
        padding: 0 var(--space-4);
    }
}

/* Category Pills - iOS Style Horizontal Scroll */
.category-pills-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 1.5rem 0 1.25rem;
    /* Remove horizontal padding here, handled by row logic */
    gap: 0.75rem;
    margin-top: 0.25rem;
    margin-bottom: 0px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(to right,
            black 88%,
            transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
            black 88%,
            transparent 100%);
}

/* On desktop, keep some inner breathing room if width allows */
@media (min-width: 769px) {
    .category-pills-row {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

[dir="rtl"] .category-pills-row {
    mask-image: linear-gradient(to left,
            black 88%,
            transparent 100%);
    -webkit-mask-image: linear-gradient(to left,
            black 88%,
            transparent 100%);
}

.category-pills-row::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.category-pill-premium {
    flex-shrink: 0;
    /* Don't squash pills */
    padding: 0.4rem 1.1rem;
    /* Reduced vertical padding */
    background: white;
    border: 1px solid var(--surface-200);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    /* Slightly smaller font to match */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: card-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.category-pill-premium.is-active {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.category-pill-premium:nth-child(1) {
    animation-delay: 0.05s;
}

.category-pill-premium:nth-child(2) {
    animation-delay: 0.1s;
}

.category-pill-premium:nth-child(3) {
    animation-delay: 0.15s;
}

.category-pill-premium:nth-child(4) {
    animation-delay: 0.2s;
}

.category-pill-premium:nth-child(5) {
    animation-delay: 0.25s;
}

.category-pill-premium:nth-child(6) {
    animation-delay: 0.3s;
}


.category-pill-premium:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
    color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Recent Activity Ticker */
.recent-activity-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    border: 1px solid var(--surface-200);
    animation: toastSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.activity-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
}

.activity-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid #10b981;
    border-radius: 50%;
}

@keyframes pulsePing {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .recent-activity-toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-100);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--surface-400);
}

/* ========================================
   SIDEBAR LAYOUT (For Inner Pages)
======================================== */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
    align-items: start;
}

.sidebar-filters {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: var(--space-6);
    border: 1px solid var(--surface-200);
}

.sidebar-filters .filter-group {
    margin-bottom: var(--space-6);
}

.sidebar-filters .filter-group:last-child {
    margin-bottom: 0;
}

.sidebar-filters label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.sidebar-filters select,
.sidebar-filters input {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--surface-300);
    border-radius: var(--radius-lg);
    background-color: var(--surface-50);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.sidebar-filters select:focus,
.sidebar-filters input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

@media (max-width: 1024px) {
    .page-with-sidebar {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .sidebar-filters {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-4);
    }

    .sidebar-filters .filter-group {
        margin-bottom: 0;
    }
}

.store-logo-wrapper {
    position: relative;
    display: inline-flex;
}

.store-logo-bg {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--store-logo-bg, var(--primary-50));
    border: 1px solid var(--surface-200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-base);
    overflow: hidden;
}

.store-logo-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15%;
}

.store-logo-bg-inline {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
}

.store-logo-bg-lg {
    width: 90px;
    /* Match country landing card icon size */
    height: 90px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.country-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: white;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 15px;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    border: 1px solid var(--surface-200);
}

.country-badge-sm {
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    font-size: 11px;
}

.store-logo-bg-lg+.country-badge {
    top: -6px;
    right: -6px;
    width: 32px;
    height: 32px;
    font-size: 20px;
}

/* ========================================
   MARQUEE & COMPONENT STYLES
   (Moved from Index)
======================================== */
.stores-marquee-wrapper {
    overflow: hidden;
    position: relative;
    padding: 0.5rem 0;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.stores-marquee-wrapper-second {
    margin-top: 0.85rem;
}

.stores-marquee-wrapper-third {
    margin-top: 1.6rem;
    mask-image: none;
    -webkit-mask-image: none;
}

.stores-marquee {
    display: flex;
    align-items: center;
    width: max-content;
    will-change: transform;
}

.stores-marquee-forward {
    animation: stores-marquee-forward 80s linear infinite;
}

.stores-marquee-reverse {
    animation: stores-marquee-reverse 90s linear infinite;
}

.stores-marquee-diagonal {
    animation: stores-marquee-diagonal 100s linear infinite;
}

.stores-marquee-wrapper:hover .stores-marquee {
    animation-play-state: paused;
}

.store-logo-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--surface-200);
    box-shadow: var(--shadow-xs);
    margin-inline-end: 0.75rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.store-logo-chip:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.store-logo-chip-bg {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.store-logo-chip-bg img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

@keyframes stores-marquee-forward {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes stores-marquee-reverse {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes stores-marquee-diagonal {
    from {
        transform: translateX(0) translateY(-10px);
    }

    to {
        transform: translateX(-50%) translateY(10px);
    }
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.about-section h2 {
    border-bottom: 2px solid var(--primary-50);
}


/* Sticky Breadcrumb Wrapper */
.breadcrumb-sticky-wrapper {
    position: sticky;
    top: var(--header-height);
    z-index: 1500;
    background: linear-gradient(90deg, #f1f5f9 0%, #ffffff 50%, #f1f5f9 100%);
    /* Luminous Metallic Silver */
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    /* Near-invisible seam */
    box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
    /* Architectural Floating Glow */
    margin: 0 !important;
    width: 100%;
}

/* High Contrast Text for Silver Surface */
.premium-breadcrumb a,
.breadcrumb-sticky-wrapper .premium-breadcrumb {
    margin-bottom: 0 !important;
    /* Flush scroll experience */
    border-top: none;
    /* Cleaner sticky look */
}

.breadcrumb-sticky-wrapper .premium-breadcrumb a {
    color: #475569 !important;
    /* High-contrast slate grey */
    text-decoration: none;
    transition: var(--transition-base);
}

.premium-breadcrumb .current,
.breadcrumb-sticky-wrapper .premium-breadcrumb .current {
    color: var(--primary-900) !important;
    /* Powerful Brand Blue */
    font-weight: 700;
}

.premium-breadcrumb .separator,
.breadcrumb-sticky-wrapper .premium-breadcrumb .separator {
    color: #94a3b8 !important;
    /* Silver-tone separator */
    opacity: 0.8;
}

.is-root-page .breadcrumb-sticky-wrapper {
    display: none;
}

/* Base Styles (non-sticky parts) */
.premium-breadcrumb {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.45rem var(--container-padding, 1.5rem) !important;
    /* Slimmer, sleeker bar */
    background: linear-gradient(90deg, #f1f5f9 0%, #ffffff 50%, #f1f5f9 100%);
    /* Luminous Metallic Silver Bar */
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
    /* Floating Glow Shadow */
    list-style: none !important;
    font-size: 0.825rem;
    font-weight: 600;
    flex-wrap: wrap;
    margin: 0 0 2rem 0 !important;
    width: 100vw;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    border-radius: 0;
}

.is-store-page .premium-breadcrumb {
    padding-bottom: 0 !important;
}

.premium-breadcrumb li {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

.premium-breadcrumb li::before {
    display: none !important;
}

::view-transition-group(root) {
    animation-duration: 0.4s;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-timing-function: var(--transition-ios);
}

/* Specific shared element timing */
::view-transition-group(*) {
    animation-duration: 0.5s;
    animation-timing-function: var(--transition-ios);
}

.premium-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    white-space: nowrap;
}

.premium-breadcrumb a:hover {
    color: var(--primary-600);
}

.premium-breadcrumb .separator {
    color: var(--surface-400);
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.premium-breadcrumb .current {
    color: var(--primary-900);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

[dir="rtl"] .premium-breadcrumb .separator svg {
    transform: rotate(180deg);
}

/* ========================================
   PREMIUM TRUST BADGES
   (One Row Design)
   ======================================== */
.trust-badges-row-premium {
    margin: 3.5rem calc(-50vw + 50%) 4rem;
    /* Full-width breakout */
    width: 100vw;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
    /* Stronger Metallic Silver */
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    color: var(--primary-900);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.08);
    /* Architectural elevation */
}

.trust-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    animation: card-entrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.trust-badge-item:nth-child(1) {
    animation-delay: 0.1s;
}

.trust-badge-item:nth-child(2) {
    animation-delay: 0.2s;
}

.trust-badge-item:nth-child(3) {
    animation-delay: 0.3s;
}


.trust-badge-icon {
    width: 52px;
    height: 52px;
    background: rgba(30, 58, 138, 0.04);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    transition: all 0.3s ease;
    border: 1px solid rgba(30, 58, 138, 0.08);
}

.trust-badge-icon svg {
    width: 26px;
    height: 26px;
}

.trust-badge-item:hover .trust-badge-icon {
    background: rgba(30, 58, 138, 0.04);
    /* Subtle non-animated background change */
}

.trust-badge-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--primary-900);
    letter-spacing: -0.01em;
}

.trust-badge-content p {
    font-size: 0.875rem;
    color: #475569;
    /* Balanced Slate */
    line-height: 1.5;
    max-width: 240px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .trust-badges-row-premium {
        padding: 1.5rem 0.5rem;
        gap: 0.5rem;
        margin-top: 2rem;
        margin-bottom: 2.5rem;
    }

    .trust-badge-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        margin-bottom: 0.25rem;
    }

    .trust-badge-icon svg {
        width: 20px;
        height: 20px;
    }

    .trust-badge-content h3 {
        font-size: 0.825rem;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .trust-badge-content p {
        font-size: 0.725rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ========================================
   UNIFIED BLUE-SILVER TRUST BLOCK
   ======================================== */
.trust-section-header-premium {
    margin: 4.5rem calc(-50vw + 50%) 0;
    /* Breakout top, flush bottom */
    width: 100vw;
    background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
    /* Silk Silver Gradient */
    padding: 2.25rem 1.5rem 1.75rem;
    text-align: center;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.9);
}

.trust-section-header-premium .section-title {
    margin-bottom: 0 !important;
    font-size: 1.6rem !important;
    letter-spacing: -0.01em;
    color: var(--primary-900) !important;
}

/* Adjust Ribbon to sit flush with header */
.trust-badges-row-premium {
    margin-top: 0 !important;
    /* Touch header */
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-top: 1.75rem !important;
    box-shadow: 0 15px 30px -15px rgba(15, 23, 42, 0.12);
}

@media (max-width: 768px) {
    .trust-section-header-premium {
        padding: 1.5rem 1rem 1.25rem;
        margin-top: 3rem;
    }

    .trust-section-header-premium .section-title {
        font-size: 1.15rem !important;
    }
}

/* ========================================
   INTEGRATED INDIGO-CAPPED TRUST SLAB
   ======================================== */
.trust-badges-row-premium {
    margin: 2rem calc(-50vw + 50%) 2rem !important;
    width: 100vw !important;
    padding: 3rem 1.5rem 2.5rem !important;
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
    /* Silk Highlight instead of bold border */
    border-bottom: 1px solid rgba(15, 23, 42, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2.5rem !important;
    box-shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.1) !important;
}

.trust-block-header {
    text-align: center;
}

.trust-block-header .section-title {
    font-size: 1.75rem !important;
    color: var(--primary-900) !important;
    margin-bottom: 0 !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

.trust-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
}

@media (max-width: 768px) {
    .trust-badges-row-premium {
        padding: 2rem 1rem !important;
        gap: 1.5rem !important;
        margin: 1.5rem calc(-50vw + 50%) 1.5rem !important;
    }

    .trust-block-header .section-title {
        font-size: 1.25rem !important;
    }

    .trust-badges-grid {
        gap: 0.5rem;
    }
}

/* ========================================
   LUMINOUS GRADIENT SEAM
   ======================================== */
.trust-badges-row-premium {
    border-top: none !important;
    /* Managed by pseudo-element below */
}

.trust-badges-row-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            var(--primary-500) 50%,
            rgba(255, 255, 255, 0) 100%);
    opacity: 0.6;
    z-index: 3;
}

/* ========================================
   REFINED GHOST-GLOW GRADIENT
   ======================================== */
.trust-badges-row-premium::before {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(37, 99, 235, 0.25) 50%,
            rgba(255, 255, 255, 0) 100%) !important;
    opacity: 1 !important;
    /* Full control via rgba */
}

/* ========================================
   PREMIUM INTERACTIVE ABOUT SECTION
   ======================================== */
.about-section-premium {
    background: white;
    border-radius: var(--radius-3xl);
    border: 1px solid var(--surface-200);
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: 0 4px 20px -5px rgba(15, 23, 42, 0.05);
    position: relative;
    max-width: 1000px;
    margin-inline: auto;
}

.about-card-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.about-card-header .section-title {
    font-size: 1.75rem !important;
    font-weight: 800;
    color: var(--primary-900);
}

.about-content-container {
    position: relative;
    max-height: 160px;
    /* Reduced vertical space for 5-6 lines */
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-text-rich {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.about-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.about-read-more-btn {
    margin: 2rem auto 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-100);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-read-more-btn:hover {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.about-read-more-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.4s ease;
}

@media (max-width: 768px) {
    .about-section-premium {
        padding: 2rem 1.25rem;
        margin-bottom: 3rem;
    }

    .about-card-header .section-title {
        font-size: 1.4rem !important;
    }

    .about-text-rich {
        font-size: 0.95rem;
    }
}

/* ========================================
   DESKTOP DEFAULT: SHOW FULL ABOUT CONTENT
   ======================================== */
.about-content-container {
    max-height: none !important;
    overflow: visible !important;
}

.about-fade-overlay {
    display: none !important;
}

.about-read-more-btn {
    display: none !important;
}

/* ========================================
   MOBILE ONLY: TRUNCATED ABOUT CONTENT
   ======================================== */
@media (max-width: 768px) {
    .about-content-container {
        max-height: 160px !important;
        /* Back to 5-6 lines */
        overflow: hidden !important;
    }

    .about-content-container.is-expanded {
        max-height: none !important;
        /* Let JS handle it or set a very large value */
    }

    .about-fade-overlay {
        display: block !important;
    }

    .about-read-more-btn {
        display: flex !important;
    }
}

/* ========================================
   FULL-WIDTH ABOUT SECTION
   ======================================== */
.about-section-premium {
    margin: 4rem calc(-50vw + 50%) !important;
    width: 100vw !important;
    max-width: none !important;
    border-radius: 0 !important;
    padding: 4.5rem 1.5rem !important;
    background: #f8fafc !important;
    /* Luminous Silver Silk Tint */
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid rgba(15, 23, 42, 0.05) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05) !important;
}

.about-card-header,
.about-content-container,
.about-read-more-btn {
    max-width: 1000px;
    margin-inline: auto;
}

/* Ensure fade overlay matches the new background */
.about-fade-overlay {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0), rgba(248, 250, 252, 1)) !important;
}

/* ========================================
   INLINE "SHOW MORE" LINK GHOST
   ======================================== */
.about-read-more-btn {
    display: none !important;
    /* Hidden on Desktop by default */
    font-family: inherit !important;
    /* Inherit brand typography (Inter/Tajawal) */
    margin: 0 !important;
    padding: 0 0.5rem !important;
    background: transparent !important;
    border: none !important;
    color: var(--primary-600) !important;
    text-decoration: none !important;
    /* Cleanup for minimalist look */
    font-size: inherit !important;
    vertical-align: baseline !important;
    box-shadow: none !important;
    transform: none !important;
}

.about-read-more-btn:hover {
    color: var(--primary-800) !important;
    background: transparent !important;
}

.about-read-more-btn svg {
    display: none !important;
    /* Remove icon for true inline feel */
}

/* Position it at the end of the truncated box's baseline */
@media (max-width: 768px) {
    .about-section-premium {
        display: block !important;
    }

    .about-read-more-btn {
        position: relative !important;
        margin-top: 0.5rem !important;
        /* Very close to text */
    }
}

/* ========================================
   ELLIPSIS-CLIPPED ABOUT CONTENT
   ======================================== */
.about-content-container {
    mask-image: none !important;
    /* Remove fade */
    overflow: hidden !important;
}

.about-fade-overlay {
    display: none !important;
    /* Explicitly remove gradient as requested */
}

@media (max-width: 768px) {
    .about-content-container {
        position: relative !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 5 !important;
        line-clamp: 5 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .about-text-rich p {
        display: inline !important;
    }

    .about-content-container.is-expanded {
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        padding-bottom: 2.5rem !important;
        /* Space for the absolute button at the end */
    }

    .about-read-more-btn {
        display: inline-flex !important;
        position: absolute !important;
        bottom: 2px !important;
        inset-inline-end: 0px !important;
        background: #f8fafc !important;
        padding: 0 0.5rem !important;
        margin: 0 !important;
        z-index: 10 !important;
        line-height: inherit !important;
        font-weight: 800 !important;
        vertical-align: baseline !important;
        box-shadow: -12px 0 10px #f8fafc !important;
    }

    [dir="rtl"] .about-read-more-btn {
        box-shadow: 12px 0 10px #f8fafc !important;
    }
}

/* ========================================
   DYNAMIC STICKY CONTEXT HUB
   ======================================== */
.logo-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sticky-context-hub {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: absolute;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

[dir="rtl"] .sticky-context-hub {
    left: auto;
    right: 0;
}

.sticky-hub-logo-wrap {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sticky-hub-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sticky-hub-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.sticky-hub-title {
    color: white;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

/* Sticky Logic Restored: Header keeps its primary identity */
@media (max-width: 768px) {
    .sticky-hub-title {
        font-size: 0.9rem;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ========================================
   SECONDARY STICKY HERO STRIP
   ======================================== */
.sticky-hero-strip {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    min-height: 48px;
    height: auto;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* More refined elevation */
    border-bottom: 1px solid var(--surface-100);
    z-index: 999;
    /* Just beneath the site-header (1000) */
    transform: translateY(-20px);
    /* Smaller transition for smoothness */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    visibility: hidden;
    padding: 0.25rem 0;
}

.sticky-hero-strip.is-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.sticky-strip-content {
    min-height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-strip-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sticky-strip-logo-box {
    width: 28px;
    height: 28px;
    background: white;
    border: 1px solid var(--surface-100);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.sticky-strip-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sticky-strip-flag {
    font-size: 1.25rem;
}

.sticky-strip-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary-900);
}

.sticky-strip-badge {
    background: var(--surface-100);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

@media (max-width: 768px) {
    .sticky-hero-strip {
        top: 64px;
        /* Matches mobile header */
        height: 44px;
    }

    .sticky-strip-content {
        height: 44px;
    }

    .sticky-strip-title {
        font-size: 0.85rem;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .sticky-strip-badge {
        display: none;
    }
}

/* ========================================
   UNIFIED HERO HUB (SCROLLED STATE)
   ======================================== */

.sticky-hero-strip.is-active {
    background-color: var(--hero-brand-color, var(--primary-700)) !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15) !important;
}

.sticky-hero-strip.is-active .sticky-strip-title {
    color: white !important;
}

/* Refined Ribbon Structure for Unified Hub */
.sticky-hero-strip {
    /* Clearer transition to the same brand background */
    border-top: none !important;
}

.sticky-strip-logo-box {
    /* Keep logo box professional even on brand backgrounds */
    border: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}



/* ========================================
   OTHER STORES - HORIZONTAL SCROLL
   ======================================== */
.other-stores-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 1rem 0.5rem 2rem;
    margin: 0 -0.5rem;
    /* Bleed to edges */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide for clean aesthetic */
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

[dir="rtl"] .other-stores-scroll {
    mask-image: linear-gradient(to left, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 85%, transparent 100%);
}

.other-stores-scroll::-webkit-scrollbar {
    display: none;
}

.other-stores-scroll .scroll-item {
    flex: 0 0 80px;
    /* High density fixed width */
    text-align: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.other-stores-scroll .store-card-logo-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    padding: 10px;
}

.other-stores-scroll .store-card-name {
    font-size: 0.85rem !important;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin-top: 0.25rem;
}

.other-stores-scroll .store-coupon-badge {
    right: -4px;
    top: -4px;
    left: auto;
}

[dir="rtl"] .other-stores-scroll .store-coupon-badge {
    right: auto;
    left: -4px;
}

/* iOS Style Toast */
.ios-toast {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast-content {
    background: rgba(40, 40, 40, 0.85);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 1px rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-content svg {
    color: #34C759;
    /* iOS Success Green */
}

/* Party Confetti */
.party-confetti {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    /* Behind the toast (10000) */
    border-radius: 2px;
}

/* Discovery Pattern Background */
.coupon-card-back::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.07;
    /* Extremely subtle texture */
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='20' y='30' font-family='Arial' font-size='24' fill='none' stroke='%23000' stroke-width='1.2' opacity='0.7' transform='rotate(-15 20 30)'%3E%25%3C/text%3E%3Ctext x='80' y='40' font-family='Arial' font-size='16' fill='none' stroke='%23000' stroke-width='0.8' opacity='0.5' transform='rotate(20 80 40)'%3E%25%3C/text%3E%3Ctext x='20' y='75' font-family='Arial' font-size='18' fill='none' stroke='%23000' stroke-width='1' opacity='0.6' transform='rotate(10 20 75)'%3E%25%3C/text%3E%3Ctext x='40' y='95' font-family='Arial' font-size='26' fill='none' stroke='%23000' stroke-width='1.3' opacity='0.9' transform='rotate(10 40 95)'%3E%25%3C/text%3E%3Ctext x='85' y='85' font-family='Arial' font-size='22' fill='none' stroke='%23000' stroke-width='1.1' opacity='0.7' transform='rotate(-15 85 85)'%3E%25%3C/text%3E%3Ctext x='95' y='110' font-family='Arial' font-size='20' fill='none' stroke='%23000' stroke-width='1' opacity='0.6' transform='rotate(-25 95 110)'%3E%25%3C/text%3E%3C/svg%3E");
    background-size: 110px 110px;
}

.coupon-details-wrapper,
.coupon-offer-side {
    z-index: 1;
    /* Place above the pattern */
    position: relative;
}

.back-content {
    z-index: 1;
    /* Place above the pattern */
    position: relative;
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Silver Shimmer Animation */
.code-placeholder {
    position: relative;
    overflow: hidden;
}

.code-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.6),
            transparent);
    transform: skewX(-25deg);
    animation: shimmer-silver 3.5s infinite ease-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes shimmer-silver {
    0% {
        left: -100%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

/* Verified Status Badge & Pulse Animation */
.verified-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(52, 199, 89, 0.12);
    /* Subtle green wash */
    color: #228B22;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
    /* Tightened from 10px to save vertical space */
    border: 1px solid rgba(52, 199, 89, 0.2);
    pointer-events: none;
    align-self: flex-start;
}

.verified-pulse-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #34C759;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    position: relative;
}

.verified-pulse-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: ver-pulse-radar 2s infinite ease-out;
    z-index: -1;
}

@keyframes ver-pulse-radar {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.verified-text {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Staggered Card Entrance Animation */
@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.coupon-card {
    opacity: 0;
    /* Base state to allow stagger in JS */
}

/* Dynamic Ribbon Shine (Glint) */
.coupon-offer-side::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg,
            transparent 45%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 55%);
    animation: ribbon-glint 12s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes ribbon-glint {
    0% {
        transform: translate(-100%, -100%) rotate(0deg);
    }

    8% {
        transform: translate(100%, 100%) rotate(0deg);
    }

    100% {
        transform: translate(100%, 100%) rotate(0deg);
    }
}

/* Adaptive Depth Shadow & Lift */
@media (min-width: 1024px) {
    .coupon-card {
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .coupon-card:hover {
        transform: translateY(-8px) scale(1.01);
        z-index: 100;
    }

    .coupon-card:hover .coupon-card-inner {
        box-shadow:
            0 20px 40px -15px rgba(0, 0, 0, 0.3),
            0 10px 20px -12px rgba(0, 0, 0, 0.15);
    }
}

/* PWA Install Modal */
.pwa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.pwa-modal-content {
    background: white;
    width: 100%;
    max-width: 420px;
    border-radius: 28px;
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--surface-200);
    position: relative;
}

.pwa-modal-dismiss {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--surface-100);
    border: 1px solid var(--surface-200);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

[dir="rtl"] .pwa-modal-dismiss {
    right: auto;
    left: 1.25rem;
}

.pwa-modal-dismiss:hover {
    background: var(--surface-200);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.pwa-modal-dismiss svg {
    width: 18px;
    height: 18px;
}

.pwa-modal-overlay.is-visible .pwa-modal-content {
    transform: translateY(0) scale(1);
}

.pwa-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.pwa-app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 2px;
}

.pwa-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-app-info h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-900);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.pwa-app-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pwa-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pwa-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.pwa-btn-primary {
    background: var(--primary-600);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25);
}

.pwa-btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -5px rgba(37, 99, 235, 0.3);
}

.pwa-btn-secondary {
    background: var(--surface-100);
    color: var(--text-secondary);
}

.pwa-btn-secondary:hover {
    background: var(--surface-200);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .pwa-modal-content {
        padding: 1.75rem 1.5rem;
        border-radius: 24px;
    }

    .pwa-app-icon {
        width: 70px;
        height: 70px;
    }

    .pwa-app-info h3 {
        font-size: 1.2rem;
    }
}

/* ========================================
   PAGE LOADER & SPLASH SCREEN
======================================== */
.page-loader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

/* 1. Full Splash Style (First visit) */
.page-loader.is-splash {
    background: #0f172a;
}

/* 2. Simple Navigation Style (Subsequent visits) */
.page-loader.is-nav-loader {
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-loader.hide-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-logo-pulse {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    -webkit-mask: url(/images/99coupon-logo.svg) no-repeat center;
    mask: url(/images/99coupon-logo.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    animation: loader-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(37, 99, 235, 0.4));
}

.is-nav-loader .loader-logo-pulse {
    width: 70px;
    /* Smaller, subtler for navigations */
    height: 70px;
}

.loader-progress {
    width: 140px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
}

.is-nav-loader .loader-progress {
    width: 100px;
}

.loader-progress-bar {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transform: translateX(-100%);
    animation: loader-progress 3s ease-in-out infinite;
}

@keyframes loader-pulse {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes loader-progress {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Removed visibility overrides to fix click issues */

.loader-brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.page-loader.is-splash .loader-brand-container {
    opacity: 1;
    transform: translateY(0);
}

.is-nav-loader .loader-brand-container {
    display: none;
    /* Hide brand for simple nav loaders */
}

.loader-brand-name {
    font-size: 2.25rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.03em;
    display: flex;
    align-items: baseline;
    gap: 0.12em;
}

.loader-brand-name .logo-suffix {
    font-size: 0.5em;
    opacity: 0.8;
}

.loader-domain {
    font-size: 1.5rem;
    text-transform: uppercase;
    color: white;
    opacity: 0.9;
    font-weight: 800;
    /* Less heavy than 900 for cleaner reading */
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 0.7em;
    /* Even wider spacing for easier memorization */
    direction: ltr !important;
    font-family: 'Inter', sans-serif;
}

.is-splash .loader-domain span {
    display: inline-block;
    opacity: 0;
    transform: translateY(5px);
    animation: loader-letter-reveal 0.4s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loader-letter-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .loader-brand-name {
        font-size: 1.75rem;
    }

    .loader-domain {
        font-size: 1.15rem;
        gap: 0.4em;
    }
}

/* ========================================
   DYNAMIC WALLET ANIMATIONS
======================================== */
.wallet-badge {
    --badge-scale: 1;
}

@keyframes badge-flash {
    0% { 
        transform: scale(var(--badge-scale)); 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); 
    }
    50% { 
        transform: scale(calc(var(--badge-scale) * 1.4)); 
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); 
        background: #22c55e; 
        color: white; 
    }
    100% { 
        transform: scale(var(--badge-scale)); 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); 
    }
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px) scale(1.15); color: #22c55e; }
}

.badge-flash {
    animation: badge-flash 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.icon-flash > svg {
    animation: icon-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}