/* ============================================
   AutoVerse — Page-Specific Styles (Phase 2)
   All pages except homepage
   ============================================ */


/* ==========================================
   Page Hero (Shared Subpage Banner)
   ========================================== */
.page-hero {
    background: var(--color-hero-bg);
    padding: var(--space-4xl) 0 var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(139,92,246,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.page-hero-sm {
    padding: var(--space-2xl) 0 var(--space-2xl);
}

.page-hero-xs {
    padding: var(--space-lg) 0 var(--space-md);
    background: var(--color-bg);
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

.page-hero-title {
    font-family: var(--font-heading);
    font-size: var(--fs-4xl);
    font-weight: 900;
    color: var(--color-hero-text);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.page-hero-subtitle {
    font-size: var(--fs-md);
    color: rgba(255,255,255,0.5);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.4);
    margin-bottom: var(--space-lg);
}

.page-hero-xs .breadcrumb {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.breadcrumb a {
    color: rgba(255,255,255,0.6);
    transition: color var(--transition-fast);
}

.page-hero-xs .breadcrumb a {
    color: var(--color-text-secondary);
}

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

.breadcrumb svg {
    opacity: 0.4;
    flex-shrink: 0;
}


/* ==========================================
   Car Listing Page
   ========================================== */
.listing-section {
    padding: var(--space-2xl) 0 var(--space-4xl);
}

.listing-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

/* Filter Sidebar */
.filter-sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + var(--space-md));
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: calc(100vh - var(--navbar-height) - 32px);
    display: flex;
    flex-direction: column;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-surface-border);
    flex-shrink: 0;
}

.filter-title {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text);
}

.filter-reset-btn {
    font-size: var(--fs-xs);
    color: var(--color-accent);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.filter-reset-btn:hover { opacity: 0.7; }

.filter-close-btn {
    display: none;
    color: var(--color-text-muted);
}

.filter-body {
    overflow-y: auto;
    padding: var(--space-sm) 0;
    flex: 1;
}

.filter-body::-webkit-scrollbar { width: 4px; }
.filter-body::-webkit-scrollbar-thumb { background: var(--color-text-muted); border-radius: 2px; }

.filter-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-surface-border);
    flex-shrink: 0;
}

.filter-apply-btn {
    width: 100%;
    justify-content: center;
}

/* Filter Groups */
.filter-group {
    border-bottom: 1px solid var(--color-surface-border);
}

.filter-group:last-child { border-bottom: none; }

.filter-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
    transition: background-color var(--transition-fast);
}

.filter-group-header:hover {
    background: var(--color-surface-hover);
}

.filter-chevron {
    transition: transform var(--transition-base);
}

.filter-group.open .filter-chevron {
    transform: rotate(180deg);
}

.filter-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 var(--space-lg);
}

.filter-group.open .filter-group-body {
    max-height: 400px;
    padding: 0 var(--space-lg) var(--space-md);
}

/* Filter Inputs */
.filter-search-input {
    margin-bottom: var(--space-sm);
}

.filter-text-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    color: var(--color-text);
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}

.filter-text-input:focus {
    border-color: var(--color-accent);
}

.filter-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.filter-checkbox:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.filter-checkbox input { display: none; }

