/* V2 - تصميم جديد كامل */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.1);
    --color-primary: var(--primary);
    --color-primary-hover: var(--primary-hover);
    --color-primary-light: var(--primary-light);
    --color-primary-ultra-light: rgba(37, 99, 235, 0.08);
    --green: #22c55e;
    --green-hover: #16a34a;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --surface: #ffffff;
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --shadow: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,.08), 0 2px 6px -2px rgba(0,0,0,.06);
    --font-ar: 'Vazirmatn', sans-serif;
    --font-en: 'Inter', sans-serif;
}
[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-hover: #7dd3fc;
    --primary-light: rgba(56, 189, 248, 0.12);
    --color-primary: var(--primary);
    --color-primary-hover: var(--primary-hover);
    --color-primary-light: var(--primary-light);
    --color-primary-ultra-light: rgba(56, 189, 248, 0.12);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --bg: #0f172a;
    --surface: #1e293b;
    --shadow: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 24px -4px rgba(0,0,0,.4), 0 2px 8px -2px rgba(0,0,0,.25);
}
html { color-scheme: light; scroll-behavior: smooth; }
[data-theme="dark"] { color-scheme: dark; }
body { transition: background-color 0.35s ease, color 0.25s ease; }
header, .catalog-card, .country-btn, .mobile-drawer { transition: background-color 0.35s ease, border-color 0.25s ease, box-shadow 0.35s ease; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-ar);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
[data-theme="dark"] body { background: linear-gradient(180deg, #0f172a 0%, #0c1222 100%); }
.container { width: 90%; max-width: 1320px; margin-inline: auto; padding-inline: 1rem; }
@media (max-width: 480px) { .container { width: 94%; padding-inline: 0.75rem; } }

/* Header */
header {
    background: var(--surface);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0);
}
.header-top { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.header-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.search-form { flex: 1; min-width: 200px; max-width: 420px; }
.search-wrap { display: flex; border: 1px solid var(--border); border-radius: 9999px; overflow: hidden; background: var(--bg); }
.search-input { flex: 1; border: none; padding: 0.5rem 1rem; font-size: 0.9rem; background: transparent; color: inherit; }
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { outline: none; }
.search-btn { background: var(--primary); color: #fff; border: none; padding: 0.5rem 1rem; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; transition: background 0.25s ease; }
.search-btn:hover { background: var(--primary-hover); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-search-btn { display: none; padding: 0.5rem; border: none; background: transparent; cursor: pointer; color: var(--text); }
.country-btn {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-size: 0.9rem;
    color: inherit;
    text-decoration: none;
}
.country-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.country-btn img { width: 1.25rem; height: 1.25rem; border-radius: 50%; object-fit: cover; }
.country-btn svg { width: 0.9rem; height: 0.9rem; color: var(--text-muted); flex-shrink: 0; }
.login-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}
.login-btn:hover { background: var(--primary-light); }
.auth-links { display: flex; align-items: center; gap: 0.5rem; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.logo:hover { color: var(--primary-hover); }
.nav-bar { padding: 0.5rem 0; }
.nav-bar ul { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; align-items: center; }
.nav-bar a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav-bar a:hover { color: var(--primary); }

/* Nav dropdown */
.nav-dropdown-wrap { position: relative; }
.nav-bar .guest-language-switcher,
.nav-bar .landing-language-switcher { margin-inline-start: auto; }
.nav-dropdown-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.75rem; border: none; background: none; cursor: pointer;
    color: var(--text); font-weight: 600; font-size: 0.95rem; font-family: inherit;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.nav-dropdown-btn:hover { 
    color: var(--primary); 
    background: var(--primary-light);
}
.nav-dropdown-btn svg { 
    transition: transform 0.3s ease; 
    flex-shrink: 0; 
    width: 16px; 
    height: 16px;
}
.nav-dropdown-wrap[aria-expanded="true"] .nav-dropdown-btn { 
    color: var(--primary); 
    background: var(--primary-light);
}
.nav-dropdown-wrap[aria-expanded="true"] .nav-dropdown-btn svg { transform: rotate(180deg); }
.nav-dropdown {
    position: absolute; top: calc(100% + 0.5rem); inset-inline-start: 0;
    width: max-content;
    min-width: 200px;
    max-width: 280px;
    background: var(--surface); 
    border: 1px solid var(--border);
    border-radius: var(--radius-md); 
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0; 
    list-style: none; 
    opacity: 0; 
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease; 
    z-index: 50; 
    max-height: 320px; 
    overflow-y: auto;
}
[dir="rtl"] .nav-dropdown { inset-inline-start: auto; inset-inline-end: 0; }
.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap[aria-expanded="true"] .nav-dropdown { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0);
}
.nav-dropdown li { 
    margin: 0;
    width: 100%;
    display: block;
}
.nav-dropdown a {
    display: block; 
    width: 100%;
    padding: 0.7rem 1.25rem;
    box-sizing: border-box; 
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text); 
    text-decoration: none; 
    white-space: normal;
    transition: all 0.2s ease;
    border-inline-start: 3px solid transparent;
}
.nav-dropdown a:hover { 
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
    color: var(--primary); 
    border-inline-start-color: var(--primary);
    padding-inline-start: 1.5rem;
}
.nav-dropdown a.language-dropdown-link-current {
    color: var(--primary);
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
    border-inline-start-color: var(--primary);
}
.nav-dropdown-all { 
    font-weight: 600; 
    border-bottom: 1px solid var(--border); 
    margin-bottom: 0.5rem; 
    padding-bottom: 0.75rem !important; 
}
.theme-toggle {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    color: var(--text-muted);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; color: #fbbf24; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav-mobile-btn { display: none; padding: 0.5rem; border: none; background: none; cursor: pointer; color: var(--text); }
@media (max-width: 768px) {
    .nav-bar { display: none; }
    .nav-mobile-btn { display: flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
    .header-top-inner .search-form { display: none !important; }
    .header-actions .auth-links { display: none !important; }
    .header-actions .country-btn .country-btn-text,
    .header-actions .country-btn .country-btn-lang { display: none !important; }
    .nav-search-btn { display: flex; align-items: center; justify-content: center; }
    .mobile-drawer-inner .search-form { display: block !important; width: 100%; max-width: none; }
}

/* Mobile drawer */
@media (min-width: 769px) { .mobile-drawer, .mobile-drawer-backdrop { display: none !important; } }
.mobile-drawer {
    position: fixed;
    top: 0; inset-inline-start: 0;
    width: 85%; max-width: 320px;
    height: 100%;
    background: var(--surface);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
    visibility: hidden;
    pointer-events: none;
}
[dir="rtl"] .mobile-drawer { transform: translateX(100%); inset-inline-start: auto; inset-inline-end: 0; }
.mobile-drawer.open { transform: translateX(0); visibility: visible; pointer-events: auto; }
[dir="rtl"] .mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.mobile-drawer-backdrop.open { opacity: 1; visibility: visible; }
.mobile-drawer-inner { padding: 1.25rem; padding-top: calc(1.25rem + env(safe-area-inset-top, 0)); }
.mobile-drawer a,
.mobile-drawer .mobile-drawer-link { display: block; width: 100%; padding: 0.75rem 1rem; text-decoration: none; color: var(--text); font-weight: 500; border-radius: var(--radius-sm); background: none; border: none; font-family: inherit; font-size: inherit; text-align: inherit; cursor: pointer; }
.mobile-drawer a:hover,
.mobile-drawer .mobile-drawer-link:hover { background: var(--primary-light); color: var(--primary); }
.mobile-drawer-divider { height: 1px; background: var(--border); margin: 0.75rem 0; }
.mobile-drawer-label {
    padding: 0 1rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.mobile-drawer-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.mobile-drawer-lang-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}
.mobile-drawer-lang-grid a:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.mobile-drawer-lang-grid a.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.mobile-drawer-user { display: block; padding: 0.75rem 1rem; color: var(--text-muted); font-size: 0.9rem; }
.mobile-drawer-dashboard { display: block; padding: 0.6rem 1rem; background: var(--primary); color: #fff; font-weight: 500; border-radius: var(--radius-sm); text-align: center; text-decoration: none; }
.mobile-drawer-dashboard:hover { background: var(--primary-dark); color: #fff; }
.mobile-drawer-form { margin: 0; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 50%, #60a5fa 100%);
    color: #fff;
    padding: 3rem 0;
}
[data-theme="dark"] .hero { background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 40%, #0284c7 100%); }
.hero .container { text-align: center; }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; }
.hero p { margin-top: 0.75rem; opacity: .95; }
.hero-cta-wrap { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.landing-cta {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem;
    background: #fff; color: var(--primary); font-weight: 600; font-size: 0.95rem;
    border-radius: var(--radius); text-decoration: none; transition: all 0.2s;
}
.landing-cta:hover { background: #f8fafc; }
.landing-cta.secondary { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.8); }
.landing-cta.secondary:hover { background: rgba(255,255,255,0.15); }

/* Section */
.section-title { font-size: 1.5rem; font-weight: 600; color: var(--text); margin-bottom: 1.25rem; }
.section-header .section-title { margin-bottom: 0; }
.section-title span { color: var(--primary); }
.section { padding: 2rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.section-link { color: var(--primary); font-weight: 500; text-decoration: none; }
.section-link:hover { text-decoration: underline; }

/* Steps */
.landing-steps { padding: 3rem 0; }
.landing-steps h2 { font-size: 1.5rem; font-weight: 600; text-align: center; margin-bottom: 2rem; color: var(--text); }
.steps-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; max-width: 48rem; margin-inline: auto; position: relative; }
.steps-row::before { content: ''; position: absolute; top: 2.25rem; inset-inline: 3rem; height: 2px; background: var(--primary); opacity: 0.2; }
@media (max-width: 768px) { .steps-row { flex-direction: column; align-items: center; } .steps-row::before { display: none; } }
.step-card { flex: 1; text-align: center; position: relative; z-index: 1; }
.step-icon {
    width: 4rem; height: 4rem; margin: 0 auto 1rem;
    background: var(--primary-light); border: 2px solid var(--primary); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; color: var(--primary);
}
.step-card p { font-weight: 600; font-size: 1rem; }

/* Countries */
.landing-countries { padding: 3rem 0; }
.countries-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1rem; }
.country-btn {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
    text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.9rem;
}
.country-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.country-btn img { width: 1.25rem; height: 1.25rem; border-radius: 50%; object-fit: cover; }

/* Catalogs grid */
.landing-catalogs, .home-catalogs { padding: 3rem 0; }
.catalogs-tabs { display: flex; gap: 0.5rem; }
.tab-btn {
    padding: 0.5rem 1rem; border: 1px solid var(--border); background: transparent;
    font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted);
}
.tab-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Filter select - فلتر اختيار يوفر المساحة */
.filter-select-wrap { flex-shrink: 0; min-width: 160px; }
.filter-select {
    min-width: 160px;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
[dir="rtl"] .filter-select {
    background-position: left 0.75rem center;
    padding: 0.5rem 1rem 0.5rem 2rem;
}
.filter-select:hover { border-color: var(--primary); }
.filter-select:focus { outline: none; border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.catalogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.catalog-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    position: relative;
    will-change: transform;
}
.catalog-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}
.catalog-card a.catalog-link { text-decoration: none; color: inherit; display: block; }
.catalog-img {
    aspect-ratio: 3/4; background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex; align-items: center; justify-content: center; color: var(--text-muted);
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .catalog-img { background: linear-gradient(145deg, #334155 0%, #1e293b 100%); }
.catalog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.catalog-card:hover .catalog-img img { transform: scale(1.06); }
.catalog-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.catalog-badge-time {
    background: rgba(34, 197, 94, 0.95);
    color: white;
}
.catalog-badge-expired {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}
.catalog-body { padding: 1rem; }
.catalog-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.5rem; }
.catalog-meta-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    flex-direction: row;
}
.catalog-store-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    margin-bottom: 0;
    border-radius: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    width: fit-content;
}
.catalog-store-icon:hover,
.catalog-store-icon:focus-visible {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.15);
}
.store-logo-small {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    object-fit: cover;
    background: white;
}
.store-logo-initial {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.store-name {
    font-weight: 500;
    color: var(--text);
}
.catalog-regions {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.catalog-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-inline-start: auto;
}
.views-meta { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.views-icon { width: 14px; height: 14px; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.v2-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.v2-breadcrumb-wrap { width: 100%; }
.v2-breadcrumb-bar { padding-top: 0.75rem; margin-bottom: 1rem; }
.v2-breadcrumb a { color: inherit; text-decoration: none; }
.v2-breadcrumb a:hover { color: var(--primary); }
.v2-breadcrumb-sep { opacity: 0.6; }
.v2-breadcrumb-current { color: var(--text); font-weight: 500; }
@media (max-width: 480px) {
    .catalogs-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .catalog-body { padding: 0.75rem; }
    .catalog-title { font-size: 0.9rem; }
    .catalog-meta { font-size: 0.75rem; }
    .catalog-badge {
        top: 0.35rem;
        right: 0.35rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
    .catalog-store-icon {
        padding: 0.3rem;
    }
    .store-logo-small,
    .store-logo-initial {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
    }
}

/* Stores section - شبكة 6 أعمدة مثل الطريقة القديمة */
.stores-section { padding: 2.5rem 0 4rem; }
.stores-stats { margin-bottom: 1.5rem; }
.stores-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.stores-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(520px, 100%);
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.stores-search svg { width: 1.1rem; height: 1.1rem; color: var(--text-muted); }
.stores-search input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text);
    font-size: 0.95rem;
}
.stores-search input::placeholder { color: var(--text-muted); }
.stores-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ultra-light);
}
.stores-count {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 9999px;
}
/* شبكة 6 أعمدة على الشاشات الكبيرة - مثل العرض القديم */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}
.store-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    padding: 1.25rem 1rem;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}
.store-badge {
    position: absolute;
    top: 0.5rem;
    inset-inline-end: 0.5rem;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: default;
}
[dir="rtl"] .store-badge { inset-inline-end: auto; inset-inline-start: 0.5rem; }
.store-card:hover {
    box-shadow: 0 4px 12px -2px rgba(0,0,0,.08), 0 2px 6px -2px rgba(0,0,0,.06);
    transform: translateY(-2px);
}
.store-card .store-logo-wrap {
    width: 5.5rem;
    height: 5.5rem;
    min-width: 5.5rem;
    min-height: 5.5rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
[data-theme="dark"] .store-card .store-logo-wrap { background: rgba(255,255,255,0.06); }
.store-card .store-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
}
.store-card .store-initial {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary);
}
.store-card .store-name {
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.35;
    color: var(--text);
}
/* تابلت: 4 أعمدة */
@media (max-width: 1024px) {
    .stores-grid { grid-template-columns: repeat(4, 1fr); }
}
/* تابلت صغير: 3 أعمدة */
@media (max-width: 768px) {
    .stores-grid { grid-template-columns: repeat(3, 1fr); gap: 0.875rem; }
    .store-card { padding: 1rem 0.75rem; }
    .store-card .store-logo-wrap { width: 4.5rem; height: 4.5rem; min-width: 4.5rem; min-height: 4.5rem; }
    .store-card .store-name { font-size: 0.85rem; }
}
/* موبايل: عمودين */
@media (max-width: 480px) {
    .stores-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .store-card { padding: 1rem 0.5rem; }
    .store-card .store-logo-wrap { width: 4rem; height: 4rem; min-width: 4rem; min-height: 4rem; }
    .store-card .store-name { font-size: 0.8rem; }
}
.stores-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 2rem;
}

