/* ============================================
   CATALOG PAGE STYLES
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-tertiary: #16162a;
    --bg-card: #1a1a2e;
    --accent-primary: #00d4aa;
    --accent-secondary: #00b894;
    --accent-tertiary: #00e5ff;
    --accent-gradient: linear-gradient(135deg, #00d4aa, #00e5ff);
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #6b6b8b;
    --border-color: rgba(255, 255, 255, 0.08);
    --success: #00d26a;
    --warning: #ffb300;
    --error: #ff4444;
    --font-primary: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.container { max-width: 1500px; margin: 0 auto; padding: 0 40px; }

/* Navigation */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1500px; margin: 0 auto; padding: 16px 40px;
    display: flex; align-items: center; justify-content: space-between;
}

.logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--text-primary);
    font-size: 1.3rem; font-weight: 600;
}
.logo-icon { font-size: 1.8rem; }
.logo-text .accent { color: var(--accent-primary); }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.95rem; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-primary); }

.nav-actions { display: flex; gap: 12px; }
.btn-nav {
    padding: 10px 20px; border-radius: 8px; text-decoration: none;
    font-size: 0.9rem; color: var(--text-secondary); transition: all 0.2s;
}
.btn-nav:hover { color: var(--text-primary); }
.btn-nav.btn-primary { background: var(--accent-primary); color: #000; }

/* Page Header */
.catalog-page { padding: 120px 0 100px; }

.page-header { text-align: center; margin-bottom: 40px; }
.page-header h1 { font-size: 3rem; font-weight: 700; margin-bottom: 12px; }
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-header p { color: var(--text-secondary); font-size: 1.1rem; }

/* Search Section */
.search-section { margin-bottom: 32px; }

.search-bar {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 4px 24px; margin-bottom: 20px;
}
.search-icon { font-size: 1.3rem; opacity: 0.5; }
.search-bar input {
    flex: 1; padding: 16px 0; background: transparent; border: none;
    color: var(--text-primary); font-size: 1rem; outline: none;
    font-family: var(--font-primary);
}
.search-bar input::placeholder { color: var(--text-muted); }

.filter-tags { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-tag {
    padding: 10px 20px; background: var(--bg-tertiary);
    border: 1px solid var(--border-color); border-radius: 30px;
    color: var(--text-secondary); font-size: 0.9rem;
    cursor: pointer; transition: all 0.2s;
    font-family: var(--font-primary);
}
.filter-tag:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.filter-tag.active {
    background: var(--accent-primary); color: #000;
    border-color: var(--accent-primary);
}

/* Catalog Layout */
.catalog-layout {
    display: grid; grid-template-columns: 280px 1fr; gap: 32px;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 24px; height: fit-content;
    position: sticky; top: 100px;
}

.filter-group { margin-bottom: 28px; }
.filter-group h3 {
    font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px;
    text-transform: uppercase; letter-spacing: 1px;
}

.filter-options { display: flex; flex-direction: column; gap: 8px; }

.filter-checkbox {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 10px 14px; border-radius: 10px; transition: background 0.2s;
}
.filter-checkbox:hover { background: var(--bg-tertiary); }
.filter-checkbox input { display: none; }
.filter-checkbox input:checked + span { color: var(--accent-primary); }
.filter-checkbox span {
    position: relative; padding-left: 28px; color: var(--text-secondary);
}
.filter-checkbox span::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; border: 2px solid var(--border-color);
    border-radius: 4px; transition: all 0.2s;
}
.filter-checkbox input:checked + span::before {
    background: var(--accent-primary); border-color: var(--accent-primary);
}
.filter-checkbox input:checked + span::after {
    content: '✓'; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #000;
}

.budget-slider { position: relative; padding: 20px 0; }
.budget-slider input[type="range"] {
    width: 100%; position: absolute;
    -webkit-appearance: none; background: transparent; pointer-events: none;
}
.budget-slider input:nth-child(1) { top: 20px; }
.budget-slider input:nth-child(2) { top: 20px; }
.budget-slider input::-webkit-slider-thumb {
    -webkit-appearance: none; width: 20px; height: 20px;
    background: var(--accent-primary); border-radius: 50%; cursor: pointer;
    pointer-events: auto;
}
.budget-slider input::-webkit-slider-runnable-track {
    height: 4px; background: var(--bg-tertiary); border-radius: 2px;
}
.budget-values {
    display: flex; justify-content: space-between; margin-top: 30px;
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-primary);
}

.filter-group select {
    width: 100%; padding: 12px 16px; background: var(--bg-tertiary);
    border: 1px solid var(--border-color); border-radius: 10px;
    color: var(--text-primary); font-family: var(--font-primary);
}

.btn-reset {
    width: 100%; padding: 12px; background: transparent;
    border: 1px solid var(--border-color); border-radius: 10px;
    color: var(--text-secondary); font-family: var(--font-primary);
    cursor: pointer; transition: all 0.2s;
}
.btn-reset:hover { border-color: var(--error); color: var(--error); }

/* Vehicles Section */
.results-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}

#results-count { color: var(--text-muted); font-size: 0.95rem; }

.sort-options select {
    padding: 10px 16px; background: var(--bg-tertiary);
    border: 1px solid var(--border-color); border-radius: 8px;
    color: var(--text-secondary); font-family: var(--font-primary);
}

/* Vehicles Grid */
.vehicles-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.vehicle-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; overflow: hidden; transition: all 0.3s;
    cursor: pointer; position: relative;
}
.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 212, 170, 0.15);
    border-color: var(--accent-primary);
}

