/* Search Section - Matching Home Page */
.search-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: visible;
}

.search-section.browse-mode {
    padding: 3rem 0;
}

.browse-header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.browse-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.browse-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></svg>') repeat;
    background-size: 100px 100px;
    pointer-events: none;
}

.search-section .container {
    position: relative;
    z-index: 10;
}

.search-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 8px;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible !important;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto;
    align-items: center;
    gap: 0;
    overflow: visible !important;
}

.search-field {
    position: relative;
    padding: 16px 20px;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
    overflow: visible !important;
}

.search-field:hover {
    background: #f7f7f7;
}

.search-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.search-input {
    border: none;
    outline: none;
    font-size: 14px;
    color: #717171;
    background: transparent;
    width: 100%;
    font-family: inherit;
    cursor: pointer;
}

.search-input::placeholder {
    color: #b0b0b0;
}

.search-divider {
    width: 1px;
    height: 40px;
    background: #ebebeb;
}

.search-button {
    background: var(--primary-color, #FF5A5F);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    margin-left: 8px;
}

.search-button:hover {
    background: var(--primary-hover, #E04E52);
    transform: scale(1.05);
}

.search-button.pulse {
    animation: search-btn-pulse 0.6s ease-out;
}

@keyframes search-btn-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(255, 90, 95, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); }
}

/* Search Dropdowns */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 9999;
}

.search-dropdown.show {
    display: block;
}