/* Testimonials */
.landing-testimonials { padding: 3rem 0; background: var(--surface); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.testimonial-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.testimonial-text { font-size: 1rem; line-height: 1.7; margin-bottom: 1rem; }
.testimonial-author { font-weight: 600; color: var(--primary); }
.testimonial-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

/* CTA Banner */
.landing-cta-banner { padding: 3rem 0; }
.cta-banner-inner {
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: var(--radius); padding: 3rem; text-align: center; position: relative; overflow: hidden;
}
[data-theme="dark"] .cta-banner-inner { background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 50%, #0284c7 100%); }
.cta-banner-inner h3 { font-size: 1.75rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.cta-banner-inner p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }
.cta-banner-inner .landing-cta { background: #fff; color: var(--primary); }

/* News */
.landing-news { padding: 3rem 0; }
.news-section { padding: 2.5rem 0 4rem; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.news-card { 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.news-card:hover { 
    border-color: var(--primary); 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-md);
}
.news-card-link { text-decoration: none; color: inherit; display: block; }
.landing-news .news-card { height: 100%; }
.landing-news .news-card-link { height: 100%; display: flex; flex-direction: column; }
.store-news-section .news-card { height: 100%; }
.store-news-section .news-card-link { height: 100%; display: flex; flex-direction: column; }
.news-card-img { 
    aspect-ratio: 4/3; 
    background: linear-gradient(145deg, #e2e8f0, #cbd5e1); 
    overflow: hidden;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; display: block; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
[data-theme="dark"] .news-card-img { background: linear-gradient(145deg, #334155, #1e293b); }
.news-card-body { padding: 1.25rem; }
.landing-news .news-card-body { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; }
.store-news-section .news-card-body { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; }
.news-card-title { 
    font-weight: 600; 
    font-size: 1.05rem; 
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-meta { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.landing-news .news-card-meta { margin-top: auto; }
.store-news-section .news-card-meta { margin-top: auto; }
@media (max-width: 768px) {
    .news-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
    .news-card-body { padding: 1rem; }
    .news-card-title { font-size: 0.95rem; }
}
@media (max-width: 480px) {
    .news-grid { grid-template-columns: 1fr; }
}
.more-news-btn {
    display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.5rem;
    padding: 0.75rem 1.25rem; border: 2px solid var(--border); border-radius: var(--radius);
    background: transparent; font-weight: 600; color: var(--text); text-decoration: none;
}
.more-news-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* News article (عرض خبر واحد) */
.news-article-page { padding: 1.5rem 0 3rem; }
.news-article-wrap { max-width: 48rem; margin-inline: auto; }
.news-article-breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; flex-wrap: wrap; }
.news-article-breadcrumb a { color: var(--primary); text-decoration: none; }
.news-article-breadcrumb a:hover { text-decoration: underline; }
.news-article-breadcrumb span { color: var(--text-muted); opacity: 0.7; }
.news-article-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.news-article-hero { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.news-article-hero img { width: 100%; height: 100%; object-fit: cover; }
.news-article-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    pointer-events: none;
}
.news-article-header { padding: 1.5rem 1.5rem 0; }
.news-article-card.no-hero .news-article-header { padding-top: 2rem; }
.news-article-meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; align-items: center; }
.news-article-meta-item { display: flex; align-items: center; gap: 0.35rem; }
.news-article-meta-item svg { width: 1rem; height: 1rem; flex-shrink: 0; opacity: 0.8; }
.news-article-title { font-size: 1.75rem; font-weight: 700; line-height: 1.3; color: var(--text); margin-bottom: 0.5rem; }
@media (min-width: 640px) { .news-article-title { font-size: 2rem; } }
.news-article-excerpt { font-size: 1.05rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; }
.news-article-body { padding: 0 1.5rem 2rem; font-size: 1.0625rem; line-height: 1.75; }
.news-article-related { margin-top: 3rem; }
.news-article-related h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.news-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 640px) { .news-related-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width: 1024px) { .news-related-grid { grid-template-columns: repeat(4, 1fr); } }
.news-related-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.news-related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary); }
.news-related-card .thumb { aspect-ratio: 16/9; overflow: hidden; }
.news-related-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-related-card:hover .thumb img { transform: scale(1.05); }
.news-related-card .info { padding: 0.75rem 1rem; }
.news-related-card .title { font-weight: 600; font-size: 0.9375rem; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-related-card .meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }
.news-back-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.9rem; font-weight: 500; color: var(--primary);
    text-decoration: none; margin-bottom: 1.25rem; transition: color 0.2s;
}
.news-back-link:hover { color: var(--primary-hover); }
.news-back-link svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* Footer */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 2rem 0; padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0)); margin-top: 2rem; }
.footer-inner { display: flex; flex-direction: column; gap: 1rem; text-align: center; }
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--text-muted); font-size: 0.875rem; }

