/* ============================================================
   AutoBazar — Design System v2
   Inspirace: AutoTrader UK, Cars.com, Sauto.cz, TipCars
   ============================================================

   DESIGN TOKENS — změna celého vzhledu úpravou :root
   ============================================================ */

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

:root {
    /* Barvy — brand */
    --accent: #1d4ed8;
    /* primární modrá */
    --accent-hover: #1e40af;
    --accent-light: #eff6ff;
    --accent-border: #bfdbfe;
    --accent-mid: #3b82f6;
    /* světlejší modrá pro gradienty */

    /* Barvy — text */
    --text-900: #0f172a;
    /* nadpisy */
    --text-700: #334155;
    /* tělo */
    --text-500: #64748b;
    /* sekundární */
    --text-300: #94a3b8;
    /* placeholder, hint */

    /* Barvy — pozadí */
    --bg-white: #ffffff;
    --bg-page: #f1f5f9;
    --bg-subtle: #f8fafc;
    --bg-hero: #0f172a;
    /* tmavý hero */

    /* Barvy — okraje */
    --border: #e2e8f0;
    --border-mid: #cbd5e1;

    /* Barvy — stavy */
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --success-br: #bbf7d0;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --error-br: #fecaca;
    --warning-bg: #fef3c7;
    --warning: #92400e;
    --warning-br: #fde68a;
    --info-bg: #eff6ff;
    --info: #1e40af;
    --info-br: #bfdbfe;

    /* Typografie */
    --font: system-ui, -apple-system, 'Segoe UI', Helvetica, sans-serif;
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-md: 18px;
    --text-lg: 21px;
    --text-xl: 27px;
    --text-2xl: 36px;
    --lh: 1.65;

    /* Layout */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, .10), 0 4px 8px rgba(0, 0, 0, .04);
    --shadow-blue: 0 4px 16px rgba(29, 78, 216, .2);

    --nav-h: 64px;
    --max-w: 1200px;
    --pad: 24px;

    /* Karty */
    --card-img: 260px;
    --card-min: 300px;
    --card-gap: 20px;
}

/* ============================================================
   BASE
   ============================================================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-900);
    line-height: var(--lh);
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

button {
    font-family: var(--font);
}

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

/* ============================================================
   MOBILE STICKY CTA BAR (jen na mobilu — styling v 768px breakpointu)
   ============================================================ */
.mobile-cta-bar { display: none; }

/* ============================================================
   SITE HEADER (sticky wrapper pro info stripe + navbar)
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
}

/* ============================================================
   INFO STRIPE
   ============================================================ */
.info-stripe {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.info-stripe .container {
    display: inline-block;
    max-width: 100%;
    padding: 0;
}
a.info-stripe:hover { filter: brightness(.96); text-decoration: underline; }
.info-stripe-info    { background: #dbeafe; color: #1e3a8a; }
.info-stripe-success { background: #dcfce7; color: #14532d; }
.info-stripe-warning { background: #fef3c7; color: #78350f; }
.info-stripe-danger  { background: #fee2e2; color: #7f1d1d; }
@media (max-width: 960px) {
    .info-stripe { font-size: 15px; padding: 9px 14px; }
}
@media (max-width: 768px) {
    .info-stripe { font-size: 14px; padding: 8px 12px; line-height: 1.35; }
}
@media (max-width: 480px) {
    .info-stripe { font-size: 13px; padding: 7px 10px; }
}

/* ============================================================
   NAVIGACE
   ============================================================ */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    height: 68px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.navbar .container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
}

/* Logo */
.navbar-logo {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -0.5px;
    flex-shrink: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    padding-right: 28px;
    margin-right: 8px;
    border-right: 1px solid var(--border);
}

.navbar-logo:hover {
    text-decoration: none;
}

.navbar-logo .logo-first {
    color: var(--text-900);
}

.navbar-logo .logo-rest {
    color: var(--accent);
    margin-left: 5px;
}

/* Navigační linky */
.navbar-links {
    display: flex;
    gap: 0;
    list-style: none;
    flex: 1;
    padding-left: 16px;
}

.navbar-links a {
    font-size: 14px;
    color: var(--text-500);
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--r-md);
    transition: color .15s, background .15s;
    display: block;
    white-space: nowrap;
}

.navbar-links a:hover {
    color: var(--text-900);
    background: var(--bg-subtle);
    text-decoration: none;
}

.navbar-links a.active {
    color: var(--accent);
    font-weight: 600;
    background: var(--accent-light);
}

/* CTA sekce vpravo */
.navbar-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    margin-left: 8px;
}

.navbar-phone {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-900);
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.navbar-phone small {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-300);
    margin-bottom: 1px;
}

.navbar-phone:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ============================================================
   HERO — tmavý, s velkým searchem
   ============================================================ */
.hero {
    background: var(--bg-hero);
    padding: 36px 0 32px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 60% 50%, rgba(29, 78, 216, .25) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    position: relative;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .7);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(26px, 4vw, var(--text-2xl));
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 10px;
}

