/* ==========================================================================
   CAR DEALER - Premium Automotive Dealership & Supercar Showroom
   Template 285 - Complete Stylesheet (Matching cover.jpg)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --color-dark-bg: #0f1115;
  --color-dark-card: #181c23;
  --color-dark-elevated: #212630;
  --color-dark-border: #2c3340;
  --color-navbar: #12151b;
  
  --color-red: #e52b2b;
  --color-red-hover: #c91f1f;
  --color-red-glow: rgba(229, 43, 43, 0.35);
  
  --color-cyan: #00d2ff;
  --color-blue: #3a7bd5;

  --color-white: #ffffff;
  --color-text-main: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  --color-border-subtle: #2d3748;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --max-w: 1380px;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-dark-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-white);
  line-height: 1.25;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 34px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 4px;
  text-align: center;
}

.btn-red {
  background: var(--color-red);
  color: #ffffff;
  border: 1px solid var(--color-red);
  box-shadow: 0 6px 20px var(--color-red-glow);
}
.btn-red:hover {
  background: var(--color-red-hover);
  border-color: var(--color-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(229, 43, 43, 0.55);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn-outline:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-white {
  background: #ffffff;
  color: var(--color-red);
  border: 1px solid #ffffff;
}
.btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-sm {
  padding: 9px 20px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   TOP BAR (Dark Automotive Bar)
   ========================================================================== */
.topbar {
  background-color: #0b0d10;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 9px 0;
  border-bottom: 1px solid #1a1e26;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar-info,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-divider {
  color: #334155;
}

.topbar-phone:hover {
  color: #ffffff;
}

.topbar-wa {
  color: #25d366;
  font-weight: 600;
}
.topbar-wa:hover {
  color: #4ade80;
}

/* ==========================================================================
   NAVBAR (Dark Theme matching cover.jpg)
   ========================================================================== */
.navbar {
  background: var(--color-navbar);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #222733;
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}
.brand-logo:hover .brand-logo-img {
  transform: scale(1.03);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu li a {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #cbd5e1;
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-red);
  transition: width 0.25s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: #ffffff;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
  width: 100%;
}

/* Right Nav Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-icon-link {
  color: #cbd5e1;
  font-size: 1.15rem;
  padding: 6px;
  transition: var(--transition);
}
.nav-icon-link:hover {
  color: #ffffff;
}

.nav-cart-btn {
  position: relative;
  color: var(--color-red);
  font-size: 1.25rem;
  padding: 6px;
  transition: var(--transition);
}
.nav-cart-btn:hover {
  color: #ff5252;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--color-red);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
}

/* ==========================================================================
   HERO SECTION (Matching cover.jpg with hero-cardealer.jpg)
   ========================================================================== */
.hero-cardealer {
  position: relative;
  width: 100%;
  min-height: 680px;
  background-color: #0b0d10;
  background-image: url('images/hero-cardealer.jpg');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1e2430;
  overflow: hidden;
}

.hero-cardealer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 13, 16, 0.1) 0%, rgba(11, 13, 16, 0.4) 42%, rgba(11, 13, 16, 0.88) 72%, rgba(11, 13, 16, 0.97) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 90px 0;
}

.hero-text-box {
  margin-left: auto;
  max-width: 580px;
  padding: 20px 0;
}

.hero-main-title {
  font-size: 3.4rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 22px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: 1.08rem;
  color: #cbd5e1;
  line-height: 1.75;
  margin-bottom: 34px;
}

/* ==========================================================================
   SEARCH BAR FILTER WIDGET
   ========================================================================== */
.search-widget-wrap {
  position: relative;
  z-index: 10;
  margin-top: -38px;
  margin-bottom: 40px;
}

.search-widget-card {
  background: #181d26;
  border: 1px solid var(--color-dark-border);
  box-shadow: var(--shadow-lg);
  padding: 26px 32px;
  border-radius: 6px;
}

.search-grid-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.2fr;
  gap: 20px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-control {
  width: 100%;
  background: #0f131a;
  border: 1px solid #2d3544;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 0.92rem;
  transition: var(--transition);
}
.filter-control:focus {
  border-color: var(--color-red);
}

/* ==========================================================================
   SECTION 1: "LOREM IPSUM / ABOUT US" (Matching cover.jpg)
   ========================================================================== */
.section-about-cover {
  padding: 110px 0 120px;
  background-color: #1e222b;
  text-align: center;
  border-bottom: 1px solid #292f3c;
}

.about-cover-content {
  max-width: 880px;
  margin: 0 auto;
}