/* Pagination */
.pagination-wrap { margin-top: 2rem; display: flex; justify-content: center; }
.pagination-wrap nav { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }

/* Catalog view */
.v2-catalog-view { min-height: 100vh; display: flex; flex-direction: column; }
.v2-catalog-overlay {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 0.75rem 1rem; padding-top: calc(0.75rem + env(safe-area-inset-top, 0));
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100; pointer-events: none; background: rgba(255,255,255,.95);
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .v2-catalog-overlay { background: rgba(30,41,59,.95); }
.v2-catalog-overlay > * { pointer-events: auto; }
.v2-catalog-overlay .logo { font-size: 1.25rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.v2-catalog-overlay .overlay-close {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: var(--text-muted);
}
.v2-catalog-overlay .overlay-close:hover { border-color: var(--primary); color: var(--primary); }
.v2-catalog-area {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 5rem 0.5rem 8rem; overflow: auto;
}
.v2-catalog-page-wrap {
    width: 100%; max-width: 480px;
    background: var(--surface); border-radius: 0.5rem; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.v2-catalog-page-wrap img { width: 100%; height: auto; display: block; vertical-align: top; }
.v2-catalog-bottom {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 0.75rem 1rem; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
}
.v2-catalog-nav { display: flex; align-items: center; gap: 0.5rem; }
.v2-catalog-nav button {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.v2-catalog-nav button:hover:not(:disabled) { border-color: var(--primary); }
.v2-catalog-nav button:disabled { opacity: 0.6; cursor: not-allowed; }
.v2-catalog-page-info { font-size: 0.9rem; font-weight: 500; }
.v2-catalog-more { display: flex; gap: 0.5rem; overflow-x: auto; padding: 1rem 0; -webkit-overflow-scrolling: touch; }
.v2-catalog-more a {
    flex: 0 0 140px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 0.5rem; overflow: hidden; text-decoration: none; color: inherit;
}
.v2-catalog-more .thumb { height: 90px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--text-muted); }
.v2-catalog-more .thumb img { width: 100%; height: 100%; object-fit: cover; }
.v2-catalog-more .info { padding: 0.5rem; font-size: 0.8rem; }
.v2-catalog-related-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

/* ========== Catalog page (prototype style) ========== */
.desktop-only { display: none !important; }
.mobile-only { display: block !important; }
.catalog-view {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.catalog-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    padding-top: 70px;
    padding-bottom: 130px;
    overflow: auto;
}
.catalog-page-wrap {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.catalog-page-display {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
}
.catalog-page-display img { width: 100%; height: auto; display: block; object-fit: contain; }
.catalog-page-display.catalog-page-has-img { background: none; padding: 0; }
[data-theme="dark"] .catalog-page-display { background: linear-gradient(145deg, #334155 0%, #1e293b 100%); }
[data-theme="dark"] .catalog-page-display.catalog-page-has-img { background: none; }

/* Catalog Swiper Styles */
.catalog-swiper,
.catalog-swiper-mobile {
    width: 100%;
    height: 100%;
}
.catalog-swiper .swiper-slide,
.catalog-swiper-mobile .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}
.catalog-swiper .swiper-zoom-container,
.catalog-swiper-mobile .swiper-zoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-swiper .swiper-zoom-container img,
.catalog-swiper-mobile .swiper-zoom-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}
.catalog-swiper .swiper-slide-zoomed .swiper-zoom-container img,
.catalog-swiper-mobile .swiper-slide-zoomed .swiper-zoom-container img {
    cursor: grab;
}
.catalog-swiper .swiper-slide-zoomed .swiper-zoom-container img:active,
.catalog-swiper-mobile .swiper-slide-zoomed .swiper-zoom-container img:active {
    cursor: grabbing;
}

/* Mobile swiper specific */
.catalog-swiper-mobile {
    aspect-ratio: 3/4;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.catalog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.catalog-overlay > * { pointer-events: auto; }
.overlay-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    line-height: 0;
}
.overlay-btn:hover { border-color: var(--primary); }
.overlay-btn svg { width: 1.3rem; height: 1.3rem; color: var(--text-muted); display: block; }
.overlay-btn:hover svg, .overlay-btn.active svg { color: var(--primary); fill: var(--primary); }
.overlay-close {
    width: auto;
    min-width: 44px;
    padding: 10px 12px 0;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
}
.overlay-close svg { width: 1.25rem; height: 1.25rem; }
.desktop-brand { display: none; font-weight: 700; font-size: 1.1rem; color: var(--primary); text-decoration: none; }
.desktop-brand:hover { color: var(--primary-hover); }
.mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.mobile-brand img { display: block; height: 24px; width: auto; }

.catalog-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; }
.catalog-nav-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}

.adsense-slot {
    width: 100%;
    min-height: 90px;
    display: block;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    background: var(--bg);
    overflow: hidden;
}
.adsense-placeholder {
    border: 1px dashed var(--border);
    background: repeating-linear-gradient(
        45deg,
        rgba(148, 163, 184, 0.1),
        rgba(148, 163, 184, 0.1) 10px,
        rgba(148, 163, 184, 0.2) 10px,
        rgba(148, 163, 184, 0.2) 20px
    );
}
.adsense-placeholder-inner {
    height: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.adsense-inline { grid-column: 1 / -1; }
.adsense-section { padding: 0 1rem; }
.adsense-banner { display: flex; justify-content: center; }
.error-hero { padding: 4rem 0 3rem; }
.error-hero-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; align-items: center; }
.error-hero-text p { color: var(--text-muted); margin-top: 0.75rem; }
.error-actions { margin-top: 1.5rem; }
.error-hero-art { display: flex; justify-content: center; }
.error-hero-number {
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    letter-spacing: 0.2rem;
}
[dir="rtl"] .nav-prev svg { transform: scaleX(-1); }
[dir="rtl"] .nav-next svg { transform: scaleX(-1); }
.nav-group { display: flex; align-items: center; gap: 0.5rem; }
.nav-zoom, .nav-download {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nav-zoom:hover, .nav-download:hover { border-color: var(--primary); }
.nav-prev, .nav-next {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-prev:hover, .nav-next:hover { border-color: var(--primary); }
.nav-prev svg, .nav-next svg { width: 1.2rem; height: 1.2rem; }
.nav-page-info { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.nav-dots {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-dots .dot { width: 5px; height: 5px; background: var(--text-muted); border-radius: 50%; }
.nav-dots span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.nav-dots:disabled { opacity: 0.6; cursor: not-allowed; }
.nav-next-catalog {
    flex: 1;
    max-width: 180px;
    padding: 0.6rem 1rem;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-next-catalog:hover { background: var(--green-hover); color: #fff; }

.catalog-footer-ad {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-footer-ad .adsense-slot {
    width: 100%;
    max-width: 728px;
    margin: 0;
}

.catalog-ad {
    position: fixed;
    top: 60px;
    top: calc(3rem + env(safe-area-inset-top, 0));
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 98;
    padding: 1rem;
}
.catalog-ad.visible { display: flex; }
.catalog-ad .catalog-ad-content {
    width: 100%;
    max-width: 728px;
    min-height: 250px;
    background: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-ad .catalog-ad-content .adsense-slot {
    width: 100%;
    margin: 0;
}
.catalog-ad .ad-skip {
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--primary);
    cursor: pointer;
    font-family: inherit;
}
.catalog-ad .ad-skip:disabled { cursor: not-allowed; opacity: 0.7; color: var(--text-muted); }
.catalog-ad .ad-skip:not(:disabled) { border-color: var(--primary); }

.catalog-details-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 150;
    padding: 1rem;
}
.catalog-details-modal.open { display: flex; }
.catalog-details-content {
    background: var(--surface);
    border-radius: 1rem;
    padding: 0;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    overflow: hidden;
}
.catalog-details-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    padding: 1.5rem;
    text-align: center;
    color: #fff;
}
.catalog-modal-logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    margin: 0 auto 1rem;
    display: block;
    background: #fff;
    padding: 4px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.catalog-modal-logo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.catalog-details-header h3 { 
    font-size: 1.25rem; 
    margin: 0; 
    padding: 0;
    border: none;
    font-weight: 700;
    color: #fff;
}
.catalog-details-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.9rem;
}
.catalog-detail-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0.75rem;
    align-items: start;
}
.catalog-details-info dt { 
    color: var(--text-muted); 
    font-weight: 600;
    font-size: 0.85rem;
}
.catalog-details-info dd { 
    margin: 0;
    color: var(--text);
    font-weight: 500;
}
.catalog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.catalog-category-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.catalog-details-close {
    margin: 0 1.5rem 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    width: calc(100% - 3rem);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}
.catalog-details-close:hover { 
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

/* Desktop catalog layout */
@media (min-width: 769px) {
    .desktop-only { display: block !important; }
    .mobile-only { display: none !important; }
    body { background: #f1f5f9; }
    .catalog-view {
        display: grid;
        grid-template-columns: 1fr 320px;
        grid-template-rows: auto 1fr auto;
        min-height: 100vh;
        max-width: 1400px;
        margin: 0 auto;
        background: var(--surface);
    }
    .catalog-overlay {
        grid-column: 1 / -1;
        position: relative;
        padding: 0.75rem 1.5rem;
    }
    .catalog-overlay .overlay-btn { box-shadow: none; }
    .desktop-brand { display: flex; align-items: center; }

    .desktop-main {
        grid-column: 1;
        padding: 1.5rem;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    .catalog-info-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        padding: 1.25rem;
        text-align: center;
    }
    .catalog-info-card .store-logo, .catalog-info-card .store-logo-img {
        width: 80px;
        height: 80px;
        border-radius: 0.5rem;
        margin: 0 auto 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: 700;
        font-size: 1.5rem;
    }
    .catalog-info-card .store-logo { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); }
    .catalog-info-card .store-logo-img { object-fit: contain; }
    .catalog-info-card h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
    .catalog-validity {
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
    }
    .catalog-validity:not(.expired) { color: var(--green); }
    .catalog-validity:not(.expired)::before { content: ''; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
    .catalog-validity.expired { color: #dc2626; }
    .catalog-validity.expired::before { content: ''; width: 6px; height: 6px; background: #dc2626; border-radius: 50%; }
    .visit-store-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        max-width: 100%;
        padding: 0.85rem 1.5rem;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 0.5rem;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        font-family: inherit;
        text-align: center;
        text-decoration: none;
        margin: 5px auto 1.5rem;
    }
    .visit-store-btn:hover { background: var(--primary-hover); color: #fff; }
    .add-to-fav-section {
        background: var(--bg);
        border-radius: 0.5rem;
        padding: 1rem;
    }
    .add-to-fav-section h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
    .add-to-fav-section p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
    .add-to-fav-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 0.5rem;
        font-size: 0.9rem;
        cursor: pointer;
        font-family: inherit;
    }
    .add-to-fav-btn:hover { background: var(--primary-hover); }
    .add-to-fav-btn.active { background: var(--primary-hover); }

    .catalog-area { padding: 0; padding-top: 0; padding-bottom: 0; flex: 1; }
    .catalog-page-wrap { max-width: 100%; }
    .related-leaflets-scroll { display: flex; gap: 1rem; overflow-x: auto; padding: 0.25rem 0; }
    .desktop-sidebar-catalogs { flex-direction: column; overflow: visible; }
    .leaflet-card {
        flex-shrink: 0;
        width: 100%;
        display: flex;
        flex-direction: row;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        overflow: hidden;
        text-decoration: none;
        color: inherit;
        margin-bottom: 0.5rem;
    }
    .leaflet-card .thumb {
        width: 60px;
        height: 50px;
        flex-shrink: 0;
        background: var(--bg);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        color: var(--text-muted);
    }
    .leaflet-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
    .leaflet-card .info { flex: 1; padding: 0.4rem 0.5rem; font-size: 0.8rem; }
    .leaflet-card .store { font-weight: 500; }
    .leaflet-card .valid:not(.expired) { color: var(--green); }
    .leaflet-card .valid.expired { color: #dc2626; }

    .desktop-sidebar {
        grid-column: 2;
        grid-row: 2;
        background: #f8fafc;
        border-inline-start: 1px solid var(--border);
        padding: 1rem;
        overflow-y: auto;
    }
    [data-theme="dark"] .desktop-sidebar { background: #0f172a; }
    .sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
    .sidebar-header span { font-weight: 700; color: var(--primary); }
    .sidebar-section { margin-bottom: 1.25rem; }
    .related-stores-section { margin-top: 2rem; }
    .sidebar-section h4 { font-size: 0.9rem; margin-bottom: 0.75rem; }
    .sidebar-stores { display: flex; flex-direction: column; gap: 0.5rem; }
    .store-card {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        text-decoration: none;
        color: inherit;
    }
    .store-card:hover { border-color: var(--primary); }
    .store-card .logo {
        width: 36px;
        height: 36px;
        background: var(--bg);
        border-radius: 0.35rem;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .store-card .name { font-size: 0.85rem; flex: 1; }

    .catalog-bottom { grid-column: 1 / -1; position: relative; }
    .catalog-footer-ad { display: none; }
    .catalog-nav-bar { padding: 0.75rem 1.5rem; }
    .catalog-details-modal .catalog-details-content { max-width: 440px; }
}

/* ========== Auth Modals ========== */
.auth-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.auth-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.auth-modal {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 420px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.auth-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.auth-header h2 { font-size: 1.25rem; font-weight: 600; }
.auth-close {
    padding: 0.5rem; border: none; background: none;
    cursor: pointer; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
}
.auth-close:hover { color: var(--text); }
.auth-body { padding: 1.5rem; }
.auth-form label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.35rem; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%; padding: 0.6rem 1rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.95rem; background: var(--bg); color: inherit;
    margin-bottom: 1rem; box-sizing: border-box;
}
.auth-form input:focus { outline: none; border-color: var(--primary); }
.auth-form input.border-error { border-color: #ef4444; }
.auth-error { display: block; font-size: 0.8rem; color: #ef4444; margin-top: -0.5rem; margin-bottom: 0.75rem; }
.auth-form-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 0.5rem; flex-wrap: wrap; }
.auth-remember { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; cursor: pointer; }
.auth-remember input { width: auto; margin: 0; }
.auth-forgot-link { background: none; border: none; color: var(--primary); font-size: 0.875rem; cursor: pointer; padding: 0; text-decoration: none; }
.auth-forgot-link:hover { text-decoration: underline; }
.auth-submit {
    width: 100%; padding: 0.75rem 1rem;
    background: var(--primary); color: #fff; border: none;
    border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: background 0.2s;
}
.auth-submit:hover { background: var(--primary-hover); }
.auth-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.auth-switch { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-top: 1rem; }
.auth-link-btn { background: none; border: none; color: var(--primary); font-weight: 500; cursor: pointer; padding: 0; text-decoration: none; }
.auth-link-btn:hover { text-decoration: underline; }
.auth-hint { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.social-login { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.social-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font-size: 0.95rem; cursor: pointer; transition: border-color .2s, background .2s;
}
.social-btn:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
.social-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.social-btn.fb { border-color: #1877f2; color: #1877f2; }
.social-btn.fb:hover:not(:disabled) { background: rgba(24,119,242,.1); }
.social-btn.google { border-color: #4285f4; color: #4285f4; }
.social-btn.google:hover:not(:disabled) { background: rgba(66,133,244,.1); }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; color: var(--text-muted); font-size: 0.875rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Header auth */
.header-auth-wrap { display: flex; align-items: center; gap: 0.75rem; }
.header-user-name { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.header-dashboard-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, transform .1s;
}
.header-dashboard-link:hover { background: var(--primary-dark); transform: translateY(-1px); }
.header-logout-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.header-logout-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Header User Dropdown */
.header-user-dropdown-wrap { position: relative; }
.header-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.header-user-btn:hover { border-color: var(--primary); background: var(--surface); }
.header-user-btn svg:first-child { width: 14px; height: 14px; transition: transform .2s; }
.header-user-btn .user-avatar-icon { width: 22px; height: 22px; color: var(--text-muted); background: var(--border); border-radius: 50%; padding: 2px; }
.header-user-dropdown-wrap[aria-expanded="true"] .header-user-btn svg:first-child { transform: rotate(180deg); }
.header-user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    inset-inline-end: 0;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .2s ease;
    z-index: 100;
}
.header-user-dropdown-wrap[aria-expanded="true"] .header-user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.header-user-dropdown li { margin: 0; }
.header-user-dropdown li.divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
    padding: 0;
}
.header-user-dropdown a,
.header-user-dropdown button {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.header-user-dropdown a:hover,
.header-user-dropdown button:hover { background: var(--primary-light); color: var(--primary); }
.header-user-dropdown form { margin: 0; }

.header-login-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.header-login-btn:hover { background: var(--primary); color: #fff; }

/* Country picker modal - prototype style */
.picker-overlay {
    position: fixed; inset: 0; z-index: 99998;
    background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}
.picker-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.picker-modal {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 560px; width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.picker-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.picker-header h2 { font-size: 1.1rem; font-weight: 600; }
.picker-close { padding: 0.5rem; border: none; background: none; cursor: pointer; color: var(--text-muted); }
.picker-close:hover { color: var(--text); }
.picker-body { padding: 1rem 1.25rem; max-height: 60vh; overflow-y: auto; }
.picker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 480px) { .picker-grid { grid-template-columns: 1fr; } }
.picker-country {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: border-color .2s;
}
.picker-country:hover { border-color: var(--primary); }
.picker-country-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.picker-country-header img { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; object-fit: cover; }
.picker-country-placeholder {
    width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem;
}
.picker-langs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.picker-langs a, .picker-langs-a {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--text);
}
.picker-langs a:hover, .picker-langs a.active,
.picker-langs-a:hover, .picker-langs-a.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* ========== Store page v2 ========== */
.store-hero { padding: 2.5rem 0; }
.store-hero-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.store-hero-logo {
    width: 7rem;
    height: 7rem;
    min-width: 7rem;
    min-height: 7rem;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.store-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}
.store-hero-initial {
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}
.store-hero-text { flex: 1; min-width: 200px; }
.store-hero-text h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; margin: 0; }
.store-hero-text p { margin: 0.35rem 0 0; opacity: 0.95; }
.store-hero-cats {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.store-cat-tag {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    background: rgba(255,255,255,0.15);
}
.store-cat-tag:hover { background: rgba(255,255,255,0.25); }
.store-cat-sep { opacity: 0.6; margin: 0 0.2rem; }

.section-link { display: inline-flex; align-items: center; gap: 0.35rem; }
.section-link svg { flex-shrink: 0; }
[dir="rtl"] .section-link svg { transform: rotate(180deg); }

/* Branches accordion */
.store-branches-section { background: var(--surface); }
.branches-accordion { display: flex; flex-direction: column; gap: 0.5rem; }
.branch-region {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.branch-region-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    text-align: start;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.2s ease;
}
.branch-region-btn:hover { 
    background: var(--bg-secondary);
}
.branch-count {
    padding: 0.2rem 0.6rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 9999px;
}
.branch-chevron {
    margin-inline-start: auto;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.branch-region-btn[aria-expanded="true"] .branch-chevron { transform: rotate(180deg); }
.branch-region-content {
    border-top: 1px solid var(--border);
    padding: 0;
}
.branch-list { display: flex; flex-direction: column; }
.branch-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease;
}
.branch-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.branch-card:last-child { border-bottom: none; }
@media (min-width: 640px) {
    .branch-card { grid-template-columns: 1fr auto; }
}
.branch-name {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    font-size: 1rem;
}
.branch-name:hover { text-decoration: underline; }
.branch-address {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0;
}
.branch-address svg { flex-shrink: 0; margin-top: 0.15rem; }
.branch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.branch-link {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
}
.branch-link:hover { text-decoration: underline; }
.branch-hours {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.branch-hours svg { 
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary);
}
.branch-hours-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.branch-hours strong { 
    color: var(--text);
    display: block;
    font-size: 0.9rem;
}
.branch-hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.branch-hour-item {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.branches-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Store info cards */
.store-info-section { padding: 2rem 0; }
.store-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.store-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.store-info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text);
}
.store-info-body { display: flex; flex-direction: column; gap: 0.5rem; }
.store-info-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: baseline; }
.store-info-label { font-size: 0.9rem; color: var(--text-muted); }
.store-info-value {
    font-size: 0.95rem;
    color: var(--primary);
    text-decoration: none;
}
.store-info-value:hover { text-decoration: underline; }
.store-info-empty { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.store-socials { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.store-social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s;
}
.store-social-link:hover { border-color: var(--primary); color: var(--primary); }
.store-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}
.store-share-btn:hover { background: var(--primary); color: #fff; }

.store-similar-grid { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1024px) { .store-similar-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) { .store-similar-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .store-similar-grid { grid-template-columns: repeat(2, 1fr); } }

/* Brand page */
.brand-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}
.brand-hero-logo {
    width: 112px;
    height: 112px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    overflow: hidden;
    padding: 0.5rem;
}
.brand-hero-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-hero-text { flex: 1; min-width: 200px; }
.brand-hero-text h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; }
.brand-meta { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.brand-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.brand-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}
.brand-action-btn:hover { background: var(--primary); color: #fff; }
.brand-action-btn.active { background: var(--primary); color: #fff; }

/* V2 product page dark/light helpers */
.v2-product-page .v2-card { background: var(--surface); }
.v2-product-page .bg-white { background: var(--surface); }
.v2-product-page .bg-gray-100 { background: var(--bg); }
.v2-product-page .bg-gray-200 { background: var(--border); }
.v2-product-page .text-gray-900,
.v2-product-page .text-gray-700 { color: var(--text); }
.v2-product-page .text-gray-600,
.v2-product-page .text-gray-500,
.v2-product-page .text-gray-400 { color: var(--text-muted); }
.v2-product-page .border { border-color: var(--border); }
.v2-product-page .shadow { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12); }
.v2-product-page .hover\:bg-gray-100:hover { background: var(--bg); }
.v2-product-page .hover\:bg-gray-200:hover { background: var(--border); }
.v2-product-page .hover\:text-gray-900:hover { color: var(--text); }
.v2-product-page .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: var(--border); }
.v2-product-page .light-scrollbar::-webkit-scrollbar-thumb { background: var(--border); }
[data-theme="dark"] .v2-product-page .text-primary { color: var(--primary); }

/* Quick Nav (شريط التنقل السريع) - Mobile bottom bar */
.quick-nav-wrap {
    display: none;
    background: var(--surface);
    border-top: 1px solid var(--border);
    overflow: hidden;
}
.quick-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.quick-nav::-webkit-scrollbar { display: none; }
.quick-nav-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    min-width: 80px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.quick-nav-item:hover,
.quick-nav-item.active { color: var(--primary); }
.quick-nav-item svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
.quick-nav-item.app-btn {
    background: var(--primary);
    color: #fff;
    min-width: 120px;
    font-size: 0.7rem;
}
.quick-nav-item.app-btn:hover { background: var(--primary-hover); color: #fff; }
.quick-nav-item.app-btn svg { width: 1.25rem; height: 1.25rem; }
@media (max-width: 768px) {
    .quick-nav-wrap {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 90;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    body:has(.quick-nav-wrap) main { padding-bottom: 90px; }
    body:has(.quick-nav-wrap) footer { padding-bottom: calc(90px + 2rem + env(safe-area-inset-bottom, 0)); }
}
@media (min-width: 769px) {
    .quick-nav-wrap { display: none; }
}
.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Branch Details Page - Professional Styling */
.branch-details-section { background: var(--surface); padding: 2rem 0; }

.branch-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.branch-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.branch-header-info {
    flex: 1;
}

.branch-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.branch-location {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.branch-store {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 500;
}

.branch-header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-header-logo img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.branch-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .branch-content-grid {
        grid-template-columns: 1fr 320px;
    }
}

.branch-details-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.branch-info-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.branch-info-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.card-header svg {
    color: var(--primary);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.card-content {
    color: var(--text);
}

.branch-address {
    font-size: 1rem;
    line-height: 1.8;
    margin: 0 0 1rem;
    color: var(--text-muted);
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hour-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface);
    border-left: 3px solid var(--primary);
    border-radius: 0.25rem;
}

.hour-text {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: inherit;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.contact-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.contact-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.card-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.card-btn-primary {
    background: var(--primary);
    color: white;
}

.card-btn-primary:hover {
    background: var(--primary-hover);
}

.card-btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    width: 100%;
    justify-content: center;
}

.card-btn-secondary:hover {
    background: var(--primary-light);
}

.branch-details-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.store-logo-box {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.store-logo-box img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.store-name-sidebar {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem;
    text-align: center;
}

.store-cats-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.other-branches-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.other-branches-section .section-header {
    margin-bottom: 1.5rem;
}

.branch-map-card {
    padding: 0 !important;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 1.5rem;
}

.branch-map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.branch-map-iframe {
    width: 100%;
    height: 100%;
    border: none;
}
/* ===================================
   Catalog Tips Modal
   =================================== */
.catalog-tips-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.catalog-tips-modal.visible {
    opacity: 1;
    visibility: visible;
}

.catalog-tips-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.catalog-tips-content {
    position: relative;
    background: var(--surface);
    border-radius: 1.25rem;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
}

.catalog-tips-modal.visible .catalog-tips-content {
    transform: scale(1);
}

.catalog-tips-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.catalog-tips-header .tips-icon {
    color: var(--primary);
    margin: 0 auto 1rem;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.catalog-tips-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.catalog-tips-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.tip-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

[dir="rtl"] .tip-item:hover {
    transform: translateX(-4px);
}

.tip-item .tip-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
}

.tip-item span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.catalog-tips-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tips-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.tips-btn-primary {
    background: var(--primary);
    color: #fff;
}

.tips-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.tips-btn-secondary {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.tips-btn-secondary:hover {
    background: var(--surface);
    border-color: var(--text-muted);
}

[data-theme="dark"] .catalog-tips-overlay {
    background: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .tip-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

@media (max-width: 768px) {
    .catalog-tips-content {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .catalog-tips-header h3 {
        font-size: 1.25rem;
    }
    
    .tip-item {
        gap: 0.75rem;
        padding: 0.875rem;
    }
    
    .tip-item .tip-icon {
        width: 36px;
        height: 36px;
    }
    
    .tip-item span {
        font-size: 0.875rem;
    }
}

/* Catalog Details Modal - Mobile Responsive */
@media (max-width: 768px) {
    .catalog-details-content {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .catalog-details-header {
        padding: 1.25rem;
    }
    
    .catalog-modal-logo,
    .catalog-modal-logo-placeholder {
        width: 80px;
        height: 80px;
    }
    
    .catalog-details-header h3 {
        font-size: 1.1rem;
    }
    
    .catalog-details-info {
        padding: 1.25rem;
    }
    
    .catalog-detail-row {
        grid-template-columns: 85px 1fr;
        gap: 0.5rem;
    }
    
    .catalog-details-info dt {
        font-size: 0.8rem;
    }
    
    .catalog-details-info dd {
        font-size: 0.875rem;
    }
    
    .catalog-category-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .catalog-details-close {
        margin: 0 1.25rem 1.25rem;
        width: calc(100% - 2.5rem);
        font-size: 0.95rem;
    }
}

/* SEO pre-footer block */
.seo-prefooter-section {
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    padding-top: 2.75rem;
    padding-bottom: 3rem;
}
.seo-prefooter-body {
    display: grid;
    gap: 1rem;
    max-width: 1000px;
}
.seo-prefooter-body p {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 0.98rem;
    margin: 0;
}
[data-theme="dark"] .seo-prefooter-section {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.75) 0%, rgba(30, 41, 59, 0.35) 100%);
}
@media (max-width: 768px) {
    .seo-prefooter-section {
        padding-top: 2.25rem;
        padding-bottom: 2.5rem;
    }
    .seo-prefooter-body p {
        font-size: 0.95rem;
        line-height: 1.8;
    }
}