.hero h1 em {
    color: #60a5fa;
    font-style: normal;
}

.hero-sub {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, .55);
    margin-bottom: 32px;
}

/* Search box */
.search-box {
    background: var(--bg-white);
    border-radius: var(--r-xl);
    padding: 6px 6px 6px 20px;
    display: flex;
    gap: 0;
    align-items: center;
    box-shadow: var(--shadow-lg);
    max-width: 780px;
}

.search-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 4px;
}

.search-field-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 8px 14px 8px 0;
}

.search-field-wrap label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-300);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 2px;
}

.search-field-wrap select {
    border: none;
    outline: none;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-900);
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding: 0;
}

.search-field-wrap select option {
    font-weight: 400;
}

.btn-search-big {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r-lg);
    padding: 14px 28px;
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-search-big:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-blue);
}

.btn-search-big svg {
    flex-shrink: 0;
}

/* Hero stats */
.hero-stats {
    display: flex;
    gap: 28px;
    margin-top: 28px;
}

.hero-stat {
    color: rgba(255, 255, 255, .5);
    font-size: var(--text-sm);
}

.hero-stat strong {
    color: #fff;
    font-weight: 700;
    display: block;
    font-size: 18px;
}

/* ============================================================
   FILTRAČNÍ LIŠTA
   ============================================================ */
.filter-strip {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.filter-strip .container {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.ftag {
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 5px 16px;
    color: var(--text-500);
    cursor: pointer;
    background: var(--bg-white);
    transition: all .12s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.ftag:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.ftag.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.filter-count {
    margin-left: auto;
    font-size: var(--text-sm);
    color: var(--text-300);
    font-weight: 500;
}

/* Zpětná kompatibilita se starým class názvem */
.filter-tag {
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 5px 16px;
    color: var(--text-500);
    cursor: pointer;
    background: var(--bg-white);
    transition: all .12s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.filter-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.filter-tag.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 28px 0 16px;
}

.section-header h2 {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text-900);
    letter-spacing: -0.3px;
}

.section-header a {
    font-size: var(--text-sm);
    color: var(--accent);
    font-weight: 500;
}

/* ============================================================
   MŘÍŽKA + KARTY INZERÁTŮ
   ============================================================ */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
    gap: var(--card-gap);
    padding-bottom: 52px;
}

.cars-show-all {
    display: flex;
    justify-content: center;
    margin-top: -28px;
    margin-bottom: 52px;
}

.btn-show-all {
    display: inline-block;
    background: var(--bg-white);
    color: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: var(--r-lg);
    padding: 13px 32px;
    font-size: var(--text-base);
    font-weight: 700;
    text-decoration: none;
    transition: all .15s;
    letter-spacing: .01em;
}

.btn-show-all:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-blue);
    text-decoration: none;
}

.car-card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform .18s, box-shadow .18s, border-color .18s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    cursor: pointer;
}

.car-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-mid);
    text-decoration: none;
}

/* Fotka */
.car-thumb {
    height: var(--card-img);
    background: #e8eef5;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.car-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.car-card:hover .car-thumb img {
    transform: scale(1.04);
}

.car-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-300);
    font-size: var(--text-xs);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.badge-blue {
    background: var(--accent);
    color: #fff;
}

.badge-red {
    background: var(--error);
    color: #fff;
}

.badge-green {
    background: var(--success);
    color: #fff;
}

.badge-amber {
    background: #d97706;
    color: #fff;
}

.photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tělo karty */
.car-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-title {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text-900);
    line-height: 1.25;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.car-sub {
    font-size: var(--text-sm);
    color: var(--text-500);
    margin-bottom: 10px;
}

.car-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.car-tag {
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-subtle);
    color: var(--text-500);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--r-pill);
}

.car-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 12px;
}

.car-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.car-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -0.5px;
    line-height: 1;
}

