/* =========================================================
   Global eShop Typography
   ========================================================= */
.eshop,
.eshop * {
    font-family: ui-sans-serif, system-ui, sans-serif,
                 "Apple Color Emoji", "Segoe UI Emoji",
                 "Segoe UI Symbol", "Noto Color Emoji";
}



/* ============================================================================
   VEHICLE SEARCH SECTION
============================================================================ */
.vehicle-search-section {
    padding: 40px 0;
    background: var(--bg-light);
}

.vehicle-search-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: visible;
    position: relative;
}

/* Tab Navigation */
.vehicle-search-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.vehicle-search-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.vehicle-search-tab:hover {
    color: #374151;
    background: #f9fafb;
}

.vehicle-search-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.vehicle-search-tab.active .tab-icon {
    color: var(--primary);
}

.tab-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: color 0.3s ease;
}

/* Tab Content */
.vehicle-search-content {
    padding: 32px 32px 0 32px;
    min-height: auto;
    overflow: visible;
    position: relative;
}

.tab-panel {
    display: none;
}

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

/* Manual Search */

/* =========================================================
   Manufacturer & Model Options
   ========================================================= */

#manufacturer-select-options .custom-select-option,
#model-select-options .custom-select-option {
    font-size: 13px;
    line-height: 1.35;
    padding: 6px 14px;
    cursor: pointer;
    color: #111827; /* gray-900 */
    transition: background-color 0.12s ease;
}

/* Hover */
#manufacturer-select-options .custom-select-option:hover,
#model-select-options .custom-select-option:hover {
    background-color: #f3f4f6; /* gray-100 */
}

/* Selected */
#manufacturer-select-options .custom-select-option.selected,
#model-select-options .custom-select-option.selected {
    background-color: #e5e7eb; /* gray-200 */
    font-weight: 500;
}


.model-group-header {
    font-weight: 600;
    font-size: 13px;
    padding: 6px 10px;
    color: #6b7280;
    cursor: default;
    background: #f9fafb;
}


.manual-search-content {
    width: 100%;
    padding-bottom: 32px;
}

.search-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: #374151;
    flex-shrink: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.search-fields {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.search-field {
    flex: 1;
    min-width: 180px;
    position: relative;
    overflow: visible;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.field-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 44px;
}

.field-select:hover {
    border-color: #9ca3af;
    background-color: #ffffff;
}

.field-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.field-select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.field-select:disabled:hover {
    border-color: #d1d5db;
    background-color: #f3f4f6;
}

/* Custom Searchable Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    z-index: 1;
}

.custom-select-wrapper.open {
    z-index: 10000;
}

.custom-select-trigger {
    width: 100%;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 44px;
    user-select: none;
    position: relative;
}

.custom-select-trigger:hover {
    border-color: #9ca3af;
    background-color: #ffffff;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.custom-select-input {
    flex: 1;
    width: 100%;
    padding: 8px 12px;
    padding-right: 40px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #374151;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    height: 100%;
    position: relative;
    z-index: 1;
}

.custom-select-input::placeholder {
    color: #9ca3af;
}

.custom-select-input[readonly] {
    cursor: pointer;
}

.custom-select-wrapper.open .custom-select-input {
    cursor: text;
}

.custom-select-wrapper.open .custom-select-input[readonly] {
    cursor: text;
}

.custom-select-input:focus {
    cursor: text;
}

.custom-select-arrow {
    flex-shrink: 0;
    margin-left: 12px;
    margin-right: 12px;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    min-height: 100px;
}

.custom-select-wrapper.open .custom-select-dropdown {
    display: flex;
    max-height: 400px;
    min-height: 100px;
    height: auto;
    z-index: 10000;
}


.custom-select-options {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 100px;
    max-height: 400px;
    height: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.custom-select-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 15px;
    color: #374151;
    transition: background-color 0.15s ease;
    user-select: none;
}

.custom-select-option:hover {
    background-color: #f3f4f6;
}

.custom-select-option.selected {
    background-color: #fef3e2;
    color: var(--primary);
    font-weight: 500;
}

.custom-select-option.hidden {
    display: none;
}

.custom-select-option.active {
    background-color: #eef2ff;
}

.custom-select-option {
    cursor: pointer;
}

.custom-select-wrapper.disabled .custom-select-trigger {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.custom-select-wrapper.disabled .custom-select-trigger:hover {
    border-color: #d1d5db;
    background-color: #f3f4f6;
}

.custom-select-input:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.custom-select-wrapper.disabled .custom-select-input {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.search-button-wrapper {
    display: flex;
    align-items: flex-end;
    height: 44px;
}

.search-parts-btn {
    padding: 12px 32px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.search-parts-btn:hover {
    background: var(--primary);
}

.search-parts-btn:active {
    transform: translateY(1px);
}


/* =========================================================
   Engine Dropdown Styling
   ========================================================= */

/* Compact dropdown */
#engine-select-dropdown {
    max-height: 320px;
    overflow-y: auto;
}

