/**
 * @file: catalog_new.css
 * @description: Стили для нового каталога в точности как в React проекте Catalog PRO
 * @created: 2025-01-XX
 */

/* ===== CSS Variables (OKLCH colors from React) ===== */
:root {
    --nfs-blue: oklch(0.623 0.214 259.815);
    --nfs-purple: oklch(0.627 0.265 303.9);
    --nfs-green: oklch(0.723 0.219 149.579);
    --nfs-orange: oklch(0.705 0.213 47.604);
    --nfs-red: oklch(0.637 0.237 25.331);
    --gray-50: oklch(0.985 0.002 247.839);
    --gray-100: oklch(0.967 0.003 264.542);
    --gray-200: oklch(0.928 0.006 264.531);
    --gray-300: oklch(0.872 0.01 258.338);
    --gray-500: oklch(0.551 0.027 264.364);
    --gray-600: oklch(0.446 0.03 256.802);
    --gray-700: oklch(0.707 0.022 261.325);
    --gray-900: oklch(0.21 0.034 264.665);
}

/* ===== Base Styles ===== */
.catalog-page-wrapper {
    min-height: 100vh;
    background: var(--gray-50);
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* ===== Header ===== */
.catalog-header-new {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gray-200);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .header-content {
        height: 64px;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

@media (min-width: 640px) {
    .logo-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 20px;
    }
}

.logo-text {
    font-weight: 600;
    font-size: 16px;
}

@media (min-width: 640px) {
    .logo-text {
        font-size: 18px;
    }
}

.header-nav {
    display: none;
    gap: 1.5rem;
}

/* Скрываем навигацию на мобильных, даже если есть класс mobile-open */
@media (max-width: 767px) {
    .header-nav,
    .header-nav.mobile-open {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--gray-700);
    font-size: 14px;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--nfs-blue);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow: visible;
    min-width: 0; /* Позволяет элементам сжиматься */
}

