/* =========================================
   STILE PERSONALIZZATO CONCESSIONARIA
   ========================================= */

body { font-family: 'Montserrat', sans-serif; background-color: #f8f9fa; color: #333; }

/* Navbar */
.navbar { background-color: #fff; box-shadow: 0 2px 15px rgba(0,0,0,0.08); padding: 15px 0; }
.navbar-brand img { max-height: 60px; }
.nav-link { font-weight: 600; color: #222 !important; text-transform: uppercase; font-size: 14px; margin: 0 12px; transition: color 0.3s; }
.nav-link:hover, .nav-link.active { color: #0d6efd !important; }

/* Slider Hero (Homepage) */
.carousel-item { height: 65vh; min-height: 450px; background-color: #000; position: relative; }
.carousel-item img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.carousel-caption { bottom: 25%; z-index: 10; text-align: center; }
.carousel-caption h1 { font-size: 3.5rem; font-weight: 700; text-transform: uppercase; text-shadow: 2px 2px 8px rgba(0,0,0,0.8); }
.carousel-caption p { font-size: 1.5rem; font-weight: 500; text-shadow: 1px 1px 5px rgba(0,0,0,0.8); }

/* Modulo di Ricerca (Homepage) */
.search-box-wrapper { margin-top: -80px; position: relative; z-index: 20; }
.search-box { background: #fff; padding: 35px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-top: 5px solid #0d6efd; }
.search-box label { font-weight: 700; color: #444; font-size: 0.9rem; text-transform: uppercase;}

/* Page Header (Pagine interne) */
.page-header { background: #222; color: #fff; padding: 50px 0 30px; margin-bottom: 40px; }
.page-header h1 { font-weight: 700; text-transform: uppercase; }
.breadcrumb a { color: #0d6efd; text-decoration: none; }
.breadcrumb-item.active { color: #aaa; }

/* Sidebar Filtri Accordion (veicoli.php) */
.filter-sidebar { background: #fff; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); padding: 20px; }
.filter-sidebar h3 { font-size: 1.2rem; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid #0d6efd; padding-bottom: 15px; margin-bottom: 20px;}
.accordion-button { font-weight: 700; background-color: #f8f9fa; color: #333; }
.accordion-button:not(.collapsed) { background-color: #e9ecef; color: #0d6efd; box-shadow: none; }
.accordion-button:focus { box-shadow: none; border-color: transparent; }
.filter-list-item a { color: #555; text-decoration: none; display: block; padding: 8px 0; border-bottom: 1px solid #eee; transition: color 0.2s; font-size: 0.95rem;}
.filter-list-item a:hover { color: #0d6efd; padding-left: 5px; }
.filter-list-item:last-child a { border-bottom: none; }

/* Toolbar Risultati */
.toolbar { background: #fff; padding: 15px 20px; border-radius: 10px; margin-bottom: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.02); }

/* Card Veicoli (Griglia) */
.car-card { border: none; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s; background: #fff; margin-bottom: 30px; display: flex; flex-direction: column; height: 100%; position: relative; }
.car-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.car-image-wrapper { position: relative; padding-top: 66.66%; overflow: hidden; background: #eee; }
.car-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.car-badge { position: absolute; top: 15px; left: 15px; background: #dc3545; color: #fff; padding: 5px 12px; font-size: 12px; font-weight: bold; border-radius: 4px; z-index: 2; text-transform: uppercase;}
.car-price { font-size: 1.5rem; font-weight: 700; color: #0d6efd; margin-bottom: 0;}
.car-features { font-size: 12.5px; color: #666; border-top: 1px solid #eee; padding-top: 15px; margin-top: 15px; display: flex; justify-content: space-between;}

/* Sezione Dinamica e Titoli */
.dynamic-content-section { background-color: #fff; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); padding: 40px; margin: 50px 0; line-height: 1.8; }
.section-title { font-weight: 700; text-transform: uppercase; margin-bottom: 40px; position: relative; padding-bottom: 15px; }
.section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 60px; height: 4px; background-color: #0d6efd; }

/* Footer */
.hover-white:hover { color: #ffffff !important; }

/* =========================================
   DETTAGLIO SINGOLO VEICOLO (veicolo.php)
   ========================================= */
/* Grid Veicoli */

/* Sidebar Filters */
        .filter-box { background: #fff; padding: 25px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
        .filter-box h4 { font-weight: 700; margin-bottom: 20px; text-transform: uppercase; font-size: 1.1rem; border-bottom: 2px solid #0d6efd; padding-bottom: 10px; display: inline-block;}
        .form-label { font-weight: 600; font-size: 0.9rem; color: #555; }


        .car-card { border: none; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s; background: #fff; margin-bottom: 30px; position: relative; display: flex; flex-direction: column; height: 100%; }
        .car-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
        .car-image-wrapper { position: relative; padding-top: 66.66%; overflow: hidden; background: #eee; }
        .car-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
        .car-badge { position: absolute; top: 15px; left: 15px; background: #dc3545; color: #fff; padding: 5px 12px; font-size: 12px; font-weight: bold; border-radius: 4px; z-index: 2; text-transform: uppercase;}
        .car-price { font-size: 1.5rem; font-weight: 700; color: #0d6efd; margin-bottom: 0;}
        .car-features { font-size: 12px; color: #666; border-top: 1px solid #eee; padding-top: 12px; margin-top: 12px; display: flex; justify-content: space-between;}
        
        .toolbar { background: #fff; padding: 15px 20px; border-radius: 10px; margin-bottom: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.02); }



/* =========================================
   GALLERIA MINIATURE (veicolo.php)
   ========================================= */
.gallery-thumbs { 
    display: flex; 
    flex-wrap: nowrap; /* Impedisce rigorosamente di andare a capo */
    gap: 8px; 
    overflow-x: auto; /* Abilita lo scorrimento orizzontale */
    padding-bottom: 12px; 
    -webkit-overflow-scrolling: touch; /* Scorrimento fluido su smartphone */
}

.gallery-thumbs img { 
    flex: 0 0 auto; /* Evita che le immagini si restringano o si deformino */
    width: 80px;  /* Larghezza ridotta (prima era 100px) */
    height: 60px; /* Altezza ridotta (prima era 70px) */
    object-fit: cover; 
    border-radius: 4px; 
    cursor: pointer; 
    opacity: 0.5; 
    transition: opacity 0.2s, border 0.2s; 
    border: 2px solid transparent; 
}

.gallery-thumbs img:hover, 
.gallery-thumbs img.active-thumb { 
    opacity: 1; 
    border-color: #0d6efd; 
}

/* Personalizzazione della barra di scorrimento per renderla invisibile o molto sottile */
.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}
.gallery-thumbs::-webkit-scrollbar-track {
    background: #f8f9fa; 
    border-radius: 4px;
}
.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 4px;
}
.gallery-thumbs::-webkit-scrollbar-thumb:hover {
    background: #aaa; 
}

/* =========================================
   SERVIZI E CARDS
   ========================================= */
.service-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.service-card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-bottom: 3px solid #0d6efd;
}
.service-card-body {
    padding: 25px;
    text-align: center;
}
.service-card-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #222;
}