.car-price-vat {
    font-size: 11px;
    color: var(--text-300);
    margin-top: 2px;
}

.car-price.sold {
    font-size: var(--text-md);
    color: var(--text-300);
    text-decoration: line-through;
    font-weight: 500;
}

.car-btn {
    font-size: var(--text-xs);
    font-weight: 700;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-md);
    padding: 7px 14px;
    white-space: nowrap;
    letter-spacing: .02em;
}

/* ============================================================
   DETAIL VOZU
   ============================================================ */
.detail-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    padding: 28px 0 56px;
    align-items: start;
}

/* Fix overflow — grid items se defaultně chovají jako min-width: auto a tlačí
   sloupec přes 1fr. Tohle resetuje to chování a respektuje šířku sloupce. */
.detail-wrap>* {
    min-width: 0;
}

.gallery-main {
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #e8eef5;
    height: 440px;
    position: relative;
    margin-bottom: 10px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.gallery-thumb {
    width: 86px;
    height: 60px;
    border-radius: var(--r-sm);
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    background: #e8eef5;
    transition: border-color .12s;
    flex-shrink: 0;
}

.gallery-thumb.active {
    border-color: var(--accent);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Wrapper pro thumbs strip s šipkami */
.gallery-thumbs-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    max-width: 100%;
    /* Aby se wrapper nerozšířil přes svého parenta */
    min-width: 0;
}

/* Horizontální posuvný pás thumbnailů */
.gallery-thumbs-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    min-width: 0;
    /* Klíčové! Bez tohohle flex item nerespektuje šířku parenta */
    /* Skrýt scrollbar (pro čistší vzhled — šipky stačí) */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: 2px 0;
    /* Místo pro 2px border aktivního thumbu */
}

.gallery-thumbs-strip::-webkit-scrollbar {
    display: none;
}

/* Chrome/Safari */

/* Thumb v stripu — fixní šířka, nestlačit se */
.gallery-thumbs-strip .gallery-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
}

/* Navigační šipky */
.gallery-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 70px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-700);
    border-radius: var(--r-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s, color .12s;
    padding: 0;
}

.gallery-arrow:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.gallery-arrow:active {
    transform: scale(0.96);
}

/* Na mobilu šipky schovat (touch scroll je intuitivnější), thumby zůstanou scrollable */
@media (max-width: 560px) {
    .gallery-arrow {
        display: none;
    }

    .gallery-thumbs-strip .gallery-thumb {
        width: 80px;
        height: 56px;
    }
}

.detail-title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.detail-sub {
    font-size: 16px;
    color: var(--text-500);
    margin-bottom: 16px;
}

.detail-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-br);
    padding: 4px 10px;
    border-radius: var(--r-pill);
    display: flex;
    align-items: center;
    gap: 4px;
}

.params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 28px;
}

.param-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 16px;
}

.param-label {
    font-size: 10px;
    color: var(--text-300);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 3px;
}

.param-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-900);
}

.detail-section-title {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.detail-desc p {
    font-size: 16px;
    color: var(--text-700);
    line-height: 1.85;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* minmax(0,1fr) = sloupec se neroztáhne přes obsah */
    gap: 0 24px;
    margin-top: 8px;
    min-width: 0;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .features-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.feature-chip {
    font-size: var(--text-sm);
    color: var(--text-700);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    /* Pro dlouhé názvy výbavy: zalom pokud potřeba, nikoli overflow */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.feature-chip:last-child {
    border-bottom: none;
}

.feature-chip::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.feature-category-title {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-300);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 20px 0 4px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}

.feature-category-title:first-child {
    margin-top: 0;
}

/* Sidebar — sticky cenový box (offset počítaný z aktuální výšky .site-header) */
.price-sidebar {
    position: sticky;
    top: calc(var(--header-h, var(--nav-h)) + 12px);
}

.price-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 14px;
}

.price-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.price-main {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -1px;
}

.price-vat {
    font-size: var(--text-sm);
    color: var(--text-300);
    font-weight: 500;
    white-space: nowrap;
}

.price-note {
    font-size: var(--text-sm);
    color: var(--text-300);
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.btn-primary {
    display: block;
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r-lg);
    padding: 15px;
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    margin-bottom: 10px;
    transition: all .15s;
    letter-spacing: .01em;
    line-height: 1.2;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-blue);
    text-decoration: none;
}