.about-pretitle {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.about-maintitle {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 30px;
}

.about-paragraph {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #cbd5e1;
  margin-bottom: 40px;
}

/* ==========================================================================
   SECTION 2: ALLOY WHEEL & SOLID RED PROMO BLOCK (Matching cover.jpg)
   ========================================================================== */
.section-split-banner {
  padding: 0;
  background-color: #0b0d10;
  overflow: hidden;
}

.split-grid-cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

.split-image-box {
  position: relative;
  background-color: #000000;
  overflow: hidden;
}

.split-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.split-image-box:hover img {
  transform: scale(1.03);
}

.split-red-block {
  background: var(--color-red);
  color: #ffffff;
  padding: 70px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-red-tag {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.split-red-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 22px;
}

.split-red-desc {
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 34px;
}

/* ==========================================================================
   SECTION: PARCO AUTO / VEICOLI IN EVIDENZA
   ========================================================================== */
.section-vehicles {
  padding: 100px 0;
  background-color: #12161d;
  border-bottom: 1px solid #1f2532;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.section-tag {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-red);
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.02rem;
  color: #94a3b8;
  line-height: 1.7;
}

/* Filter Tabs */
.brand-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.brand-tab-btn {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 10px 24px;
  background: #181d26;
  color: #94a3b8;
  border: 1px solid #28303f;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.brand-tab-btn:hover,
.brand-tab-btn.active {
  background: var(--color-red);
  color: #ffffff;
  border-color: var(--color-red);
  box-shadow: 0 4px 14px var(--color-red-glow);
}

/* Vehicles Grid */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.vehicle-card {
  background: #181c24;
  border: 1px solid #262e3d;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.vehicle-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-red);
  box-shadow: var(--shadow-md);
}

.vehicle-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: #0b0d10;
  display: block;
}

.vehicle-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.vehicle-card:hover .vehicle-thumb-box img {
  transform: scale(1.05);
}

.vehicle-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--color-red);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 3px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.vehicle-condition-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
}

.vehicle-body {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.vehicle-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 12px;
  min-height: 48px;
}
.vehicle-title a:hover {
  color: var(--color-red);
}

.vehicle-specs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid #232b38;
  border-bottom: 1px solid #232b38;
  margin-bottom: 18px;
  font-size: 0.82rem;
  color: #94a3b8;
}

.vehicle-spec-item {
  display: flex;
  align-items: center;
  gap: 7px;
}
.vehicle-spec-item i {
  color: var(--color-red);
  font-size: 0.85rem;
}

.vehicle-pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  margin-bottom: 18px;
}

.vehicle-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.vehicle-monthly {
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 600;
}

.vehicle-actions-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

/* ==========================================================================
   SECTION: COCKPIT DRIVING EXPERIENCE (dealership2.jpg)
   ========================================================================== */
.section-experience {
  padding: 100px 0;
  background-color: #0b0e13;
  border-bottom: 1px solid #1b212c;
}

.experience-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}

.experience-img-box {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid #222938;
}

.experience-img-box img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}

.experience-text-box {
  padding-left: 10px;
}

.experience-heading {
  font-size: 2.8rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.2;
}

.experience-desc {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #94a3b8;
  margin-bottom: 34px;
}

/* ==========================================================================
   SECTION: SERVICES GRID
   ========================================================================== */
.section-services {
  padding: 90px 0;
  background-color: #151922;
  border-bottom: 1px solid #232a36;
}

.services-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.service-card {
  background: #1c222e;
  border: 1px solid #293244;
  padding: 36px 28px;
  border-radius: 6px;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-red);
  box-shadow: var(--shadow-md);
}