.filter-checkbox .checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.filter-checkbox input:checked + .checkmark {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.filter-checkbox input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 3px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin-top: -1px;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.filter-pill {
    cursor: pointer;
}

.filter-pill input { display: none; }

.filter-pill span {
    display: inline-block;
    padding: 6px 14px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.filter-pill:hover span {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.filter-pill input:checked + span {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* Range Sliders */
.range-slider-container {
    padding-top: var(--space-xs);
}

.range-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.dual-range {
    position: relative;
    height: 32px;
}

.range-input {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 3;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(59,130,246,0.3);
    border: 2px solid white;
}

.range-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background: var(--color-bg-alt);
    border-radius: 2px;
}

.range-fill {
    position: absolute;
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
}

/* Results Top Bar */
.results-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.results-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-toggle-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.results-count {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.results-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.sort-select {
    padding: 8px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    color: var(--color-text);
    outline: none;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.view-btn {
    padding: 8px 10px;
    background: var(--color-surface);
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}

.view-btn.active {
    background: var(--color-accent);
    color: white;
}

/* Active Filters Tags */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    color: var(--color-accent);
    font-weight: 500;
}

.filter-tag button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    padding: 0;
}

.filter-tag button:hover { opacity: 1; }

/* Car Grid Listing */
.car-grid-listing {
    grid-template-columns: repeat(3, 1fr);
}

.car-grid-dashboard {
    grid-template-columns: repeat(3, 1fr);
}

/* List View */
.car-grid.list-view {
    grid-template-columns: 1fr;
}

.car-grid.list-view .car-card {
    display: grid;
    grid-template-columns: 280px 1fr;
}

.car-grid.list-view .car-card-image {
    aspect-ratio: auto;
    height: 100%;
}

/* Compare Checkbox */
.car-compare-check {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.car-compare-check input { display: none; }

.compare-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
}

.car-compare-check input:checked + .compare-icon {
    background: var(--color-accent);
    color: white;
}

/* Filter Overlay (Mobile) */
.filter-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-2xl);
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.page-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    color: var(--color-text-muted);
    padding: 0 var(--space-sm);
}


/* ==========================================
   Car Detail Page
   ========================================== */
.detail-hero {
    padding: var(--space-xl) 0 var(--space-2xl);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

/* Gallery */
.detail-gallery {
    position: sticky;
    top: calc(var(--navbar-height) + var(--space-md));
}

.gallery-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-alt);
    margin-bottom: var(--space-md);
}

.gallery-main-image svg {
    width: 100%;
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    z-index: 2;
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.05);
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-fullscreen {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
    z-index: 2;
}

.gallery-fullscreen:hover { background: rgba(0,0,0,0.7); }

.gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 500;
    z-index: 2;
}

.gallery-thumbs {
    display: flex;
    gap: var(--space-sm);
}

.gallery-thumb {
    flex: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    background: none;
    padding: 0;
}

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

.gallery-thumb svg {
    width: 100%;
    display: block;
}

/* Overview Panel */
.detail-badges {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.badge-featured {
    background: rgba(59,130,246,0.1);
    color: var(--color-accent);
}

.badge-verified {
    background: rgba(16,185,129,0.1);
    color: #10b981;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.detail-price {
    font-family: var(--font-heading);
    font-size: var(--fs-3xl);
    font-weight: 900;
    color: var(--color-accent);
}

.detail-emi {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* Quick Specs */
.detail-quick-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.quick-spec {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
}

.quick-spec svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.spec-label {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.spec-value {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
}

/* Detail Actions */
.detail-actions {
    margin-bottom: var(--space-xl);
}

.detail-action-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.detail-secondary-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Seller Card */
.seller-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-surface-border);
}

.seller-info {
    flex: 1;
    min-width: 0;
}

.seller-name {
    display: block;
    font-weight: 700;
    color: var(--color-text);
    font-size: var(--fs-sm);
}

.seller-type {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating-text, .seller-rating span {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-left: 4px;
}

.seller-link {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
}

.seller-link:hover { text-decoration: underline; }


/* ==========================================
   Tabs System
   ========================================== */
.detail-tabs-section {
    padding: 0 0 var(--space-3xl);
}

.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-surface-border);
    margin-bottom: var(--space-2xl);
    overflow-x: auto;
}

.tab-btn {
    padding: var(--space-md) var(--space-xl);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Overview Tab */
.overview-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-2xl);
}

.overview-description h3,
.overview-highlights h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.overview-description p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.highlight-list {
    list-style: none;
}

.highlight-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-surface-border);
}

.highlight-list li svg { flex-shrink: 0; }

/* Specs Tab */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
}

