/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    color: #333;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-branding img {
    height: 40px;
    width: auto;
}

.site-title a {
    text-decoration: none;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation li a {
    text-decoration: none;
    color: #555;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s ease;
}

.main-navigation li a:hover {
    color: #007bff;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-bell {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 5px;
}

.notification-bell svg {
    width: 24px;
    height: 24px;
    color: #555;
}

.notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    line-height: 1;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu-toggle img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.user-name {
    font-weight: bold;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    min-width: 150px;
    z-index: 1000;
}

.user-dropdown li a {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: #333;
}

.user-dropdown li a:hover {
    background-color: #f0f0f0;
}

.auth-buttons .btn {
    margin-left: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline {
    background-color: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-outline:hover {
    background-color: #e9f5ff;
    color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-text {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 12px 25px;
    font-size: 18px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-group input[type="checkbox"] {
    margin-right: 5px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Search and Filter Bar (Homepage) */
.search-filter-bar {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.search-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.location-selectors, .location-inputs, .date-time-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.search-input-group input {
    flex-grow: 1;
}

.mobile-only {
    display: none;
}

/* Discount Banner */
.discount-banner {
    background-color: #ffc107; /* Yellow */
    color: #333;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.discount-banner h2 {
    margin-top: 0;
    font-size: 28px;
    color: #333;
}

.discount-banner p {
    font-size: 18px;
    margin-bottom: 0;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 30px;
}

.filter-sidebar {
    flex: 0 0 280px;
	min-width: 250px;
    max-width: 20%;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    align-self: flex-start; /* Stick to top */
}

.filter-sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #555;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.price-inputs input {
    flex: 1;
}

.filter-sidebar .btn {
    width: 100%;
    margin-top: 10px;
}

.cars-content {
    flex-grow: 1;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Car Card */
.car-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.car-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.car-card-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.car-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.favorite-button:hover {
    background-color: #fff;
}

.favorite-button svg {
    width: 20px;
    height: 20px;
    color: #888;
    fill: none;
    transition: fill 0.2s ease, color 0.2s ease;
}

.favorite-button.favorited svg {
    fill: #ff4d4d;
    color: #ff4d4d;
}

.car-card-content {
    padding: 15px;
}

.car-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.car-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.car-card-location svg {
    width: 16px;
    height: 16px;
    color: #777;
}

.car-card-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.car-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.car-card-rating svg {
    width: 16px;
    height: 16px;
    color: #ffc107; /* Yellow star */
    fill: #ffc107;
}

.car-card-price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.car-card-price .per-day {
    font-size: 14px;
    font-weight: normal;
    color: #777;
}

/* Loading and No Results */
.loading-indicator,
.no-results {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results h3 {
    font-size: 24px;
    color: #555;
    margin-bottom: 10px;
}

.no-results p {
    color: #777;
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
}

/* Footer */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.8;
}

.footer-section a:hover {
    color: #007bff;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li a {
    display: block;
    padding: 5px 0;
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
    font-size: 16px;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #aaa;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    z-index: 1000;
    justify-content: space-around;
    padding: 10px 0;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #777;
    font-size: 12px;
    gap: 5px;
}

.mobile-bottom-nav .nav-item svg {
    width: 24px;
    height: 24px;
    color: #777;
}

.mobile-bottom-nav .nav-item.active {
    color: #007bff;
}

.mobile-bottom-nav .nav-item.active svg {
    color: #007bff;
}

/* Modals (General) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
}

.modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Notification Popup */
.notification-popup {
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1500;
}

.notification-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.notification-popup-header h3 {
    margin: 0;
    font-size: 18px;
}

.notification-actions .btn-text {
    margin-left: 10px;
}

.notification-popup-content {
    padding: 15px;
}

.notifications-list .notification-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notifications-list .notification-item:last-child {
    border-bottom: none;
}

.notification-item.notification-unread {
    background-color: #e9f5ff;
}

.notification-message {
    flex-grow: 1;
    font-size: 14px;
}

.notification-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12px;
    color: #777;
}

.notification-unread-indicator {
    background-color: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-top: 5px;
}

/* Car Detail Page */
.car-detail {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.car-images {
    flex: 1;
}

.main-image {
    position: relative;
    width: 100%;
    padding-bottom: 60%; /* Adjust as needed */
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.car-main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-button-large {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255,255,255,0.9);
    border: 1px solid #eee;
    border-radius: 25px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.favorite-button-large:hover {
    background-color: #fff;
    border-color: #ccc;
}

.favorite-button-large svg {
    width: 20px;
    height: 20px;
    color: #888;
    fill: none;
    transition: fill 0.2s ease, color 0.2s ease;
}

.favorite-button-large.favorited svg {
    fill: #ff4d4d;
    color: #ff4d4d;
}

.car-info {
    flex: 1;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.car-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.car-title {
    font-size: 32px;
    margin: 0;
}

.car-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    color: #555;
}

.car-rating svg {
    color: #ffc107;
    fill: #ffc107;
}

.reviews-count {
    font-size: 14px;
    color: #777;
}

.car-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 16px;
    margin-bottom: 20px;
}

.car-location svg {
    width: 20px;
    height: 20px;
    color: #777;
}

.car-price {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

.car-price .price-period {
    font-size: 16px;
    font-weight: normal;
    color: #777;
}

.car-specs {
    margin-bottom: 30px;
}

.car-specs h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.spec-item {
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
}

.spec-item span {
    display: block;
    font-size: 14px;
    color: #777;
}

.spec-item strong {
    font-size: 16px;
    color: #333;
}

.car-description {
    margin-top: 30px;
}

.car-description h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.car-description p {
    line-height: 1.6;
    color: #555;
}

.booking-summary {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.booking-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.summary-item strong {
    color: #333;
}

.summary-total {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.book-now-section {
    margin-top: 30px;
    text-align: center;
}

/* Booking Modal */
#booking-modal .modal-content {
    max-width: 600px;
}

#booking-form .form-row {
    flex-wrap: wrap;
}

#booking-form .form-row .form-group {
    flex: 1 1 calc(50% - 7.5px); /* Two columns */
}

#booking-form .form-row.full-width .form-group {
    flex: 1 1 100%;
}

/* Advanced Search Page */
.advanced-search-page .search-filter-bar {
    padding: 30px;
    margin-bottom: 40px;
}

.advanced-search-page .search-section {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.advanced-search-page .main-content {
    flex-direction: row; /* Ensure sidebar is on the left */
}

.advanced-search-page .filter-sidebar {
    flex: 0 0 300px;
}

.advanced-search-page .cars-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Country Selector in Header */
.country-selector-wrapper {
    margin-left: 20px;
}

.country-selector-wrapper select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-size: 14px;
    cursor: pointer;
}

/* Homepage specific styles */
.homepage-cars-section {
    margin-top: 30px;
}

.homepage-cars-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.homepage-filters {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

.homepage-filters select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        z-index: 999;
    }

    .main-navigation li {
        border-bottom: 1px solid #eee;
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .menu-toggle {
        display: block;
    }

    .header-actions {
        order: 3; /* Move to end on mobile */
    }

    .site-branding {
        order: 1;
    }

    .country-selector-wrapper {
        order: 2;
        margin-left: 0;
    }

    .search-filter-bar {
        padding: 15px;
    }

    .search-section {
        grid-template-columns: 1fr;
    }

    .main-content {
        flex-direction: column;
    }

    .filter-sidebar {
        display: none; /* Hide desktop sidebar on mobile */
    }

    .mobile-only {
        display: block;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .car-detail {
        flex-direction: column;
    }

    .car-images, .car-info {
        flex: none;
        width: 100%;
    }

    .car-info {
        padding: 20px;
    }

    .car-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .car-title {
        font-size: 28px;
    }

    .car-rating {
        margin-top: 10px;
    }

    .booking-summary {
        margin-top: 20px;
    }

    .advanced-search-page .main-content {
        flex-direction: column;
    }

    .advanced-search-page .filter-sidebar {
        display: none;
    }

    .advanced-search-page .cars-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-branding, .header-actions, .country-selector-wrapper {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .site-branding {
        margin-bottom: 15px;
    }

    .header-actions {
        justify-content: center;
    }

    .country-selector-wrapper {
        margin-bottom: 15px;
    }

    .main-navigation ul {
        top: 120px; /* Adjust for wrapped header */
    }

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

    .homepage-filters select {
        width: 100%;
    }
}

/* Mobile Filters Modal */
.modal.mobile-only {
    display: none; /* Hidden by default, shown by JS */
}

.modal.mobile-only .modal-content {
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
}

.modal.mobile-only .modal-body {
    padding: 15px;
}

.modal.mobile-only .filter-group {
    margin-bottom: 15px;
}

.modal.mobile-only .filter-group h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.modal.mobile-only .price-inputs input {
    padding: 8px;
}

.modal.mobile-only select {
    padding: 8px;
}

.modal.mobile-only .modal-footer {
    justify-content: space-between;
    padding: 15px;
}

.modal.mobile-only .modal-footer .btn {
    flex: 1;
    margin: 0 5px;
}

/* Notification Bar */
.notification-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    color: white;
    font-weight: bold;
    z-index: 2000;
    display: none;
}

.notification-bar.success {
    background-color: #28a745;
}

.notification-bar.error {
    background-color: #dc3545;
}

.notification-bar.info {
    background-color: #17a2b8;
}

/* Image Gallery on Single Car Page */
.car-thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px; /* For scrollbar */
}

.car-thumbnail-gallery img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.car-thumbnail-gallery img.active, .car-thumbnail-gallery img:hover {
    border-color: #007bff;
}

/* Lightbox/Modal for Image Gallery */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 3000; /* Sit on top of other modals */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: auto;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Reviews Section */
.car-reviews-section {
    margin-top: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.car-reviews-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.review-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

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

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-info strong {
    font-size: 18px;
    color: #333;
}

.review-date {
    font-size: 14px;
    color: #777;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.review-rating svg {
    width: 16px;
    height: 16px;
    color: #ffc107;
    fill: #ffc107;
}

.review-content p {
    line-height: 1.6;
    color: #555;
}

.review-form-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.review-form-section h4 {
    font-size: 20px;
    margin-bottom: 15px;
}

.rating-input {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 24px;
    color: #ccc;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input[type="radio"]:checked ~ label {
    color: #ffc107;
}

/* Booking Confirmation / Accessories Page */
.booking-confirmation-page {
    margin-top: 30px;
}

.booking-details-summary {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.booking-details-summary h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.booking-car-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.booking-car-info img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
}

.booking-car-text h3 {
    margin: 0;
    font-size: 20px;
}

.booking-car-text p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.booking-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.summary-block {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.summary-block h4 {
    margin-top: 0;
    font-size: 16px;
    color: #777;
}

.summary-block p {
    margin: 5px 0 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.accessories-selection-section {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.accessories-selection-section h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.accessory-category {
    margin-bottom: 20px;
}

.accessory-category h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #007bff;
}

.accessory-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.accessory-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.accessory-item label {
    flex-grow: 1;
    font-size: 16px;
    cursor: pointer;
}

.accessory-item .accessory-price {
    font-weight: bold;
    color: #333;
}

.final-booking-actions {
    text-align: right;
    margin-top: 30px;
}

.final-booking-actions .btn {
    margin-left: 15px;
}

/* WhatsApp-like Messages Page */
.messages-page {
    display: flex;
    height: calc(100vh - 150px); /* Adjust based on header/footer height */
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.chat-sidebar {
    flex: 0 0 300px;
    background-color: #fff;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.chat-sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    font-weight: bold;
}

.chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chat-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-list-item:hover, .chat-list-item.active {
    background-color: #e9f5ff;
}

.chat-list-item-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.chat-list-item-info {
    flex-grow: 1;
}

.chat-list-item-name {
    font-weight: bold;
    font-size: 16px;
}

.chat-list-item-last-message {
    font-size: 14px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-name {
    font-weight: bold;
    font-size: 18px;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f0f2f5; /* WhatsApp-like background */
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-bubble.sent {
    background-color: #dcf8c6; /* Green for sent messages */
    align-self: flex-end;
    margin-left: auto;
}

.message-bubble.received {
    background-color: #fff; /* White for received messages */
    align-self: flex-start;
    margin-right: auto;
    border: 1px solid #eee;
}

.message-meta {
    font-size: 11px;
    color: #777;
    margin-top: 5px;
    text-align: right;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
    display: flex;
    gap: 10px;
}

.chat-input-area textarea {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    resize: none;
    font-size: 15px;
}

.chat-input-area button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Responsive for Messages Page */
@media (max-width: 768px) {
    .messages-page {
        flex-direction: column;
        height: auto;
    }

    .chat-sidebar {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .chat-main {
        flex: none;
        width: 100%;
    }

    .chat-messages {
        max-height: 400px; /* Limit height on mobile */
    }

    .message-bubble {
        max-width: 90%;
    }
}

/* Country Selector in Header */
.country-selector-wrapper {
    margin-left: 20px;
}

.country-selector-wrapper select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-size: 14px;
    cursor: pointer;
}

/* Homepage specific styles */
.homepage-cars-section {
    margin-top: 30px;
}

.homepage-cars-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.homepage-filters {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

.homepage-filters select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        z-index: 999;
    }

    .main-navigation li {
        border-bottom: 1px solid #eee;
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .menu-toggle {
        display: block;
    }

    .header-actions {
        order: 3; /* Move to end on mobile */
    }

    .site-branding {
        order: 1;
    }

    .country-selector-wrapper {
        order: 2;
        margin-left: 0;
    }

    .search-filter-bar {
        padding: 15px;
    }

    .search-section {
        grid-template-columns: 1fr;
    }

    .main-content {
        flex-direction: column;
    }

    .filter-sidebar {
        display: none; /* Hide desktop sidebar on mobile */
    }

    .mobile-only {
        display: block;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .car-detail {
        flex-direction: column;
    }

    .car-images, .car-info {
        flex: none;
        width: 100%;
    }

    .car-info {
        padding: 20px;
    }

    .car-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .car-title {
        font-size: 28px;
    }

    .car-rating {
        margin-top: 10px;
    }

    .booking-summary {
        margin-top: 20px;
    }

    .advanced-search-page .main-content {
        flex-direction: column;
    }

    .advanced-search-page .filter-sidebar {
        display: none;
    }

    .advanced-search-page .cars-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-branding, .header-actions, .country-selector-wrapper {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .site-branding {
        margin-bottom: 15px;
    }

    .header-actions {
        justify-content: center;
    }

    .country-selector-wrapper {
        margin-bottom: 15px;
    }

    .main-navigation ul {
        top: 120px; /* Adjust for wrapped header */
    }

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

    .homepage-filters select {
        width: 100%;
    }
}

/* Mobile Filters Modal */
.modal.mobile-only {
    display: none; /* Hidden by default, shown by JS */
}

.modal.mobile-only .modal-content {
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
}

.modal.mobile-only .modal-body {
    padding: 15px;
}

.modal.mobile-only .filter-group {
    margin-bottom: 15px;
}

.modal.mobile-only .filter-group h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.modal.mobile-only .price-inputs input {
    padding: 8px;
}

.modal.mobile-only select {
    padding: 8px;
}

.modal.mobile-only .modal-footer {
    justify-content: space-between;
    padding: 15px;
}

.modal.mobile-only .modal-footer .btn {
    flex: 1;
    margin: 0 5px;
}

/* Notification Bar */
.notification-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    color: white;
    font-weight: bold;
    z-index: 2000;
    display: none;
}

.notification-bar.success {
    background-color: #28a745;
}

.notification-bar.error {
    background-color: #dc3545;
}

.notification-bar.info {
    background-color: #17a2b8;
}

/* Image Gallery on Single Car Page */
.car-thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px; /* For scrollbar */
}

.car-thumbnail-gallery img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.car-thumbnail-gallery img.active, .car-thumbnail-gallery img:hover {
    border-color: #007bff;
}

/* Lightbox/Modal for Image Gallery */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 3000; /* Sit on top of other modals */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: auto;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Reviews Section */
.car-reviews-section {
    margin-top: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.car-reviews-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.review-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

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

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-info strong {
    font-size: 18px;
    color: #333;
}

.review-date {
    font-size: 14px;
    color: #777;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.review-rating svg {
    width: 16px;
    height: 16px;
    color: #ffc107;
    fill: #ffc107;
}

.review-content p {
    line-height: 1.6;
    color: #555;
}

.review-form-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.review-form-section h4 {
    font-size: 20px;
    margin-bottom: 15px;
}

.rating-input {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 24px;
    color: #ccc;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input[type="radio"]:checked ~ label {
    color: #ffc107;
}

/* Booking Confirmation / Accessories Page */
.booking-confirmation-page {
    margin-top: 30px;
}

.booking-details-summary {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.booking-details-summary h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.booking-car-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.booking-car-info img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
}

.booking-car-text h3 {
    margin: 0;
    font-size: 20px;
}

.booking-car-text p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.booking-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.summary-block {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.summary-block h4 {
    margin-top: 0;
    font-size: 16px;
    color: #777;
}

.summary-block p {
    margin: 5px 0 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.accessories-selection-section {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.accessories-selection-section h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.accessory-category {
    margin-bottom: 20px;
}

.accessory-category h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #007bff;
}

.accessory-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.accessory-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.accessory-item label {
    flex-grow: 1;
    font-size: 16px;
    cursor: pointer;
}

.accessory-item .accessory-price {
    font-weight: bold;
    color: #333;
}

.final-booking-actions {
    text-align: right;
    margin-top: 30px;
}

.final-booking-actions .btn {
    margin-left: 15px;
}

/* WhatsApp-like Messages Page */
.messages-page {
    display: flex;
    height: calc(100vh - 150px); /* Adjust based on header/footer height */
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.chat-sidebar {
    flex: 0 0 300px;
    background-color: #fff;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.chat-sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    font-weight: bold;
}

.chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chat-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-list-item:hover, .chat-list-item.active {
    background-color: #e9f5ff;
}

.chat-list-item-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.chat-list-item-info {
    flex-grow: 1;
}

.chat-list-item-name {
    font-weight: bold;
    font-size: 16px;
}

.chat-list-item-last-message {
    font-size: 14px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-name {
    font-weight: bold;
    font-size: 18px;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f0f2f5; /* WhatsApp-like background */
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-bubble.sent {
    background-color: #dcf8c6; /* Green for sent messages */
    align-self: flex-end;
    margin-left: auto;
}

.message-bubble.received {
    background-color: #fff; /* White for received messages */
    align-self: flex-start;
    margin-right: auto;
    border: 1px solid #eee;
}

.message-meta {
    font-size: 11px;
    color: #777;
    margin-top: 5px;
    text-align: right;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
    display: flex;
    gap: 10px;
}

.chat-input-area textarea {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    resize: none;
    font-size: 15px;
}

.chat-input-area button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Responsive for Messages Page */
@media (max-width: 768px) {
    .messages-page {
        flex-direction: column;
        height: auto;
    }

    .chat-sidebar {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .chat-main {
        flex: none;
        width: 100%;
    }

    .chat-messages {
        max-height: 400px; /* Limit height on mobile */
    }

    .message-bubble {
        max-width: 90%;
    }
}




/* Image Gallery and Slider */
.thumbnail-gallery {
/*     display: flex; */
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px; /* For scrollbar visibility */
}

.thumbnail-image {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: #007bff;
    transform: scale(1.05);
}

#image-slider-modal .modal-content.slider-content {
    max-width: 90%;
    width: 900px; /* Larger size for image slider */
    padding: 0;
    background-color: #000; /* Black background for slider */
    border: none;
    box-shadow: none;
    position: relative;
}

#image-slider-modal .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 30px;
    z-index: 2010;
    background: none;
    border: none;
    cursor: pointer;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-images {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

.slider-images img {
    max-width: 100%;
    max-height: 80vh; /* Limit height to viewport height */
    object-fit: contain; /* Ensure entire image is visible */
}

.prev-button, .next-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 2005;
}

.prev-button:hover, .next-button:hover {
    background-color: rgba(255,255,255,0.4);
}

.prev-button {
    left: 20px;
}

.next-button {
    right: 20px;
}

/* Responsive adjustments for car detail page */
@media (max-width: 768px) {
    .car-detail {
        flex-direction: column;
    }

    .car-info {
        padding: 20px;
    }

    .car-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .car-title {
        font-size: 28px;
    }

    .favorite-button-large {
        position: static;
        margin-top: 15px;
        width: 100%;
    }

    .thumbnail-gallery {
        justify-content: center;
    }

    #image-slider-modal .modal-content.slider-content {
        width: 95%;
        max-height: 90vh;
    }

    .slider-images img {
        max-height: 70vh;
    }

    .prev-button, .next-button {
        padding: 10px;
        font-size: 20px;
    }
}




/* Reviews Section */
.car-reviews {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.car-reviews h3 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.review-form-container {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.review-form-container h4 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
}

.star-rating {
    display: inline-block;
    font-size: 30px;
    cursor: pointer;
    margin-bottom: 15px;
}

.star-rating .star {
    color: #ccc; /* Default star color */
    transition: color 0.2s ease;
}

.star-rating .star.filled,
.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #ffc107; /* Filled star color */
}

.star-rating .star:hover ~ .star.filled {
    color: #ccc; /* Reset color for stars after hovered one */
}

.reviews-list {
    margin-top: 20px;
}

.review-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: bold;
    font-size: 16px;
}

.review-stars .star {
    color: #ffc107;
    font-size: 18px;
}

.review-stars .star:not(.filled) {
    color: #ccc;
}

.review-body p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.review-footer {
    font-size: 13px;
    color: #777;
    text-align: right;
}

.login-to-review {
    text-align: center;
    font-size: 16px;
    color: #555;
}

.login-to-review a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.login-to-review a:hover {
    text-decoration: underline;
}




/* Messages Page (WhatsApp-like) */
.messages-page {
    padding-top: 30px;
    padding-bottom: 30px;
}

.messages-wrapper {
    display: flex;
    height: 70vh; /* Adjust as needed */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.message-threads-sidebar {
    flex: 0 0 300px;
    background-color: #f7f7f7;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

#message-threads-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
}

#message-threads-list li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#message-threads-list li:hover {
    background-color: #f0f0f0;
}

#message-threads-list li.active {
    background-color: #e6f7ff;
    border-left: 3px solid #007bff;
}

#message-threads-list li h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

#message-threads-list li p {
    margin: 0;
    font-size: 14px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-chat-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

#chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

#chat-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

#chat-messages-container {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #e5ddd5; /* WhatsApp chat background */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-conversation-selected {
    text-align: center;
    color: #777;
    margin-top: 50px;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
}

.message-bubble.sent {
    background-color: #dcf8c6; /* WhatsApp sent message color */
    align-self: flex-end;
    margin-left: auto;
}

.message-bubble.received {
    background-color: #fff; /* WhatsApp received message color */
    align-self: flex-start;
    margin-right: auto;
}

.message-bubble p {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    color: #888;
    text-align: right;
    margin-top: 5px;
}

#chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #f0f0f0;
    gap: 10px;
}

#message-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    resize: none;
    font-size: 16px;
}

#send-message-button {
    border-radius: 20px;
    padding: 10px 20px;
}

/* Responsive adjustments for messages page */
@media (max-width: 768px) {
    .messages-wrapper {
        flex-direction: column;
        height: auto;
    }

    .message-threads-sidebar {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .message-chat-area {
        flex: none;
        width: 100%;
    }

    #message-threads-list {
        max-height: 300px; /* Limit height on mobile */
    }

    .message-bubble {
        max-width: 90%;
    }
}




/* Finalize Booking Page */
.finalize-booking-page {
    padding: 30px 0;
}

.finalize-booking-page h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

.booking-summary-section,
.accessories-selection-section,
.final-price-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.booking-summary-section h2,
.accessories-selection-section h2,
.final-price-section h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.car-details-summary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-car-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.summary-car-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.summary-car-info p {
    margin: 5px 0;
    font-size: 15px;
    color: #555;
}

.summary-car-info span {
    font-weight: 600;
    color: #333;
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.accessory-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: border-color 0.2s ease;
}

.accessory-item:hover {
    border-color: #007bff;
}

.accessory-item input[type="checkbox"] {
    margin-top: 5px;
    transform: scale(1.2);
}

.accessory-item label {
    cursor: pointer;
    flex-grow: 1;
}

.accessory-item h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 18px;
    color: #333;
}

.accessory-item p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #777;
}

.accessory-price {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

.final-total-price {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
    text-align: right;
    margin-bottom: 30px;
}

.login-prompt {
    text-align: center;
    font-size: 18px;
    color: #555;
    padding: 50px 0;
}

.login-prompt a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

/* Messages Page (WhatsApp-like) */
.messages-page {
    display: flex;
    height: calc(100vh - 150px); /* Adjust based on header/footer height */
    max-width: 1320px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.message-threads {
    flex: 0 0 300px;
    background-color: #f0f2f5;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.message-threads h2 {
    font-size: 20px;
    padding: 15px;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
    background-color: #e9ecef;
}

.message-threads ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.message-threads li {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.message-threads li:last-child {
    border-bottom: none;
}

.message-threads li:hover,
.message-threads li.active {
    background-color: #e0e0e0;
}

.message-threads li h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.message-threads li p {
    margin: 0;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f9f9f9;
}

.chat-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f5f5f5; /* Chat background */
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message-bubble p {
    margin: 0;
    font-size: 15px;
}

.message-bubble .message-time {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.5);
    text-align: right;
    display: block;
    margin-top: 5px;
}

.message-bubble.sent {
    background-color: #dcf8c6; /* WhatsApp sent message color */
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message-bubble.received {
    background-color: #fff; /* WhatsApp received message color */
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid #e0e0e0;
}

.chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
}

.chat-input-area textarea {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 15px;
    resize: none;
    margin-right: 10px;
    height: 40px;
    overflow: hidden;
}

.chat-input-area button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

.no-conversation-selected {
    text-align: center;
    color: #777;
    padding: 50px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .messages-page {
        flex-direction: column;
        height: auto;
    }

    .message-threads {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .chat-area {
        height: 60vh; /* Give chat area a fixed height on mobile */
    }

    .message-bubble {
        max-width: 90%;
    }
}




/* Finalize Booking Page */
.finalize-booking-page {
    padding: 30px 0;
}

.finalize-booking-page h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

.booking-summary-section,
.accessories-selection-section,
.final-price-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.booking-summary-section h2,
.accessories-selection-section h2,
.final-price-section h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.car-details-summary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-car-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.summary-car-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.summary-car-info p {
    margin: 5px 0;
    font-size: 15px;
    color: #555;
}

.summary-car-info span {
    font-weight: 600;
    color: #333;
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.accessory-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: border-color 0.2s ease;
}

.accessory-item:hover {
    border-color: #007bff;
}

.accessory-item input[type="checkbox"] {
    margin-top: 5px;
    transform: scale(1.2);
}

.accessory-item label {
    cursor: pointer;
    flex-grow: 1;
}

.accessory-item h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 18px;
    color: #333;
}

.accessory-item p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #777;
}

.accessory-price {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

.final-total-price {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
    text-align: right;
    margin-bottom: 30px;
}

.login-prompt {
    text-align: center;
    font-size: 18px;
    color: #555;
    padding: 50px 0;
}

.login-prompt a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}


