/* =============================================================
   ZERF — Modern dizayn sistemi v2
   Token-based, dark mode dəstəkli, mikro-animasiyalı
   ============================================================= */

:root {
    /* === Brend rəngləri === */
    --primary:        #2563eb;
    --primary-hover:  #1d4ed8;
    --primary-soft:   #eff6ff;
    --primary-mid:    #dbeafe;
    --accent:         #f97316;
    --accent-hover:   #ea580c;
    --accent-soft:    #fff7ed;

    /* === Status === */
    --success: #16a34a;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #06b6d4;

    /* === Surfaces === */
    --bg:           #f8fafc;
    --bg-soft:      #f1f5f9;
    --surface:      #ffffff;
    --surface-hover:#f8fafc;
    --overlay:      rgba(15, 23, 42, .04);

    /* === Text === */
    --text:        #0f172a;
    --text-soft:   #475569;
    --text-mute:   #94a3b8;
    --text-invert: #ffffff;

    /* === Borders === */
    --border:        #e2e8f0;
    --border-strong: #cbd5e1;
    --ring:          rgba(37, 99, 235, .15);

    /* === Shadows (multi-layer, soft) === */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .05), 0 1px 2px rgba(15, 23, 42, .03);
    --shadow:    0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .04);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, .08), 0 4px 6px -4px rgba(15, 23, 42, .04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, .10), 0 8px 10px -6px rgba(15, 23, 42, .04);
    --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, .25);
    --shadow-glow: 0 0 0 4px var(--ring);

    /* === Radii === */
    --r-xs:  4px;
    --r-sm:  8px;
    --r:     12px;
    --r-md:  16px;
    --r-lg:  20px;
    --r-xl:  24px;
    --r-pill: 999px;

    /* === Spacing scale (consistent rhythm) === */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
    --s-12: 48px; --s-16: 64px;

    /* === Transition === */
    --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
    --t:      200ms cubic-bezier(.4, 0, .2, 1);
    --t-slow: 320ms cubic-bezier(.4, 0, .2, 1);

    /* === Layout === */
    --header-h: 68px;
    --container-w: 1320px;

    /* === Gradients (modern brand) === */
    --grad-brand:  linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
    --grad-warm:   linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    --grad-mesh:   radial-gradient(at 0% 0%, rgba(37, 99, 235, .12) 0px, transparent 50%),
                   radial-gradient(at 100% 0%, rgba(236, 72, 153, .10) 0px, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(249, 115, 22, .08) 0px, transparent 50%);
    --grad-vip:    linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --grad-premium:linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f59e0b 100%);
}

/* === DARK MODE === */
[data-theme="dark"] {
    --bg:           #0a0e1a;
    --bg-soft:      #111827;
    --surface:      #131b2c;
    --surface-hover:#182238;
    --overlay:      rgba(255, 255, 255, .04);

    --text:        #f1f5f9;
    --text-soft:   #cbd5e1;
    --text-mute:   #64748b;

    --border:        #1f2a44;
    --border-strong: #334155;
    --primary-soft:  #0c2240;
    --primary-mid:   #1e3a5f;
    --accent-soft:   #2a1607;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
    --shadow:    0 4px 6px -1px rgba(0, 0, 0, .5), 0 2px 4px -2px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, .55), 0 4px 6px -4px rgba(0, 0, 0, .4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, .55);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, .7);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    transition: background var(--t), color var(--t);
    overflow-x: clip;       /* mobil-də kənara çıxma qarşısı (sticky-yə təsir etməz) */
    max-width: 100vw;
}
/* Bütün böyük elementlər viewport-dan kənara çıxa bilməsin */
.container, main, section, footer, header, .form-card { max-width: 100%; }
/* Uzun sözlər/URL-lər avtomatik break olsun */
.listing-title, .ad-title, .form-card p, blockquote, pre, code {
    overflow-wrap: anywhere;
    word-break: break-word;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-hover); }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--primary-mid); color: var(--text); }

/* === Container === */
.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 var(--s-4);
}
@media (min-width: 768px) { .container { padding: 0 var(--s-6); } }

/* === HEADER === */
.site-header {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
}
[data-theme="dark"] .site-header {
    background: rgba(19, 27, 44, .85);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    height: var(--header-h);
}
.brand {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -.5px;
    transition: opacity var(--t-fast);
}
.brand:hover { color: var(--text); opacity: .85; }
.brand-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 17px;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, .1) inset;
}
.brand-text { letter-spacing: -.5px; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.search-bar {
    flex: 1;
    max-width: 560px;
    position: relative;
}
.search-bar input {
    width: 100%;
    padding: 11px var(--s-4) 11px 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-pill);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
    transition: all var(--t);
}
.search-bar input::placeholder { color: var(--text-mute); }
.search-bar input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: var(--shadow-glow);
    outline: none;
}
.search-bar i {
    position: absolute;
    left: var(--s-4); top: 50%;
    transform: translateY(-50%);
    color: var(--text-mute);
    pointer-events: none;
    font-size: 17px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-left: auto;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: 10px 18px;
    border: 1.5px solid transparent;
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--t);
    font-family: inherit;
    white-space: nowrap;
    user-select: none;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-glow); }

.btn-primary {
    background: var(--primary);
    color: var(--text-invert);
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--text-invert); box-shadow: 0 8px 20px -4px rgba(37, 99, 235, .35); }

.btn-accent {
    background: var(--accent);
    color: var(--text-invert);
    border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--text-invert); box-shadow: 0 8px 20px -4px rgba(249, 115, 22, .35); }

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-soft); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 15.5px; border-radius: var(--r); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: var(--r-sm); }

/* === Theme toggle button === */
.theme-toggle {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--r-pill);
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: all var(--t);
    font-size: 16px;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); transform: rotate(15deg); }

