/* ============================================
   PREMENNÉ
   ============================================ */
:root {
    --primary: #ef4444;
    --primary-hover: #dc2626;
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);
    --mobile-nav-height: 75px;
}

/* ============================================
   SVETLÝ REŽIM
   ============================================ */
body.light-mode {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --input-bg: #f1f5f9;
}

/* ============================================
   ZÁKLADNÉ ŠTÝLY
   ============================================ */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex: 1;
    padding-bottom: 40px;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

[x-cloak] {
    display: none !important;
}

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

body.light-mode #preloader {
    background: #f8fafc;
}

.loader-car {
    font-size: 4rem;
    color: #ef4444;
    animation: drive 1.5s infinite linear, pulse-loader 1s infinite alternate;
}

@keyframes drive {
    0% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(-10px); }
}

@keyframes pulse-loader {
    from { opacity: 0.6; transform: scale(0.9) translateX(-10px); }
    to { opacity: 1; transform: scale(1.1) translateX(10px); }
}

.loader-text {
    margin-top: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* ============================================
   HEADER
   ============================================ */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
    height: 70px;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
    .logo img {
        height: 40px;
    }
    .header-flex {
        padding: 0 15px;
    }
}

/* Search v headeri */
.search-input-group {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.nav-search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    height: 42px;
    outline: none;
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Tlačidlá v headeri */
.btn-add {
    background: white;
    color: #b91c1c;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
    transition: 0.1s;
}

.btn-add:active {
    transform: translateY(2px);
    box-shadow: none;
}

.action-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    transition: 0.2s;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.action-icon-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

@media (max-width: 768px) {
    .action-icon-btn {
        width: 36px;
        height: 36px;
    }
}

/* Desktop / Mobile prepínanie */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
}

/* ============================================
   KATEGÓRIE (subheader)
   ============================================ */
.category-subheader {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    margin-bottom: 30px;
}

.category-scroll-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 5px 10px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    box-sizing: border-box;
}

.category-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: 0.2s;
}

.cat-item.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* ============================================
   MOBILNÁ LIŠTA (SPODNÁ)
   ============================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: visible;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex !important;
    }
    body {
        padding-bottom: var(--mobile-nav-height);
    }
}

.mobile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    width: 20%;
    position: relative;
}

.mobile-item i {
    font-size: 1.8rem;
    margin-bottom: 4px;
    transition: 0.2s;
}

.mobile-item.active {
    color: var(--text-main);
}

.mobile-item.active i {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Oprava farby ikony filtra v mobile menu */
.mobile-nav .ph-sliders {
    transition: color 0.2s;
}

body.light-mode .mobile-nav .ph-sliders {
    color: #0f172a !important;
}

body.light-mode .mobile-nav button:hover .ph-sliders {
    color: #ef4444 !important;
}

body:not(.light-mode) .mobile-nav .ph-sliders {
    color: #e2e8f0 !important;
}

body:not(.light-mode) .mobile-nav button:hover .ph-sliders {
    color: #ef4444 !important;
}

/* Tlačidlo Pridať inzerát v mobile */
.mobile-fab-wrapper {
    position: relative;
    top: -30px;
    width: 65px;
    height: 65px;
    pointer-events: auto;
}

.mobile-fab-btn {
    width: 65px;
    height: 65px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
    border: 6px solid var(--bg-body);
}

.mobile-fab-btn i {
    font-size: 2.2rem;
}

/* ============================================
   FLOATING GARAGE (DESKTOP)
   ============================================ */
.desktop-float-garage {
    position: fixed;
    bottom: 100px;
    right: 40px;
    width: 65px;
    height: 65px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    border: 4px solid var(--bg-body);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.desktop-float-garage:hover {
    transform: scale(1.1);
}

.desktop-float-garage i {
    font-size: 2rem;
}

.float-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: white;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-body);
}

@media (max-width: 768px) {
    .desktop-float-garage {
        display: none !important;
    }
}

/* ============================================
   AUTA - KARTY
   ============================================ */
.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-filters {
        display: none;
    }
}

.car-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    position: relative;
}

.car-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #000;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    content-visibility: auto;
}

.fav-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 50 !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.fav-btn:hover {
    background: white;
    border-color: white;
}

.fav-btn:hover i {
    color: #ef4444 !important;
}

.fav-btn i {
    font-size: 1.5rem;
    transition: transform 0.2s;
    font-weight: bold;
}

.card-price-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
}

.car-info {
    padding: 12px;
}