.spec-group-title {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-accent);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid var(--color-surface-border);
}

.spec-table td {
    padding: 10px 0;
    font-size: var(--fs-sm);
}

.spec-table td:first-child {
    color: var(--color-text-muted);
}

.spec-table td:last-child {
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
}

/* Features Tab */
.features-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
}

.feature-col h4 {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 8px 0;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-surface-border);
    padding-left: var(--space-lg);
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

/* Price Analysis */
.price-analysis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.price-gauge h4,
.finance-calculator h4 {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.gauge-bar {
    position: relative;
    height: 8px;
    background: linear-gradient(to right, #10b981, #eab308, #ef4444);
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.gauge-marker {
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-marker::before {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--color-surface);
    border: 3px solid var(--color-accent);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.marker-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-accent);
    margin-top: 4px;
}

.marker-price {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-lg);
}

.gauge-labels span {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-align: center;
}

.price-verdict {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.verdict-good {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.15);
}

.price-verdict svg { flex-shrink: 0; margin-top: 2px; }

/* Finance Calculator */
.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.calc-field label {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.calc-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-family: inherit;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast);
}

.calc-input:focus { border-color: var(--color-accent); }

.calc-result {
    padding: var(--space-lg);
    background: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: var(--radius-md);
    text-align: center;
}

.calc-label {
    display: block;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.calc-payment {
    font-family: var(--font-heading);
    font-size: var(--fs-3xl);
    font-weight: 900;
    color: var(--color-accent);
}

/* Seller Detail Tab */
.seller-detail-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.seller-detail-header h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--color-text);
}

.seller-detail-header p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.seller-detail-stats {
    display: flex;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

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

.seller-stat strong {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--color-text);
}

.seller-stat span {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* Similar Cars Scroll */
.similar-scroll {
    position: relative;
}

.similar-track {
    display: flex;
    gap: var(--space-xl);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: var(--space-md);
}

.similar-track::-webkit-scrollbar { display: none; }

.similar-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.scroll-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    z-index: 2;
}

.scroll-nav:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.scroll-prev { left: -22px; }
.scroll-next { right: -22px; }


/* ==========================================
   Compare Page
   ========================================== */
.compare-section {
    padding: var(--space-xl) 0 var(--space-4xl);
}

.compare-header {
    position: sticky;
    top: var(--navbar-height);
    z-index: var(--z-sticky);
    background: var(--color-bg);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-xl);
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.compare-slot {
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    position: relative;
    transition: all var(--transition-base);
}

.compare-slot.empty {
    border-style: dashed;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.compare-add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
    background: none;
    border: none;
    font-family: inherit;
    font-size: var(--fs-sm);
}

.compare-add-btn:hover { color: var(--color-accent); }

.compare-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.compare-remove:hover { background: #fee2e2; color: #ef4444; }

.compare-slot-image {
    margin-bottom: var(--space-md);
}

.compare-slot-image svg {
    width: 100%;
    border-radius: var(--radius-sm);
}

.compare-slot-name {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.compare-slot-price {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--color-accent);
}

/* Compare Table */
.compare-table-wrapper {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 12px var(--space-lg);
    text-align: left;
    font-size: var(--fs-sm);
    border-bottom: 1px solid var(--color-surface-border);
}

.compare-table th {
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-bg-alt);
    position: sticky;
    top: 0;
}

.compare-label-col {
    width: 200px;
    color: var(--color-text-muted) !important;
    font-weight: 500 !important;
}

.compare-section-row td {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: var(--fs-sm);
    color: var(--color-text);
    background: var(--color-bg-alt);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compare-table .highlight {
    color: var(--color-accent);
    font-weight: 700;
}

.compare-table .has-feature {
    color: #10b981;
    font-weight: 700;
}

.compare-table .no-feature {
    color: #ef4444;
    font-weight: 700;
}

.empty-col {
    color: var(--color-text-muted) !important;
    opacity: 0.3;
}


/* ==========================================
   Sell Your Car Page
   ========================================== */
.sell-section {
    padding: var(--space-2xl) 0 var(--space-4xl);
    max-width: 800px;
    margin: 0 auto;
}

/* Stepper */
.stepper {
    margin-bottom: var(--space-3xl);
    position: relative;
}

.stepper-track {
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--color-surface-border);
    border-radius: 2px;
    z-index: 0;
}