/* === HERO (modern, gradient mesh) === */
.hero {
    position: relative;
    overflow: hidden;
    padding: var(--s-12) 0 var(--s-8);
    background:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, .14) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, .12) 0px, transparent 45%),
        radial-gradient(at 100% 100%, rgba(249, 115, 22, .10) 0px, transparent 45%),
        var(--bg);
}
[data-theme="dark"] .hero {
    background:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, .22) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, .18) 0px, transparent 45%),
        radial-gradient(at 100% 100%, rgba(249, 115, 22, .14) 0px, transparent 45%),
        var(--bg);
}
.hero-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    margin: 0 0 var(--s-3);
    letter-spacing: -.8px;
    line-height: 1.1;
}
.hero-title .grad {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    color: var(--text-soft);
    margin: 0 0 var(--s-6);
    font-size: clamp(15px, 1.6vw, 17px);
    max-width: 640px;
    line-height: 1.55;
}
.hero-cta-row {
    display: flex;
    gap: var(--s-3);
    flex-wrap: wrap;
    margin-bottom: var(--s-8);
}

/* === Kompakt hero (anasəhifə) === */
.hero.hero-compact {
    padding: var(--s-8) 0 var(--s-6);
}
.hero.hero-tight {
    padding: var(--s-6) 0 var(--s-4);
}
.hero-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-5);
    flex-wrap: wrap;
    margin-bottom: var(--s-5);
}
.hero-row .hero-title { margin: 0; }
.hero-row .hero-quick { margin: 0; }
.hero-title.hero-title-sm {
    font-size: clamp(22px, 2.8vw, 30px);
    margin-bottom: var(--s-4);
    line-height: 1.2;
}

/* Hero-da axtarış sahəsi (Tap.az tipli) */
.hero-search {
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 6px;
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, .15);
    max-width: 640px;
    margin-bottom: var(--s-3);
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}
.hero-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 8px 24px -8px rgba(37, 99, 235, .3);
}
.hero-search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-mute);
    font-size: 18px;
    pointer-events: none;
}
.hero-search input {
    flex: 1;
    padding: 12px 18px 12px 50px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text);
    outline: none;
    font-family: inherit;
    min-width: 0;
}
.hero-search button {
    padding: 0 26px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: var(--r-pill);
    cursor: pointer;
    font-size: 14.5px;
    transition: background .15s, transform .15s;
    font-family: inherit;
    white-space: nowrap;
}
.hero-search button:hover { background: var(--primary-hover); transform: translateY(-1px); }

.hero-quick {
    display: flex;
    gap: var(--s-3);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--s-6);
}
.hero-quick .hero-link {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    transition: background .15s, color .15s;
}
.hero-quick .hero-link:hover { background: var(--bg-soft); color: var(--primary); }
.hero-stat {
    color: var(--text-mute);
    font-size: 13px;
    margin-left: auto;
}

/* Kateqoriya gizli kartlar (12-dən sonrakı) */
.cat-card-hidden {
    display: none !important;
}
.cat-card-hidden.cat-card-show {
    display: flex !important;
    animation: fadeInUp .35s ease backwards;
}
.cat-more-btn {
    margin: var(--s-3) 0 0;
    background: transparent;
    border: 1px dashed var(--border-strong);
    color: var(--text-soft);
    padding: 10px 18px;
    border-radius: var(--r-md);
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cat-more-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

@media (max-width: 640px) {
    .hero-title.hero-title-sm { font-size: 22px; line-height: 1.2; }
    .hero-search { border-radius: var(--r-md); }
    .hero-search input { padding-left: 42px; font-size: 14px; }
    .hero-search-icon { left: 16px; }
    .hero-search button { border-radius: var(--r-md); padding: 0 16px; font-size: 13.5px; }
    .hero-stat { margin-left: 0; width: 100%; text-align: left; }
}

/* === Categories grid (modern, with colored icons) === */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--s-3);
}
.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: var(--s-4);
    display: flex;
    align-items: center;
    gap: var(--s-3);
    text-decoration: none;
    color: var(--text);
    transition: all var(--t);
    position: relative;
    overflow: hidden;
}
.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity var(--t);
    z-index: 0;
}
.cat-card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    color: var(--text);
    text-decoration: none;
}
.cat-card-icon {
    width: 44px; height: 44px;
    border-radius: var(--r-sm);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform var(--t);
    position: relative;
    z-index: 1;
}
.cat-card:hover .cat-card-icon { transform: scale(1.1) rotate(-5deg); }
.cat-card-info { position: relative; z-index: 1; min-width: 0; }
.cat-card-name {
    font-weight: 700;
    font-size: 14.5px;
    line-height: 1.25;
}
.cat-card-count {
    font-size: 12px;
    color: var(--text-mute);
    margin-top: 3px;
}

/* === Rich category card (anasəhifə dolu görünüş) === */
.cat-grid-rich {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--s-4);
}
.cat-card-rich {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    position: relative;
}
.cat-card-rich::after {
    /* sol kənar accent strip — hər kateqoriya rəng üçün */
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: var(--cat-accent, var(--primary));
    transition: width var(--t);
}
.cat-card-rich:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -16px rgba(15, 23, 42, .25);
    border-color: var(--cat-accent, var(--primary));
}
.cat-card-rich:hover::after { width: 6px; }

.cat-card-rich .cat-card-head {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--cat-bg-from, #f0f9ff) 0%, var(--cat-bg-to, #fff) 100%);
}
.cat-card-rich .cat-card-icon {
    width: 52px; height: 52px;
    border-radius: var(--r-md);
    background: var(--cat-accent, var(--primary));
    color: white;
    font-size: 24px;
    box-shadow: 0 8px 20px -8px var(--cat-accent, var(--primary));
}
.cat-card-rich .cat-card-info { flex: 1; }
.cat-card-rich .cat-card-name { font-size: 16px; font-weight: 800; }
.cat-card-rich .cat-card-count {
    font-size: 12.5px;
    color: var(--cat-accent, var(--primary));
    font-weight: 700;
    margin-top: 2px;
}
.cat-card-rich .cat-card-arrow {
    color: var(--text-mute);
    font-size: 18px;
    transition: transform var(--t), color var(--t);
}
.cat-card-rich:hover .cat-card-arrow {
    color: var(--cat-accent, var(--primary));
    transform: translateX(4px);
}

.cat-card-subs {
    padding: var(--s-3) var(--s-5) var(--s-4);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cat-sub-chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    background: var(--bg-soft);
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--t);
    line-height: 1.2;
}
.cat-sub-chip:hover {
    background: var(--cat-accent, var(--primary));
    color: white;
    transform: translateY(-1px);
}
.cat-sub-chip.cat-sub-more {
    background: transparent;
    border-color: var(--border);
    color: var(--text-mute);
    font-weight: 700;
}

