/* =====================================================
   SECTION 1: GLOBAL STYLES
   ===================================================== */

/* --- General Body & Typography --- */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #f7fafc; /* Modern off-white background */
    color: #2d3748;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 0;
}
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 95%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}
/* --- Consistent Width Container --- */
.main-container, .navbar, .header, .content-wrapper, .search-page-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* --- Header Background --- */
.header-wrapper {
    position: relative;
    background-color: #fff;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255,107,0,0.07), transparent 40%),
        radial-gradient(circle at 85% 35%, rgba(255,107,0,0.04), transparent 40%),
        linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    border-bottom: 1px solid #e2e8f0;
}

/* --- Navigation Bar --- */
.nav-container {
    width: 100%;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    z-index: 10;
    background-color: #f7fafc;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    padding-bottom: 25px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    text-decoration: none;
}

.nav-links a { margin-left: 30px; text-decoration: none; color: #4a5568; font-weight: 600; transition: color 0.3s ease; }
.nav-links a:hover { color: #FF6B00; }
.nav-links .nav-signup { background-color: #FF6B00; color: #fff; padding: 12px 24px; border-radius: 8px; transition: background-color 0.3s ease, transform 0.2s ease; display: inline-block; }
.nav-links .nav-signup:hover { background-color: #E55F00; color: #fff; transform: translateY(-2px); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1001; }
.hamburger-bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: #1a202c; transition: all 0.3s ease-in-out; }

/* --- Header & Search --- */
.header { text-align: center; padding: 120px 0; position: relative; z-index: 1; }
.header h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 15px; letter-spacing: -1px; color: #111827; }
.header .subtitle { font-size: 1.25rem; color: #6B7280; margin-bottom: 50px; max-width: 600px; margin-left: auto; margin-right: auto; }
.search-container { display: flex; justify-content: center; max-width: 650px; margin: 0 auto; border-radius: 50px; overflow: hidden; border: 1px solid #e2e8f0; background-color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.search-input { flex-grow: 1; background-color: transparent; border: none; padding: 18px 30px; font-size: 1.15rem; outline: none; color: #111827; }
.search-input::placeholder { color: #9ca3af; }
.search-button { border: none; background-color: #FF6B00; color: white; padding: 0 35px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.3s ease; }
.search-button:hover { background-color: #E55F00; }

/* --- Compare Section --- */
.compare-section { margin-top: 50px; color: #6B7280; }
.compare-title { text-transform: uppercase; font-size: 0.9rem; font-weight: 600; letter-spacing: 1px; margin-right: 15px; }
.compare-links { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 20px; }
.compare-link-item { display: inline-flex; align-items: center; gap: 8px; color: #6B7280; text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 6px; transition: background-color 0.3s ease, color 0.3s ease; }
.compare-link-item:hover { background-color: rgba(0, 0, 0, 0.05); color: #111827; }
.compare-link-item svg { transition: fill 0.3s ease; }

/* --- Features Section --- */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px 40px; padding: 100px 0; }
.feature-item { display: flex; align-items: flex-start; text-align: left; transition: transform 0.3s ease; }
.feature-item:hover { transform: translateY(-5px); }
.feature-icon { margin-right: 20px; flex-shrink: 0; }
.feature-icon img { border-radius: 12px; background-color: #ffffff; border: 1px solid #e2e8f0; }
.feature-text h3 { margin: 0 0 10px 0; font-size: 1.3rem; font-weight: 600; color: #1a202c; }
.feature-text p { margin: 0; color: #718096; }

/* --- Search Page Specific Styles --- */
.search-form-wrapper { padding: 40px 0; background-color: #fff; border-bottom: 1px solid #e2e8f0; }
.search-page-header { margin-bottom: 20px; }
.search-page-header h1 { font-size: 1.8rem; margin: 0; font-weight: 600; color: #111827; }
.filter-grid-horizontal { display: flex; flex-direction: column; gap: 20px; }
.filter-fieldset { border: none; padding: 0; margin: 0; border-top: 1px solid #e2e8f0; padding-top: 20px; }
.filter-fieldset:first-child { border-top: none; padding-top: 0; }
.filter-fieldset legend { font-size: 1rem; font-weight: 600; color: #111827; padding: 0; margin-bottom: 15px; }
.fieldset-grid-6, .fieldset-grid-5, .fieldset-grid-4, .fieldset-grid-3-condensed { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
.fieldset-grid-5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 25px; }
.fieldset-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }
.filter-select { width: 100%; background-color: #fff; color: #111827; border: 1px solid #d1d5db; border-radius: 6px; padding: 12px; font-size: 1rem; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.filter-select option:disabled { color: #9ca3af; }
.slider-group label { display: block; text-align: center; font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; color: #6B7280; }
.range-value { display: block; text-align: center; font-weight: 600; margin-top: 8px; color: #6B7280; font-size: 0.9rem; }
.ev-filters { display: none; }
.search-actions { text-align: center; padding-top: 30px; }
.search-actions .cta-button { background: #FF6B00; }
.search-actions .cta-button:hover { background: #E55F00; }

/* --- Modern Checkbox Button Styles --- */
.checkbox-group-label { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; color: #6B7280; display: block; }
.checkbox-button-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-button-group input[type="checkbox"] { display: none; }
.checkbox-button-group label { background-color: #f3f4f6; color: #374151; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: all 0.2s ease-in-out; border: 1px solid #e5e7eb; }
.checkbox-button-group input[type="checkbox"]:checked + label { background-color: #FF6B00; color: #fff; border-color: #FF6B00; box-shadow: 0 0 0 2px rgba(255,107,0,0.2); }

/* --- Results Page Styles --- */
#results-section { padding-top: 40px; padding-bottom: 40px; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.result-card { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.result-card-header { position: relative; }
.result-image { width: 100%; height: 220px; object-fit: cover; display: block; }
.result-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.result-info h3 { margin: 0 0 5px 0; font-size: 1.3rem; font-weight: 600; }
.result-trim { color: #718096; font-weight: 600; margin-bottom: 15px; display: block; }
.result-specs-full { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 0.9rem; margin-bottom: 20px; }
.spec-item { display: flex; justify-content: space-between; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.spec-item span { color: #718096; }
.spec-item strong { color: #2d3748; }
.best-spec { color: #16a34a; font-weight: 700; }

.result-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    background: #FF6B00;
    color: white;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    margin-top: auto;
    transition: background-color 0.3s ease;
}

.result-button:hover {
    background: #E55F00;
}


/* --- Compare Checkbox --- */
.compare-checkbox-wrapper { position: absolute; top: 15px; right: 15px; }
.compare-checkbox { display: none; }
.compare-checkbox + label { background-color: rgba(17, 24, 39, 0.7); color: #ffffff; padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s ease; backdrop-filter: blur(5px); }
.compare-checkbox:checked + label { background-color: #3b82f6; }

/* --- Compare Bar --- */
.compare-bar { position: fixed; bottom: -100px; left: 0; width: 100%; background-color: #fff; box-shadow: 0 -4px 20px rgba(0,0,0,0.08); border-top: 1px solid #e2e8f0; transition: bottom 0.3s ease-in-out; z-index: 100; }
.compare-bar.active { bottom: 0; }
.compare-bar-content { max-width: 600px; margin: 0 auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.compare-bar span { color: #111827; font-weight: 600; }
.compare-button { background-color: #d1d5db; cursor: not-allowed; color: #6B7280; }
.compare-bar.active .compare-button { background-color: #FF6B00; cursor: pointer; color: #fff; }
.compare-bar.active .compare-button:hover { background-color: #E55F00; }

/* --- Comparison Page Styles --- */
.ai-summary { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; margin-bottom: 30px; }
.ai-summary h3 { margin: 0 0 15px 0; font-size: 1.5rem; }
.ai-summary p { margin: 0 0 10px 0; line-height: 1.7; }
.ai-summary p:last-child { margin-bottom: 0; }
.mpg-calculator { border-top: 1px solid #e2e8f0; margin-top: 20px; padding-top: 20px; }
.mpg-calculator h4 { margin: 0 0 15px 0; }
.mpg-inputs { display: flex; gap: 20px; margin-bottom: 15px; }
.mpg-inputs div { flex: 1; }
.mpg-inputs label { font-size: 0.9rem; font-weight: 600; margin-bottom: 5px; display: block; }
.mpg-inputs input { width: 100%; padding: 8px; border: 1px solid #d1d5db; border-radius: 6px; }

/* --- Car Detail Page --- */
#car-detail-page { padding-top: 40px; padding-bottom: 40px; }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.detail-title h1 { margin: 0; font-size: 2.5rem; }
.detail-title h2 { margin: 5px 0 0 0; font-size: 1.2rem; color: #718096; font-weight: 600; }
.add-to-garage-btn { background-color: #FF6B00; }
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.gallery-main-image { width: 100%; border-radius: 12px; margin-bottom: 15px; }
.gallery-thumbnails { display: flex; gap: 10px; }
.gallery-thumb { width: 100px; height: 67px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumb.active { border-color: #FF6B00; }
.specs-container { margin-top: 30px; }
.specs-container h3 { font-size: 1.5rem; margin-bottom: 20px; }
.detail-sidebar h3 { font-size: 1.5rem; margin: 0 0 20px 0; }
.reviews-container { display: flex; flex-direction: column; gap: 20px; }
.review-card { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-username { font-weight: 600; }
.review-rating { color: #f59e0b; }
.review-title { margin: 0; font-size: 1.1rem; }
.review-ownership { font-size: 0.9rem; color: #718096; margin: 5px 0 10px 0; }
.review-body { margin: 0; }
.review-form-container { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; margin-top: 30px; }
.review-form-container h4 { margin: 0 0 20px 0; font-size: 1.3rem; }
.review-form-container .cta-button { width: 100%; }
.review-form-container textarea { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; box-sizing: border-box; resize: vertical; }
.login-prompt { background-color: #f0f9ff; color: #0c4a6e; border: 1px solid #bae6fd; border-radius: 12px; padding: 20px; text-align: center; margin-top: 30px; }
.login-prompt a { color: #0284c7; font-weight: 600; }

/* --- Auth Page (Login/Sign Up) Styles --- */
.auth-container { display: flex; justify-content: center; align-items: center; padding: 80px 20px; flex-grow: 1; }
.auth-form-wrapper { background-color: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 40px; max-width: 450px; width: 100%; box-shadow: 0 8px 40px rgba(0,0,0,.08), 0 1px 0 rgba(0,0,0,.04); }
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h2 { font-size: 2rem; margin: 0 0 10px 0; color: #111827; }
.auth-header p { color: #6B7280; margin: 0; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #374151; }
.input-group input { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; box-sizing: border-box; background-color: #fff; color: #111827; }
.auth-button { width: 100%; background: #FF6B00; }
.auth-button:hover { background: #E55F00; }
.auth-footer { text-align: center; margin-top: 20px; color: #6B7280; }
.auth-footer a { color: #FF6B00; text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* --- Admin Dashboard Styles --- */
body.dashboard-body { background-color: #f1f5f9; }
.dashboard-header { margin-bottom: 30px; }
.dashboard-header h1 { font-size: 2.2rem; margin: 0; }
.dashboard-header p { font-size: 1.1rem; color: #718096; margin-top: 5px; }
.stats-grid {width: 98%; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card-modern { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; display: flex; align-items: center; gap: 20px; }
.stat-icon { border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon.icon-cars { background-color: #e0f2fe; color: #0284c7; }
.stat-icon.icon-users { background-color: #e0e7ff; color: #4338ca; }
.stat-icon.icon-admins { background-color: #dcfce7; color: #166534; }
.stat-icon.icon-reviews { background-color: #fef3c7; color: #a16207; }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 2rem; font-weight: 700; color: #1a202c; }
.stat-title { font-size: 0.9rem; font-weight: 600; color: #718096; }
.dashboard-grid-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    width: 98%;
}

/* Individual Widget styling */
.dashboard-widget {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
}
.widget-full { grid-column: 1 / -1; }
.dashboard-widget h3 { margin: 0 0 20px 0; font-size: 1.3rem; }
.widget-table-container { max-height: 350px; overflow-y: auto; }
.widget-table { width: 100%; border-collapse: collapse; }
.widget-table th, .widget-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 0.9rem; }
.widget-table tr:last-child td { border-bottom: none; }
.widget-table th { background-color: #f7fafc; font-weight: 600; }
.car-search-form .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; align-items: flex-end; }
.car-search-form input { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; box-sizing: border-box; }
.car-search-form .cta-button { padding: 12px; height: 47px; box-sizing: border-box; background-color: #FF6B00; }

/* --- Message Styles --- */
.message { padding: 15px; margin-bottom: 20px; border-radius: 8px; text-align: center; font-weight: 600; }
.message.error { background-color: #fee2e2; color: #991b1b; }
.message.success { background-color: #dcfce7; color: #14532d; }


/* --- Custom Range Slider --- */
.styled-slider { -webkit-appearance: none; width: 100%; height: 6px; background: #e2e8f0; outline: none; border-radius: 3px; }
.styled-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: #FF6B00; cursor: pointer; border-radius: 50%; transition: background-color 0.2s ease; }
.styled-slider::-webkit-slider-thumb:hover { background: #E55F00; }
.styled-slider::-moz-range-thumb { width: 18px; height: 18px; background: #FF6B00; cursor: pointer; border-radius: 50%; transition: background-color 0.2s ease; }
.styled-slider::-moz-range-thumb:hover { background: #E55F00; }

/* --- Call to Action & Footer --- */
.cta-section { text-align: center; padding: 80px 0; margin: 40px 0 80px 0; border-top: 1px solid #e2e8f0; }
.cta-section h2 { font-size: 2.2rem; margin-bottom: 15px; color: #1a202c; }
.cta-button { background: #FF6B00; color: white; border: none; padding: 18px 40px; font-size: 1.1rem; font-weight: 600; border-radius: 12px; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.cta-button:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(255, 107, 0, 0.3); }
.footer { text-align: center; padding: 40px 0; color: #718096; border-top: 1px solid #e2e8f0; }
.footer-links { margin-top: 10px; }
.footer-links a { color: #718096; text-decoration: none; margin: 0 15px; transition: color 0.3s ease; }
.footer-links a:hover { color: #FF6B00; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .nav-links-wrapper { position: absolute; top: 85px; left: 0; width: 100%; background-color: #f7fafc; border-bottom: 1px solid #e2e8f0; display: none; flex-direction: column; align-items: center; padding: 20px 0; }
    .nav-links-wrapper.nav-active { display: flex; }
    .nav-links { display: flex; flex-direction: column; align-items: center; width: 100%; }
    .nav-links a { margin: 15px 0; font-size: 1.2rem; }
    .nav-links .nav-signup { margin-top: 15px; }
    .hamburger { display: block; }
    .hamburger.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
    .hamburger.is-active .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.is-active .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .header h1 { font-size: 2.5rem; }
    .header .subtitle { font-size: 1.1rem; }
    .compare-section { margin-top: 40px; }
    .compare-title { display: block; margin-bottom: 15px; margin-right: 0; }
    .results-grid { grid-template-columns: 1fr 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; padding: 60px 0; }
    .fieldset-grid-6, .fieldset-grid-5, .fieldset-grid-4, .fieldset-grid-3, .fieldset-grid-3-condensed { grid-template-columns: 1fr 1fr; }
    .results-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .fieldset-grid-6, .fieldset-grid-5, .fieldset-grid-4, .fieldset-grid-3, .fieldset-grid-3-condensed { grid-template-columns: 1fr; }
    .search-container { flex-direction: column; border-radius: 12px; border: none; background-color: transparent; }
    .search-input { border-radius: 12px; border: 1px solid #e2e8f0; text-align: center; }
    .search-button { border-radius: 12px; margin-top: 15px; padding: 18px 30px; }
}
@media (max-width: 768px) {
    .dashboard-grid-main {
        gap: 20px;
        grid-template-columns: 1fr;
    }
    .stat-card-modern {
        padding: 15px;
        gap: 10px;
    }
    .stat-value {
        font-size: 1.5rem;
    }
}
/* Professional Form Inputs */
.auth-form input, .auth-form textarea, .auth-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #ffffff;
    color: #1a202c;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.auth-form input:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
/* --- Professional Table Styles --- */
.widget-table {
    width: 100%;
    border-collapse: collapse;
}
.widget-table th {
    text-align: left;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 12px;
    border-bottom: 2px solid #f1f5f9;
}
.widget-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #334155;
}
.lab-portal-wrapper {
    width: 100%;
    overflow-x: hidden;
}
.lab-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    width: 100%;
    background: #fff;
    margin: 0;
    padding: 0;
    gap: 0;
}
.lab-portal-header {
    width: 100%;
    box-sizing: border-box;
    padding: 30px 50px;
    background: #f8fafc;
    background-image: radial-gradient(#cbd5e1 0.8px, transparent 0.8px);
    background-size: 30px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lab-header-info h1 {
    margin: 8px 0 0;
    font-size: 1.8rem;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

.lab-tagline {
    font-size: 0.75rem;
    color: #FF6B00;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.lab-stream-container {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
.lab-stream-container::-webkit-scrollbar { display: none; }

.lab-cell {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.cell-animation-strip {
    width: 100%;
    aspect-ratio: 2 / 1;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.cell-animation-strip video, .cell-animation-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cell-media-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fdfdfd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.cell-text-square {
    width: 100%;
    min-height: 600px;
    box-sizing: border-box;
    padding: 45px;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.lab-action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e40af;
    background: #eff6ff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid #dbeafe;
    padding: 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.lab-action-link:hover {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.lab-action-link svg { margin-left: 8px; stroke: currentColor; }

.lab-navigation-bar {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 0;
    gap: 80px;
}

.blinker-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blinker-btn svg {
    width: 54px;
    height: 54px;
    stroke-width: 1.2;
    transition: all 0.2s ease-in-out;
}

/* =====================================================
   SECTION: USER DASHBOARD
   Namespace: ud-*
   Design: Functional Minimalism, Action Orange #FF6B00
   ===================================================== */

/* ── CSS Variables ────────────────────────────────────── */
.ud-body {
    --ud-bg:          #F0F2F5;
    --ud-surface:     rgba(255,255,255,0.92);
    --ud-surface2:    rgba(0,0,0,0.04);
    --ud-border:      rgba(0,0,0,0.08);
    --ud-text-1:      #111827;
    --ud-text-2:      #6B7280;
    --ud-text-3:      #9CA3AF;
    --ud-orange:      #FF6B00;
    --ud-orange-dim:  rgba(255,107,0,0.08);
    --ud-orange-br:   rgba(255,107,0,0.18);
    --ud-green:       #10B981;
    --ud-green-dim:   rgba(16,185,129,0.08);
    --ud-blue:        #3B82F6;
    --ud-blue-dim:    rgba(59,130,246,0.08);
    --ud-sidebar-w:   220px;
    --ud-radius:      12px;
    --ud-radius-lg:   16px;
    --ud-transition:  .18s ease;
}

/* ── Body & canvas ────────────────────────────────────── */
.ud-body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--ud-bg);
    color: var(--ud-text-1);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 0; /* override global padding-bottom */
    display: block;    /* override global flex */
}

#ud-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: .7;
}

/* ── Sidebar ──────────────────────────────────────────── */
.ud-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--ud-sidebar-w);
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: rgba(248,249,250,.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--ud-border);
    overflow: hidden;
}

.ud-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px 18px;
    text-decoration: none;
    color: var(--ud-text-1);
    font-size: 15px;
    font-weight: 700;
    border-bottom: 1px solid var(--ud-border);
    flex-shrink: 0;
}

.ud-logo-mark {
    width: 32px; height: 32px;
    background: var(--ud-orange);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    flex-shrink: 0;
}

.ud-logo-sub {
    font-size: 9px; font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ud-orange);
    display: block;
    margin-top: 1px;
}

/* ── Sidebar nav ──────────────────────────────────────── */
.ud-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.ud-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--ud-radius);
    text-decoration: none;
    color: var(--ud-text-2);
    font-size: 13.5px; font-weight: 500;
    cursor: pointer;
    border: none; background: none;
    width: 100%; text-align: left;
    font-family: inherit;
    transition: background var(--ud-transition), color var(--ud-transition);
    position: relative;
}
.ud-nav-item i { font-size: 17px; flex-shrink: 0; }
.ud-nav-item:hover  { background: var(--ud-surface2); color: var(--ud-text-1); }
.ud-nav-item.active { background: var(--ud-orange-dim); color: var(--ud-orange); }
.ud-nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--ud-orange);
    border-radius: 0 3px 3px 0;
}

.ud-nav-badge {
    margin-left: auto;
    background: var(--ud-orange); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 100px;
    min-width: 18px; text-align: center;
}

/* ── Explorer score box ───────────────────────────────── */
.ud-score-box {
    margin: 10px;
    padding: 16px;
    background: var(--ud-orange-dim);
    border: 1px solid var(--ud-orange-br);
    border-radius: var(--ud-radius-lg);
    flex-shrink: 0;
}

.ud-score-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ud-score-ring { width: 52px; height: 52px; flex-shrink: 0; }
.ud-score-ring circle { transform-origin: center; }

.ud-score-meta  { flex: 1; min-width: 0; }
.ud-score-num   { font-size: 15px; font-weight: 800; color: var(--ud-orange); line-height: 1.2; }
.ud-score-label { font-size: 10px; font-weight: 600; color: var(--ud-text-2); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.ud-score-hint  { font-size: 11.5px; color: var(--ud-text-3); line-height: 1.4; margin: 0; }

/* ── Sidebar footer ───────────────────────────────────── */
.ud-sidebar-foot {
    padding: 10px;
    border-top: 1px solid var(--ud-border);
    flex-shrink: 0;
}

/* ── Mobile bottom nav ────────────────────────────────── */
.ud-bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 300;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--ud-border);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}

.ud-bnav-inner {
    display: flex;
    justify-content: space-around;
}

.ud-bnav-btn {
    display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    background: none; border: none;
    color: var(--ud-text-3); cursor: pointer;
    padding: 6px 12px;
    font-family: inherit;
    transition: color var(--ud-transition);
}
.ud-bnav-btn i    { font-size: 20px; }
.ud-bnav-btn span { font-size: 10px; font-weight: 500; }
.ud-bnav-btn.active { color: var(--ud-orange); }

/* ── Main content area ────────────────────────────────── */
.ud-main {
    position: relative; z-index: 1;
    margin-left: var(--ud-sidebar-w);
    min-height: 100vh;
    padding: 28px 32px 60px;
}

/* ── Page header ──────────────────────────────────────── */
.ud-header {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px; gap: 16px;
    flex-wrap: wrap;
}
.ud-header-left h1 {
    font-size: 24px; font-weight: 800;
    letter-spacing: -.03em; margin-bottom: 3px;
    margin: 0 0 3px;
}
.ud-header-left p { font-size: 13.5px; color: var(--ud-text-3); margin: 0; }
.ud-header-actions { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ──────────────────────────────────────────── */
.ud-btn {
    display: inline-flex; align-items: center;
    justify-content: center; gap: 7px;
    border-radius: var(--ud-radius);
    padding: 10px 18px;
    font-size: 13.5px; font-weight: 600;
    font-family: inherit; cursor: pointer;
    text-decoration: none; border: none;
    transition: transform var(--ud-transition), box-shadow var(--ud-transition);
    white-space: nowrap;
}
.ud-btn i { font-size: 15px; }

.ud-btn-primary { background: var(--ud-orange); color: #fff; }
.ud-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,107,0,.3);
}

.ud-btn-ghost {
    background: var(--ud-surface2);
    border: 1px solid var(--ud-border);
    color: var(--ud-text-2);
}
.ud-btn-ghost:hover { color: var(--ud-text-1); background: rgba(0,0,0,.06); }

.ud-btn-sm { padding: 7px 13px; font-size: 12px; }

/* ── Sections ─────────────────────────────────────────── */
.ud-section { display: none; }
.ud-section.active { display: block; animation: ud-fadein .22s ease; }

@keyframes ud-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* ── Stats grid ───────────────────────────────────────── */
.ud-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.ud-stat {
    background: var(--ud-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--ud-border);
    border-radius: var(--ud-radius-lg);
    padding: 22px 20px;
    position: relative; overflow: hidden;
    transition: transform var(--ud-transition), border-color var(--ud-transition);
    box-shadow: 0 8px 40px rgba(0,0,0,.10), 0 1px 0 rgba(0,0,0,.04);
}
.ud-stat::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    background: var(--ud-accent, var(--ud-orange));
    opacity: .4;
}
.ud-stat:hover { transform: translateY(-2px); border-color: rgba(0,0,0,.12); }

.ud-stat-ico {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; margin-bottom: 14px;
}
.ud-stat-val {
    font-size: 28px; font-weight: 800;
    letter-spacing: -.04em; line-height: 1; margin-bottom: 4px;
}
.ud-stat-lbl {
    font-size: 12px; font-weight: 500;
    color: var(--ud-text-3);
    text-transform: uppercase; letter-spacing: .05em;
}

/* ── Layout rows ──────────────────────────────────────── */
.ud-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px; margin-bottom: 24px;
}
.ud-row.ud-thirds { grid-template-columns: 2fr 1fr; }

/* ── Glass card ───────────────────────────────────────── */
.ud-card {
    background: var(--ud-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--ud-border);
    border-radius: var(--ud-radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.10), 0 1px 0 rgba(0,0,0,.04);
}

.ud-card-head {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--ud-border);
}
.ud-card-head h3 {
    font-size: 14px; font-weight: 700;
    letter-spacing: -.01em; margin: 0;
    display: flex; align-items: center;
}
.ud-card-head a,
.ud-card-head button {
    font-size: 12px; font-weight: 500;
    color: var(--ud-orange); text-decoration: none;
    background: none; border: none; cursor: pointer;
    font-family: inherit;
    transition: opacity var(--ud-transition);
}
.ud-card-head a:hover,
.ud-card-head button:hover { opacity: .75; }

.ud-card-body { padding: 18px 20px; }

/* ── Table ────────────────────────────────────────────── */
.ud-table-wrap { overflow-x: auto; }

.ud-table {
    width: 100%; border-collapse: collapse;
    font-size: 13px;
}
.ud-table th {
    text-align: left; padding: 10px 12px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--ud-text-3);
    border-bottom: 1px solid var(--ud-border);
}
.ud-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,.03);
    vertical-align: middle;
    color: var(--ud-text-2);
}
.ud-table tr:last-child td { border-bottom: none; }
.ud-table tr:hover td { background: rgba(255,107,0,.03); }

/* ── Vehicle name / meta ──────────────────────────────── */
.ud-vehicle-name { font-size: 13px; font-weight: 600; color: var(--ud-text-1); }
.ud-vehicle-meta { font-size: 11.5px; color: var(--ud-text-3); margin-top: 2px; }

/* ── Inline action button ─────────────────────────────── */
.ud-action-btn {
    width: 28px; height: 28px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ud-surface2); border: 1px solid var(--ud-border);
    color: var(--ud-text-2); cursor: pointer; text-decoration: none;
    font-size: 14px;
    transition: background var(--ud-transition), color var(--ud-transition);
}
.ud-action-btn:hover { background: rgba(0,0,0,.08); color: var(--ud-text-1); }

/* ── Saved search rows ────────────────────────────────── */
.ud-search-row {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 20px;
    text-decoration: none; color: var(--ud-text-1);
    font-size: 13px; font-weight: 500;
    border-bottom: 1px solid var(--ud-border);
    transition: background var(--ud-transition);
}
.ud-search-row:last-child { border-bottom: none; }
.ud-search-row:hover { background: var(--ud-surface2); }

.ud-search-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px;
    text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--ud-border);
    transition: background var(--ud-transition);
}
.ud-search-item:last-child { border-bottom: none; }
.ud-search-item:hover { background: var(--ud-surface2); }

.ud-search-item-ico {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--ud-orange-dim); color: var(--ud-orange);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}

/* ── Stars ────────────────────────────────────────────── */
.ud-stars     { color: #F59E0B; font-size: 15px; letter-spacing: 1px; }
.ud-stars-sm  { color: #F59E0B; font-size: 13px; }

/* ── Empty state ──────────────────────────────────────── */
.ud-empty {
    padding: 48px 24px;
    text-align: center;
}
.ud-empty i    { font-size: 38px; color: var(--ud-text-3); margin-bottom: 14px; display: block; }
.ud-empty h4   { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.ud-empty p    { font-size: 13px; color: var(--ud-text-3); line-height: 1.5; margin: 0 0 18px; }

/* ── Section header (for sub-sections) ───────────────── */
.ud-section-header {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px; gap: 12px;
    flex-wrap: wrap;
}
.ud-section-header h2 {
    font-size: 18px; font-weight: 700;
    letter-spacing: -.02em; margin: 0 0 3px;
}
.ud-section-header p {
    font-size: 13px; color: var(--ud-text-3); margin: 0;
}

/* ── Quick action cards ───────────────────────────────── */
.ud-actions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.ud-action-card {
    padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; color: inherit;
    cursor: pointer;
    transition: border-color var(--ud-transition), transform var(--ud-transition);
    border: 1px solid var(--ud-border);
}
.ud-action-card:hover { transform: translateY(-2px); border-color: rgba(0,0,0,.12); }
.ud-action-card strong { font-size: 13.5px; font-weight: 600; display: block; margin-bottom: 2px; }
.ud-action-card span   { font-size: 12px; color: var(--ud-text-3); }

.ud-action-ico {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
    .ud-stats { grid-template-columns: repeat(2, 1fr); }
    .ud-row, .ud-row.ud-thirds { grid-template-columns: 1fr; }
    .ud-actions-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .ud-sidebar    { display: none; }
    .ud-bottom-nav { display: flex; }
    .ud-main       { margin-left: 0; padding: 20px 16px 90px; }
    .ud-header-left h1 { font-size: 20px; }
    .ud-stats      { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (max-width: 480px) {
    .ud-actions-row { grid-template-columns: 1fr; }
    .ud-stat        { padding: 16px 14px; }
    .ud-stat-val    { font-size: 22px; }
}

.blinker-btn:hover svg { stroke-width: 2.5; transform: scale(1.15); }

.scroll-progress-hint {
    font-family: monospace;
    font-size: 0.7rem;
    color: #cbd5e1;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.lab-id-tag {
    font-size: 0.7rem;
    font-weight: 800;
    color: #FF6B00;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.lab-title {
    margin: 0 0 15px 0;
    font-size: 1.6rem;
    text-transform: uppercase;
    font-weight: 900;
    line-height: 1.1;
}

.lab-description {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: auto;
}

.lab-verdict-wrap { border-top: 2px solid #f1f5f9; padding-top: 25px; margin-top: 20px; }

.lab-verdict-text {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e293b;
    display: block;
    margin-bottom: 15px;
}

.verdict-status { color: #10b981; }
.verdict-status.warning { color: #ef4444; }
.verdict-status.info { color: #3b82f6; }

.lab-affiliate-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #FF6B00;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.2s;
    text-align: center;
}

.lab-affiliate-link:hover { background: #1e293b; color: #fff; border-color: #1e293b; }

@media (max-width: 500px) {
    .lab-grid-container { grid-template-columns: 1fr; }
    .lab-cell, .cell-media-square, .cell-text-square, .cell-animation-strip, .lab-cell-recap {
        width: 100vw;
        max-width: 100vw;
    }
    .cell-media-square { height: 100vw; }
    .cell-text-square { height: auto; min-height: 600px; }
}
@media (max-width: 768px) {
    .mobile-swipe-hint {
        display: block;
        text-align: center;
        padding: 10px;
        background: #f8fafc;
        font-size: 0.65rem;
        color: #94a3b8;
        letter-spacing: 2px;
        text-transform: uppercase;
        animation: pulse 2s infinite;
    }
}
@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.lab-action-link-top {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e40af;
    background: #eff6ff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid #dbeafe;
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.lab-action-link-top:hover { background: #1e40af; color: #fff; }

.lab-cell-recap {
    width: 100%;
    min-height: 1320px;
    background: #f1f5f9;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f1f5f9;
}

.recap-post-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s;
}

.recap-post-item:hover { transform: translateX(5px); }

.recap-thumb { width: 100px; height: 100px; background: #f8fafc; border-right: 1px solid #f1f5f9; }

.recap-info { padding: 0 20px; flex: 1; }

.recap-info span {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recap-footer-link {
    display: block;
    background: #ffffff;
    color: #000000;
    text-align: center;
    padding: 15px;
    margin-top: 10px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.recap-footer-link:hover { background: #f8fafc; }

.ar-car-card:hover .ar-view-btn {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}


/* =====================================================
   SECTION 2: AR COMPONENT SYSTEM (index2.css)
   ===================================================== */

:root {
  --ar-bg: #f8fafc;
  --ar-dark: #111827;
  --ar-card-bg: #ffffff;
  --ar-border: #e2e8f0;
  --ar-accent: #FF6B00;
  --ar-text: #334155;
  --ar-text-muted: #64748b;
  --ar-radius: 12px;
  --ar-container-padding: 0 40px;
}

body {
  background-color: var(--ar-bg);
  overflow-x: hidden;
}

.ar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--ar-container-padding);
  box-sizing: border-box;
  width: 100%;
}

/* --- NAVBAR (Neumorphism) --- */
.ar-nav {
  background: #f3f5f9;
  border-bottom: 1px solid #e2e2e2;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 14px 0;
}

.ar-nav-container { display: flex; justify-content: space-between; align-items: center; }

.ar-nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ar-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ar-nav-logo i { color: var(--ar-accent); }

.ar-nav-links { display: flex; gap: 6px; }

.ar-nav-link {
  text-decoration: none;
  color: var(--ar-text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 7px 16px;
  border-radius: 20px;
  transition: all 0.2s;
  background: transparent;
}
.ar-nav-link:hover {
  color: var(--ar-dark);
  background: #f3f5f9;
  box-shadow:
    3px 3px 7px rgba(163, 177, 198, 0.4),
    -3px -3px 7px rgba(255, 255, 255, 0.9);
}

.ar-nav-actions { display: flex; align-items: center; gap: 10px; }

.ar-nav-btn {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 18px;
  border-radius: 20px;
  transition: all 0.2s;
}

.ar-nav-btn-text {
  color: var(--ar-text);
  background: #f3f5f9;
  box-shadow:
    3px 3px 7px rgba(163, 177, 198, 0.4),
    -3px -3px 7px rgba(255, 255, 255, 0.9);
}
.ar-nav-btn-text:hover {
  box-shadow:
    inset 2px 2px 5px rgba(163, 177, 198, 0.4),
    inset -2px -2px 5px rgba(255, 255, 255, 0.9);
  color: var(--ar-dark);
}

.ar-nav-btn-primary {
  background: #f3f5f9;
  color: var(--ar-accent);
  box-shadow:
    3px 3px 7px rgba(163, 177, 198, 0.4),
    -3px -3px 7px rgba(255, 255, 255, 0.9);
}
.ar-nav-btn-primary:hover {
  box-shadow:
    inset 2px 2px 5px rgba(163, 177, 198, 0.4),
    inset -2px -2px 5px rgba(255, 255, 255, 0.9);
}

.ar-mobile-toggle { display: none; font-size: 1.5rem; color: var(--ar-dark); cursor: pointer; }

/* --- HERO SECTION --- */
.ar-hero { background: var(--ar-dark); color: #fff; padding: 60px 0 80px; position: relative; }
.ar-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.ar-hero-content h1 { font-size: 3rem; line-height: 1.3; margin: 0 0 20px; font-weight: 800; letter-spacing: -0.02em; }
.ar-hero-content p { color: #94a3b8; font-size: 1.1rem; max-width: 500px; margin-bottom: 35px; line-height: 1.6; }

.ar-omnibox {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.ar-tabs { display: flex; gap: 20px; margin-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ar-tab { background: none; border: none; color: #94a3b8; font-weight: 600; cursor: pointer; padding: 0 0 8px 0; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ar-tab.active { color: #fff; border-bottom: 2px solid var(--ar-accent); }

.ar-search-input-wrapper { display: flex; background: #fff; border-radius: 8px; padding: 4px; }
.ar-search-input-wrapper input { flex: 1; border: none; padding: 12px 15px; font-size: 1rem; outline: none; min-width: 0; }
.ar-search-btn { background: var(--ar-accent); border: none; color: #fff; width: 50px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.ar-hero-visual { height: 500px; position: relative; }
.ar-hero-visual model-viewer { width: 100%; height: 100%; }
.ar-visual-caption { position: absolute; bottom: 20px; right: 20px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); padding: 10px 15px; border-radius: 8px; font-size: 0.85rem; color: #fff; }

/* --- STATS BAR --- */
.ar-stats-bar { background: #fff; border-bottom: 1px solid var(--ar-border); padding: 25px 0; width: 100%; }
.ar-stats-grid { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.ar-stat { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; }
.ar-stat-icon { font-size: 2rem; color: var(--ar-accent); background: #eff6ff; padding: 10px; border-radius: 12px; flex-shrink: 0; }
.ar-stat strong { display: block; font-size: 1.1rem; color: var(--ar-dark); line-height: 1.1; white-space: nowrap; }
.ar-stat span { font-size: 0.75rem; color: var(--ar-text-muted); text-transform: uppercase; font-weight: 600; white-space: nowrap; }

/* --- LAYOUT GRID --- */
.ar-feed-section { padding: 40px 0; }
.ar-feed-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; }

.ar-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; height: fit-content; }
.ar-card { background: #fff; border: 1px solid var(--ar-border); border-radius: var(--ar-radius); padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.ar-card h3 { margin: 0 0 15px; font-size: 0.8rem; text-transform: uppercase; color: var(--ar-text-muted); font-weight: 700; letter-spacing: 0.05em; }

.ar-nav-list, .ar-community-list { list-style: none; padding: 0; margin: 0; }
.ar-nav-list li a, .ar-community-list li a { display: flex; align-items: center; gap: 12px; padding: 12px; color: var(--ar-text); text-decoration: none; border-radius: 8px; font-weight: 500; transition: background 0.2s; }
.ar-nav-list li a:hover { background: #f1f5f9; color: var(--ar-dark); }
.ar-nav-list i { font-size: 1.2rem; color: var(--ar-text-muted); }

/* --- MOBILE MENU SCROLL --- */
.ar-mobile-nav-scroll { display: none; overflow-x: auto; white-space: nowrap; gap: 10px; padding-bottom: 20px; margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.ar-mobile-nav-scroll::-webkit-scrollbar { display: none; }
.ar-mobile-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--ar-border); padding: 10px 16px; border-radius: 50px; color: var(--ar-text); text-decoration: none; font-weight: 600; font-size: 0.9rem; flex-shrink: 0; }
.ar-mobile-pill.active { background: var(--ar-dark); color: #fff; border-color: var(--ar-dark); }

/* --- FEATURED CARS --- */
.ar-featured-section { margin-bottom: 50px; }
.ar-featured-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 25px; padding-bottom: 10px; border-bottom: 1px solid var(--ar-border); }
.ar-cars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --- FILTER CHIPS --- */
.ar-filters-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.ar-chip {
    display: inline-flex; align-items: center; gap: 10px;
    background: #eff6ff; color: #1e40af;
    padding: 6px 10px 6px 12px; border-radius: 50px;
    font-size: 0.9rem; font-weight: 600;
    border: 1px solid #dbeafe;
}
.ar-chip-text { line-height: 1; }
.ar-chip-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 999px;
    text-decoration: none; color: #1e40af; background: #dbeafe;
    font-weight: 900; line-height: 1; opacity: 1; transition: 0.2s;
}
.ar-chip-x:hover { background: #bfdbfe; }
.ar-chip a { color: #1e40af; text-decoration: none; display: flex; align-items: center; opacity: 0.6; transition: 0.2s; }
.ar-chip a:hover { opacity: 1; }
.ar-clear-all { font-size: 0.9rem; color: #64748b; text-decoration: underline; margin-left: 10px; align-self: center; }

/* --- CAR CARDS --- */
.ar-car-card { background: #fff; border: 1px solid var(--ar-border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.ar-car-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.ar-car-visual { height: 160px; background: #f1f5f9; position: relative; }
.ar-car-visual img, .ar-card-model { width: 100%; height: 100%; object-fit: cover; }
.ar-car-badge { position: absolute; top: 10px; left: 10px; background: rgba(17, 24, 39, 0.85); color: #fff; font-size: 0.7rem; padding: 4px 8px; border-radius: 4px; font-weight: 600; backdrop-filter: blur(4px); }
.ar-car-details { padding: 10px 16px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex-grow: 1; }
.ar-car-title { font-size: 1rem; font-weight: 600; color: var(--ar-dark); margin: 0; line-height: 1.3; }
.ar-car-trim { font-size: 0.7rem; color: var(--ar-text-muted); font-weight: 300; margin-bottom: 5px; }
.ar-specs-table { display: flex; flex-direction: column; gap: 3px; }
.ar-spec-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; padding-bottom: 5px; border-bottom: 1px dashed #f1f5f9; }
.ar-spec-label { color: var(--ar-text-muted); display: flex; align-items: center; gap: 6px; }
.ar-spec-val { font-weight: 600; color: var(--ar-dark); }
.ar-car-footer { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; }
.ar-price { font-size: 0.8rem; display: flex; flex-direction: column; }
.ar-price strong { font-size: 0.8rem; color: var(--ar-dark); font-weight: 700; }
.ar-view-btn { border: 1px solid var(--ar-border); background: transparent; color: var(--ar-text); padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.ar-dot-val { display: flex; align-items: center; gap: 6px; }
.ar-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ar-dot-green { background-color: #10b981; } .ar-dot-orange { background-color: #f59e0b; } .ar-dot-red { background-color: #ef4444; }

/* --- OTHER SECTIONS --- */
.ar-pills-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ar-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--ar-border); padding: 8px 16px; border-radius: 50px; text-decoration: none; color: var(--ar-text); font-weight: 600; font-size: 0.9rem; }
.ar-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.ar-filter-toggles { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 5px; }
.ar-filter-toggles button { background: #fff; border: 1px solid var(--ar-border); padding: 6px 16px; border-radius: 20px; white-space: nowrap; }
.ar-feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ar-feed-card { background: #fff; border: 1px solid var(--ar-border); border-radius: var(--ar-radius); padding: 20px; display: flex; flex-direction: column; }
.ar-feed-meta { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.8rem; }
.ar-feed-tag { font-weight: 700; color: var(--ar-accent); text-transform: uppercase; }

/* --- CTA SECTION --- */
.ar-cta-section { background: var(--ar-dark); color: #fff; text-align: center; padding: 60px 0; margin-top: 60px; width: 100%; }
.ar-cta-buttons { margin-top: 30px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.ar-btn { padding: 12px 24px; border-radius: 8px; text-decoration: none; font-weight: 600; display: inline-block; }
.ar-btn-primary { background: var(--ar-accent); color: #fff; }
.ar-btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* --- FOOTER --- */
.ar-footer { background: #fff; border-top: 1px solid var(--ar-border); padding: 60px 0 30px; }
.ar-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.ar-footer-brand h2 { font-size: 1.5rem; color: var(--ar-dark); margin: 0 0 15px; font-weight: 800; }
.ar-footer-col h4 { font-size: 0.9rem; font-weight: 700; color: var(--ar-dark); text-transform: uppercase; margin-bottom: 20px; }
.ar-footer-col ul { list-style: none; padding: 0; margin: 0; }
.ar-footer-col li { margin-bottom: 12px; }
.ar-footer-col a { text-decoration: none; color: var(--ar-text-muted); font-size: 0.95rem; }
.ar-footer-bottom { border-top: 1px solid var(--ar-border); padding-top: 30px; display: flex; justify-content: space-between; color: var(--ar-text-muted); font-size: 0.85rem; }

/* =========================================
   MOBILE RESPONSIVENESS (Max Width 900px)
   ========================================= */
@media (max-width: 900px) {
    :root { --ar-container-padding: 0 20px; }
    .ar-nav-links, .ar-nav-actions { display: none; }
    .ar-mobile-toggle { display: block; }
    .ar-hero { padding: 30px 0 40px; }
    .ar-hero-grid { grid-template-columns: 1fr; gap: 0; }
    .ar-hero-visual { display: none; }
    .ar-hero-content h1 { font-size: 2rem; max-width: 100%; }
    .ar-hero-content p { font-size: 1rem; margin-bottom: 25px; }
    .ar-omnibox { width: 100%; box-sizing: border-box; padding: 20px; }
    .ar-stat:nth-child(2), .ar-stat:nth-child(3) { display: none; }
    .ar-stats-grid { justify-content: space-between; gap: 15px; padding-bottom: 0; }
    .ar-stat { min-width: 0; flex: 1; padding: 8px; border: 1px solid var(--ar-border); border-radius: 10px; }
    .ar-stat-icon { font-size: 1.2rem; padding: 8px; }
    .ar-stat strong { font-size: 0.9rem; }
    .ar-stat span { font-size: 0.65rem; }
    .ar-sidebar { display: none; }
    .ar-mobile-scroll-container, .ar-scroll-wrapper { position: relative; margin: 0 -20px 25px -20px; }
    .ar-mobile-scroll-container::after, .ar-scroll-wrapper::after { content: '→'; position: absolute; right: 0; top: 0; bottom: 0; width: 50px; background: linear-gradient(to right, transparent, #f8fafc 80%); display: flex; align-items: center; justify-content: flex-end; padding-right: 15px; color: var(--ar-accent); font-weight: 800; font-size: 1.5rem; pointer-events: none; z-index: 2; }
    .ar-mobile-nav-scroll { display: flex; overflow-x: auto; gap: 10px; padding: 0 20px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .ar-mobile-nav-scroll::-webkit-scrollbar { display: none; }
    .ar-mobile-pill { flex: 0 0 auto; font-size: 0.85rem; padding: 8px 14px; background: #fff; }
    .ar-cars-grid { display: flex; overflow-x: auto; gap: 15px; padding: 0 20px 20px 20px; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x mandatory; }
    .ar-cars-grid::-webkit-scrollbar { display: none; }
    .ar-car-card { min-width: 280px; width: 280px; flex: 0 0 auto; scroll-snap-align: center; }
    .ar-feed-layout { display: block; }
    .ar-footer { padding: 40px 0 30px; }
    .ar-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 20px; }
    .ar-footer-brand { grid-column: 1 / -1; text-align: center; margin-bottom: 10px; }
    .ar-footer-brand p { margin: 0 auto; }
    .ar-footer-col h4 { font-size: 0.8rem; margin-bottom: 15px; }
    .ar-footer-col a { font-size: 0.85rem; }
    .ar-footer-col:last-child { grid-column: 1 / -1; border-top: 1px solid var(--ar-border); padding-top: 20px; }
    .ar-footer-col:last-child ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .ar-footer-bottom { flex-direction: column; gap: 15px; text-align: center; margin-top: 20px; }
}

/* =========================================
   NARROW DESKTOP & TABLET FIX
   ========================================= */
@media (max-width: 1400px) {
    .ar-main-feed { min-width: 0; overflow: hidden; }
    .ar-scroll-wrapper { position: relative; margin-right: -20px; }
    .ar-scroll-wrapper::after { content: '→'; position: absolute; right: 0; top: 0; bottom: 0; width: 50px; background: linear-gradient(to right, transparent, #fff 90%); display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; color: var(--ar-accent); font-weight: 800; font-size: 1.5rem; pointer-events: none; z-index: 10; }
    .ar-cars-grid { display: flex; overflow-x: auto; gap: 20px; padding-bottom: 20px; padding-right: 20px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .ar-cars-grid::-webkit-scrollbar { display: none; }
    .ar-car-card { min-width: 240px; flex: 0 0 auto; scroll-snap-align: start; }
}


/* =====================================================
   SECTION 3: HOMEPAGE LAYOUT (home.css)
   ===================================================== */

:root {
  --hp-text: #0f172a;
  --hp-muted: #64748b;
  --hp-line: #e2e8f0;
  --hp-card: #ffffff;
  --hp-soft: #f8fafc;
  --hp-radius: 16px;
  --hp-shadow: 0 1px 0 rgba(15,23,42,.06);
}

.hp-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hp-muted { color: var(--hp-muted); }
.hp-section { padding: 20px 0; }
.hp-hero { padding: 26px 0 8px; }
.hp-hero__grid { display: grid; gap: 16px; align-items: start; }
.hp-hero__copy h1 { margin: 0 0 8px; font-size: clamp(28px,4vw,44px); line-height: 1.1; color: var(--hp-text); }
.hp-hero__copy p { margin: 0 0 14px; max-width: 60ch; color: var(--hp-muted); }
.hp-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hp-btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 14px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; box-shadow: var(--hp-shadow); text-decoration: none; }
.hp-btn--primary { background: #111827; color: #fff; }
.hp-btn--secondary { background: var(--hp-soft); border-color: var(--hp-line); color: var(--hp-text); }
.hp-preview { border: 1px solid var(--hp-line); border-radius: var(--hp-radius); background: linear-gradient(#fff,var(--hp-soft)); padding: 14px; }
.hp-preview__card { border: 1px solid var(--hp-line); border-radius: 12px; background: #fff; padding: 12px; }
.hp-preview__title { font-size: 15px; }
.hp-preview__meta { margin-top: 6px; font-size: 13px; color: var(--hp-muted); }
.hp-preview__cars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.hp-preview__car { height: 74px; border: 1px solid var(--hp-line); border-radius: 12px; background: #f1f5f9; }
.hp-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.hp-section__head h2 { margin: 0; font-size: 20px; }
.hp-cards-grid { display: none; gap: 12px; }
.hp-cards-row { display: flex; gap: 12px; overflow: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.hp-card { border: 1px solid var(--hp-line); border-radius: var(--hp-radius); background: var(--hp-card); padding: 14px; box-shadow: var(--hp-shadow); text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.hp-card:hover { transform: translateY(-1px); transition: transform .12s ease; text-decoration: none; }
.hp-card__title { font-size: 16px; }
.hp-card__meta { font-size: 13px; color: var(--hp-muted); }
.hp-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hp-rating { font-weight: 800; }
.hp-card--mobile { min-width: 82%; scroll-snap-align: start; }
.hp-dots { display: flex; gap: 6px; margin-top: 10px; }
.hp-dot { width: 7px; height: 7px; border-radius: 999px; background: #d1d5db; }
.hp-dot.is-active { background: #111827; }
.hp-split { display: grid; gap: 12px; }
.hp-panel { border: 1px solid var(--hp-line); border-radius: var(--hp-radius); background: #fff; padding: 14px; box-shadow: var(--hp-shadow); }
.hp-panel h3 { margin: 0 0 10px; font-size: 16px; }
.hp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hp-list a { display: block; padding: 10px 12px; border: 1px solid var(--hp-line); border-radius: 12px; background: var(--hp-soft); text-decoration: none; }
.hp-list a:hover { text-decoration: underline; }
.hp-reviews { display: grid; gap: 12px; }
.hp-review { border: 1px solid var(--hp-line); border-radius: var(--hp-radius); background: #fff; padding: 14px; box-shadow: var(--hp-shadow); }
.hp-review__top { display: flex; gap: 10px; align-items: center; }
.hp-avatar { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--hp-line); background: #f1f5f9; }
.hp-review__title { font-size: 14px; margin: 0; }
.hp-review__bullets { margin-top: 12px; display: grid; gap: 8px; }
.hp-bullet { display: flex; gap: 8px; align-items: center; }
.hp-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-tool { padding: 12px; border: 1px solid var(--hp-line); border-radius: 14px; background: #fff; text-align: center; font-weight: 700; box-shadow: var(--hp-shadow); text-decoration: none; }

@media (min-width: 900px) {
  .hp-hero__grid { grid-template-columns: 1.2fr .9fr; align-items: center; }
  .hp-cards-grid { display: grid; grid-template-columns: repeat(4,1fr); }
  .hp-cards-row, .hp-dots { display: none; }
  .hp-split { grid-template-columns: 1fr 1fr; }
  .hp-reviews { grid-template-columns: 1fr 1fr; }
  .hp-tools { grid-template-columns: repeat(4,1fr); }
}


/* =====================================================
   SECTION 4: SEARCH & RESULTS (search2.css)
   ===================================================== */

.ar-year-range { font-size: 0.85rem; color: #64748b; font-weight: 600; margin-bottom: 0; display: block; }
.ar-car-title { margin-top: 0 !important; }

/* --- LAYOUT --- */
.sr-layout { display: grid; grid-template-columns: 320px 1fr; gap: 0; min-height: 100vh; background: #f8fafc; }

/* --- SIDEBAR CONTAINER --- */
.sr-sidebar { background: #f3f5f9; border-right: none; height: calc(100vh - 66px); position: sticky; top: 66px; z-index: 9999; overflow-y: auto; padding: 24px; box-sizing: border-box; }
.sr-sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sr-sidebar-header h3 { font-size: 1.1rem; font-weight: 700; color: #111827; margin: 0; }
.sr-close-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* --- FILTER GROUPS --- */
.sr-group { padding-bottom: 24px; }
.sr-group:last-child { border-bottom: none; }
.sr-group-head { display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 0.85rem; color: #1e293b; cursor: pointer; margin-bottom: 16px; background-image: radial-gradient(#e5e5e5 0.1px, #00000000 0.8px); background-size: 7px 7px; }
.sr-group-head i { transition: transform 0.2s; }
.sr-group.collapsed .sr-group-body { display: none; }
.sr-group.collapsed .sr-group-head i { transform: rotate(-90deg); }

/* --- FORM ELEMENTS --- */
.sr-row { display: flex; gap: 12px; margin-bottom: 12px; }
.sr-field { margin-bottom: 12px; width: 100%; }
.sr-field label { display: block; font-size: 0.8rem; font-weight: 600; color: #64748b; margin-bottom: 6px; }
.sr-select-wrapper { position: relative; }
.sr-select-wrapper select { width: 100%; appearance: none; background: #f3f5f9; border: none; border-radius: 8px; padding: 10px 14px; font-size: 0.75rem; color: #4c617e; cursor: pointer; box-shadow: 3px 3px 7px rgba(163, 177, 198, 0.4), -3px -3px 7px rgba(255, 255, 255, 0.9); transition: box-shadow 0.2s; }
.sr-select-wrapper select:focus { outline: none; box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.4), inset -2px -2px 5px rgba(255, 255, 255, 0.85); }
.sr-select-wrapper i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #64748b; font-size: 0.9rem; }
.sr-text-input { width: 100%; padding: 10px 14px; border: none; border-radius: 8px; font-size: 0.9rem; box-sizing: border-box; background: #f3f5f9; color: #4c617e; box-shadow: 3px 3px 7px rgba(163, 177, 198, 0.4), -3px -3px 7px rgba(255, 255, 255, 0.9); transition: box-shadow 0.2s; }
.sr-text-input:focus { outline: none; box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.4), inset -2px -2px 5px rgba(255, 255, 255, 0.85); }
.sr-slider-field { margin-bottom: 16px; }
.sr-slider-label { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 500; color: #64748b; margin-bottom: 8px; }
.sr-slider-label span:last-child { color: #0f172a; font-weight: 700; }

/* Submit Button */
.sr-submit-area { position: sticky; bottom: 0; background: #f3f5f9; padding-top: 10px; border-top: none; }
.sr-submit-btn { width: 100%; background: #f3f5f9; color: var(--ar-accent, #3b82f6); font-weight: 600; padding: 14px; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.5), -4px -4px 8px rgba(255, 255, 255, 0.9); transition: box-shadow 0.15s; }
.sr-submit-btn:hover { box-shadow: 5px 5px 10px rgba(163, 177, 198, 0.55), -4px -4px 9px rgba(255, 255, 255, 0.95); }
.sr-submit-btn:active { box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.5), inset -2px -2px 5px rgba(255, 255, 255, 0.8); }

/* --- CONTENT AREA --- */
.sr-content { padding: 40px; }
.sr-results-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.sr-results-header h1 { font-size: 1.8rem; color: #0f172a; margin: 0; }
.sr-count { color: #64748b; font-weight: 600; }
.sr-query-echo { color: #64748b; font-size: 0.9rem; margin: -16px 0 20px; }
.sr-query-echo strong { color: #0f172a; }

/* --- MOBILE BAR --- */
.sr-mobile-bar { display: none; }

@media (max-width: 1024px) {
    .sr-layout { display: block; }
    .sr-sidebar { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; transform: translateX(-100%); transition: transform 0.3s ease; }
    .sr-sidebar.active { transform: translateX(0); }
    .sr-close-btn { display: block; }
    .sr-mobile-bar { display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid #e2e8f0; padding: 12px 20px; position: sticky; top: 73px; z-index: 100; }
    .sr-mobile-btn { background: #0f172a; color: #fff; padding: 8px 16px; border-radius: 6px; border: none; font-weight: 600; display: flex; align-items: center; gap: 6px; }
    .sr-mobile-chips { display: flex; gap: 8px; overflow-x: auto; }
    .sr-chip { white-space: nowrap; font-size: 0.8rem; background: #f1f5f9; padding: 6px 12px; border-radius: 50px; color: #475569; font-weight: 500; }
    .sr-content { padding: 20px; }
}

/* =========================================
   SCROLLABLE CARDS & RAILS
   ========================================= */
.sr-rail-grid { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 20px; padding-bottom: 20px; padding-right: 20px; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sr-rail-grid::-webkit-scrollbar { display: none; }
.sr-rail-grid .ar-car-card, .sr-rail-grid .sr-card { min-width: 240px; width: 240px; flex: 0 0 auto; scroll-snap-align: start; }

.sr-rail-wrapper, .ar-scroll-wrapper { position: relative; transition: all 0.2s ease; }
.sr-rail-wrapper::after { display: none; }
.sr-rail-wrapper.can-scroll::after {
    content: '→';
    display: flex;
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, #f8fafc 90%);
    align-items: center; justify-content: flex-end;
    padding-right: 15px;
    color: var(--ar-accent);
    font-weight: 800; font-size: 1.5rem;
    pointer-events: none;
    z-index: 10;
    animation: bounceRight 2s infinite;
}

.ar-scroll-wrapper::after { content: '→'; display: flex; position: absolute; right: 0; top: 0; bottom: 0; width: 80px; background: linear-gradient(to right, transparent 0%, #f8fafc 60%); align-items: center; justify-content: flex-end; padding-right: 20px; color: var(--ar-accent); font-weight: 800; font-size: 1.8rem; pointer-events: none; z-index: 20; opacity: 0; transition: opacity 0.3s ease; }
.ar-scroll-wrapper.can-scroll::after { opacity: 1; animation: bounceRight 2s infinite; }

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@media (max-width: 1750px) {
    .sr-content { min-width: 0; overflow: hidden; }
    .ar-cars-grid { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 20px; padding-bottom: 20px; padding-right: 20px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .ar-cars-grid::-webkit-scrollbar { display: none; }
    .ar-cars-grid .ar-car-card, .ar-cars-grid .sr-card { min-width: 240px; width: 240px; flex: 0 0 auto; scroll-snap-align: start; }
}

/* PAGINATION */
.sr-pagination { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 48px; padding-bottom: 24px; }
.pg-row { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 4px; }
.pg-arrow { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #64748b; text-decoration: none; transition: all 0.15s; font-size: 0.85rem; cursor: pointer; background: none; border: none; }
.pg-arrow:hover { background: #f1f5f9; color: #0f172a; }
.pg-arrow.disabled { opacity: 0.25; pointer-events: none; }
.pg-num { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #475569; font-weight: 600; text-decoration: none; transition: all 0.15s; font-size: 0.85rem; cursor: pointer; background: none; }
.pg-num:hover { background: #f1f5f9; color: #0f172a; }
.pg-num.active { background: #0f172a; color: #fff; pointer-events: none; }
.pg-dots { color: #cbd5e1; font-size: 0.85rem; padding: 0 2px; user-select: none; letter-spacing: 1px; }
.pg-info { font-size: 0.78rem; color: #94a3b8; font-weight: 500; margin: 0; }
@media (max-width: 600px) {
    .pg-row { gap: 2px; padding: 3px; }
    .pg-arrow, .pg-num { width: 32px; height: 32px; font-size: 0.8rem; }
}

/* RESULTS PAGE OVERRIDES */
.ar-grid-view { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 20px !important; overflow: hidden !important; padding-bottom: 0 !important; }
.ar-grid-view .ar-car-card { min-width: 0 !important; width: auto !important; }
@media (max-width: 600px)  { .ar-grid-view { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; } }
.ar-grid-view .ar-car-badge { left: auto; right: 10px; top: 10px; }

/* 3D available badge on car cards */
.ar-3d-badge {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    background: rgba(30,41,59,0.75); color: #fff; backdrop-filter: blur(4px);
    padding: 4px 8px; border-radius: 6px; font-size: 0.68rem; font-weight: 700;
    display: flex; align-items: center; gap: 3px;
}
.ar-car-visual { position: relative; }

#compareBar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1e293b; color: #fff; padding: 12px 24px; border-radius: 14px; display: flex; align-items: center; gap: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); z-index: 999; font-size: 0.85rem; font-weight: 600; animation: arSlideUp 0.25s ease-out; }
@keyframes arSlideUp { from { opacity:0; transform: translateX(-50%) translateY(20px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
#compareBar span { color: #94a3b8; font-weight: 400; font-size: 0.78rem; }
#compareBar button { background: #fff; color: #1e293b; padding: 8px 18px; border-radius: 10px; font-weight: 700; border: none; cursor: pointer; font-size: 0.82rem; transition: background 0.15s; }
#compareBar button:hover { background: #f1f5f9; }

/* Result count */
.sr-result-count { font-size: 0.88rem; color: #64748b; font-weight: 500; }

/* Empty state */
.sr-empty { text-align: center; padding: 80px 20px; }
.sr-empty h3 { font-size: 1.2rem; color: #334155; margin: 16px 0 6px; }
.sr-empty p { font-size: 0.88rem; color: #94a3b8; margin: 0; }

/* Discovery sections */
.sr-discovery-section { margin-bottom: 36px; }
.sr-discovery-header h2 { font-size: 1.2rem; font-weight: 800; color: #0f172a; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.sr-discovery-header h2 i { color: #f97316; }
.sr-discovery-header p { font-size: 0.82rem; color: #94a3b8; margin: 0 0 12px; }

/* Card wrap for compare checkboxes */
.ar-card-wrap { position: relative; }
.ar-card-wrap .compare-check { position: absolute; top: 10px; left: 10px; z-index: 5; width: 22px; height: 22px; cursor: pointer; accent-color: #475569; }
.ar-card-wrap.ar-card-selected > .ar-car-card { outline: 2px solid #475569; outline-offset: -2px; box-shadow: 0 0 0 4px rgba(71,85,105,0.1); }

/* SINGLE SLIDER FILL */
input[type=range]:not(#fromSlider):not(#toSlider) { -webkit-appearance: none; width: 100%; height: 4px; background: #e2e8f0; border-radius: 4px; background-image: linear-gradient(#2563eb, #2563eb); background-size: 0% 100%; background-repeat: no-repeat; cursor: pointer; }
input[type=range]:not(#fromSlider):not(#toSlider)::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: #fff; border: 2px solid #2563eb; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: background .3s ease-in-out; }


/* =====================================================
   SECTION 5: SIDEBAR FILTER STYLES
   ===================================================== */

.sr-slider-field input[type="range"] { -webkit-appearance: none; width: 100%; height: 6px; background: #f3f5f9; border-radius: 4px; outline: none; margin: 15px 0; cursor: pointer; box-shadow: inset 1px 1px 3px rgba(163, 177, 198, 0.5), inset -1px -1px 3px rgba(255, 255, 255, 0.8); }
.sr-slider-field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #f3f5f9; border: none; border-radius: 50%; cursor: pointer; box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.45), -3px -3px 6px rgba(255, 255, 255, 0.9); }
.sr-slider-field input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; background: #f3f5f9; border: none; border-radius: 50%; cursor: pointer; box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.45), -3px -3px 6px rgba(255, 255, 255, 0.9); }

.sr-field-label { font-size: 0.8rem; }

.sr-pills-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; width: 100%; }

.sr-toggle-btn, .sr-pill-dropdown summary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 5px 14px; background: #f3f5f9; color: #475569; border-radius: 8px; font-size: 0.75rem; font-weight: 500; border: none; box-shadow: 3px 3px 7px rgba(163, 177, 198, 0.4), -3px -3px 7px rgba(255, 255, 255, 0.9); transition: box-shadow 0.2s ease; cursor: pointer; user-select: none; width: auto; }
.sr-toggle-btn:hover, .sr-pill-dropdown summary:hover { box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.45), -3px -3px 8px rgba(255, 255, 255, 0.95); }
.sr-toggle-btn:has(input:checked), 
.sr-pill-dropdown.active-pill summary { 
    font-weight: 600; 
    box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.5), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}
/* 2. WebKit Support (Chrome, Safari, Edge) */

/* Set the overall width of the scrollbar space */
.sr-sidebar::-webkit-scrollbar {
  width: 12px; /* Made slightly wider to accommodate the floating border trick below */
}

/* Make the background track completely invisible */
.sr-sidebar::-webkit-scrollbar-track {
  background: transparent; 
}

/* Style the drag handle (thumb) and make it float */
.sr-sidebar::-webkit-scrollbar-thumb {
  background-color: #cbd5e1; /* A nice subtle gray, adjust to match AutoRooster's theme */
  border-radius: 10px; 
  
  /* THE FLOATING TRICK */
  border: 3px solid transparent; /* Acts as a margin around the thumb */
  background-clip: padding-box;  /* Stops the background color from painting underneath the transparent border */
}

/* Darken the thumb slightly on hover for user feedback */
.sr-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8; 
}
.sr-dropdown-wrapper { position: relative; display: inline-block; }
.sr-pill-dropdown summary { list-style: none; outline: none; }
.sr-pill-dropdown summary::-webkit-details-marker { display: none; }
.sr-dropdown-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 110px; background: #f3f5f9; border: none; border-radius: 10px; padding: 12px; box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.5), -4px -4px 10px rgba(255, 255, 255, 0.9); z-index: 1000; display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; }
.sr-dropdown-menu label { display: flex; align-items: center; gap: 8px; padding: 5px 4px; cursor: pointer; color: #475569; border-radius: 6px; transition: color 0.15s; }
.sr-dropdown-menu label:hover { color: #1e293b; }
.sr-dropdown-menu input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 4px; background: #f3f5f9; border: none; box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.45), -2px -2px 4px rgba(255, 255, 255, 0.9); cursor: pointer; position: relative; flex-shrink: 0; transition: box-shadow 0.15s; }
.sr-dropdown-menu input[type="checkbox"]:checked { box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.5), inset -1px -1px 3px rgba(255, 255, 255, 0.7); }
.sr-dropdown-menu input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: 2px solid #2563eb; border-top: none; border-left: none; transform: rotate(45deg); }
.sr-toggle-btn input { position: absolute; opacity: 0; width: 0; height: 0; }

/* Dual Range Slider */
.range_container { position: relative; width: 100%; height: 20px; margin-top: 5px; }
.sliders_control { position: relative; min-height: 20px; }
.range_container::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 4px; background: #e2e8f0; border-radius: 4px; z-index: 0; }
#slider_highlight { position: absolute; top: 9px; height: 4px; background: #163b8d; z-index: 1; border-radius: 4px; pointer-events: none; }
.sliders_control input[type=range] { position: absolute; pointer-events: none; -webkit-appearance: none; z-index: 2; height: 6px; width: 100%; opacity: 1; background: transparent; cursor: pointer; top: 6px; }
.sliders_control input[type=range]::-webkit-slider-thumb { pointer-events: all; width: 20px; height: 20px; -webkit-appearance: none; background: #f3f5f9; border: none; border-radius: 50%; cursor: pointer; box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.45), -3px -3px 6px rgba(255, 255, 255, 0.9); }