.stepper-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.step-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 2px solid var(--color-surface-border);
    border-radius: 50%;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-text-muted);
    transition: all var(--transition-base);
}

.step.active .step-num {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.step.completed .step-num {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.step-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color var(--transition-base);
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--color-text);
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

.form-step-header {
    margin-bottom: var(--space-2xl);
}

.form-step-header h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.form-step-header p {
    color: var(--color-text-secondary);
    font-size: var(--fs-sm);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.required { color: #ef4444; }

.form-input {
    padding: 12px 16px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-family: inherit;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-input.error {
    border-color: #ef4444;
}

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

.form-error {
    font-size: var(--fs-xs);
    color: #ef4444;
    margin-top: 4px;
    display: none;
}

.form-group.has-error .form-error {
    display: block;
}

.form-group.has-error .form-input {
    border-color: #ef4444;
}

/* Input with Prefix */
.input-with-prefix {
    display: flex;
    align-items: center;
}

.input-prefix {
    padding: 12px 14px;
    background: var(--color-surface-border);
    border: 1px solid var(--color-surface-border);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-text-muted);
}

.input-with-prefix .form-input {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    flex: 1;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: var(--space-md);
    padding-top: var(--space-sm);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.radio-label input[type="radio"] {
    accent-color: var(--color-accent);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--color-surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--color-bg-alt);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--color-accent);
    background: rgba(59,130,246,0.03);
}

.upload-zone-content svg {
    margin: 0 auto var(--space-md);
    color: var(--color-text-muted);
}

.upload-zone-content h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.upload-zone-content p {
    color: var(--color-text-secondary);
    font-size: var(--fs-sm);
}

.upload-hint {
    display: block;
    margin-top: var(--space-sm);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.upload-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-alt);
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Price Suggestion */
.price-suggestion {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: var(--radius-md);
    margin-top: var(--space-xl);
}

.price-suggestion-icon {
    color: var(--color-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.price-suggestion strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 4px;
}

.price-suggestion p {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Preview Card */
.preview-card {
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.preview-placeholder {
    text-align: center;
    padding: var(--space-3xl);
}

.preview-placeholder p {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    margin-top: var(--space-md);
}

/* Form Navigation */
.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-surface-border);
}


/* ==========================================
   Auth Pages
   ========================================== */
.page-auth .navbar { display: none; }
.page-auth .footer { display: none; }
.page-auth main { min-height: 100vh; }

.auth-section {
    min-height: 100vh;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-layout-centered {
    grid-template-columns: 1fr;
    place-items: center;
}

.auth-visual {
    background: linear-gradient(135deg, #0a0f1c 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(59,130,246,0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139,92,246,0.1) 0%, transparent 50%);
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 400px;
}

.auth-visual-text h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-4xl);
    font-weight: 900;
    color: white;
    margin-bottom: var(--space-md);
}

.auth-visual-text p {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-md);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
}

.auth-visual-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255,255,255,0.7);
    font-size: var(--fs-sm);
}

.auth-feature svg { color: #10b981; flex-shrink: 0; }

/* Auth Form */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: var(--color-bg);
}

.auth-form-panel-centered {
    min-height: 100vh;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    margin-bottom: var(--space-2xl);
}

.auth-logo .logo-text {
    color: var(--color-text);
}

.auth-icon-circle {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,0.1);
    border-radius: 50%;
    color: var(--color-accent);
    margin-bottom: var(--space-lg);
}