/* Kateqoriya rəng tonları (10 ana kateqoriya üçün) */
.cat-card-rich.tone-1  { --cat-accent: #2563eb; --cat-bg-from: #dbeafe; --cat-bg-to: #eff6ff; } /* mavi — daşınmaz */
.cat-card-rich.tone-2  { --cat-accent: #f97316; --cat-bg-from: #ffedd5; --cat-bg-to: #fff7ed; } /* narıncı — nəqliyyat */
.cat-card-rich.tone-3  { --cat-accent: #16a34a; --cat-bg-from: #dcfce7; --cat-bg-to: #f0fdf4; } /* yaşıl — iş */
.cat-card-rich.tone-4  { --cat-accent: #7c3aed; --cat-bg-from: #ede9fe; --cat-bg-to: #f5f3ff; } /* bənövşəyi — elektronika */
.cat-card-rich.tone-5  { --cat-accent: #db2777; --cat-bg-from: #fce7f3; --cat-bg-to: #fdf2f8; } /* çəhrayı — ev üçün */
.cat-card-rich.tone-6  { --cat-accent: #d946ef; --cat-bg-from: #fae8ff; --cat-bg-to: #fdf4ff; } /* magenta — şəxsi əşyalar */
.cat-card-rich.tone-7  { --cat-accent: #0891b2; --cat-bg-from: #cffafe; --cat-bg-to: #ecfeff; } /* cyan — hobbi */
.cat-card-rich.tone-8  { --cat-accent: #65a30d; --cat-bg-from: #ecfccb; --cat-bg-to: #f7fee7; } /* lime — heyvanlar */
.cat-card-rich.tone-9  { --cat-accent: #f59e0b; --cat-bg-from: #fef3c7; --cat-bg-to: #fffbeb; } /* sarı — uşaq aləmi */
.cat-card-rich.tone-10 { --cat-accent: #475569; --cat-bg-from: #e2e8f0; --cat-bg-to: #f1f5f9; } /* boz — xidmətlər */

@media (max-width: 480px) {
    .cat-grid-rich { grid-template-columns: 1fr; }
    .cat-card-rich .cat-card-icon { width: 44px; height: 44px; font-size: 20px; }
}

/* === Header icon-button + badge (Favoritlər, Mesajlar) === */
.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hdr-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: var(--r-pill);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    border: 2px solid var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hdr-badge-msg { background: var(--danger); }
.hdr-badge-fav { background: #ef4444; }

/* CentralPay balans badge */
.cp-balance-badge {
    width: auto !important;
    padding: 0 12px !important;
    background: linear-gradient(135deg, #ccfbf1, #f0fdfa) !important;
    border: 1px solid #5eead4 !important;
    gap: 6px;
}
.cp-balance-badge:hover {
    background: linear-gradient(135deg, #5eead4, #ccfbf1) !important;
    text-decoration: none;
}
.cp-balance-amount {
    font-weight: 800;
    font-size: 13px;
    color: #0f766e;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
    .cp-balance-amount { display: none; }
    .cp-balance-badge { padding: 0 8px !important; }
}

/* === SECTIONS === */
section { padding: var(--s-8) 0; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--s-5);
    flex-wrap: wrap;
    gap: var(--s-2);
}
.section-head h2 {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 800;
    letter-spacing: -.4px;
    display: flex;
    align-items: center;
    gap: var(--s-2);
}
.section-head a {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    transition: gap var(--t);
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
}
.section-head a:hover { gap: var(--s-2); }

/* === LISTING CARDS — modern === */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--s-4);
}
.listing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: all var(--t);
    position: relative;
}
.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    text-decoration: none;
    color: var(--text);
}

/* VIP — yellow */
.listing-card.vip {
    border-color: #fbbf24;
    background: linear-gradient(180deg, #fffbeb 0%, var(--surface) 30%);
}
[data-theme="dark"] .listing-card.vip {
    background: linear-gradient(180deg, #2a1d04 0%, var(--surface) 35%);
}
.listing-card.vip::before {
    content: 'VIP';
    position: absolute;
    top: 10px; left: 10px;
    background: var(--grad-vip);
    color: white;
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    z-index: 2;
    letter-spacing: 1.2px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, .4);
}

/* PREMIUM — gradient border + larger */
.listing-card.premium {
    border: 2px solid transparent;
    background:
        linear-gradient(180deg, #faf5ff 0%, var(--surface) 25%) padding-box,
        var(--grad-premium) border-box;
    box-shadow: 0 12px 28px -8px rgba(168, 85, 247, .2);
}
[data-theme="dark"] .listing-card.premium {
    background:
        linear-gradient(180deg, #1f0a2c 0%, var(--surface) 30%) padding-box,
        var(--grad-premium) border-box;
}
.listing-card.premium::before {
    content: '\F4D5  PREMIUM';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 10px; left: 10px;
    background: var(--grad-premium);
    color: white;
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    z-index: 2;
    letter-spacing: 1.2px;
    box-shadow: 0 6px 16px rgba(168, 85, 247, .35);
}
.listing-card.premium .listing-price { color: #7c3aed; }

.premium-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}
.premium-grid .listing-photo { aspect-ratio: 16 / 11; }

/* Photo */
.listing-photo {
    aspect-ratio: 4 / 3;
    background: var(--bg-soft);
    overflow: hidden;
    position: relative;
}
.listing-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.listing-card:hover .listing-photo img { transform: scale(1.06); }
.listing-photo .no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-mute);
    font-size: 36px;
    background: var(--bg-soft);
}

/* Photo gradient overlay (alt-da yumşaq tündləşmə — qiymət oxunaqlı olsun) */
.listing-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .15) 100%);
    pointer-events: none;
}

/* Favori */
.listing-fav {
    position: absolute;
    top: 10px; right: 10px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-soft);
    font-size: 15px;
    z-index: 2;
    transition: all var(--t);
    box-shadow: var(--shadow-sm);
}
.listing-fav:hover { color: var(--danger); transform: scale(1.1); box-shadow: var(--shadow-md); }
.listing-fav.active { color: var(--danger); background: white; }

.listing-body {
    padding: var(--s-3) var(--s-4) var(--s-4);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--s-2);
}
.listing-price {
    font-weight: 800;
    font-size: 17px;
    color: var(--text);
    letter-spacing: -.4px;
    line-height: 1.2;
}
.listing-price.free { color: var(--success); }
.listing-title {
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}
.listing-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-2);
    font-size: 11.5px;
    color: var(--text-mute);
}
.listing-meta .region {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Footer sosial linklər === */
.footer-social {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    transition: all .2s;
    border: 1px solid var(--border);
}
.footer-social a:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* === Footer sərbəst HTML bloku === */
.footer-extra {
    padding: 18px 0;
    margin: 14px 0 0;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-soft);
    line-height: 1.6;
}
.footer-extra a { color: var(--primary); text-decoration: underline; }

/* === FOOTER SEO bölməsi (Naxçıvan internal linklər) === */
.footer-seo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    padding: 28px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.footer-seo-block h5 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-mute);
}
.footer-seo-block a {
    display: block;
    color: var(--text-soft);
    text-decoration: none;
    padding: 4px 0;
    font-size: 13px;
    transition: color .15s;
}
.footer-seo-block a:hover { color: var(--primary); }