.btn-secondary {
    display: block;
    width: 100%;
    background: var(--bg-white);
    color: var(--text-900);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-lg);
    padding: 14px;
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    margin-bottom: 20px;
    transition: background .15s;
    line-height: 1.2;
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    text-decoration: none;
}

.dealer-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 18px 22px;
}

.dealer-name {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 6px;
}

.dealer-info {
    font-size: var(--text-sm);
    color: var(--text-500);
    line-height: 1.7;
}

.dealer-hours {
    margin-top: 8px;
    font-size: var(--text-sm);
    color: var(--text-300);
}

/* ============================================================
   FORMULÁŘE
   ============================================================ */
.form-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 36px 0 52px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 11px 14px;
    font-size: var(--text-base);
    color: var(--text-900);
    background: var(--bg-white);
    transition: border-color .15s, box-shadow .15s;
    font-family: var(--font);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}

.form-group textarea {
    min-height: 130px;
    resize: vertical;
}

.form-note {
    font-size: var(--text-xs);
    color: var(--text-300);
    margin-top: 5px;
}

.alert {
    padding: 13px 16px;
    border-radius: var(--r-md);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-br);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-br);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-br);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-br);
}

/* ============================================================
   MAP BAND — kde nás najdete (nad footerem)
   ============================================================ */
.map-band {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 44px 0;
}

.map-band-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 32px;
    align-items: stretch;
}

.map-band-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-band-info h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-900);
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.map-band-info p {
    margin: 0 0 6px;
    color: var(--text-700);
}

.map-band-info .map-address {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-900);
    margin-bottom: 14px;
}

.map-band-info .map-hours {
    font-size: 14px;
    color: var(--text-500);
}

.map-band-info .map-hours strong {
    color: var(--text-700);
    font-weight: 600;
    display: inline-block;
    min-width: 64px;
}

.map-band-info .map-phone {
    margin-top: 16px;
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.map-band-info .map-phone:hover {
    text-decoration: underline;
}

.map-band-frame {
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-height: 320px;
    background: var(--bg-subtle);
}

.map-band-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
}

@media (max-width: 960px) {
    .map-band-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .map-band {
        padding: 28px 0;
    }
    .map-band-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .map-band-info h3 {
        font-size: 20px;
    }
    .map-band-info .map-address {
        font-size: 16px;
    }
    .map-band-frame,
    .map-band-frame iframe {
        min-height: 260px;
    }
}

/* ============================================================
   PATIČKA
   ============================================================ */
.footer {
    background: var(--text-900);
    color: rgba(255, 255, 255, .6);
    padding: 36px 0 28px;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.footer-logo span {
    color: #60a5fa;
}

.footer-desc {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, .45);
    line-height: 1.7;
}

.footer-email {
    display: inline-block;
    margin-top: 14px;
    color: rgba(255, 255, 255, .7);
    font-size: var(--text-sm);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    padding-bottom: 2px;
    transition: color .15s, border-color .15s;
}

.footer-email:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, .5);
    text-decoration: none;
}

.footer-heading {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 14px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: rgba(255, 255, 255, .55);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color .15s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-copy {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, .3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy-link {
    color: rgba(255, 255, 255, .3);
    font-size: var(--text-xs);
    text-decoration: none;
    transition: color .15s;
}

.footer-copy-link:hover {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    font-size: var(--text-sm);
    color: var(--text-300);
    padding: 18px 0 0;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a {
    color: var(--text-500);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb span {
    color: var(--text-900);
    font-weight: 600;
}

.breadcrumb-sep {
    color: var(--text-300);
    font-size: 12px;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: #0d0d0d;
    z-index: 1000;
    flex-direction: column;
}

.lightbox.open {
    display: flex;
}

/* Horní část — foto + info panel */
.lb-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.lb-photo {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 56px;
    background: #0d0d0d;
    position: relative;
}

.lb-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--r-md);
    user-select: none;
}

/* Info panel vpravo */
.lb-info {
    width: 280px;
    flex-shrink: 0;
    background: #181818;
    border-left: 1px solid rgba(255, 255, 255, .07);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.lb-counter-top {
    font-size: 11px;
    color: rgba(255, 255, 255, .35);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.lb-info-title {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.lb-info-price {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.lb-info-price-note {
    font-size: 13px;
    color: rgba(255, 255, 255, .35);
    margin-top: 3px;
}

.lb-info-divider {
    height: 1px;
    background: rgba(255, 255, 255, .07);
}

.lb-params {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.lb-param {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.lb-param-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, .35);
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.lb-param-value {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, .9);
    text-align: right;
}

.lb-info-cta {
    display: block;
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 11px;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    transition: background .15s;
}

.lb-info-cta:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

/* Zavřít */
.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, .1);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, .2);
}

/* Šipky */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .1);
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 10;
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, .2);
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

/* Spodní pruh s thumbnaily — velké jako na referenci */
.lb-thumbs-bar {
    height: 110px;
    flex-shrink: 0;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.lb-thumbs-bar::-webkit-scrollbar {
    height: 3px;
}

.lb-thumbs-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 2px;
}

.lb-thumb {
    width: 155px;
    height: 88px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2.5px solid transparent;
    opacity: .45;
    transition: opacity .15s, border-color .15s;
    position: relative;
}

.lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-thumb.active {
    border-color: #fff;
    opacity: 1;
}

.lb-thumb:hover {
    opacity: .8;
}

.lb-thumb-num {
    position: absolute;
    bottom: 4px;
    right: 5px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, .6);
    background: rgba(0, 0, 0, .45);
    padding: 1px 5px;
    border-radius: 3px;
}