/* Better scrollbar (optional, modern browsers) */
#engine-select-dropdown::-webkit-scrollbar {
    width: 6px;
}
#engine-select-dropdown::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 4px;
}

/* Engine search input */
#engine-search-input {
    font-size: 13px;
    padding: 8px 12px;
}

#engine-select-options {
    padding: 6px 0;
}

/* Group headers: Petrol / Diesel */
#engine-select-options .engine-group-header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280; /* gray-500 */
    padding: 8px 14px 4px;
    cursor: default;
    user-select: none;
    background: #f9fafb; /* subtle separation */
}

/* Engine options */
#engine-select-options .custom-select-option {
    font-size: 13px;
    line-height: 1.35;
    padding: 6px 14px;
    cursor: pointer;
    color: #111827; /* gray-900 */
    transition: background 0.12s ease;
}

/* Hover */
#engine-select-options .custom-select-option:hover {
    background-color: #f3f4f6; /* gray-100 */
}

/* Selected */
#engine-select-options .custom-select-option.selected {
    background-color: #e5e7eb; /* gray-200 */
    font-weight: 500;
}

/* Disabled headers never highlight */
#engine-select-options .engine-group-header:hover {
    background: inherit;
}



/* Vehicle Identification */
.vehicle-identification-content {
    width: 100%;
    padding-bottom: 32px;
}

.vin-search-form {
    width: 100%;
}

.vin-search-field {
    width: 100%;
}

.vin-input-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.vin-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 15px;
    color: #374151;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 44px;
}

.vin-input:hover {
    border-color: #9ca3af;
    background-color: #ffffff;
}

.vin-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.identify-vehicle-btn {
    flex: 1;
    padding: 12px 32px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.identify-vehicle-btn:hover {
    background: var(--primary);
}

.identify-vehicle-btn:active {
    transform: translateY(1px);
}

/* Recent Search */
.recent-search-content {
    width: 100%;
    padding-bottom: 32px;
}

.recent-search-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 24px 0;
}

.recent-searches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-search-item {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.recent-search-item:hover {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recent-search-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recent-search-vehicle {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.recent-search-date {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vehicle-search-content {
        padding: 24px 16px;
    }
    
    .vehicle-search-tabs {
        flex-direction: column;
    }
    
    .vehicle-search-tab {
        justify-content: flex-start;
        padding: 14px 20px;
        border-bottom: 1px solid #e5e7eb;
        border-left: 3px solid transparent;
    }
    
    .vehicle-search-tab.active {
        border-bottom-color: #e5e7eb;
        border-left-color: var(--primary);
    }
    
    .search-fields {
        flex-direction: column;
    }
    
    .search-field {
        width: 100%;
        min-width: unset;
    }
    
    .search-parts-btn {
        width: 100%;
    }
    
    .vin-input-wrapper {
        flex-direction: column;
    }
    
    .identify-vehicle-btn {
        width: 100%;
    }
}