.auth-title {
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.auth-subtitle {
    color: var(--color-text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-2xl);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Floating Labels */
.form-group.floating {
    position: relative;
}

.form-group.floating label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: var(--fs-sm);
    font-weight: 400;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 4px;
    margin: 0;
}

.form-group.floating .form-input:focus + label,
.form-group.floating .form-input:not(:placeholder-shown) + label {
    top: 0;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-bg);
}

.form-group.floating .form-input {
    padding: 16px 16px 12px;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
}

.eye-closed { display: none; }

.password-toggle.showing .eye-open { display: none; }
.password-toggle.showing .eye-closed { display: block; }

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.strength-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: var(--color-surface-border);
    border-radius: 2px;
    transition: background var(--transition-fast);
}

.strength-bar.active-weak { background: #ef4444; }
.strength-bar.active-fair { background: #eab308; }
.strength-bar.active-good { background: #3b82f6; }
.strength-bar.active-strong { background: #10b981; }

.strength-text {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Form Utilities */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.checkbox-label input { display: none; }

.checkbox-label .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.checkbox-label input:checked + .checkmark {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 3px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin-top: -1px;
}

.form-link {
    font-size: var(--fs-sm);
    color: var(--color-accent);
    font-weight: 600;
}

.form-link:hover { text-decoration: underline; }

.btn-full { width: 100%; justify-content: center; }

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-surface-border);
}

.auth-divider span {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Social Auth */
.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.social-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-auth-btn:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

.auth-footer-text {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}


/* ==========================================
   Dashboard
   ========================================== */
.dashboard-section {
    padding: var(--space-xl) 0 var(--space-4xl);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + var(--space-md));
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dash-user-card {
    padding: var(--space-xl);
    text-align: center;
    border-bottom: 1px solid var(--color-surface-border);
}

.dash-avatar {
    margin: 0 auto var(--space-md);
}

.dash-user-name {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--color-text);
}

.dash-user-email {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.dash-member-since {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    opacity: 0.6;
}

.dash-nav {
    padding: var(--space-sm);
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: none;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.dash-nav-item:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.dash-nav-item.active {
    background: rgba(59,130,246,0.08);
    color: var(--color-accent);
    font-weight: 600;
}

.dash-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
}

/* Dashboard Panels */
.dash-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dash-panel.active {
    display: block;
}

.dash-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.dash-panel-header h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--color-text);
}

/* Dashboard Listing Cards */
.dash-listings {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.dash-listing-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dash-listing-card:hover {
    box-shadow: var(--shadow-md);
}

.dash-listing-image {
    flex-shrink: 0;
    width: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dash-listing-image svg { width: 100%; display: block; }

.dash-listing-info {
    flex: 1;
    min-width: 0;
}

.dash-listing-info h4 {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.dash-listing-price {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.dash-listing-stats {
    display: flex;
    gap: var(--space-md);
}

.dash-listing-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.dash-listing-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-md);
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.status-active { background: rgba(16,185,129,0.1); color: #10b981; }
.status-pending { background: rgba(234,179,8,0.1); color: #ca8a04; }
.status-sold { background: rgba(100,116,139,0.1); color: #64748b; }

.dash-action-btns {
    display: flex;
    gap: var(--space-xs);
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon-sm:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-icon-sm.btn-danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Messages */
.message-list {
    display: flex;
    flex-direction: column;
}

.message-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-surface-border);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.message-item:hover { background: var(--color-surface-hover); }

.message-item.unread { background: rgba(59,130,246,0.03); }
.message-item.unread .message-from { font-weight: 700; }

.message-content { flex: 1; min-width: 0; }

.message-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.message-from {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
}

.message-time {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.message-subject {
    display: block;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.message-preview {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Settings Form */
.settings-form .form-grid {
    grid-template-columns: 1fr 1fr;
}


/* ==========================================
   Dealer Profile Page
   ========================================== */
.dealer-banner {
    position: relative;
    padding: var(--space-3xl) 0 var(--space-2xl);
    overflow: hidden;
}

.dealer-banner-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #0a0f1c, #1e293b);
}

.dealer-banner-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(59,130,246,0.12), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(139,92,246,0.08), transparent 50%);
}

.dealer-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.dealer-logo-large {
    flex-shrink: 0;
}

.dealer-header-info { flex: 1; min-width: 200px; }

.dealer-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
    flex-wrap: wrap;
}

.dealer-name {
    font-family: var(--font-heading);
    font-size: var(--fs-3xl);
    font-weight: 900;
    color: white;
}

.dealer-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(16,185,129,0.2);
    color: #10b981;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.dealer-tagline {
    color: rgba(255,255,255,0.5);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-sm);
}

.dealer-rating-row .dealer-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dealer-stars span {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-sm);
    margin-left: 8px;
}

.dealer-banner-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Dealer Stats */
.dealer-stats-section {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-surface-border);
}

.dealer-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.dealer-stat-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-md);
}

.dealer-stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 900;
    color: var(--color-accent);
}