.vehicle-card.compare-selected { border-color: var(--accent-tertiary); }
.vehicle-card.compare-selected::after {
    content: '✓'; position: absolute; top: 16px; left: 16px;
    width: 28px; height: 28px; background: var(--accent-tertiary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #000;
}

.vehicle-image {
    height: 180px; background: var(--bg-tertiary);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem; position: relative;
}

.vehicle-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 6px 12px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-new { background: var(--success); color: #000; }
.badge-promo { background: var(--warning); color: #000; }
.badge-limited { background: var(--error); color: white; }

.vehicle-info { padding: 20px; }
.vehicle-brand {
    font-size: 0.8rem; color: var(--accent-primary);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.vehicle-model { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.vehicle-specs {
    display: flex; gap: 12px; flex-wrap: wrap;
    font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px;
}
.vehicle-specs span { display: flex; align-items: center; gap: 4px; }

.vehicle-pricing {
    display: flex; justify-content: space-between; align-items: flex-end;
    padding-top: 16px; border-top: 1px solid var(--border-color);
}
.price-ht { font-size: 0.85rem; color: var(--text-muted); }
.price-ttc {
    font-size: 1.3rem; font-weight: 700; color: var(--accent-primary);
    font-family: var(--font-mono);
}
.price-territory { font-size: 0.7rem; color: var(--text-muted); }

.vehicle-actions {
    display: flex; gap: 8px; margin-top: 16px;
}
.btn-action {
    flex: 1; padding: 10px; border: none; border-radius: 8px;
    font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
    font-family: var(--font-primary);
}
.btn-action.primary { background: var(--accent-primary); color: #000; }
.btn-action.secondary {
    background: transparent; color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-action:hover { opacity: 0.9; }

/* Compare Bar */
.compare-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-card); border-top: 1px solid var(--accent-primary);
    padding: 16px 40px; z-index: 100;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } }

.compare-content {
    max-width: 1500px; margin: 0 auto;
    display: flex; align-items: center; gap: 24px;
}
.compare-count { color: var(--text-secondary); }
.compare-vehicles {
    flex: 1; display: flex; gap: 12px;
}
.compare-vehicle-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-tertiary); padding: 8px 16px;
    border-radius: 8px; font-size: 0.9rem;
}
.compare-vehicle-item button {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 4px;
}
.btn-compare {
    padding: 12px 24px; background: var(--accent-tertiary); color: #000;
    border: none; border-radius: 8px; font-weight: 600;
    cursor: pointer; font-family: var(--font-primary);
}

/* Modal */
.modal {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.modal.hidden { display: none; }
.modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px);
}
.modal-content {
    position: relative; z-index: 1;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 24px; max-width: 700px; width: 90%;
    max-height: 90vh; overflow: auto;
}
.modal-large { max-width: 1200px; }
.modal-close {
    position: absolute; top: 20px; right: 20px;
    width: 40px; height: 40px; background: var(--bg-tertiary);
    border: none; border-radius: 50%; color: var(--text-primary);
    font-size: 1.2rem; cursor: pointer; z-index: 10;
}
.modal-body { padding: 32px; }

/* Vehicle Detail */
.vehicle-detail-header {
    display: flex; gap: 32px; margin-bottom: 32px;
}
.vehicle-detail-image {
    width: 300px; height: 200px; background: var(--bg-tertiary);
    border-radius: 16px; display: flex; align-items: center;
    justify-content: center; font-size: 5rem; flex-shrink: 0;
}
.vehicle-detail-info h2 { font-size: 1.8rem; margin-bottom: 8px; }
.vehicle-detail-specs {
    display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px;
}
.spec-item {
    background: var(--bg-tertiary); padding: 12px 16px;
    border-radius: 10px; min-width: 100px;
}
.spec-item label { display: block; font-size: 0.75rem; color: var(--text-muted); }
.spec-item span { font-weight: 600; }

.vehicle-detail-pricing {
    background: var(--bg-tertiary); border-radius: 16px;
    padding: 24px; margin-bottom: 24px;
}
.pricing-row {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.pricing-total {
    font-size: 1.3rem; font-weight: 700; border: none;
    padding-top: 16px; color: var(--accent-primary);
}

.vehicle-detail-actions {
    display: flex; gap: 16px;
}
.vehicle-detail-actions .btn {
    flex: 1; padding: 16px; border: none; border-radius: 12px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    font-family: var(--font-primary);
}
.vehicle-detail-actions .btn-primary {
    background: var(--accent-primary); color: #000;
}
.vehicle-detail-actions .btn-secondary {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Comparison Table */
.comparison-header {
    text-align: center; margin-bottom: 32px;
}
.comparison-header h2 { font-size: 1.8rem; margin-bottom: 8px; }

.comparison-grid {
    display: grid; gap: 0;
    border: 1px solid var(--border-color); border-radius: 16px;
    overflow: hidden;
}
.comparison-row {
    display: grid; grid-template-columns: 150px repeat(var(--cols), 1fr);
}
.comparison-row.header { background: var(--bg-tertiary); }
.comparison-cell {
    padding: 16px; border-bottom: 1px solid var(--border-color);
    text-align: center;
}
.comparison-cell:first-child {
    text-align: left; font-weight: 500; color: var(--text-muted);
}
.comparison-row.header .comparison-cell {
    font-weight: 600; font-size: 1.1rem;
}
.comparison-row:last-child .comparison-cell { border-bottom: none; }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 1200px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filters-sidebar { position: static; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .page-header h1 { font-size: 2rem; }
    .nav-links { display: none; }
    .vehicle-detail-header { flex-direction: column; }
    .vehicle-detail-image { width: 100%; }
}