.location-dropdown {
    min-width: 320px;
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-title {
    padding: 12px 20px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #717171;
    text-transform: uppercase;
}

.location-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.location-option:hover {
    background: #f7f7f7;
}

.location-option.selected {
    background: #f0f0f0;
}

.location-option i {
    color: #717171;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: #ebebeb;
    margin: 8px 0;
}

/* DateTime Dropdown */
.datetime-dropdown {
    padding: 20px;
    min-width: 480px;
}

.datetime-container {
    display: flex;
    gap: 20px;
}

.date-picker {
    flex: 1;
}

.time-picker {
    width: 120px;
}

.time-header {
    font-size: 11px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.time-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Calendar */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 14px;
    font-weight: 600;
}

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ebebeb;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.calendar-nav-btn:hover:not(.disabled) {
    border-color: #222;
}

.calendar-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

.calendar-weekdays div {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #717171;
    padding: 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: #f7f7f7;
}

.calendar-day.selected {
    background: #222;
    color: white;
}

.calendar-day.disabled {
    color: #ddd;
    cursor: not-allowed;
}

/* Results Section with Sidebar Layout */
.results-section {
    padding: 3rem 0 4rem;
    background: var(--bg-gray, #f7f7f7);
}

.results-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #222);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-header h3 i {
    color: var(--primary-color, #FF5A5F);
}

.clear-filters {
    font-size: 0.85rem;
    color: var(--primary-color, #FF5A5F);
    text-decoration: none;
}

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

.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

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

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #222);
    margin: 0 0 0.75rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-options.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.filter-option:hover {
    background: #f7f7f7;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    accent-color: var(--primary-color, #FF5A5F);
    width: 16px;
    height: 16px;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-label i {
    width: 18px;
    text-align: center;
    color: #94a3b8;
}

.filter-option-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
}

.filter-option-btn:hover {
    border-color: var(--primary-color, #FF5A5F);
}

.filter-option-btn.active {
    background: var(--primary-color, #FF5A5F);
    border-color: var(--primary-color, #FF5A5F);
    color: white;
}

.filter-option-btn input {
    display: none;
}

.filter-option-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Price Range Slider */
.price-filter-group,
.seats-filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.price-filter-group .filter-title,
.seats-filter-group .filter-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary, #222);
}

.price-filter-group .filter-title i,
.seats-filter-group .filter-title i {
    font-size: 0.9rem;
    color: var(--primary-color, #FF5A5F);
}

.price-slider-container {
    padding: 0;
}

.price-display {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.price-value-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary, #222);
    font-size: 0.95rem;
}

.price-range-sep {
    color: #94a3b8;
}

.range-slider-wrapper {
    position: relative;
    height: 6px;
    margin: 1rem 0 0.5rem;
}

.range-slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
}

.range-slider-range {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color, #FF5A5F) 0%, var(--secondary-color, #E04E52) 100%);
    border-radius: 3px;
}

.range-slider-thumb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 2;
}

.range-slider-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--primary-color, #FF5A5F);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.range-slider-thumb::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.range-slider-thumb::-webkit-slider-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(255, 90, 95, 0.4);
}

.range-slider-thumb::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--primary-color, #FF5A5F);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.range-slider-thumb::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Firefox specific track styling */
.range-slider-thumb::-moz-range-track {
    background: transparent;
}

/* Mobile Filter Toggle */
.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.filter-badge {
    background: var(--primary-color, #FF5A5F);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Results Content */
.results-content {
    min-width: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-info h2 {
    color: var(--text-primary, #222);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.results-count {
    color: var(--text-secondary, #717171);
    font-size: 0.9rem;
    margin: 0;
}

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

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.view-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary, #717171);
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--text-primary, #222);
}

.view-btn.active {
    background: var(--primary-color, #FF5A5F);
    color: white;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--text-primary, #222);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-secondary, #717171);
    margin-bottom: 1.5rem;
}

.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color, #FF5A5F);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-reset-filters:hover {
    background: var(--primary-hover, #E04E52);
}

/* Vehicles Container - Grid View (Default) */
.vehicles-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Vehicles Container - List View */
.vehicles-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Vehicle Card - Grid View */
.grid-view .vehicle-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.grid-view .vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.grid-view .vehicle-card.unavailable {
    opacity: 0.7;
}

.grid-view .vehicle-card.featured {
    /* Featured badge already present - no border needed */
}

.grid-view .vehicle-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.grid-view .vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-view .vehicle-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Vehicle Card - List View */
.list-view .vehicle-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 220px;
}

.list-view .vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.list-view .vehicle-card.unavailable {
    opacity: 0.7;
}

.list-view .vehicle-image {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.list-view .vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-view .vehicle-info {
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto 1fr auto;
    gap: 1rem;
}

.list-view .vehicle-name {
    grid-column: 1 / -1;
}

.list-view .vehicle-features {
    grid-column: 1 / 2;
}

.list-view .price-breakdown,
.list-view .price-simple {
    grid-column: 2 / 3;
    grid-row: 2 / 4;
    align-self: start;
}

.list-view .rent-btn {
    grid-column: 1 / -1;
    max-width: 200px;
}

/* Common Styles */
.unavailable-badge,
.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.unavailable-badge {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.featured-badge {
    background: var(--primary-color, #FF5A5F);
    color: white;
}

.vehicle-name {
    color: var(--text-primary, #222);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.vehicle-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0.75rem;
}

.vehicle-features .feature {
    color: var(--text-secondary, #717171);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.vehicle-features .feature i {
    color: var(--primary-color, #FF5A5F);
}

/* Browse Mode Simple Price */
.price-simple {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.price-simple .price-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #717171);
}

.price-simple .price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color, #FF5A5F);
}

.price-simple .price-period {
    font-size: 0.85rem;
    color: var(--text-secondary, #717171);
}

/* Search Mode Price Breakdown */
.price-breakdown {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

.price-item .label {
    color: var(--text-secondary, #717171);
}

.price-item .value {
    color: var(--text-primary, #222);
    font-weight: 600;
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0 0.35rem;
    margin-top: 0.35rem;
    border-top: 2px solid #e0e0e0;
}

.price-total .label {
    color: var(--text-primary, #222);
    font-weight: 700;
    font-size: 0.95rem;
}

.price-total .value {
    color: var(--primary-color, #FF5A5F);
    font-weight: 700;
    font-size: 1.15rem;
}

.rent-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color, #FF5A5F);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rent-btn:hover {
    background: var(--primary-hover, #E04E52);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 90, 95, 0.3);
}

.rent-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.rent-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    padding: 0.625rem 1rem;
    background: white;
    color: var(--text-primary, #222);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--primary-color, #FF5A5F);
    color: white;
    border-color: var(--primary-color, #FF5A5F);
}

.page-link.active {
    background: var(--primary-color, #FF5A5F);
    color: white;
    border-color: var(--primary-color, #FF5A5F);
}

/* Responsive */
@media (max-width: 1024px) {
    .results-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        border-radius: 0;
        overflow-y: auto;
        padding: 1.5rem;
    }

    .filter-sidebar.show {
        display: block;
    }

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

@media (max-width: 992px) {
    .search-form {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .search-divider {
        display: none;
    }

    .search-button {
        width: 100%;
        margin: 8px 0 0 0;
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    .search-card {
        border-radius: 16px;
    }

    /* Search form mobile styles are in search-form.css */

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .results-actions {
        width: 100%;
        justify-content: space-between;
    }

    .vehicles-container.grid-view {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .list-view .vehicle-card {
        grid-template-columns: 1fr;
        grid-template-rows: 180px auto;
    }

    .list-view .vehicle-info {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 1.25rem;
    }

    .list-view .vehicle-features {
        grid-column: 1 / -1;
    }

    .list-view .price-breakdown,
    .list-view .price-simple {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .list-view .rent-btn {
        max-width: 100%;
    }

    .results-info h2 {
        font-size: 1.5rem;
    }

    .browse-header h1 {
        font-size: 1.75rem;
    }
}