.dealer-stat-label {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.review-card {
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.review-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.review-name {
    display: block;
    font-weight: 700;
    color: var(--color-text);
    font-size: var(--fs-sm);
}

.review-date {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.review-stars {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-md);
}

.review-text {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: 1.7;
}


/* ==========================================
   Nav Login Button (desktop only — mobile uses full-width from .mobile-nav-actions)
   ========================================== */
@media (min-width: 769px) {
.nav-login-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    }
}


/* ==========================================
   Responsive Grid Utility
   ========================================== */
@media (max-width: 480px) {
    .responsive-grid-2 {
        grid-template-columns: 1fr !important;
    }
}


/* ==========================================
   Listing Page Search Bar
   ========================================== */
.listing-search-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.listing-search-bar input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-surface-border);
    background: var(--color-surface);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}

.listing-search-bar input[type="text"]:focus {
    border-color: var(--color-accent);
}

.listing-search-bar input[type="text"]::placeholder {
    color: var(--color-text-muted);
}


/* ==========================================
   Quick Filter Chips (Listing Page)
   ========================================== */
.quick-filters-row {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.quick-filters-row::-webkit-scrollbar {
    display: none;
}

.quick-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 36px;
    cursor: pointer;
}

.quick-filter-chip svg {
    flex-shrink: 0;
}

.quick-filter-chip:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--color-accent);
}

.quick-filter-chip.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}


/* ==========================================
   Gallery Image Slides
   ========================================== */
.gallery-main-image {
    display: none;
}

.gallery-main-image.active {
    display: block;
}


/* ==========================================
   Responsive Overrides for All Pages
   ========================================== */
