/* assets/css/style.css */
.rental-cars-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rental-cars-catalogs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.catalog-button {
    padding: 10px 20px;
    background: #009fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.catalog-button:hover {
    background: #e0e0e0;
}

.catalog-button.active {
    background: #1c39bb;
    color: white;
}

.rental-cars-search {
    margin-bottom: 30px;
}

#cars-search {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

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

.car-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

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

.car-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.car-info {
    padding: 20px;
}

.car-info h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #333;
}

.car-engine {
    color: #666;
    font-size: 0.9em;
    margin: 0 0 15px;
}

.car-price {
    margin: 15px 0 0;
    text-align: right;
}

.price-label {
    display: block;
    font-size: 0.8em;
    color: #666;
}

.price-amount {
    display: block;
    font-size: 1.4em;
    font-weight: bold;
    color: #086afe;
}

.price-period {
    font-size: 0.8em;
    color: #666;
}

.no-cars-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

@media (max-width: 768px) {
    .rental-cars-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .catalog-button {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 1;
}

.close-modal:hover {
    color: #000;
}

/* Contenuto del modal */
.car-details-content {
    display: flex;
    gap: 30px;
    padding: 20px;
    flex-direction: column;
}

.car-gallery {
    position: relative;
}

.main-image-wrapper {
    margin-bottom: 15px;
}

.main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}


.thumbnail:hover {
    opacity: 0.8;
}

.car-details-info {
    padding: 20px;
}

.car-details-info h2 {
    margin: 0 0 20px;
    font-size: 24px;
    color: #333;
}

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

.car-specs h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #666;
}

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

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.spec-item .label {
    color: #666;
}

.car-offer {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.offer-details .price {
    margin-bottom: 15px;
}

.amount {
    font-size: 24px;
    font-weight: bold;
    color: #086afe;
}

.period {
    color: #666;
    font-size: 14px;
}

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

.offer-specs li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.contact-button {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 30px;
    background: #086afe;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contact-button:hover {
    background: #0656cc;
}

/* Loading state */
.modal-content.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #086afe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        width: auto;
    }


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

/* Animazione apertura modal */
.modal.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Stili per il pulsante nella card */
.view-details-button {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #086afe;
    color: white;
    text-align: center;
    border: none;
    border-radius: 5px;
    margin-top: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.view-details-button:hover {
    background: #0656cc;
}


.car-details-header {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.car-details-header h2 {
    font-size: 28px;
    margin: 0;
}

.car-details-header .car-trim {
    font-size: 18px;
    color: #666;
    margin: 5px 0 0;
}

.car-gallery-section {
    position: relative;
}

.main-image-wrapper {
    margin-bottom: 15px;
}

.main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.thumbnail:hover {
    opacity: 0.8;
}

.car-main-features, .included-services, .rental-details, .insurance-coverage {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.feature-item, .service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-item .icon, .service-item .icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.feature-item .label, .service-item .label {
    font-size: 14px;
    color: #666;
}

.feature-item .value {
    font-weight: 500;
    color: #333;
}

.rental-info {
    display: grid;
    gap: 20px;
}

.price-section .price {
    font-size: 32px;
    font-weight: bold;
    color: #086afe;
}

.price-section .period {
    font-size: 16px;
    color: #666;
}

.rental-terms {
    display: grid;
    gap: 10px;
}

.term {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.coverage-list {
    display: grid;
    gap: 10px;
}

.coverage-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.request-info-button {
    width: 100%;
    padding: 15px;
    background: #086afe;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.request-info-button:hover {
    background: #0656cc;
}

/* Aggiungi questo CSS al tuo file style.css */

.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background: #f0f0f0;
}

.pagination-button.active {
    background: #086afe;
    color: white;
    border-color: #086afe;
}

.pagination-button.prev,
.pagination-button.next {
    font-weight: bold;
}

.pagination-dots {
    padding: 0 5px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .pagination-button {
        padding: 6px 10px;
        font-size: 14px;
    }
}

.colors-section {
    margin: 20px 0;
}

.colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ddd;
}