.service-icon-box {
  width: 58px;
  height: 58px;
  background: rgba(229, 43, 43, 0.12);
  border: 1px solid rgba(229, 43, 43, 0.3);
  color: var(--color-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 6px;
  margin-bottom: 22px;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

.service-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.7;
}

/* ==========================================================================
   SECTION: STATS COUNTERS
   ========================================================================== */
.section-stats {
  padding: 70px 0;
  background-color: #0d1015;
  border-bottom: 1px solid #1c222e;
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item {
  padding: 20px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--color-red);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 4px 14px var(--color-red-glow);
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

/* ==========================================================================
   FOOTER (Dark Automotive Styling)
   ========================================================================== */
.footer {
  background-color: #0b0d11;
  color: #94a3b8;
  padding: 80px 0 30px;
  border-top: 1px solid #1e2430;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: #828fa3;
  margin-bottom: 22px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-socials a {
  width: 38px;
  height: 38px;
  background: #181d26;
  border: 1px solid #283242;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-socials a:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #ffffff;
}

.footer-col h4 {
  font-size: 0.96rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffffff;
  margin-bottom: 22px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background-color: var(--color-red);
}

.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-contact-list p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid #1a202a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-badges {
  display: flex;
  gap: 20px;
  font-size: 0.82rem;
  color: #94a3b8;
}
.footer-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-badges i {
  color: var(--color-red);
}

/* ==========================================================================
   INTERNAL PAGES SHARED STYLES (parco-auto, auto, valuta-permuta, etc.)
   ========================================================================== */

/* Page Hero */
.page-hero {
  padding: 60px 0 50px;
  background-color: #12161e;
  border-bottom: 1px solid #1f2532;
  text-align: center;
}

.page-hero-title {
  font-size: 3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  color: #ffffff;
}

.page-hero-lead {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-bottom: 16px;
}
.breadcrumbs a {
  color: #94a3b8;
}
.breadcrumbs a:hover {
  color: #ffffff;
}
.breadcrumbs span {
  color: var(--color-red);
}

/* Single Vehicle Detail Page (auto.php) */
.car-detail-section {
  padding: 60px 0 90px;
}

.car-detail-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 50px;
  align-items: start;
}

.car-gallery-main {
  background: #0f131a;
  border: 1px solid #232b38;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}
.car-gallery-main img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.car-thumbs-row {
  display: flex;
  gap: 12px;
}
.car-thumb-item {
  width: 100px;
  height: 70px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.car-thumb-item.active,
.car-thumb-item:hover {
  border-color: var(--color-red);
}
.car-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-spec-panel {
  background: #171b24;
  border: 1px solid #262e3d;
  border-radius: 6px;
  padding: 34px;
}

.car-spec-badge {
  display: inline-block;
  background: var(--color-red);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
}

.car-spec-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.2;
}

.car-spec-pricing {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #252d3c;
}

.car-spec-price {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
}

.car-spec-monthly {
  color: #38bdf8;
  font-weight: 700;
  font-size: 1rem;
}

.car-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.car-tech-box {
  background: #10131a;
  border: 1px solid #222938;
  padding: 12px 14px;
  border-radius: 4px;
}
.car-tech-box .label {
  font-size: 0.76rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}
.car-tech-box .value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

/* Forms (Valuta Usato & Finanziamenti) */
.form-card {
  background: #181d26;
  border: 1px solid #27303f;
  border-radius: 6px;
  padding: 40px;
  box-shadow: var(--shadow-md);
}

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

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  background: #0f131a;
  border: 1.5px solid #2a3342;
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--color-red);
  outline: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
  .vehicles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-grid-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 992px) {
  .topbar-info {
    display: none;
  }
  .main-nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }

  .hero-cardealer {
    background-position: 25% center;
    min-height: 560px;
  }
  .hero-cardealer::before {
    background: linear-gradient(90deg, rgba(11, 13, 16, 0.45) 0%, rgba(11, 13, 16, 0.85) 60%, rgba(11, 13, 16, 0.96) 100%);
  }
  .hero-text-box {
    margin-left: 0;
    max-width: 100%;
  }
  .hero-main-title {
    font-size: 2.6rem;
  }

  .split-grid-cover,
  .experience-grid,
  .car-detail-grid {
    grid-template-columns: 1fr;
  }

  .split-red-block {
    padding: 50px 30px;
  }

  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 640px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }
  .search-grid-form {
    grid-template-columns: 1fr;
  }
  .search-widget-wrap {
    margin-top: 20px;
  }
  .about-pretitle {
    font-size: 2rem;
  }
  .about-maintitle {
    font-size: 2.4rem;
  }
  .vehicles-grid {
    grid-template-columns: 1fr;
  }
  .services-grid-4 {
    grid-template-columns: 1fr;
  }
  .stats-grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}


/* Responsive Layout Grid Utilities (Auto-migrated from inline styles) */
.grid-2col-responsive {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.grid-split-responsive {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
.grid-split-rev-responsive {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}
.grid-3col-responsive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.grid-4col-responsive {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .grid-4col-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3col-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-split-responsive,
  .grid-split-rev-responsive {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .grid-2col-responsive,
  .grid-3col-responsive,
  .grid-4col-responsive,
  .grid-split-responsive,
  .grid-split-rev-responsive {
    grid-template-columns: 1fr !important;
  }
}


/* Comprehensive Mobile Polish (360px - 768px) */
@media (max-width: 768px) {
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  /* Ensure tap targets are comfortable */
  button, .btn, .nav-link, a.btn {
    min-height: 42px;
  }
  
  /* Prevent font clipping on smaller devices */
  h1, .hero-title, .page-hero-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem) !important;
    line-height: 1.25 !important;
  }
  h2, .section-title, .shelf-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem) !important;
    line-height: 1.3 !important;
  }
  
  /* Tables wrapper for smooth touch scrolling */
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  /* Single column cards for small phones */
  .grid-2col-responsive,
  .grid-3col-responsive,
  .grid-4col-responsive,
  .grid-split-responsive,
  .grid-split-rev-responsive {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Full width forms and buttons */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    width: 100% !important;
    box-sizing: border-box;
  }
}