@media (max-width: 1024px) {
    .listing-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        z-index: calc(var(--z-overlay) + 1);
        border-radius: 0;
        transition: left var(--transition-base);
        pointer-events: none;
        visibility: hidden;
    }

    .filter-sidebar.open {
        left: 0;
        pointer-events: auto;
        visibility: visible;
    }

    .filter-close-btn { display: block; }
    .filter-toggle-btn { display: flex; }

    .filter-overlay {
        display: block;
    }

    .car-grid-listing {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-gallery {
        position: static;
    }

    .compare-slots {
        grid-template-columns: repeat(2, 1fr);
    }

    .overview-grid,
    .specs-grid,
    .features-columns,
    .price-analysis {
        grid-template-columns: 1fr;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-visual { display: none; }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .dealer-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* List view: adapt card layout for tablets */
    .car-grid.list-view .car-card {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 768px) {
    .car-grid-listing,
    .car-grid-dashboard {
        grid-template-columns: 1fr;
    }

    .compare-slots {
        grid-template-columns: 1fr;
    }

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

    .form-row-double {
        grid-template-columns: 1fr;
    }

    .upload-preview {
        grid-template-columns: repeat(3, 1fr);
    }

    .dash-listing-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-listing-image {
        width: 100%;
    }

    .dash-listing-actions {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .dealer-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .dealer-name-row {
        justify-content: center;
    }

    .dealer-banner-actions {
        justify-content: center;
    }

    .dealer-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .similar-card {
        flex: 0 0 260px;
    }

    .scroll-prev, .scroll-next { display: none; }

    .stepper-steps { overflow-x: auto; gap: var(--space-lg); }
    .step-label { display: none; }

    .sell-section { padding-left: var(--space-md); padding-right: var(--space-md); }

    /* List view: single column on mobile */
    .car-grid.list-view .car-card {
        grid-template-columns: 1fr;
    }

    .car-grid.list-view .car-card-image {
        aspect-ratio: 16 / 10;
    }

    /* Detail page: badges wrap */
    .detail-badges {
        flex-wrap: wrap;
    }

    /* Detail page: price row stacking */
    .detail-price-row {
        flex-wrap: wrap;
    }

    /* Detail page: secondary actions wrap with proper sizing */
    .detail-secondary-actions {
        flex-wrap: wrap !important;
    }

    .detail-secondary-actions .btn-icon {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        font-size: var(--fs-xs);
        padding: 10px 8px;
        min-height: 44px;
    }

    /* Seller card stacks on small screens */
    .seller-card {
        flex-direction: column;
        text-align: center;
    }

    .seller-card .seller-link {
        width: 100%;
        text-align: center;
        padding: 10px;
        background: rgba(59, 130, 246, 0.08);
        border-radius: var(--radius-md);
    }

    /* Tabs: horizontal scroll with momentum */
    .tabs-nav {
        gap: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: var(--space-md) var(--space-md);
        font-size: var(--fs-xs);
        min-height: 44px;
    }

    /* Gallery thumbs: scroll on mobile */
    .gallery-thumbs {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

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

    .gallery-thumb {
        flex: 0 0 64px;
    }

    /* Quick filter chips: scroll horizontally on mobile */
    .quick-filter-chip {
        flex-shrink: 0;
    }

    /* Page hero title sizing */
    .page-hero-title {
        font-size: var(--fs-2xl);
    }

    /* Filter toggle and results bar */
    .results-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .results-controls {
        justify-content: space-between;
    }

    /* Compare table scroll */
    .compare-table-wrapper {
        margin: 0 calc(-1 * var(--space-md));
        padding: 0 var(--space-md);
    }

    /* Pagination: wrap and center */
    .pagination {
        flex-wrap: wrap;
    }

    /* Seller detail header */
    .seller-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .seller-detail-stats {
        flex-wrap: wrap;
        gap: var(--space-md);
        justify-content: center;
    }

    /* Filter sidebar: full width on small phones */
    .filter-sidebar {
        width: 100%;
        max-width: 100%;
    }

    /* Improve touch targets globally */
    .filter-group-header {
        min-height: 48px;
    }

    .filter-checkbox {
        min-height: 44px;
        padding: 10px 8px;
    }

    .filter-pill span {
        padding: 10px 16px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    .page-btn {
        min-width: 44px;
        height: 44px;
    }

    .sort-select {
        min-height: 44px;
        padding: 10px 12px;
    }

    .view-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .upload-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-auth {
        grid-template-columns: 1fr;
    }

    .detail-quick-specs {
        grid-template-columns: 1fr;
    }

    /* Secondary actions: stack fully */
    .detail-secondary-actions .btn-icon {
        flex: 1 1 100%;
    }

    /* Compare slot: compact */
    .compare-slot {
        padding: var(--space-md);
    }

    /* Brands grid: tight on small screens */
    .brands-grid {
        gap: var(--space-sm);
    }

    .brand-card {
        padding: var(--space-md) var(--space-sm);
    }

    .brand-logo {
        width: 56px;
        height: 56px;
    }

    /* Gallery nav buttons: bigger touch area */
    .gallery-nav {
        width: 44px;
        height: 44px;
    }

    /* Modal responsive (inline styles get overridden by specificity) */
    .compare-label-col {
        width: 120px;
        font-size: var(--fs-xs);
    }
}
