/* ASSETS/CSS/RENT.CSS - Noleggio Auto */

/* Header Section */
.section-title-big {
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.section-desc {
    text-align: center;
    color: #666;
    font-size: 1.3rem;
    max-width: 900px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* Search Bar Top */
.search-bar-top {
    margin-bottom: 2rem;
}

.search-box-large {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box-large i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

.search-box-large input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box-large input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(0,123,255,0.15);
}

/* Sidebar Styles */
.sidebar {
    position: static;
}

.filter-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.filter-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.filter-section {
    margin-bottom: 1rem;
}

.filter-label-row {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 1rem 0;
}

/* Filtri Collapsabili */
.filter-collapsible .filter-toggle {
    cursor: pointer;
    user-select: none;
}

.filter-collapsible .filter-toggle:hover {
    color: var(--primary-blue);
}

.filter-arrow {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
    color: #999;
}

.filter-collapsible.open .filter-arrow {
    transform: rotate(180deg);
}

.filter-content-collapse {
    margin-top: 0.75rem;
    animation: slideDown 0.3s ease;
}

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

/* Toggles */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--text-dark);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Brand Grid Filter (con loghi locali) */
.brand-grid-filter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.brand-check-item {
    cursor: pointer;
    display: block;
}

.brand-check-item input {
    display: none;
}

.brand-box {
    border: 1px solid #eee;
    border-radius: 8px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.2s;
    padding: 8px;
}

.brand-box img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: saturate(0.3) opacity(0.6);
    transition: all 0.3s ease;
}

.brand-check-item input:checked + .brand-box {
    border: 2px solid var(--primary-blue);
    background: #f0f7ff;
}

.brand-check-item input:checked + .brand-box img {
    filter: saturate(1) opacity(1);
}

.brand-name-fallback {
    font-size: 0.65rem;
    font-weight: 700;
    color: #666;
    text-align: center;
}

/* List Items */
.list-check-item {
    display: block;
    margin-bottom: 6px;
    cursor: pointer;
}

.list-check-item input {
    display: none;
}

.list-box {
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    transition: all 0.2s;
}

.list-check-item input:checked + .list-box {
    border-color: var(--text-dark);
    background: #f0f7ff;
    color: var(--text-dark);
}

/* Range Slider */
.range-wrapper {
    padding: 10px 0;
}

.range-wrapper input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-green));
    outline: none;
    margin-bottom: 10px;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.range-value {
    text-align: center;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

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

.results-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

/* Car Grid */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Car Card */
.car-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.discount-badge-card {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(231,76,60,0.3);
}

.car-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.3s ease;
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

.car-info {
    padding: 1rem 1.25rem;
    flex: 1;
}

.car-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.car-brand-logo {
    height: 20px;
    max-width: 60px;
    object-fit: contain;
}

.fuel-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fuel-diesel { background: #2c3e50; color: white; }
.fuel-benzina { background: #27ae60; color: white; }
.fuel-elettrica { background: #3498db; color: white; }
.fuel-ibrida { background: #16a085; color: white; }
.fuel-other { background: #95a5a6; color: white; }

.car-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.car-version {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-specs {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: #666;
}

.car-specs span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.car-specs i {
    color: #999;
}

/* Price Section */
.car-price-section {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

.car-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    color: var(--text-dark);
}

.price-label {
    font-size: 0.8rem;
    color: #888;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.price-suffix {
    font-size: 0.9rem;
    font-weight: 600;
}

.price-iva {
    display: block;
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 10px;
}

.btn-scopri {
    display: block;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-scopri:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn-scopri i {
    margin-left: 5px;
}

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
}

/* === PAGINA DETTAGLIO === */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

.details-left {
    min-width: 0;
}

.details-right {
    position: relative;
}

.detail-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.car-gallery {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.car-main-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    display: block;
}

.car-detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.car-detail-logo {
    height: 30px;
}

.car-detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

.car-detail-version {
    font-size: 1rem;
    color: #666;
    margin: 0 0 1.5rem 0;
}

/* Specs Row 3 colonne */
.specs-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.spec-item-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec-item-inline i {
    font-size: 1.3rem;
    color: var(--primary-blue);
    width: 35px;
    text-align: center;
}

.spec-item-inline .spec-label {
    font-size: 0.65rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-item-inline .spec-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Sezioni Collassabili */
.collapsible-section {
    margin-top: 1.5rem;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s;
}

.collapsible-header:hover {
    background: #f0f0f0;
}

.collapsible-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.collapsible-arrow {
    transition: transform 0.3s ease;
    color: #999;
}

.collapsible-content {
    padding: 1.5rem;
    animation: slideDown 0.3s ease;
}

/* Services List */
.services-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #555;
    padding: 8px 0;
}

.service-item i {
    color: #27ae60;
    margin-top: 3px;
}

/* Price Card (static) */
.sticky-card {
    background: white;
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    position: static;
    overflow: hidden;
}

.card-top-dark {
    background: linear-gradient(145deg, #4281A4 0%, #2c5f7c 50%, #1a3d4d 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.card-top-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.price-from {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    position: relative;
}

.price-huge-white {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    position: relative;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.period-white {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 10px;
    letter-spacing: 1.5px;
    position: relative;
}

.card-mid-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 1.25rem 1rem;
    background: linear-gradient(to bottom, #f8f9fa, white);
    border-bottom: 1px solid #eee;
}

.mid-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #555;
    font-weight: 600;
    text-align: center;
}

.mid-spec i {
    font-size: 1.1rem;
    color: var(--primary-blue);
    background: #f0f7ff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mid-spec span {
    color: #333;
    font-weight: 700;
}


/* Gallery Thumbs */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 68px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    background: #f8f9fa;
    transition: all 0.2s;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.gallery-thumb:hover {
    border-color: #999;
}

.gallery-thumb:hover img {
    transform: scale(1.05);
}

.gallery-thumb.active {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0,123,255,0.25);
}

/* Lightbox Modale */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-content {
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 85vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-counter {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    margin-top: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.3rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10001;
}

.lightbox-arrow:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}


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

    .sidebar {
        position: static;
    }

    .brand-grid-filter {
        grid-template-columns: repeat(4, 1fr);
        max-height: none;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }

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

@media (max-width: 768px) {
    .car-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

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

    .services-list {
        grid-template-columns: 1fr;
    }

    .car-main-image {
        height: 280px;
    }

    .gallery-thumb {
        width: 65px;
        height: 50px;
    }

    .lightbox-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

}