/* ============================================================
   STATICKÉ STRÁNKY
   ============================================================ */
.page-content p {
    font-size: 17px;
    color: var(--text-700);
    line-height: 1.85;
    margin-bottom: 1.5em;
}

.page-content p:last-child {
    margin-bottom: 0;
}

.page-content strong {
    color: var(--text-900);
    font-weight: 700;
}

/* ============================================================
   ADMINISTRACE
   ============================================================ */
.admin-body {
    background: #f0f4f8;
    min-height: 100vh;
}

.admin-nav {
    background: var(--text-900);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.admin-nav-logo {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.admin-nav-logo span {
    color: #60a5fa;
}

.admin-nav-links {
    display: flex;
    gap: 20px;
}

.admin-nav-links a {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, .5);
    transition: color .12s;
}

.admin-nav-links a:hover {
    color: #fff;
    text-decoration: none;
}

.admin-nav-user {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, .4);
}

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
}

.admin-page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-900);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.admin-table {
    width: 100%;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.admin-table thead tr {
    background: var(--bg-subtle);
}

.admin-table th {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-300);
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    font-size: var(--text-sm);
    color: var(--text-900);
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-subtle);
}

.status-pill {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--r-pill);
}

.status-active {
    background: var(--success-bg);
    color: var(--success);
}

.status-sold {
    background: var(--error-bg);
    color: var(--error);
}

.status-hidden {
    background: var(--bg-subtle);
    color: var(--text-500);
    border: 1px solid var(--border);
}

.admin-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.admin-card h3 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-muted {
    color: var(--text-300);
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* ============================================================
   RESPONZIVITA — tablet + mobil
   ============================================================ */

/* Hamburger tlačítko — skryto na desktopu */
.navbar-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.navbar-burger span {
    display: block;
    height: 2px;
    background: var(--text-900);
    border-radius: 2px;
    transition: all .2s;
    transform-origin: center;
}

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

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

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

/* Mobile rozbalovací menu */
.navbar-mobile {
    display: none;
    flex-direction: column;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 8px 0 16px;
    box-shadow: var(--shadow-md);
}

.navbar-mobile.open {
    display: flex;
}

.navbar-mobile a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-700);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .12s;
}

.navbar-mobile a:last-child {
    border-bottom: none;
}

.navbar-mobile a:hover,
.navbar-mobile a.active {
    background: var(--bg-subtle);
    color: var(--accent);
}

.navbar-mobile .mobile-tel {
    font-weight: 700;
    color: var(--accent);
    font-size: 17px;
    margin-top: 4px;
    border-bottom: none !important;
}