/* === FOOTER === */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--s-10) 0 var(--s-4);
    margin-top: var(--s-12);
    color: var(--text-soft);
    font-size: 13.5px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--s-8);
    margin-bottom: var(--s-6);
}
.footer-col h4 {
    color: var(--text);
    margin: 0 0 var(--s-3);
    font-size: 14.5px;
    font-weight: 700;
}
.footer-col a {
    color: var(--text-soft);
    display: block;
    padding: 5px 0;
    transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--s-4);
    text-align: center;
    font-size: 12.5px;
    color: var(--text-mute);
}

/* === ALERT === */
.alert {
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-sm);
    margin-bottom: var(--s-3);
    font-size: 14px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: var(--s-2);
}
.alert-success { background: #dcfce7; border-color: var(--success); color: #14532d; }
.alert-warning { background: #fef3c7; border-color: var(--warning); color: #78350f; }
.alert-danger  { background: #fee2e2; border-color: var(--danger);  color: #7f1d1d; }
.alert-info    { background: var(--primary-soft); border-color: var(--primary); color: #1e3a8a; }
[data-theme="dark"] .alert-success { background: #052e1a; color: #86efac; }
[data-theme="dark"] .alert-warning { background: #2a1c08; color: #fcd34d; }
[data-theme="dark"] .alert-danger  { background: #2a0d0d; color: #fca5a5; }
[data-theme="dark"] .alert-info    { background: #0a1f3f; color: #93c5fd; }

/* === FORM === */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-6);
    box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: var(--s-4); }
.form-label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: var(--s-2);
    color: var(--text);
}
.form-label .req { color: var(--danger); }
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 11px var(--s-4);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 14.5px;
    transition: all var(--t);
    -webkit-appearance: none;
    appearance: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-mute); }
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-help { font-size: 12.5px; color: var(--text-mute); margin-top: var(--s-1); }
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--s-3);
}

/* === Animations === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}
.listing-card { animation: fadeInUp .45s cubic-bezier(.4, 0, .2, 1) backwards; }
.listing-grid > .listing-card:nth-child(1)  { animation-delay: .02s; }
.listing-grid > .listing-card:nth-child(2)  { animation-delay: .04s; }
.listing-grid > .listing-card:nth-child(3)  { animation-delay: .06s; }
.listing-grid > .listing-card:nth-child(4)  { animation-delay: .08s; }
.listing-grid > .listing-card:nth-child(5)  { animation-delay: .10s; }
.listing-grid > .listing-card:nth-child(6)  { animation-delay: .12s; }
.listing-grid > .listing-card:nth-child(7)  { animation-delay: .14s; }
.listing-grid > .listing-card:nth-child(8)  { animation-delay: .16s; }
.cat-card { animation: fadeInUp .35s cubic-bezier(.4, 0, .2, 1) backwards; }
.cat-grid > .cat-card:nth-child(1)  { animation-delay: .03s; }
.cat-grid > .cat-card:nth-child(2)  { animation-delay: .06s; }
.cat-grid > .cat-card:nth-child(3)  { animation-delay: .09s; }
.cat-grid > .cat-card:nth-child(4)  { animation-delay: .12s; }
.cat-grid > .cat-card:nth-child(5)  { animation-delay: .15s; }
.cat-grid > .cat-card:nth-child(6)  { animation-delay: .18s; }
.cat-grid > .cat-card:nth-child(7)  { animation-delay: .21s; }
.cat-grid > .cat-card:nth-child(8)  { animation-delay: .24s; }
.cat-grid > .cat-card:nth-child(9)  { animation-delay: .27s; }
.cat-grid > .cat-card:nth-child(10) { animation-delay: .30s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    :root { --header-h: 60px; }
    .search-bar { display: none; }
    .header-actions .btn { padding: 9px 12px; font-size: 13px; }
    .listing-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
    .cat-card { padding: var(--s-3); gap: var(--s-2); }
    .cat-card-icon { width: 38px; height: 38px; font-size: 17px; }
    .cat-card-name { font-size: 13px; }
    section { padding: var(--s-6) 0; }
    .listing-price { font-size: 15px; }
    .listing-title { font-size: 12.5px; }
    .listing-fav { width: 32px; height: 32px; font-size: 13px; }
    .form-card { padding: var(--s-4); }
}
@media (max-width: 480px) {
    .brand-text { display: none; }
    .listing-grid { gap: var(--s-2); }
    .listing-body { padding: var(--s-2) var(--s-3) var(--s-3); }
}

/* === Mobile bottom nav (modern, pill highlight) === */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--border);
    z-index: 99;
    padding: var(--s-1) 0 calc(var(--s-1) + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(15, 23, 42, .06);
}
[data-theme="dark"] .mobile-bottom-nav { background: rgba(19, 27, 44, .92); }
.mobile-bottom-nav .row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}
.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--s-2) var(--s-1);
    color: var(--text-mute);
    font-size: 10.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--t-fast);
    position: relative;
}
.mobile-bottom-nav a.active { color: var(--primary); }
.mobile-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px; height: 3px;
    border-radius: var(--r-pill);
    background: var(--primary);
}
.mobile-bottom-nav a i { font-size: 19px; }
.mobile-bottom-nav a.cta-btn {
    background: var(--grad-warm);
    color: white;
    margin: 0 var(--s-2);
    border-radius: var(--r-pill);
    padding: var(--s-2);
    box-shadow: 0 6px 16px -4px rgba(249, 115, 22, .45);
}
.mobile-bottom-nav a.cta-btn::before { display: none; }
.mobile-bottom-nav a.cta-btn i { font-size: 22px; }