@media (max-width: 639px) {
    .header-right {
        gap: 0.25rem;
    }
    
    .header-btn-primary {
        padding: 0.5rem 0.75rem;
        font-size: 12px;
        flex-shrink: 0;
        min-width: fit-content;
        white-space: nowrap;
    }
    
    .header-btn-menu {
        margin-left: 0.25rem;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .header-btn-primary {
        padding: 0.5rem 0.625rem;
        font-size: 11px;
        min-width: fit-content;
    }
    
    /* Скрываем иконки на очень маленьких экранах, чтобы освободить место */
    .header-btn-icon {
        display: none;
    }
}

.header-btn-icon {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.header-btn-icon:hover {
    background: var(--gray-100);
}

.header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--nfs-red);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.header-btn-primary {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

.header-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-btn-menu {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-700);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.header-btn-menu:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    animation: fadeIn 0.2s ease-in-out;
}

.mobile-menu-content {
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-logo .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.mobile-menu-logo .logo-text {
    font-weight: 600;
    font-size: 18px;
    color: var(--gray-900);
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    background: var(--gray-50);
    color: var(--nfs-blue);
    border-left-color: var(--nfs-blue);
}

.mobile-menu-link i {
    width: 24px;
    text-align: center;
    color: var(--gray-500);
    font-size: 18px;
}

.mobile-menu-link span {
    flex: 1;
}

.mobile-menu-link:hover i,
.mobile-menu-link:active i {
    color: var(--nfs-blue);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@media (min-width: 640px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ===== Breadcrumbs ===== */
.breadcrumbs-section {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
}

.breadcrumb-link {
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--nfs-blue);
}

.breadcrumb-chevron {
    font-size: 12px;
    color: var(--gray-700);
}

.breadcrumb-current {
    color: var(--gray-900);
    font-weight: 500;
}

/* ===== Search Bar ===== */
.search-bar-section {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
}

@media (min-width: 640px) {
    .search-bar-section {
        padding: 1.5rem 0;
    }
}

.search-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .search-bar-wrapper {
        flex-direction: row;
        gap: 0.75rem;
    }
}

.search-input-wrapper-main {
    flex: 1;
    position: relative;
    z-index: 1001;
}

/* Global search results positioning */
.search-bar-section {
    position: relative;
}

.search-bar-wrapper[data-global-search] {
    position: relative;
}

.global-search-results {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    z-index: 10000 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    margin-top: 0 !important;
    padding: 0.5rem;
}

.global-search-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.global-search-item:hover {
    background: var(--gray-50);
}

.global-search-item img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.global-search-item-content {
    flex: 1;
    min-width: 0;
}

.global-search-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-item-meta {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-empty {
    text-align: center;
    color: var(--gray-600);
    font-size: 14px;
    padding: 1.5rem;
}

.search-icon-main {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-700);
    font-size: 16px;
}

@media (min-width: 640px) {
    .search-icon-main {
        left: 1rem;
        font-size: 20px;
    }
}

.search-input-main {
    width: 100%;
    height: 44px;
    padding: 0 1rem 0 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

@media (min-width: 640px) {
    .search-input-main {
        height: 56px;
        padding: 0 1rem 0 3rem;
        border-radius: 12px;
        font-size: 16px;
    }
}

.search-input-main:focus {
    border-color: var(--nfs-blue);
    box-shadow: 0 0 0 3px rgba(98, 126, 234, 0.1);
}

.search-input-main::placeholder {
    color: var(--gray-500);
}

.search-buttons-wrapper {
    display: flex;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .search-buttons-wrapper {
        gap: 0.75rem;
    }
}

.search-ai-btn-main {
    flex: 1;
    height: 44px;
    padding: 0 1rem;
    background: linear-gradient(135deg, oklch(0.627 0.265 303.9), oklch(0.656 0.241 354.308));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s;
}

@media (min-width: 640px) {
    .search-ai-btn-main {
        flex: initial;
        height: 56px;
        padding: 0 1.5rem;
        border-radius: 12px;
        font-size: 16px;
    }
}

.search-ai-btn-main:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-ai-btn-main i {
    animation: pulse 2s infinite;
}

.search-advanced-btn-main {
    height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s;
}

@media (min-width: 640px) {
    .search-advanced-btn-main {
        height: 56px;
        padding: 0 1.5rem;
        border-radius: 12px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .search-advanced-btn-main span {
        display: inline;
    }
}

.search-advanced-btn-main:hover {
    background: var(--gray-50);
}

.advanced-search-panel {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
}

@media (min-width: 640px) {
    .advanced-search-panel {
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 12px;
    }
}

.advanced-search-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .advanced-search-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
}

.advanced-search-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    cursor: pointer;
}

@media (min-width: 640px) {
    .advanced-search-checkbox {
        font-size: 14px;
    }
}

.advanced-search-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== Stats Bar ===== */
.stats-bar-section {
    background: white;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .stats-bar-section {
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 640px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: center;
    padding: 0.25rem;
}

@media (min-width: 640px) {
    .stat-item {
        gap: 0.75rem;
        padding: 0;
    }
}

.stat-icon-wrapper {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .stat-icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }
}

.stat-icon {
    font-size: 14px;
}

@media (min-width: 640px) {
    .stat-icon {
        font-size: 20px;
    }
}

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.125rem;
    line-height: 1.2;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .stat-value {
        font-size: 18px;
    }
}

.stat-label {
    font-size: 10px;
    color: var(--gray-700);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

@media (min-width: 640px) {
    .stat-label {
        font-size: 12px;
    }
}

/* ===== Catalog Layout ===== */
.catalog-layout-flex {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== Sidebar ===== */
.catalog-sidebar-new {
    position: fixed;
    inset-y: 0;
    left: 0;
    z-index: 50;
    width: 320px;
    background: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s;
}

@media (min-width: 1024px) {
    .catalog-sidebar-new {
        position: relative;
        transform: translateX(0);
        box-shadow: none;
        border-right: 1px solid var(--gray-200);
        width: 320px;
        flex-shrink: 0;
    }
}

.catalog-sidebar-new.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-collapse-all,
.btn-close-sidebar {
    padding: 0.375rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    color: var(--gray-700);
}

.btn-collapse-all:hover,
.btn-close-sidebar:hover {
    background: var(--gray-100);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.filter-section {
    border-bottom: 1px solid var(--gray-200);
}

.filter-section-header {
    width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.filter-section-header:hover {
    background: var(--gray-50);
}

.filter-chevron {
    transition: transform 0.2s;
    font-size: 12px;
    color: var(--gray-500);
}

.filter-section.active .filter-chevron {
    transform: rotate(180deg);
}

.filter-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.filter-section.active .filter-section-body {
    max-height: 1000px;
    padding: 0 1.5rem 1rem 1.5rem;
}

.filter-search-box {
    position: relative;
    margin-bottom: 0.75rem;
}

.filter-search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 14px;
}

.filter-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.filter-search-input:focus {
    border-color: var(--nfs-blue);
}

.brand-list {
    max-height: 300px;
    overflow-y: auto;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.brand-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.brand-name {
    flex: 1;
    font-size: 14px;
    color: var(--gray-900);
}

.brand-count {
    font-size: 12px;
    color: var(--gray-500);
}

/* Dual Range Slider */
.dual-range-slider {
    position: relative;
    height: 16px;
    margin: 1rem 0;
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    transform: translateY(-50%);
}

.slider-range {
    position: absolute;
    top: 50%;
    height: 4px;
    background: var(--nfs-blue);
    border-radius: 2px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: left 0.1s, width 0.1s;
}

.slider-input {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    margin: 0;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    pointer-events: none;
    z-index: 2;
    transform: translateY(-50%);
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--nfs-blue);
    cursor: pointer;
    pointer-events: all;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.slider-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--nfs-blue);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: all;
    position: relative;
    z-index: 3;
}

.slider-input-min {
    z-index: 3;
}

.slider-input-max {
    z-index: 4;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.range-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.range-input:focus {
    border-color: var(--nfs-blue);
}

.range-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 14px;
    color: var(--gray-700);
}

.body-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.body-type-btn {
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.body-type-btn:hover,
.body-type-btn.active {
    border-color: var(--nfs-blue);
    background: var(--gray-50);
}

.body-type-icon {
    font-size: 24px;
}

.body-type-label {
    font-size: 12px;
    color: var(--gray-700);
}

.fuel-type-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fuel-type-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.2s;
}

.fuel-type-btn:hover,
.fuel-type-btn.active {
    border-color: var(--nfs-blue);
    background: var(--gray-50);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-apply-filters {
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-reset-filters {
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===== Catalog Content Area ===== */
.catalog-content-main {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ===== Toolbar ===== */
.catalog-toolbar-new {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: white;
    border-radius: 12px 12px 0 0;
}

@media (min-width: 640px) {
    .catalog-toolbar-new {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
    }
}

.toolbar-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .toolbar-left {
        justify-content: flex-start;
    }
}

.btn-toggle-filters {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-toggle-filters.active {
    background: var(--nfs-blue);
    color: white;
    border-color: var(--nfs-blue);
}

.results-count {
    font-size: 12px;
    color: var(--gray-700);
}

@media (min-width: 640px) {
    .results-count {
        font-size: 14px;
    }
}

.toolbar-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .toolbar-right {
        justify-content: flex-end;
        gap: 1rem;
    }
}

.sort-dropdown-wrapper {
    position: relative;
}

.btn-sort {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 640px) {
    .btn-sort {
        font-size: 14px;
        gap: 0.5rem;
    }
}

.sort-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.sort-dropdown-wrapper:hover .sort-menu,
.sort-menu.active {
    display: block;
}

.sort-group {
    padding: 0.5rem 0;
}

.sort-group-title {
    padding: 0.5rem 1rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
}

.sort-option {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 14px;
    color: var(--gray-900);
    text-decoration: none;
    transition: background 0.2s;
}

.sort-option:hover {
    background: var(--gray-50);
}

.view-toggle {
    display: none;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .view-toggle {
        display: flex;
    }
}

.view-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
}

.view-btn.active {
    background: var(--nfs-blue);
    color: white;
}

.btn-compare {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

@media (min-width: 640px) {
    .btn-compare {
        font-size: 14px;
    }
}

.compare-badge {
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple));
    color: white;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

/* ===== Results ===== */
.catalog-results-wrapper {
    padding: 1rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .catalog-results-wrapper {
        padding: 1.5rem 0;
    }
}

/* ===== Feature Promo Banner ===== */
.feature-promo-banner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 1rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .feature-promo-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin: 1.5rem 0;
    }
}

@media (min-width: 1024px) {
    .feature-promo-banner {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-promo-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 640px) {
    .feature-promo-item {
        padding: 1rem;
        border-radius: 12px;
        gap: 0.75rem;
    }
}

.feature-promo-item:hover {
    border-color: transparent;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.feature-promo-item:hover .feature-promo-icon {
    transform: scale(1.1);
}

.feature-promo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

@media (min-width: 640px) {
    .feature-promo-icon {
        width: 40px;
        height: 40px;
    }
}

.feature-promo-icon i {
    color: white;
    font-size: 16px;
}

@media (min-width: 640px) {
    .feature-promo-icon i {
        font-size: 20px;
    }
}

.feature-promo-content {
    min-width: 0;
    flex: 1;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.feature-promo-content h4 {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .feature-promo-content h4 {
        font-size: 14px;
        margin-bottom: 0.125rem;
    }
}

.feature-promo-content p {
    font-size: 12px;
    color: var(--gray-700);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

@media (min-width: 640px) {
    .feature-promo-content p {
        display: block;
    }
}

/* ===== Cars Grid ===== */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(294px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: stretch;
    width: 100%;
}

@media (max-width: 768px) {
    .cars-grid {
        grid-template-columns: 1fr;
    }
}

.cars-grid-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 640px) {
    .cars-grid-view {
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .cars-grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .cars-grid-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* ===== Car Card ===== */
.car-card-new {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.car-card-new:hover {
    border-color: var(--nfs-blue);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.car-image-section {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--gray-50);
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.car-card-new:hover .car-image {
    transform: scale(1.05);
}

.car-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.badge {
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-verified {
    background: var(--nfs-green);
    color: white;
}

.badge-hot {
    background: linear-gradient(135deg, var(--nfs-red), var(--nfs-orange));
    color: white;
}

.car-favorite-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.car-favorite-btn:hover {
    transform: scale(1.1);
}

.car-favorite-btn i {
    font-size: 16px;
    color: var(--gray-700);
}

.car-content-section {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.car-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 12px;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.car-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.car-ai-assessment {
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.ai-assessment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.ai-label {
    font-size: 12px;
    color: var(--gray-700);
}

.ai-rating-icon {
    font-size: 12px;
}

.ai-price-scale {
    position: relative;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.price-scale-bar {
    position: relative;
    width: 100%;
    height: 100%;
}

.price-scale-range {
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 100%;
    background: rgba(115, 219, 149, 0.3);
}

.price-scale-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--nfs-orange);
}

.ai-rating-text {
    font-size: 12px;
    color: var(--nfs-orange);
}

.car-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    font-size: 12px;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.spec-icon {
    width: 12px;
    height: 12px;
    color: var(--nfs-blue);
}

.car-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-action {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--gray-50);
}

.btn-action.active {
    background: var(--nfs-blue);
    color: white;
    border-color: var(--nfs-blue);
}

.btn-details {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--gray-900);
    transition: all 0.2s;
}

.btn-details:hover {
    background: var(--gray-50);
}

/* ===== CTA Banner ===== */
.cta-banner {
    margin: 1.5rem 0;
}

.cta-banner-content {
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple), oklch(0.656 0.241 354.308));
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.cta-banner-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.cta-banner-text p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

.cta-banner-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--nfs-blue);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* ===== Quick Tips ===== */
.quick-tips {
    margin: 1.5rem 0;
}

.quick-tips-content {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
}

.quick-tips-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.quick-tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.quick-tip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    color: var(--gray-700);
}

.quick-tip-item i {
    color: var(--nfs-green);
}

/* ===== Empty State ===== */
.empty-state {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 60px;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-700);
    margin: 0 0 1.5rem 0;
}

.empty-state ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 1.5rem;
    list-style: none;
    padding: 0;
}

.empty-state li {
    padding: 0.5rem 0;
    font-size: 14px;
    color: var(--gray-700);
}

.btn-reset-filters-main {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* ===== Floating Actions ===== */
.floating-actions {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.floating-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.floating-action-top {
    background: linear-gradient(135deg, var(--nfs-blue), var(--nfs-purple));
    color: white;
}

.floating-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--nfs-red);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== Compare Dialog ===== */
.compare-dialog {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-dialog-content {
    background: white;
    border-radius: 12px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.compare-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.compare-dialog-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.compare-dialog-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-dialog-body {
    padding: 1.5rem;
}

/* ===== Responsive Utilities ===== */
.hidden-mobile {
    display: none;
}

@media (min-width: 640px) {
    .hidden-mobile {
        display: inline;
    }
}

.mobile-only {
    display: inline;
}

@media (min-width: 640px) {
    .mobile-only {
        display: none;
    }
}

/* ===== Animations ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== Load More Button ===== */
.load-more-wrapper {
    text-align: center;
    margin-top: 32px;
    padding: 24px 0;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, oklch(0.623 0.214 259.815), oklch(0.627 0.265 303.9));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-load-more:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn-load-more:active:not(:disabled) {
    transform: translateY(0);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-load-more-text {
    font-weight: 600;
}

.btn-load-more-count {
    font-weight: 400;
    opacity: 0.9;
}

.btn-load-more-icon {
    transition: transform 0.3s ease;
}

.btn-load-more:hover:not(:disabled) .btn-load-more-icon {
    transform: translateY(2px);
}

@media (max-width: 640px) {
    .btn-load-more {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-load-more-count {
        display: none;
    }
}