/* ---- Tablet (960px) ---- */
@media (max-width: 960px) {
    :root {
        --card-min: 260px;
        --card-img: 210px;
        --pad: 16px;
    }

    /* Navbar — skryj linky, zmenši */
    .navbar {
        height: 60px;
    }

    .navbar-logo {
        font-size: 16px;
        padding-right: 0;
        border-right: none;
        margin-right: 0;
    }

    .navbar-links {
        display: none;
    }

    .navbar-cta {
        border-left: none;
        padding-left: 0;
        margin-left: auto;
    }

    .navbar-phone {
        font-size: 14px;
        align-items: flex-end;
    }

    .navbar-burger {
        display: flex;
    }

    /* Hero search box */
    .search-box {
        flex-direction: column;
        padding: 16px;
        border-radius: var(--r-lg);
        gap: 0;
    }

    .search-divider {
        display: none;
    }

    .search-field-wrap {
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }

    .search-field-wrap:last-of-type {
        border: none;
    }

    .btn-search-big {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    /* Detail */
    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .price-sidebar {
        position: static;
    }

    /* Lightbox */
    .lb-info {
        display: none;
    }

    .lb-thumbs-bar {
        height: 80px;
    }

    .lb-thumb {
        width: 110px;
        height: 66px;
    }
}

/* ---- Mobil (640px) ---- */
@media (max-width: 640px) {
    :root {
        --card-min: 100%;
        --card-img: 220px;
        --text-2xl: 24px;
        --pad: 14px;
    }

    /* Navbar */
    .navbar {
        height: 56px;
    }

    .navbar-logo {
        font-size: 15px;
    }

    .navbar-phone small {
        display: none;
    }

    .navbar-phone {
        font-size: 13px;
    }

    /* Hero */
    .hero {
        padding: 28px 0 24px;
    }

    .hero h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .hero-sub {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-stats {
        display: none;
    }

    .hero-eyebrow {
        font-size: 11px;
        margin-bottom: 12px;
    }

    /* Filter strip */
    .filter-strip .container {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-strip .container::-webkit-scrollbar {
        display: none;
    }

    .ftag,
    .filter-tag {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .filter-count {
        display: none;
    }

    /* Karty */
    .cars-grid {
        gap: 12px;
    }

    .car-title {
        font-size: 16px;
    }

    .car-price {
        font-size: 19px;
    }

    /* Section header */
    .section-header {
        padding: 20px 0 12px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    /* Detail vozu */
    .gallery-main {
        height: 260px !important;
    }

    .gallery-thumbs {
        gap: 6px;
    }

    .gallery-thumb {
        width: 72px !important;
        height: 52px !important;
    }

    .detail-title {
        font-size: 22px;
    }

    .detail-sub {
        font-size: 14px;
    }

    .params-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .param-box {
        padding: 10px 12px;
    }

    .param-label {
        font-size: 10px;
    }

    .param-value {
        font-size: 14px;
    }

    .detail-badges {
        gap: 5px;
    }

    .detail-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    /* Price sidebar */
    .price-card {
        padding: 18px;
    }

    .price-main {
        font-size: 26px;
    }

    .dealer-card {
        padding: 14px 16px;
    }

    /* Formuláře */
    .form-page {
        padding: 20px 0 40px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
    }

    /* zabraň iOS zoomu */

    /* Patička */
    .footer {
        padding: 28px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
        justify-items: center;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }

    /* Skryj filtrové sloupce (Vozy podle paliva / ceny) na mobilu */
    .footer-col + .footer-col {
        display: none;
    }

    /* Vycentruj odkazy v Stránky sloupci */
    .footer-col .footer-links {
        align-items: center;
    }

    .footer-copy {
        gap: 10px;
        align-items: flex-start;
    }

    /* Výkup — kroky */
    .vykup-steps {
        grid-template-columns: 1fr !important;
    }

    /* Kontakt — info karty */
    .contact-cards {
        grid-template-columns: 1fr !important;
    }

    /* Statické stránky — grid na 1 sloupec */
    .about-grid,
    .vykup-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---- Malý mobil (400px) ---- */
@media (max-width: 400px) {
    :root {
        --pad: 12px;
    }

    .params-grid {
        grid-template-columns: 1fr;
    }

    .car-tags {
        gap: 4px;
    }

    .gallery-main {
        height: 220px !important;
    }

    .navbar-phone {
        display: none;
    }

    /* velmi malá obrazovka — skryj telefon úplně */
}

/* ===========================================
   Paginace — frontend seznam vozů
   =========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 40px 0 16px;
    padding: 12px 0;
}

.pagination-num,
.pagination-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--text-700);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
    cursor: pointer;
    user-select: none;
}

.pagination-num:hover,
.pagination-arrow:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination-num.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    pointer-events: none;
    font-weight: 700;
}

.pagination-arrow.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pagination-arrow.disabled:hover {
    background: #fff;
    color: var(--text-700);
    border-color: var(--border);
}

.pagination-ellipsis {
    padding: 0 6px;
    color: var(--text-300);
    user-select: none;
}

/* Na mobile mírně menší tlačítka */
@media (max-width: 560px) {

    .pagination-num,
    .pagination-arrow {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

/* ============================================================
   Touch-friendly mobile layout
   - Spouští se buď úzkým viewportem (do 768px), NEBO
   - na touch zařízeních (telefony/tablety) až do 1100px
     → řeší Android telefony (Xiaomi 14T Pro), které hlásí
     širší device-width než iPhone a klasické breakpointy
     se neaktivují.
   ============================================================ */
@media (max-width: 768px),
(pointer: coarse) and (max-width: 1100px) {

    /* --- Karty inzerátů: vždy 1 sloupec na mobile --- */
    .cars-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* --- Navbar: hamburger místo desktop linků --- */
    .navbar {
        height: 60px !important;
    }

    .navbar-logo {
        font-size: 16px !important;
        padding-right: 0;
        border-right: none;
        margin-right: 0;
    }

    .navbar-links {
        display: none !important;
    }

    .navbar-cta {
        border-left: none !important;
        padding-left: 0 !important;
        margin-left: auto !important;
    }

    .navbar-phone {
        font-size: 14px !important;
        align-items: flex-end;
    }

    .navbar-phone small {
        font-size: 11px !important;
    }

    .navbar-burger {
        display: flex !important;
    }

    /* --- Hero: čitelnější titulky a stats --- */
    .hero {
        padding: 32px 0 28px !important;
    }

    .hero-eyebrow {
        font-size: 12px !important;
        margin-bottom: 14px !important;
    }

    .hero h1 {
        font-size: 28px !important;
        line-height: 1.18 !important;
        margin-bottom: 10px !important;
    }

    .hero-sub {
        font-size: 15px !important;
        margin-bottom: 22px !important;
    }

    .hero-stats {
        gap: 22px !important;
        flex-wrap: wrap !important;
    }

    .hero-stat {
        min-width: 0;
    }

    .hero-stat>div:first-child {
        font-size: 22px !important;
        font-weight: 800 !important;
    }

    .hero-stat>div:last-child {
        font-size: 12px !important;
    }

    /* --- Filter strip --- */
    .filter-strip .container {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 6px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .filter-strip .container::-webkit-scrollbar {
        display: none !important;
    }

    .ftag,
    .filter-tag {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        font-size: 14px !important;
        padding: 8px 14px !important;
    }

    .filter-count {
        display: none !important;
    }

    /* --- Sekce header („Aktuální nabídka vozů") --- */
    .section-header h2 {
        font-size: 19px !important;
    }

    .section-header a {
        font-size: 14px !important;
    }

    /* --- Karta inzerátu --- */
    .car-title {
        font-size: 18px !important;
        line-height: 1.25 !important;
    }

    .car-sub {
        font-size: 14px !important;
    }

    .car-tags {
        gap: 6px !important;
    }

    .car-tag {
        font-size: 13px !important;
        padding: 4px 11px !important;
    }

    .car-price {
        font-size: 22px !important;
    }

    .car-price-vat {
        font-size: 12px !important;
    }

    .car-btn {
        font-size: 14px !important;
        padding: 8px 14px !important;
    }

    /* --- Search box & hero --- */
    .search-box {
        flex-direction: column !important;
        padding: 16px !important;
        border-radius: var(--r-lg) !important;
        gap: 0 !important;
    }

    .search-divider {
        display: none !important;
    }

    .search-field-wrap {
        padding: 10px 0 !important;
        border-bottom: 1px solid var(--border) !important;
        width: 100% !important;
    }

    .search-field-wrap:last-of-type {
        border: none !important;
    }

    .btn-search-big {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 4px !important;
    }

    /* --- Detail vozu: čitelné metadata + výbava --- */
    .detail-wrap {
        grid-template-columns: 1fr !important;
    }

    .price-sidebar {
        position: static !important;
    }

    .detail-title {
        font-size: 26px !important;
        line-height: 1.2 !important;
    }

    .detail-sub {
        font-size: 15px !important;
    }

    .detail-badges {
        gap: 6px !important;
        margin-bottom: 18px !important;
    }

    .detail-badge {
        font-size: 13px !important;
        padding: 5px 12px !important;
    }

    .params-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .param-box {
        padding: 12px 14px !important;
    }

    .param-label {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }

    .param-value {
        font-size: 16px !important;
    }

    .detail-section-title {
        font-size: 17px !important;
    }

    .feature-chip {
        font-size: 15px !important;
        padding: 10px 0 !important;
    }

    .detail-desc p {
        font-size: 16px !important;
        line-height: 1.7 !important;
    }

    /* --- Galerie na detailu --- */
    .gallery-main {
        height: 280px !important;
    }

    .gallery-thumb {
        width: 76px !important;
        height: 54px !important;
    }

    /* --- Price sidebar / Mám zájem --- */
    .price-card {
        padding: 20px !important;
    }

    .price-main {
        font-size: 28px !important;
    }

    .dealer-card {
        padding: 14px 16px !important;
    }

    /* --- Lightbox: vertikální layout (foto velké, info nahoře) --- */
    .lb-body {
        flex-direction: column !important;
    }

    /* Skryj info sekci v mobilním lightboxu — necháme jen foto, CTA a thumby.
       .lb-info zůstává v DOM (kvůli .lb-info-cta uvnitř), ale je vizuálně sbalená. */
    .lb-info {
        display: block !important;
        max-height: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
    }

    .lb-info > *:not(.lb-info-cta) {
        display: none !important;
    }

    .lb-counter-top {
        display: none !important;
    }

    .lb-info-title {
        font-size: 15px !important;
        flex-shrink: 0;
    }

    .lb-info-price {
        font-size: 22px !important;
        flex-shrink: 0;
    }

    .lb-info-price-note {
        display: none !important;
    }

    .lb-info-divider {
        display: none !important;
    }

    .lb-params {
        flex-direction: row !important;
        gap: 16px !important;
        flex-wrap: nowrap !important;
    }

    .lb-param {
        flex-direction: column !important;
        gap: 0 !important;
        align-items: flex-start !important;
        min-width: 0;
    }

    .lb-param-label {
        font-size: 10px !important;
    }

    .lb-param-value {
        font-size: 13px !important;
        text-align: left !important;
        white-space: nowrap;
    }

    .lb-info-cta {
        position: absolute !important;
        bottom: 96px !important;
        /* nad thumbs-bar */
        left: 12px !important;
        right: 12px !important;
        margin-top: 0 !important;
        font-size: 14px !important;
        padding: 12px !important;
        z-index: 5;
    }

    .lb-photo {
        padding: 12px !important;
    }

    .lb-thumbs-bar {
        height: 80px !important;
    }

    .lb-thumb {
        width: 100px !important;
        height: 60px !important;
    }

    /* --- Sticky mobile CTA bar (cena + Mám zájem) --- */
    .mobile-cta-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-top: 1px solid var(--border);
        box-shadow: 0 -2px 14px rgba(0, 0, 0, .08);
        padding: 10px 14px;
        gap: 12px;
        align-items: center;
        z-index: 150;
        transform: translateY(110%);
        transition: transform .25s ease;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    .mobile-cta-bar.visible {
        transform: translateY(0);
    }
    .mobile-cta-info {
        flex: 1;
        display: flex;
        align-items: baseline;
        gap: 6px;
        min-width: 0;
        flex-wrap: wrap;
        line-height: 1.1;
    }
    .mobile-cta-price {
        font-size: 20px;
        font-weight: 800;
        color: var(--text-900);
        white-space: nowrap;
    }
    .mobile-cta-vat {
        font-size: 12px;
        color: var(--text-300);
        font-weight: 500;
        white-space: nowrap;
    }
    .mobile-cta-btn {
        background: var(--accent);
        color: #fff;
        padding: 12px 22px;
        border-radius: var(--r-md);
        font-weight: 700;
        text-decoration: none;
        font-size: 15px;
        white-space: nowrap;
        transition: background .15s;
    }
    .mobile-cta-btn:hover, .mobile-cta-btn:active {
        background: var(--accent-hover);
        color: #fff;
    }
    body.has-sticky-cta {
        padding-bottom: 70px;
    }

    /* --- Footer --- */
    .footer {
        padding: 28px 0 20px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
        text-align: center !important;
        justify-items: center !important;
    }
    .footer-brand {
        grid-column: 1 / -1 !important;
        max-width: 100% !important;
    }
    .footer-col + .footer-col {
        display: none !important;
    }
    .footer-col .footer-links {
        align-items: center !important;
    }

    /* --- Statické stránky --- */
    .about-grid,
    .vykup-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    .vykup-steps {
        grid-template-columns: 1fr !important;
    }

    .contact-cards {
        grid-template-columns: 1fr !important;
    }
}