@media (max-width: 768px) {
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: 78px; }
    .site-footer { display: none; }
}

/* =====================================================
   === ADS — premium çərçivəli reklam kartı ===
   ===================================================== */
.ad-card {
    --ad-accent: #2563eb;
    --ad-soft:   #eff6ff;
    margin: var(--s-5) 0;
    border-radius: var(--r-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .25s, box-shadow .25s, transform .25s;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}
.ad-card::before {
    /* sol kənar accent strip — incə */
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--ad-accent);
    opacity: .9;
    transition: width .25s;
}
.ad-card:hover {
    border-color: var(--ad-accent);
    box-shadow: 0 14px 30px -16px rgba(15, 23, 42, .14);
    transform: translateY(-1px);
}
.ad-card:hover::before { width: 5px; }

.ad-clickwrap {
    display: flex;
    align-items: center;
    gap: var(--s-5);
    padding: var(--s-5) var(--s-6) var(--s-5) calc(var(--s-6) + 6px);
    text-decoration: none !important;
    color: var(--text);
    min-height: 96px;
}
.ad-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--ad-soft);
    color: var(--ad-accent);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform .25s, background .25s;
}
.ad-clickwrap:hover .ad-icon { transform: scale(1.06); }

.ad-body { flex: 1; min-width: 0; }
.ad-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ad-accent);
    background: var(--ad-soft);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    margin-bottom: 6px;
    opacity: .9;
}
.ad-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 3px;
}
.ad-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-soft);
}
.ad-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ad-accent);
    font-weight: 700;
    font-size: 13.5px;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    background: var(--ad-soft);
    transition: background .2s, transform .2s, color .2s;
}
.ad-clickwrap:hover .ad-cta {
    background: var(--ad-accent);
    color: white;
    transform: translateX(3px);
}

/* Variant: STRIP (kompakt — footer_strip üçün) */
.ad-card.ad-v-strip {
    border-radius: 0;
    margin: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
}
.ad-card.ad-v-strip::before { display: none; }
.ad-card.ad-v-strip .ad-clickwrap {
    min-height: 64px;
    padding: var(--s-3) var(--s-5);
    gap: var(--s-3);
}
.ad-card.ad-v-strip .ad-icon { width: 40px; height: 40px; font-size: 20px; }
.ad-card.ad-v-strip .ad-title { font-size: 14.5px; margin-bottom: 1px; }
.ad-card.ad-v-strip .ad-text { font-size: 12.5px; }
.ad-card.ad-v-strip .ad-tag { display: none; }

/* Variant: SIDEBAR (şaquli, kompakt) */
.ad-card.ad-v-sidebar .ad-clickwrap {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: var(--s-6) var(--s-5);
    min-height: auto;
}
.ad-card.ad-v-sidebar .ad-icon { width: 60px; height: 60px; font-size: 30px; margin-bottom: 8px; }
.ad-card.ad-v-sidebar .ad-cta { margin-top: 8px; }