.car-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.car-title span {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 5px;
}

.specs-row {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.specs-row.secondary {
    opacity: 0.7;
    font-size: 0.8rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spec-item i {
    color: var(--primary);
}

/* ============================================
   SELECTY, INPUTY, CHECKBOXY
   ============================================ */
select, .form-select, .form-control {
    appearance: none;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 12px;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

select:focus, .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Rádio tlačidlá (štvorcové checkboxy) */
.radio-filter {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 2px solid #cbd5e1;
    background: #f1f5f9;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.radio-filter:checked {
    border-color: #ef4444;
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.radio-filter:checked::after {
    content: '✓';
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-filter:focus {
    outline: none;
    ring: 2px solid #ef4444;
}

.radio-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}

body:not(.light-mode) .radio-label {
    color: #f1f5f9;
}

.radio-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    transition: background 0.2s;
    cursor: pointer;
}

.radio-wrapper:hover {
    background: rgba(239, 68, 68, 0.1);
}

body.light-mode .radio-filter {
    border-color: #cbd5e1;
    background: white;
}

body.light-mode .radio-filter:checked {
    border-color: #ef4444;
    background-color: #ef4444;
}

body:not(.light-mode) .radio-filter {
    border-color: #64748b;
    background: #1e293b;
}

body:not(.light-mode) .radio-filter:checked {
    border-color: #ef4444;
    background-color: #ef4444;
}

/* Vertikálne taby */
.vertical-tab {
    cursor: pointer;
    touch-action: manipulation;
}

body.light-mode .vertical-tab.active {
    background-color: white;
    border-left-color: #dc2626;
    color: #dc2626;
}

body:not(.light-mode) .vertical-tab.active {
    background-color: #1e293b;
    border-left-color: #ef4444;
    color: #ef4444;
}

/* ============================================
   RESPONZIVITA
   ============================================ */
@media (max-width: 640px) {
    .vertical-tab {
        min-width: 70px;
        padding: 0 4px;
    }
    .vertical-tab i {
        font-size: 1.8rem !important;
    }
    .vertical-tab span {
        font-size: 9px !important;
        letter-spacing: 0;
    }
}

@media (max-width: 480px) {
    .radio-label {
        font-size: 0.7rem !important;
        white-space: normal;
        line-height: 1.2;
    }
    .flex.items-center.gap-3 {
        gap: 0.5rem;
    }
    .vertical-tab {
        min-width: 60px !important;
        height: 70px !important;
    }
    .vertical-tab i {
        font-size: 1.5rem !important;
    }
    .vertical-tab span {
        font-size: 8px !important;
    }
}

@media (max-width: 380px) {
    .vertical-tab {
        min-width: 50px !important;
        height: 65px !important;
    }
    .vertical-tab i {
        font-size: 1.2rem !important;
    }
}

/* ============================================
   OSTATNÉ
   ============================================ */
.no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Trust banner */
.trust-banner {
    display: block;
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.trust-banner:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-icon-wrapper {
    width: 56px;
    height: 56px;
    background: var(--bg-body);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.trust-banner:hover .banner-icon-wrapper {
    background: var(--primary);
    color: white;
}

.banner-text h4 {
    margin: 0;
    color: var(--text-main);
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1.2;
}

.banner-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.arrow-icon {
    margin-left: auto;
    color: var(--border);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.trust-banner:hover .arrow-icon {
    color: var(--primary);
    transform: translateX(4px);
}

/* Forced light filter */
#forced-light-filter,
#forced-light-filter * {
    background-color: transparent;
}

#forced-light-filter {
    background-color: #ffffff !important;
}

#forced-light-filter section {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

#forced-light-filter span,
#forced-light-filter p,
#forced-light-filter h2,
#forced-light-filter h3,
#forced-light-filter label {
    color: #0f172a !important;
    opacity: 1 !important;
}

#forced-light-filter input,
#forced-light-filter select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}



@media (max-width: 768px) {
    .mobile-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: 75px !important;
        background: red !important; /* Dočasne červená, aby si ju videl */
    }
}
    
    
    
   /* ============================================
   MOBILNÁ LIŠTA - FINÁLNA OPRAVA
   ============================================ */
.mobile-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 75px !important;
    z-index: 99999 !important;
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Skryté na desktop */
@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Zobrazené na mobile */
@media (max-width: 768px) {
    .mobile-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: var(--bg-card) !important;
    }
    body {
        padding-bottom: 75px !important;
    }
} 
    
    
    
    
    