:root {
  --primary: #8B0000;
  --primary-dark: #5c0000;
  --secondary: #1a1a1a;
  --light: #f5f5f5;
  --text: #333;
  --text-light: #666;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--light);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
.main-header {
  background: var(--secondary);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-nav .logo {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.main-nav .logo i {
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.main-nav .nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav .nav-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

.main-nav .nav-links a:hover,
.main-nav .nav-links a.active {
  color: var(--primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1920');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Section */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--secondary);
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* Grid Auto */
.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.auto-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.auto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.auto-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.auto-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.auto-card:hover .auto-image img {
  transform: scale(1.05);
}

.auto-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
}

.no-image-placeholder {
  height: 220px;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
}

.no-image-placeholder i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.auto-content {
  padding: 1.5rem;
}

.auto-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.auto-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.auto-details span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.auto-price {
  color: #333;   /* come il prezzo scontato: i prezzi sono tutti grigi scuri (chiesto dall'utente) */
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem 0;
}

/* Prezzo scontato nella card, come su AutoScout24 (valori presi dal loro foglio di stile):
   il listino barrato e' ROSSO #c60000 in grassetto, il prezzo in evidenza quasi nero, la
   percentuale sta in una pillola verde (il verde del risparmio: #0d670f su #e9f4ea). */
.auto-prezzi {
  display: flex;
  /* centrato, non allineato sulle basi: cosi' la barra del barrato cade al centro del prezzo */
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0;
}

.auto-prezzi > * {
  margin: 0;
}

.auto-price-old {
  position: relative;
  color: #555;   /* prezzo vecchio in grigio... */
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;   /* la barra la disegniamo noi, sotto */
}

/* La barra del prezzo barrato disegnata a mano: quella del font non cade al centro degli
   occhielli e sopra un prezzo piu' grande si vede subito che e' fuori asse. E' rossa:
   e' lei a segnalare lo sconto, il prezzo vecchio resta grigio. */
.auto-price-old::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #c60000;
  transform: translateY(-50%);
}

.auto-price-sconto {
  color: #333;
  font-size: 1.6rem;
  font-weight: 700;
}

.auto-price-pct {
  background: #e9f4ea;
  color: #0d670f;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 1rem;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-light {
  background: white;
  color: var(--primary);
}

.btn-light:hover {
  background: var(--light);
}

/* Empty Catalog */
.empty-catalog {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.empty-catalog i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #ddd;
}

/* Newsletter Section */
.newsletter-section {
  background: var(--secondary);
  color: white;
  padding: 4rem 0;
  margin-top: 4rem;
}

.newsletter-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-box h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.newsletter-box p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-form .form-control {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Footer */
.main-footer {
  background: var(--secondary);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-form {
  display: flex;
  gap: 0.5rem;
}

.footer-form input {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 4px;
}

.footer-form button {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-social a {
  color: white;
  margin-left: 1rem;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--primary);
}

/* Auto Detail Page */
.auto-detail-header {
  background-size: cover;
  background-position: center;
  color: white;
  padding: 4rem 0 2rem;
  margin-bottom: 2rem;
}

.breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.auto-year {
  font-size: 1.2rem;
  opacity: 0.9;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.detail-gallery {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-list {
  display: flex;
  gap: 10px;
  padding: 1rem;
  overflow-x: auto;
}

.thumbnail-list .thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  border: 2px solid transparent;
}

.thumbnail-list .thumb:hover,
.thumbnail-list .thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

.no-image-large {
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
}

.no-image-large i {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.detail-info {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  height: fit-content;
}

.price-box {
  background: var(--primary);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 2rem;
}

.price-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.price-value {
  font-size: 2.2rem;
  font-weight: 700;
}

/* Riquadro del prezzo nel dettaglio: il fondo e' nel colore del tema, quindi il listino
   barrato e' bianco tenue in grassetto (il rosso #c60000 delle card qui sparirebbe) e la
   percentuale usa la stessa pillola verde delle card. */
.price-riga {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.price-old {
  position: relative;
  color: rgba(255, 255, 255, 0.85);   /* "grigio" su fondo scuro: il #555 non si leggerebbe */
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
}

/* Qui la barra rossa piena sparisce sul fondo rosso del riquadro: serve un rosso chiaro. */
.price-old::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #ff6b6b;
  transform: translateY(-50%);
}

.price-pct {
  background: #e9f4ea;
  color: #0d670f;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.spec-item {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.spec-item i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.spec-label {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.3rem;
}

.spec-value {
  display: block;
  font-weight: bold;
  color: var(--secondary);
}

.description-box {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.description-box h3 {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.cta-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Contact Page */
.page-header-section {
  background: var(--secondary);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.contact-section {
  padding: 4rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.contact-form-wrapper {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-form-wrapper h2 {
  margin-bottom: 1.5rem;
  color: var(--secondary);
}

.contact-info {
  background: var(--secondary);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  height: fit-content;
}

.contact-info h2 {
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.info-item i {
  font-size: 1.2rem;
  color: var(--primary);
  margin-top: 0.3rem;
}

.info-item h4 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.info-item a {
  color: white;
  text-decoration: none;
}

.info-item a:hover {
  color: var(--primary);
}

.social-links-contact {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.social-links-contact a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

.social-links-contact a:hover {
  background: var(--primary);
}

.form-feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 5px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Error Page */
.error-page {
  text-align: center;
  padding: 6rem 1rem;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-page h1 {
  font-size: 8rem;
  color: var(--primary);
  margin: 0;
  line-height: 1;
}

.error-page h2 {
  font-size: 2rem;
  margin: 1rem 0;
  color: var(--secondary);
}

/* Hero Logo - posizionato a sinistra, più piccolo */
.hero-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  /* Rimuovi temporaneamente il filtro per testare */
  /* filter: brightness(0) invert(1); */
  background: white; /* Se il logo è nero, serve sfondo chiaro per vedersi */
  padding: 10px;
  border-radius: 8px;
}

/* Su mobile si centra */
@media (max-width: 768px) {
  .hero-content {
    text-align: center !important;
  }
  
  .hero-logo {
    max-width: 140px;
    margin: 0 auto 20px auto;
  }
}

/* Logo nella Navbar */
.nav-logo {
  height: 40px;
  width: auto;
  margin-right: 10px;
  background: white; /* Sfondo bianco per il logo nero */
  padding: 4px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
}

.main-nav .logo {
  display: flex;
  align-items: center;
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 37, 41, 0.95);
    color: #f8f9fa;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    font-size: 14px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.cookie-banner p {
    margin: 0;
    padding-right: 20px;
    flex: 1;
}

.btn-cookie {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.btn-cookie:hover {
    background-color: #0b5ed7;
}


/* --- Card annunci: card cliccabile + carosello foto --- */
.auto-card {
  position: relative;
}

.auto-card .card-link-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  font-size: 0;
  color: transparent;
  text-decoration: none;
}

.auto-card .card-slider,
.auto-card .auto-share {
  position: relative;
  z-index: 2;
}

.auto-card .card-slider {
  height: 100%;
}

.card-slide-track {
  display: flex;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.card-slide-track::-webkit-scrollbar {
  display: none;
}

.card-slide-track.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.card-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.card-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.3s;
}

.auto-card:hover .card-slide img {
  transform: scale(1.05);
}

.card-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s, background 0.2s;
  z-index: 3;
}

.card-slider-nav:hover {
  opacity: 1;
  background: var(--primary);
}

.card-slider-nav.prev { left: 8px; }
.card-slider-nav.next { right: 8px; }

/* il badge con l'anno deve restare sopra il carosello: senza z-index finisce DIETRO la
   foto, perche' il carosello e' posizionato (vale per qualunque badge futuro sulla foto) */
.auto-card .auto-badge {
  z-index: 4;
}

/* contatore delle foto: sta su TUTTE le card (i pallini, solo sotto le 13 foto,
   facevano sembrare diverse card identiche) */
.card-slider-counter {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: 0.03em;
  z-index: 3;
}

/* --- Lightbox: foto a schermo intero --- */
.main-image img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: var(--primary);
}

.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  opacity: 0.85;
  letter-spacing: 0.05em;
}

body.lightbox-aperto {
  overflow: hidden;
}

/* Orari di apertura: badge aperto/chiuso + riepilogo compatto */
.orari-stato {
  display: inline-block;
  margin: 0.15rem 0 0.4rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.7;
}

.orari-stato.aperto {
  background: #e6f4ea;
  color: #1a7f37;
}

.orari-stato.chiuso {
  background: #fdecea;
  color: #b3261e;
}

.orari-stato:empty {
  display: none;
}

.orari-elenco {
  font-size: 0.9rem;
  margin-top: 0.2rem;
  max-width: 420px;   /* le due righe restano compatte anche su pagina larga */
}

.orari-riga {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1px 0;
}

.orari-giorno {
  opacity: 0.85;
}

.orari-fascia {
  font-weight: 600;
  white-space: nowrap;
}

.contact-info .orari-stato.aperto {
  background: rgba(46, 204, 113, 0.2);
  color: #8ff0b5;
}

.contact-info .orari-stato.chiuso {
  background: rgba(255, 255, 255, 0.12);
  color: #ffb3ad;
}

/* Scheda tecnica ed equipaggiamento nella pagina annuncio */
.tech-box {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-top: 2rem;
}

.tech-box h3 {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0 2rem;
}

.tech-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed #e6e6e6;
  font-size: 0.95rem;
}

.tech-item .tech-label {
  color: var(--text-light);
}

.tech-item .tech-value {
  font-weight: 600;
  text-align: right;
}

.equip-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem 2rem;
}

.equip-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.equip-list li i {
  color: var(--primary);
  margin-top: 0.3rem;
  font-size: 0.85em;
}

.form-section-title {
  margin: 2rem 0 1rem;
  font-size: 1.1rem;
  color: var(--secondary);
  border-bottom: 1px solid #eee;
  padding-bottom: 0.4rem;
}

.form-hint {
  font-weight: 400;
  font-size: 0.85rem;
  color: #888;
}

/* Galleria annuncio: la foto grande si scorre a dito come le card del catalogo */
.main-image {
  position: relative;
}

.detail-slide-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}

.detail-slide-track::-webkit-scrollbar {
  display: none;
}

.detail-slide-track.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.detail-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.detail-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
  z-index: 3;
}

.detail-slide-nav:hover {
  opacity: 1;
  background: var(--primary);
}

.detail-slide-nav.prev { left: 10px; }
.detail-slide-nav.next { right: 10px; }

.detail-slide-counter {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.03em;
  z-index: 3;
}

/* --- Mini mappa dell'indirizzo --- */
.mini-mappa {
  margin-top: 1rem;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  background: #e9ecef;
}

.mini-mappa iframe {
  display: block;
  width: 100%;
  height: 180px;
  border: 0;
}

.mini-mappa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.mini-mappa-link:hover {
  text-decoration: underline;
}

.contact-info .mini-mappa {
  border: 1px solid rgba(255,255,255,0.15);
}

.contact-info .mini-mappa-link {
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .cookie-banner p {
        padding-right: 0;
        margin-bottom: 10px;
    }
    .btn-cookie {
        width: 100%;
    }

  .mobile-menu-toggle {
    display: block;
  }
  
  .main-nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .main-nav .nav-links.active {
    display: flex;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .main-image {
    height: 250px;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form {
    flex-direction: column;
    align-items: center;
  }
  
  .newsletter-form .form-control {
    width: 100%;
  }
  
  .footer-content {
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .card-slider-nav {
    width: 30px;
    height: 30px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .detail-slide-nav {
    width: 34px;
    height: 34px;
  }

  .mini-mappa iframe {
    height: 150px;
  }

}

/* ---------- Motore di ricerca del catalogo (file COMUNE ai due siti) ---------- */
.filtri {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}
.filtro {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 150px;
  min-width: 140px;
}
.filtro label {
  font-size: .78rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.filtro select {
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 16px;            /* >= 16px: su iOS il campo non fa zoomare la pagina */
  width: 100%;
}
.filtro select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 0, 0, .12);
}
.filtro-intervallo { display: flex; gap: 8px; }
.filtro-intervallo select { flex: 1 1 0; }
.filtri-azioni {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.btn-filtri {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 11px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s;
}
.btn-filtri:hover { background: var(--primary-dark); }
.azzera-filtri {
  font-size: .9rem;
  color: #666;
  text-align: center;
  text-decoration: underline;
}
.azzera-filtri:hover { color: var(--primary); }
.filtri-risultato {
  color: #555;
  font-size: .95rem;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .filtri { padding: 12px; gap: 10px; }
  /* due controlli per riga: con nove campi in colonna il catalogo finirebbe fuori schermo */
  .filtro { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .filtro label { font-size: .72rem; }
  .filtro select { padding: 8px 8px; }
  .filtro-intervallo { gap: 6px; }
  .filtri-azioni { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .btn-filtri { flex: 0 0 auto; }
  .azzera-filtri { text-align: right; }
}
/* --- Condivisione della card: una icona + menù (foglio su mobile, popup su desktop) --- */
.auto-card .auto-share {
  display: flex;
  gap: 12px;
}

.auto-card .share-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #25d366;  /* verde WhatsApp: lo stesso del link "Scrivici su WhatsApp" */
  padding: 0;
  line-height: 1;
}

.auto-card .share-btn:hover,
.auto-card .share-btn:focus-visible {
  color: #1da851;
}

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001; /* sopra il banner cookie (9999) e la lightbox (10000) */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.share-overlay[hidden] {
  display: none;
}

.share-panel {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 16px 16px 0 0;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.2);
  animation: share-entra 0.2s ease-out;
}

@keyframes share-entra {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.share-panel-titolo {
  padding: 10px 18px 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
}

.share-voce {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  color: #333;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.share-voce:hover,
.share-voce:focus-visible {
  background: #f5f5f5;
}

.share-voce i {
  width: 24px;
  font-size: 1.25rem;
  text-align: center;
}

.share-voce.whatsapp i { color: #25d366; }
.share-voce.email i { color: #6b7280; }
.share-voce.copia i { color: #6b7280; }
.share-voce.nativo i { color: var(--primary-color); }
.share-voce.fatto i { color: #28a745; }

.share-annulla {
  display: block;
  width: calc(100% - 24px);
  margin: 6px 12px 0;
  padding: 12px;
  background: #f1f1f1;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
}

/* Da 769 px in su il menù diventa un popup centrato, non un foglio dal basso */
@media (min-width: 769px) {
  .share-overlay {
    align-items: center;
  }

  .share-panel {
    border-radius: 14px;
    padding: 8px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: none;
  }

  .share-annulla {
    margin-bottom: 8px;
  }
}
.share-voce.non-riuscito i {
  color: #dc3545;
}