/* Rəng temaları — yalnız accent rəngi (gradient fon yoxdur) */
.ad-ocean   { --ad-accent: #2563eb; --ad-soft: #eff6ff; }
.ad-sunset  { --ad-accent: #ea580c; --ad-soft: #fff7ed; }
.ad-purple  { --ad-accent: #7c3aed; --ad-soft: #f5f3ff; }
.ad-orange  { --ad-accent: #ea580c; --ad-soft: #fff7ed; }
.ad-green   { --ad-accent: #059669; --ad-soft: #ecfdf5; }
.ad-blue    { --ad-accent: #2563eb; --ad-soft: #eff6ff; }
.ad-dark    { --ad-accent: #1e293b; --ad-soft: #f1f5f9; }

@media (max-width: 640px) {
    /* Reklam kartı — mobil-də ÇOX kompakt (yer qənaət, elanlar tez görsənsin) */
    .ad-card { margin: 10px 0; border-radius: var(--r-md); }
    .ad-card::before { width: 3px !important; }
    .ad-clickwrap {
        flex-wrap: nowrap;
        padding: 8px 10px 8px 14px !important;
        gap: 10px;
        min-height: auto;
    }
    .ad-icon { width: 34px !important; height: 34px !important; font-size: 16px; border-radius: 8px; }
    .ad-tag { display: none !important; }
    .ad-title {
        font-size: 12.5px !important;
        line-height: 1.25;
        margin-bottom: 1px;
        font-weight: 700;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .ad-text {
        font-size: 11.5px !important;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .ad-cta {
        padding: 5px 10px !important;
        font-size: 11px !important;
        margin-left: auto;
        flex-shrink: 0;
        gap: 3px;
    }
}

/* =====================================================
   === SHOPS — Mağaza (biznes hesab) komponentləri ===
   ===================================================== */

/* Şəxsi/Mağaza qeydiyyat seçimi */
.acc-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
}
.acc-type-card {
    cursor: pointer;
    margin: 0;
}
.acc-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.acc-type-card .acc-type-inner {
    border: 2px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px 12px;
    text-align: center;
    transition: all .2s;
    background: var(--surface);
}
.acc-type-card .acc-type-inner i { font-size: 28px; color: var(--text-mute); }
.acc-type-card .acc-type-name { font-weight: 700; margin-top: 6px; }
.acc-type-card .acc-type-desc { font-size: 12px; color: var(--text-soft); margin-top: 2px; line-height: 1.4; }
.acc-type-card input:checked ~ .acc-type-inner {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.acc-type-card input:checked ~ .acc-type-inner i { color: var(--primary); }

/* Profil bölmə seçim kartları (Şəxsi / Mağaza quick-jump) */
.prof-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.prof-section-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text);
    transition: all .2s;
    position: relative;
}
.prof-section-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.prof-section-icon {
    width: 48px; height: 48px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.prof-section-name {
    font-weight: 800;
    font-size: 15px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 5px;
}
.prof-section-desc {
    font-size: 12.5px;
    color: var(--text-soft);
    margin-top: 2px;
}
.prof-section-arrow {
    margin-left: auto;
    color: var(--text-mute);
    font-size: 18px;
    transition: transform .2s;
}
.prof-section-card:hover .prof-section-arrow { transform: translateY(2px); color: var(--primary); }

@media (max-width: 600px) {
    .prof-section-grid { grid-template-columns: 1fr; }
}

/* Profil — başlıq H2 (Şəxsi / Mağaza) */
.prof-h2 {
    margin: 28px 0 14px;
    font-size: 19px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    scroll-margin-top: 90px;  /* anchor scroll header-in altında dayansın */
    color: var(--text);
}
.prof-h2:first-of-type { margin-top: 8px; }
.prof-h2-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

/* form-card içindəki başlıq stili (ikon + ad) */
.form-card { margin-bottom: 14px; }
.form-card-title {
    margin: 0 0 14px;
    font-size: 14.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.form-card-title i { color: var(--primary); }
.form-help-inline { color: var(--text-mute); font-weight: 400; font-size: 12.5px; }

/* Profil — mağaza header preview (cover + logo + ad düz layout-da) */
.shop-edit-header {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.shop-edit-cover {
    height: 120px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
    background-size: cover;
    background-position: center;
}
.shop-edit-cover.shop-cover-empty {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
}
.shop-edit-meta {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.shop-edit-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--r-md);
    background: var(--surface);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
    margin-top: -36px;
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .15);
}
.shop-edit-logo.shop-logo-empty {
    background: var(--bg-soft);
    color: var(--text-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.shop-edit-info { flex: 1; min-width: 0; }
.shop-edit-name {
    font-weight: 800;
    font-size: 17px;
    line-height: 1.25;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.shop-edit-url {
    font-size: 12.5px;
    color: var(--text-mute);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.shop-edit-url:hover { color: var(--primary); }

/* Loqo + cover yükləmə kartı */
.upload-card .upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.upload-form .form-input { padding: 8px; font-size: 13px; }
@media (max-width: 600px) {
    .upload-card .upload-grid { grid-template-columns: 1fr; }
}

/* === Köhnə class-lar (geriyə uyğunluq, listing detail-də və başqa yerdə istifadə oluna bilər) === */
.shop-cover-empty,
.shop-logo-empty {
    background: var(--bg-soft);
    color: var(--text-mute);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Public mağaza səhifəsi (shop.php) */
.shop-public-header {
    position: relative;
    margin-bottom: 0;
}
.shop-cover-public {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.shop-cover-grad {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.18), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,.12), transparent 50%);
}
.shop-public-info {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: -45px;
    padding-bottom: 16px;
    flex-wrap: wrap;
}

/* === COVER ŞƏKİL YOXDURSA: nazik banner + heç bir overlap === */
.shop-public-header.no-cover .shop-cover-public {
    height: 70px;
    background: linear-gradient(90deg, #1e6cf6 0%, #7c3aed 50%, #ec4899 100%);
}
.shop-public-header.no-cover .shop-public-info {
    margin-top: 16px;            /* overlap YOX, ayrıca aşağı */
    align-items: center;
    gap: 16px;
}
.shop-public-header.no-cover .shop-logo-wrap-public {
    border-width: 2px;
    width: 88px;
    height: 88px;
}
.shop-public-header.no-cover .shop-logo-public.shop-logo-empty {
    font-size: 32px;
}
.shop-logo-wrap-public {
    width: 130px;
    height: 130px;
    border-radius: var(--r-lg);
    border: 5px solid var(--surface);
    overflow: hidden;
    background: var(--surface);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}
.shop-logo-public {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.shop-logo-public.shop-logo-empty {
    background: var(--bg-soft);
    color: var(--text-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}
.shop-public-meta { flex: 1; min-width: 250px; }
.shop-public-name {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.shop-public-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 12px;
}
.shop-public-stats span i { color: var(--primary); margin-right: 3px; }
.shop-public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Mağazalar siyahısı (shops.php) */
.shops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.shop-tile {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform var(--t), box-shadow var(--t);
    position: relative;
}
.shop-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.shop-tile-cover {
    height: 88px;
    background: var(--grad-brand);
    background-size: cover;
    background-position: center;
}
.shop-tile-body {
    padding: 0 14px 14px;
    text-align: center;
    margin-top: -28px;
    position: relative;
}
.shop-tile-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--r-md);
    border: 3px solid var(--surface);
    background: var(--surface);
    display: inline-block;
    object-fit: cover;
    margin-bottom: 8px;
}
.shop-tile-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shop-tile-meta {
    font-size: 12.5px;
    color: var(--text-soft);
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Listing card-da mağaza badge */
.listing-shop {
    font-size: 11.5px;
    color: var(--text-soft);
    background: var(--bg-soft);
    padding: 3px 8px;
    border-radius: var(--r-pill);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.listing-shop i.bi-shop { color: var(--primary); }

/* Listing detail-də inline mağaza badge */
.shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.shop-badge:hover { background: var(--primary-mid); }
.shop-badge.shop-badge-sm { font-size: 11.5px; padding: 2px 7px; }

@media (max-width: 600px) {
    .shop-public-info { margin-top: -40px; }
    .shop-logo-wrap-public { width: 90px; height: 90px; }
    .shop-public-name { font-size: 20px; }
    .shop-cover-public { height: 160px; }
    .shop-cover-public:not([style*="background-image"]) { height: 70px; }
}

/* ===== Header profil dropdown ===== */
.profile-dropdown {
    position: relative;
    display: inline-block;
}
.profile-trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 2px !important;
    padding: 0 8px !important;
}
.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    max-width: calc(100vw - 24px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,.16), 0 4px 12px rgba(0,0,0,.08);
    padding: 4px 0;
    z-index: 1000;
    display: none;
    overflow: hidden;
}
.profile-menu.open {
    display: block;
    animation: profMenuIn .14s ease-out;
}
@keyframes profMenuIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.profile-menu-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.profile-menu-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mute);
    font-size: 26px;
    flex-shrink: 0;
    overflow: hidden;
}
.profile-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-menu-info {
    flex: 1;
    min-width: 0;
}
.profile-menu-name {
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-menu-sub {
    font-size: 12px;
    color: var(--text-mute);
    margin-top: 2px;
}
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: background .12s;
}
.profile-menu-item:hover {
    background: var(--bg-soft);
    text-decoration: none;
}
.profile-menu-item i {
    font-size: 16px;
    color: var(--text-soft);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.profile-menu-item > span:first-of-type {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-menu-badge {
    background: var(--primary-soft, #dbeafe);
    color: var(--primary, #2563eb);
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    flex-shrink: 0;
}
.profile-menu-badge-msg {
    background: #fee2e2;
    color: #b91c1c;
}
.profile-menu-badge-admin {
    background: #fef3c7;
    color: #92400e;
    letter-spacing: .5px;
    font-size: 10px;
}
.profile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
.profile-menu-item-admin {
    color: #dc2626;
}
.profile-menu-item-admin i {
    color: #dc2626;
}
.profile-menu-item-logout {
    color: var(--text-soft);
}
.profile-menu-item-logout i {
    color: var(--danger, #ef4444);
}
[data-theme="dark"] .profile-menu {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
}
[data-theme="dark"] .profile-menu-badge {
    background: rgba(37,99,235,.15);
    color: #93c5fd;
}

@media (max-width: 600px) {
    .profile-menu {
        width: 280px;
        right: -8px;
    }
}

/* === Mağaza telefon idarəetmə (profil) === */
.phone-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
    padding: 8px;
    background: var(--bg-soft);
    border-radius: var(--r-md);
}
.phone-row .form-input {
    margin: 0;
    background: var(--surface);
}
.phone-wa-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-soft);
    user-select: none;
    transition: all .15s;
    white-space: nowrap;
}
.phone-wa-toggle input { margin: 0; cursor: pointer; }
.phone-wa-toggle:has(input:checked) {
    background: #25d366;
    border-color: #25d366;
    color: white;
}
.phone-row .phone-remove {
    color: var(--danger);
    background: var(--surface);
    border: 1px solid var(--border);
    height: 38px;
    width: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.phone-row .phone-remove:hover { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); }

@media (max-width: 600px) {
    .phone-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "phone phone"
            "label label"
            "wa    remove";
        gap: 6px;
    }
    .phone-row > input[type=tel]  { grid-area: phone; }
    .phone-row > input[type=text] { grid-area: label; }
    .phone-row > .phone-wa-toggle { grid-area: wa;     justify-self: start; }
    .phone-row > .phone-remove    { grid-area: remove; justify-self: end;   }
}

/* === Promo card (pulsuz tanıtım banner) === */
.promo-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-lg);
    color: white;
    position: relative;
    overflow: hidden;
}
.promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(255,255,255,.18), transparent 50%);
    pointer-events: none;
}
.promo-card > * { position: relative; z-index: 1; }
.promo-card.promo-free {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}
.promo-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    backdrop-filter: blur(4px);
}
.promo-title {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.promo-badge {
    background: rgba(255,255,255,.95);
    color: #047857;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
}
.promo-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    opacity: .96;
}

/* === Infinite scroll loader === */
.infinite-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 0;
    color: var(--text-soft);
    font-size: 14px;
}
.loader-spinner {
    width: 24px; height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    animation: spin 0.8s linear infinite;
}
.loader-spinner i { font-size: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.infinite-end {
    text-align: center;
    padding: 32px 0 16px;
    color: var(--text-mute);
    font-size: 14px;
}
.infinite-end i { color: var(--success, #16a34a); margin-right: 4px; }

/* === Ödəniş səhifəsi — metod kartları === */
.pay-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.pay-method-card {
    --m-color: #2563eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: all .2s;
}
.pay-method-card:hover {
    border-color: var(--m-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(15, 23, 42, .15);
}
.pay-method-card.active {
    border-color: var(--m-color);
    background: color-mix(in srgb, var(--m-color) 8%, white);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-color) 18%, transparent);
}
.pay-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--m-color) 12%, white);
    color: var(--m-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.pay-method-name {
    font-weight: 700;
    font-size: 13.5px;
    text-align: center;
    line-height: 1.3;
}

/* === "Naxçıvana göndərilir" badge — yanıb-sönən diqqətçəkən === */
@keyframes shipsPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, .55), 0 4px 14px -4px rgba(16, 185, 129, .35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 4px 14px -4px rgba(16, 185, 129, .55);
        transform: scale(1.03);
    }
}

/* "Naxçıvana göndərilir" badge-i şəkil üzərində GÖSTƏRİLMİR
   (yalnız body-də .ships-nx-badge kimi qalır) */
.ships-nx-photo-badge { display: none !important; }
.ships-nx-photo-badge i { font-size: 13px; }

/* Listing-body altda kompakt mətn (icon + söz) */
.ships-nx-badge {
    font-size: 11.5px;
    color: #047857;
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
    border: 1px solid #6ee7b7;
    padding: 3px 8px;
    border-radius: var(--r-pill);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ships-nx-badge i { color: #10b981; }

/* Forma-da çekçeçili kart (post.php / edit-listing.php) */
.ships-nx-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1.5px solid #10b981;
    border-radius: var(--r-md);
    position: relative;
    animation: shipsPulse 2.5s ease-in-out infinite;
}
.ships-nx-card > i {
    font-size: 22px;
    color: #10b981;
    flex-shrink: 0;
}

/* Naxçıvan daxili çatdırılma — cyan rəng (mavi-yaşıl ortası) */
@keyframes deliveryPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(8, 145, 178, .55), 0 4px 14px -4px rgba(8, 145, 178, .35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(8, 145, 178, 0), 0 4px 14px -4px rgba(8, 145, 178, .55);
        transform: scale(1.03);
    }
}
.delivery-nx-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #cffafe, #ecfeff);
    border: 1.5px solid #0891b2;
    border-radius: var(--r-md);
    animation: deliveryPulse 2.5s ease-in-out infinite;
}
.delivery-nx-card > i {
    font-size: 22px;
    color: #0891b2;
    flex-shrink: 0;
}
.delivery-nx-photo-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 2;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: .2px;
    animation: deliveryPulse 2s ease-in-out infinite;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.delivery-nx-photo-badge i { font-size: 13px; }
.delivery-nx-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #cffafe, #ecfeff);
    border: 2px solid #0891b2;
    color: #155e75;
    padding: 10px 14px;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 700;
    margin: 14px 0;
    animation: deliveryPulse 2.5s ease-in-out infinite;
}
.delivery-nx-detail i { font-size: 22px; color: #0891b2; }

/* Listing card body-də cyan badge variant */
.ships-nx-badge.delivery-badge {
    background: linear-gradient(135deg, #cffafe, #ecfeff);
    color: #155e75;
    border-color: #67e8f9;
}
.ships-nx-badge.delivery-badge i { color: #0891b2; }

/* Yeni / İşlənmiş badge (listing card + detail) */
.cond-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: var(--r-pill);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.5;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.cond-pill.cond-new {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
}
.cond-pill.cond-used {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
/* Listing detail-də daha böyük göstər */
.listing-page-meta .cond-pill,
[style*="font-size: 13px"] .cond-pill {
    font-size: 11px;
    padding: 2px 9px;
}

/* Filter sahəsində Naxçıvana göndərilənlər checkbox */
.ships-nx-filter {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1.5px solid #6ee7b7;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all .2s;
}
.ships-nx-filter:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px -4px rgba(16, 185, 129, .25);
}
.ships-nx-filter input { margin-top: 3px; cursor: pointer; }
.ships-nx-filter-label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.3; }
.ships-nx-filter-label small { color: var(--text-soft); font-size: 11.5px; font-weight: 500; }

/* Cyan variant — Naxçıvan daxili çatdırılma filteri */
.ships-nx-filter.delivery-filter {
    background: linear-gradient(135deg, #cffafe, #ecfeff);
    border-color: #67e8f9;
}
.ships-nx-filter.delivery-filter:hover {
    border-color: #0891b2;
    box-shadow: 0 4px 12px -4px rgba(8, 145, 178, .25);
}

/* Listing detail-də qabariq blok */
.ships-nx-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
    border: 2px solid #10b981;
    color: #064e3b;
    padding: 10px 14px;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 700;
    margin: 14px 0;
    animation: shipsPulse 2.5s ease-in-out infinite;
}
.ships-nx-detail i { font-size: 22px; color: #10b981; }

/* === Skeleton loader (if needed) === */
.skel {
    background: linear-gradient(90deg, var(--bg-soft) 0%, var(--border) 50%, var(--bg-soft) 100%);
    background-size: 200% 100%;
    animation: skelAnim 1.4s linear infinite;
    border-radius: var(--r-sm);
}
@keyframes skelAnim {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   === MOBİL XÜSUSİ — yalnız 640px və daha az ===
   Veb (desktop, planşet) versiyada heç nə dəyişmir.
   Telefondaki istifadəçilər üçün:
     - Kateqoriyalar yan-yana 3 sütun, kompakt
     - Elanlar yan-yana 2 sütun (1 əvəzinə)
   ===================================================== */
@media (max-width: 640px) {
    /* Kateqoriyalar — 3 sütun, kompakt kart */
    .cat-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    /* Mobil-də ilk 3 kateqoriya görsənir (1 sıra), qalanı düyməyə basıb açılır */
    .cat-grid > .cat-card:nth-child(n+4):not(.cat-card-show) {
        display: none !important;
    }
    .cat-grid > .cat-card.cat-card-show {
        display: flex !important;
        animation: fadeInUp .3s ease backwards;
    }

    .cat-card {
        flex-direction: column !important;
        align-items: center;
        gap: 6px;
        padding: 12px 6px;
        text-align: center;
    }
    .cat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .cat-card-info {
        text-align: center;
        width: 100%;
    }
    .cat-card-name {
        font-size: 12px !important;
        line-height: 1.2;
        font-weight: 700;
    }
    .cat-card-count {
        font-size: 10.5px !important;
        margin-top: 2px;
    }

    /* Elanlar — 2 sütun yan-yana, kompakt kart */
    .listing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .listing-card .listing-body {
        padding: 8px 10px;
    }
    .listing-card .listing-price {
        font-size: 14px !important;
        font-weight: 800;
        line-height: 1.2;
    }
    .listing-card .listing-title {
        font-size: 12.5px !important;
        line-height: 1.3;
        margin-top: 3px;
        /* 2 sətir limiti */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .listing-card .listing-meta {
        font-size: 10.5px !important;
        margin-top: 4px;
    }
    .listing-card .listing-meta i { font-size: 11px; }
    .listing-shop {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    .listing-shop i { font-size: 9px !important; }

    /* Photo badge-ləri kompakt + ALT-sol küncə (VIP/Premium ilə üst-üstə düşməsin) */
    .ships-nx-photo-badge,
    .delivery-nx-photo-badge {
        font-size: 9.5px !important;
        padding: 3px 7px !important;
        top: auto !important;
        bottom: 5px !important;
        left: 5px !important;
    }
    .ships-nx-photo-badge i,
    .delivery-nx-photo-badge i { font-size: 10px !important; }

    /* Body badge-ləri də mobil-də gizli (yalnız photo overlay qalır — yer qənaət) */
    .listing-card .ships-nx-badge { display: none; }

    /* Premium və VIP kart üçün də 2 sütun saxla */
    .premium-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Section-larda padding az olsun ki elanlar tez başlasın */
    section { padding-top: 12px !important; padding-bottom: 12px !important; }
    .hero.hero-tight { padding: 12px 0 !important; }
    .section-head { margin-bottom: 8px !important; }
    .section-head h2 { font-size: 17px !important; }
}

/* Çox kiçik telefonlar üçün (< 380px) — kateqoriya 2 sütun, çox sığacaq */
@media (max-width: 380px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
