/* Extracted from index.html */

/* Search & Header extras (page-specific) */
        .search-container {
            flex: 1;
            max-width: 600px;
        }

        .search-box {
            display: flex;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            transition: border-color 0.3s;
        }

        .search-box:focus-within {
            border-color: var(--accent);
        }

        .search-input {
            flex: 1;
            padding: 0.8rem 1rem;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.95rem;
            outline: none;
        }

        .search-input::placeholder {
            color: var(--text-secondary);
        }

        .search-btn, .vin-btn {
            padding: 0.8rem 1rem;
            background: transparent;
            border: none;
            border-left: 1px solid var(--border);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.3s;
        }

        .search-btn:hover, .vin-btn:hover {
            background: var(--accent);
            color: white;
        }

        /* Enhanced Search Styles */
        .search-box-enhanced {
            position: relative;
            width: 100%;
            max-width: 600px;
        }

        .search-input-wrapper {
            display: flex;
            align-items: center;
            background: var(--bg-card);
            border: 2px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.3s;
        }

        .search-input-wrapper:focus-within {
            border-color: var(--accent);
            box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
        }

        .search-input-wrapper .search-icon {
            padding: 0 0.5rem 0 1rem;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        .search-input-wrapper .search-input {
            flex: 1;
            padding: 0.9rem 0.5rem;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.95rem;
            outline: none;
            min-width: 200px;
        }

        .search-filters-toggle {
            padding: 0.5rem 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: color 0.2s;
        }

        .search-filters-toggle:hover,
        .search-filters-toggle.active {
            color: var(--accent);
        }

        .search-loading {
            padding: 0 0.75rem;
        }

        .search-spinner {
            width: 18px;
            height: 18px;
            border: 2px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        /* Search Dropdown */
        .search-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            max-height: 70vh;
            overflow-y: auto;
            z-index: 1000;
        }

        .search-dropdown.active {
            display: block;
            animation: slideDown 0.2s ease-out;
        }

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

        /* Search Filters */
        .search-filters {
            display: flex;
            gap: 1rem;
            padding: 1rem;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
        }

        .search-filters .filter-group {
            flex: 1;
        }

        .search-filters label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-bottom: 0.25rem;
            text-transform: uppercase;
        }

        .search-filters select {
            width: 100%;
            padding: 0.5rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }

        /* Recent Searches */
        .search-recent {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--border);
        }

        .search-section-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            margin-bottom: 0.5rem;
        }

        .search-section-title i {
            font-size: 0.7rem;
        }

        .clear-recent {
            margin-left: auto;
            cursor: pointer;
            color: var(--accent);
            font-size: 0.7rem;
        }

        .clear-recent:hover {
            text-decoration: underline;
        }

        .search-recent-items {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .search-recent-item {
            padding: 0.4rem 0.8rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 20px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }

        .search-recent-item:hover {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }

        /* Search Results */
        .search-results-container {
            padding: 0.5rem;
        }

        .search-results-section {
            margin-bottom: 0.5rem;
        }

        .search-results-section .search-section-title {
            padding: 0.5rem;
        }

        .search-results-list {
            display: flex;
            flex-direction: column;
        }

        .search-result-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .search-result-item:hover {
            background: rgba(255, 107, 53, 0.15);
        }

        .search-result-item.highlighted {
            background: rgba(255, 107, 53, 0.2);
            outline: 2px solid var(--accent);
            outline-offset: -2px;
        }

        .search-result-icon {
            width: 40px;
            height: 40px;
            background: var(--bg-secondary);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .search-result-icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            border-radius: 8px;
        }

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

        .search-result-title {
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .search-result-title .highlight {
            background: rgba(255, 107, 53, 0.3);
            color: var(--accent);
            padding: 0 2px;
            border-radius: 2px;
        }

        .search-result-subtitle {
            font-size: 0.8rem;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .search-result-badge {
            padding: 0.2rem 0.5rem;
            background: var(--bg-secondary);
            border-radius: 4px;
            font-size: 0.7rem;
            color: var(--text-secondary);
            flex-shrink: 0;
        }

        .search-result-badge.aftermarket {
            background: rgba(76, 175, 80, 0.15);
            color: #66bb6a;
        }

        .search-result-badge.cross_reference {
            background: rgba(255, 152, 0, 0.15);
            color: #ffb74d;
        }

        .search-result-badge.vehicle-badge {
            background: rgba(33, 150, 243, 0.15);
            color: #42a5f5;
        }

        /* Vehicle category buttons in search */
        .vehicle-item {
            flex-wrap: wrap;
        }

        .vehicle-categories-row {
            display: flex;
            gap: 0.4rem;
            margin-top: 0.5rem;
            width: 100%;
        }

        .vehicle-category-btn {
            padding: 0.35rem 0.6rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .vehicle-category-btn:hover {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }

        .vehicle-category-btn i {
            font-size: 0.8rem;
        }

        .vehicle-all-btn {
            margin-left: auto;
            background: rgba(33, 150, 243, 0.1);
            border-color: rgba(33, 150, 243, 0.3);
            color: #42a5f5;
        }

        .vehicle-all-btn:hover {
            background: #42a5f5;
            color: white;
        }

        /* Vehicle parts search results (combined search) */
        .vehicle-parts-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.6rem 0.8rem;
            background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.05));
            border-radius: 8px;
            margin-bottom: 0.5rem;
            border-left: 3px solid #42a5f5;
        }

        .vehicle-parts-header i {
            color: #42a5f5;
        }

        .vehicle-parts-header span {
            font-weight: 600;
            color: var(--text-primary);
        }

        .vehicle-parts-header small {
            color: var(--text-secondary);
            font-size: 0.8rem;
            margin-left: auto;
        }

        .vehicle-part-item {
            border-left: 2px solid transparent;
        }

        .vehicle-part-item:hover {
            border-left-color: var(--accent);
        }

        .search-result-badge.vehicle-part-badge {
            background: rgba(76, 175, 80, 0.15);
            color: #66bb6a;
            font-size: 0.65rem;
        }

        .search-result-badge.vehicle-part-badge i {
            font-size: 0.6rem;
        }

        .search-category-badge {
            font-size: 0.7rem;
            padding: 0.1rem 0.4rem;
            background: var(--bg-secondary);
            border-radius: 3px;
            color: var(--text-secondary);
            margin-left: 0.5rem;
        }

        .search-result-subtitle .part-number {
            font-family: 'Roboto Mono', monospace;
            font-weight: 500;
        }

        .search-suggestion-tags {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        .search-tag {
            padding: 0.3rem 0.75rem;
            background: var(--bg-secondary);
            border-radius: 20px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .search-tag:hover {
            background: var(--accent);
            color: white;
        }

        /* No Results */
        .search-no-results {
            padding: 2rem;
            text-align: center;
            color: var(--text-secondary);
        }

        .search-no-results i {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            opacity: 0.5;
        }

        .search-no-results p {
            font-weight: 500;
            margin-bottom: 0.25rem;
        }

        .search-no-results span {
            font-size: 0.85rem;
        }

        /* Dropdown Footer */
        .search-dropdown-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
        }

        .search-hint {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        .search-hint kbd {
            padding: 0.15rem 0.4rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            font-family: inherit;
            font-size: 0.7rem;
        }

        .search-view-all {
            padding: 0.5rem 1rem;
            background: var(--accent);
            border: none;
            border-radius: 6px;
            color: white;
            font-size: 0.8rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .search-view-all:hover {
            background: var(--accent-hover);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .header-stats {
            display: flex;
            gap: 1.5rem;
        }

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

        .header-stat-value {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--accent);
        }

        .header-stat-label {
            font-size: 0.7rem;
            color: var(--text-secondary);
            text-transform: uppercase;
        }

        .btn-icon {
            width: 42px;
            height: 42px;
            padding: 0;
            border-radius: 10px;
        }

        /* Main Content */
        .main-container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 100px 2rem 2rem;
        }

        /* Breadcrumb */
        .breadcrumb-container {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1rem 1.5rem;
            margin-bottom: 1.5rem;
        }

        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .breadcrumb-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-secondary);
            font-size: 0.95rem;
        }

        .breadcrumb-item a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
        }

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

        .breadcrumb-item.active {
            color: var(--text-primary);
            font-weight: 600;
        }

        .breadcrumb-separator {
            color: var(--text-secondary);
        }

        /* Filters Bar */
        .filters-bar {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1rem 1.5rem;
            margin-bottom: 1.5rem;
            display: none;
        }

        .filters-bar.visible {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .filter-label {
            font-weight: 600;
            color: var(--text-secondary);
        }

        .filter-select {
            padding: 0.6rem 1rem;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.9rem;
            outline: none;
            cursor: pointer;
            min-width: 150px;
        }

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

        .result-count {
            margin-left: auto;
            padding: 0.5rem 1rem;
            background: var(--accent);
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
        }

        /* Content Grid */
        .content-grid {
            display: grid;
            gap: 1.5rem;
        }

        .content-grid.brands-grid {
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        }

        .content-grid.models-grid {
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        }

        .content-grid.vehicles-grid {
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        }

        .content-grid.categories-grid {
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        }

        .content-grid.groups-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        }

        /* Brand Card */
        .brand-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 2rem 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .brand-card:hover {
            transform: translateY(-5px);
            border-color: var(--accent);
            box-shadow: 0 10px 30px var(--accent-glow);
        }

        .brand-icon {
            width: 70px;
            height: 70px;
            background: var(--bg-hover);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            margin: 0 auto 1rem;
            transition: all 0.3s;
        }

        .brand-card:hover .brand-icon {
            background: var(--accent);
            transform: scale(1.1);
        }

        .brand-name {
            font-weight: 700;
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
        }

        .brand-count {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .brand-country {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 0.5rem;
        }

        /* Model Card */
        .model-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 1.5rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .model-card:hover {
            transform: translateY(-5px);
            border-color: var(--accent);
            box-shadow: 0 10px 30px var(--accent-glow);
        }

        .model-name {
            font-weight: 700;
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
        }

        .model-info {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .model-badge {
            display: inline-block;
            padding: 0.3rem 0.8rem;
            background: var(--bg-hover);
            border-radius: 20px;
            font-size: 0.8rem;
            color: var(--accent);
            margin-top: 0.75rem;
        }

        /* Vehicle Card */
        .vehicle-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.3s;
        }

        .vehicle-card:hover {
            transform: translateY(-5px);
            border-color: var(--accent);
            box-shadow: 0 10px 30px var(--accent-glow);
        }

        .vehicle-header {
            background: linear-gradient(135deg, var(--accent) 0%, #ff4500 100%);
            padding: 1.2rem 1.5rem;
            color: white;
        }

        .vehicle-title {
            font-weight: 700;
            font-size: 1.1rem;
            margin-bottom: 0.3rem;
        }

        .vehicle-engine {
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .vehicle-body {
            padding: 1.5rem;
        }

        .vehicle-specs {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
        }

        .spec-item {
            background: var(--bg-hover);
            padding: 0.75rem;
            border-radius: 8px;
            text-align: center;
        }

        .spec-item i {
            color: var(--accent);
            margin-bottom: 0.3rem;
            display: block;
        }

        .spec-value {
            font-weight: 600;
            font-size: 0.9rem;
        }

        .btn-parts {
            width: 100%;
            margin-top: 1rem;
            padding: 0.8rem;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-primary);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

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

        /* Category Card */
        .category-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .category-card:hover {
            transform: translateY(-5px);
            border-color: var(--accent);
            box-shadow: 0 10px 30px var(--accent-glow);
        }

        .category-icon {
            width: 60px;
            height: 60px;
            background: var(--bg-hover);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            margin: 0 auto 1rem;
            transition: all 0.3s;
        }

        .category-card:hover .category-icon {
            background: var(--accent);
            transform: scale(1.1);
        }

        .category-name {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 0.3rem;
        }

        .category-count {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        /* Group Card */
        .group-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 1.5rem;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .group-card:hover {
            transform: translateY(-3px);
            border-color: var(--accent);
            box-shadow: 0 8px 25px var(--accent-glow);
        }

        .group-icon {
            width: 50px;
            height: 50px;
            background: var(--bg-hover);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
            transition: all 0.3s;
        }

        .group-card:hover .group-icon {
            background: var(--accent);
        }

        .group-info {
            flex: 1;
        }

        .group-name {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 0.25rem;
        }

        .group-count {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .group-actions {
            display: flex;
            gap: 0.5rem;
        }

        .btn-diagram {
            padding: 0.5rem 1rem;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-diagram:hover {
            background: var(--info);
            border-color: var(--info);
            color: white;
        }

        /* Parts Table */
        .parts-container {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
        }

        .parts-header {
            background: linear-gradient(135deg, var(--accent) 0%, #ff4500 100%);
            padding: 1rem 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
        }

        .parts-title {
            font-weight: 700;
            font-size: 1.1rem;
        }

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

        .parts-table thead {
            background: var(--bg-hover);
        }

        .parts-table th {
            padding: 1rem;
            text-align: left;
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            border-bottom: 1px solid var(--border);
        }

        .parts-table tbody tr {
            transition: background 0.2s;
        }

        .parts-table tbody tr:hover {
            background: var(--bg-hover);
        }

        .parts-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
            font-size: 0.95rem;
        }

        .part-number {
            font-family: 'Orbitron', monospace;
            color: var(--accent);
            font-weight: 600;
        }

        .btn-view {
            padding: 0.4rem 1rem;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s;
        }

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

        /* Modal Styles */
        .modal-content {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            width: 100%;
            max-width: 800px;
            max-height: 90vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .modal-content.large {
            max-width: 1200px;
        }

        .modal-header {
            background: linear-gradient(135deg, var(--accent) 0%, #ff4500 100%);
            padding: 1.25rem 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
        }

        .modal-title {
            font-weight: 700;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .modal-close {
            background: rgba(255,255,255,0.2);
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 8px;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            transition: background 0.3s;
        }

        .modal-close:hover {
            background: rgba(255,255,255,0.3);
        }

        .modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            flex: 1;
        }

        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
        }

        /* Part Detail */
        .part-detail-row {
            display: flex;
            justify-content: space-between;
            padding: 0.8rem 0;
            border-bottom: 1px solid var(--border);
        }

        .part-detail-row:last-child {
            border-bottom: none;
        }

        .part-detail-label {
            font-weight: 600;
            color: var(--accent);
        }

        .part-detail-value {
            color: var(--text-primary);
        }

        .part-oem-badge {
            display: inline-block;
            background: var(--accent);
            color: white;
            padding: 0.4rem 1rem;
            border-radius: 20px;
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
        }

        /* Alternatives Section */
        .alternatives-section, .crossref-section {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--border);
        }

        .section-title-sm {
            color: var(--accent);
            font-weight: 700;
            margin-bottom: 1rem;
            font-size: 1rem;
        }

        .alternatives-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }

        .alternatives-table thead {
            background: var(--bg-hover);
        }

        .alternatives-table th {
            padding: 0.75rem;
            text-align: left;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .alternatives-table td {
            padding: 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        .crossref-badge {
            display: inline-block;
            background: var(--bg-hover);
            color: var(--accent);
            padding: 0.3rem 0.6rem;
            border-radius: 6px;
            margin: 0.2rem;
            font-size: 0.85rem;
            font-family: monospace;
        }

        /* Diagram Viewer */
        .diagram-viewer {
            background: var(--bg-secondary);
            border-radius: 12px;
            overflow: hidden;
        }

        .diagram-toolbar {
            background: var(--bg-card);
            padding: 0.75rem 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border);
        }

        .zoom-controls {
            display: flex;
            gap: 0.5rem;
        }

        .zoom-btn {
            width: 36px;
            height: 36px;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s;
        }

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

        .diagram-container {
            padding: 1rem;
            min-height: 400px;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: auto;
        }

        .diagram-svg-wrapper {
            transform-origin: center;
            transition: transform 0.2s;
        }

        .diagram-svg-wrapper svg {
            max-width: 100%;
            height: auto;
        }

        .diagram-thumbnails {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
            padding: 1rem;
            border-top: 1px solid var(--border);
        }

        .diagram-thumbnail {
            background: var(--bg-card);
            border: 2px solid var(--border);
            border-radius: 8px;
            padding: 0.5rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .diagram-thumbnail:hover,
        .diagram-thumbnail.active {
            border-color: var(--accent);
        }

        .diagram-thumbnail svg {
            width: 100%;
            height: 80px;
            object-fit: contain;
        }

        .diagram-thumbnail-name {
            text-align: center;
            font-size: 0.8rem;
            margin-top: 0.5rem;
            color: var(--text-secondary);
        }

        /* VIN Decoder */
        .vin-input-container {
            max-width: 500px;
            margin-bottom: 1.5rem;
        }

        .vin-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }

        .vin-input-group {
            display: flex;
            gap: 0.5rem;
        }

        .vin-input {
            flex: 1;
            padding: 0.8rem 1rem;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-primary);
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            outline: none;
        }

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

        .vin-help {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-top: 0.5rem;
        }

        .vin-result {
            background: var(--bg-hover);
            border-radius: 12px;
            padding: 1.5rem;
        }

        .vin-badge {
            display: inline-block;
            background: var(--accent);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            letter-spacing: 1px;
            margin-bottom: 1rem;
        }

        .vehicle-match-card {
            background: linear-gradient(135deg, var(--success), #16a34a);
            color: white;
            border-radius: 10px;
            padding: 1rem;
            margin-top: 1rem;
        }

        .vehicle-no-match {
            background: linear-gradient(135deg, var(--warning), #d97706);
        }

        /* Search Results */
        .search-results-list {
            max-height: 400px;
            overflow-y: auto;
        }

        .search-result-item {
            padding: 1rem;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            border-bottom: 1px solid var(--border);
        }

        .search-result-item:hover {
            background: var(--bg-hover);
        }

        .search-result-item:last-child {
            border-bottom: none;
        }

        .search-result-part-number {
            font-family: 'Orbitron', monospace;
            font-weight: 600;
            color: var(--accent);
        }

        .search-result-name {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-top: 0.25rem;
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .header-stats {
                display: none;
            }

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

        @media (max-width: 768px) {
            .header {
                padding: 0.75rem 1rem;
            }

            .header-content {
                flex-wrap: wrap;
            }

            .search-container {
                order: 3;
                max-width: 100%;
                width: 100%;
                margin-top: 0.75rem;
            }

            .main-container {
                padding: 90px 1rem 1rem;
            }

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

            .content-grid.models-grid,
            .content-grid.vehicles-grid,
            .content-grid.groups-grid {
                grid-template-columns: 1fr;
            }

            .filters-bar.visible {
                flex-direction: column;
                align-items: stretch;
            }

            .result-count {
                margin-left: 0;
                text-align: center;
            }

            .group-card {
                flex-direction: column;
                text-align: center;
            }

            .group-actions {
                width: 100%;
                justify-content: center;
            }
        }

        /* Focus styles */
        .brand-card:focus,
        .model-card:focus,
        .category-card:focus,
        .group-card:focus,
        .vehicle-card:focus,
        .diagram-thumbnail:focus {
            outline: 3px solid var(--accent);
            outline-offset: 2px;
        }

        /* ========== Diagram Strip (horizontal scroll above groups) ========== */
        .diagrams-strip {
            margin-bottom: 1.5rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
        }

        .diagrams-strip-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1.25rem;
            background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
            border-bottom: 1px solid var(--border);
        }

        .diagrams-strip-header h5 {
            margin: 0;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .diagrams-strip-header .strip-badge {
            font-size: 0.75rem;
            background: rgba(255, 107, 53, 0.2);
            color: var(--accent);
            padding: 0.15rem 0.6rem;
            border-radius: 10px;
            font-weight: 600;
        }

        .diagrams-strip-scroll {
            display: flex;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            overflow-x: auto;
            scroll-behavior: smooth;
            scrollbar-width: thin;
            scrollbar-color: var(--accent) var(--bg-hover);
        }

        .diagrams-strip-scroll::-webkit-scrollbar {
            height: 6px;
        }

        .diagrams-strip-scroll::-webkit-scrollbar-track {
            background: var(--bg-hover);
            border-radius: 3px;
        }

        .diagrams-strip-scroll::-webkit-scrollbar-thumb {
            background: var(--accent);
            border-radius: 3px;
        }

        .strip-card {
            flex: 0 0 180px;
            background: var(--bg-hover);
            border: 2px solid var(--border);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.25s ease;
            overflow: hidden;
        }

        .strip-card:hover {
            border-color: var(--accent);
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(255, 107, 53, 0.15);
        }

        .strip-card-img {
            width: 100%;
            height: 110px;
            object-fit: contain;
            background: #e8e8e8;
            display: block;
        }

        .strip-card-body {
            padding: 0.5rem 0.65rem;
        }

        .strip-card-title {
            font-family: 'Orbitron', monospace;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--accent);
        }

        .strip-card-type {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 0.15rem;
        }

        /* ========== Diagram Viewer Overlay (full-screen split) ========== */
        .diagram-viewer-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.92);
            z-index: 3000;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .diagram-viewer-overlay.active {
            display: flex;
            opacity: 1;
        }

        .dv-layout {
            display: flex;
            width: 100%;
            height: 100%;
        }

        /* Left: Diagram image panel */
        .dv-image-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-primary);
            position: relative;
        }

        .dv-toolbar {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.65rem 1.25rem;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            z-index: 2;
        }

        .dv-toolbar .dv-title {
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            font-weight: 600;
            color: var(--accent);
            flex: 1;
        }

        .dv-toolbar .dv-subtitle {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .dv-toolbar-btn {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 0.45rem 0.7rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.85rem;
        }

        .dv-toolbar-btn:hover {
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .dv-close-btn {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            width: 34px; height: 34px;
            border-radius: 8px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .dv-close-btn:hover { background: var(--accent); }

        .dv-img-container {
            flex: 1;
            overflow: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background: #e0e0e0;
            position: relative;
        }

        .dv-img-wrapper {
            position: relative;
            display: inline-block;
            transition: transform 0.2s ease;
            transform-origin: center center;
        }

        .dv-img-wrapper img {
            max-width: 100%;
            max-height: 100%;
            display: block;
            user-select: none;
            -webkit-user-drag: none;
        }

        .dv-img-wrapper.zoomed img {
            max-width: none;
            max-height: none;
        }

        .dv-zoom-controls {
            position: absolute;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 0.4rem;
            background: rgba(0, 0, 0, 0.7);
            padding: 0.35rem;
            border-radius: 8px;
            z-index: 5;
        }

        .dv-zoom-btn {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 5px;
            padding: 0.35rem 0.65rem;
            color: var(--text-primary);
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .dv-zoom-btn:hover { background: var(--accent); border-color: var(--accent); }

        .dv-zoom-level {
            display: flex;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.75rem;
            padding: 0 0.4rem;
        }

        /* Nav arrows */
        .dv-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            border: none;
            color: white;
            width: 42px; height: 42px;
            border-radius: 50%;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background 0.2s;
            z-index: 5;
        }

        .dv-nav-btn:hover { background: var(--accent); }
        .dv-nav-btn.prev { left: 0.75rem; }
        .dv-nav-btn.next { right: 0.75rem; }

        /* Right: Parts panel */
        .dv-parts-panel {
            width: 400px;
            background: var(--bg-secondary);
            border-left: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .dv-parts-header {
            padding: 0.75rem 1rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .dv-parts-header h3 {
            font-size: 0.9rem;
            font-weight: 600;
            flex: 1;
            margin: 0;
        }

        .dv-parts-header .dv-parts-count {
            font-size: 0.75rem;
            color: var(--text-secondary);
            background: var(--bg-hover);
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
        }

        .dv-parts-search {
            padding: 0.5rem 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        .dv-parts-search input {
            width: 100%;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 0.45rem 0.65rem;
            color: var(--text-primary);
            font-size: 0.82rem;
            outline: none;
        }

        .dv-parts-search input:focus { border-color: var(--accent); }

        .dv-parts-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }

        .dv-group-label {
            font-size: 0.72rem;
            color: var(--accent);
            padding: 0.5rem 0.25rem 0.2rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .dv-part-item {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0.65rem 0.75rem;
            margin-bottom: 0.4rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .dv-part-item:hover {
            border-color: var(--accent);
            background: var(--bg-hover);
        }

        .dv-part-item.highlighted {
            border-color: var(--accent);
            background: rgba(255, 107, 53, 0.1);
            box-shadow: 0 0 0 1px var(--accent);
        }

        .dv-part-number {
            font-family: 'Orbitron', monospace;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--accent);
        }

        .dv-part-name {
            font-size: 0.78rem;
            color: var(--text-secondary);
            margin-top: 0.15rem;
        }

        .dv-xref-list {
            margin-top: 0.35rem;
            padding-top: 0.35rem;
            border-top: 1px solid var(--border);
        }

        .dv-xref-tag {
            display: inline-block;
            font-size: 0.68rem;
            padding: 0.08rem 0.4rem;
            background: rgba(59, 130, 246, 0.15);
            color: #60a5fa;
            border-radius: 3px;
            margin: 0.08rem;
        }

        /* ========== Hotspot markers ========== */
        .hotspot-marker {
            position: absolute;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(255, 107, 53, 0.35);
            border: 2px solid var(--accent);
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            transform: translate(-50%, -50%);
            z-index: 3;
        }

        .hotspot-marker:hover,
        .hotspot-marker.active {
            background: rgba(255, 107, 53, 0.6);
            transform: translate(-50%, -50%) scale(1.25);
            box-shadow: 0 0 12px rgba(255, 107, 53, 0.5);
        }

        .hotspot-marker .hotspot-number {
            font-size: 0.65rem;
            font-weight: 700;
            color: white;
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }

        @keyframes hotspot-pulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
            50% { box-shadow: 0 0 0 8px rgba(255, 107, 53, 0); }
        }

        .hotspot-marker.pulse {
            animation: hotspot-pulse 1.5s ease-in-out 3;
        }

        /* ========== Responsive ========== */
        @media (max-width: 768px) {
            .dv-layout { flex-direction: column; }
            .dv-parts-panel { width: 100%; height: 45%; }
            .strip-card { flex: 0 0 150px; }
            .strip-card-img { height: 90px; }
        }
