/* ============================================
   AutoSalloni AutoZone — Design System
   Mobile-first CSS | System fonts | < 20KB
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-primary: #000000;
  --color-accent: #25D366;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F5F5;
  --color-text: #222222;
  --color-text-light: #666666;
  --color-border: #E0E0E0;
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --radius: 8px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* --- Article Typography --- */
article > .container > h1 { margin-bottom: 1.5rem; }
article > .container > h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
article > .container > h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
article > .container > p { margin-bottom: 1rem; line-height: 1.7; }
article > .container > ul,
article > .container > ol { margin-bottom: 1rem; padding-left: 1.5rem; list-style: revert; line-height: 1.7; }

article > .container > table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
article > .container > table th,
article > .container > table td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  text-align: left;
}
article > .container > table thead th {
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 600;
}
article > .container > table tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

main {
  flex: 1;
}

section {
  padding: 2rem 0;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 0.75rem 0;
}

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

.site-header a {
  color: #FFFFFF;
  text-decoration: none;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 36px;
  width: auto;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #FFFFFF;
  transition: var(--transition);
}

.nav-links {
  display: none;
}

/* --- Mobile Nav Overlay --- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay nav {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--color-bg);
  padding: 5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nav-overlay.active nav {
  transform: translateX(0);
}

.nav-overlay nav a {
  display: block;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.nav-overlay nav a:hover {
  color: var(--color-accent);
}

.nav-overlay nav .btn-whatsapp {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #FFFFFF;
  border-radius: var(--radius);
  border-bottom: none;
  font-weight: 600;
  text-align: center;
}

.nav-overlay nav .btn-whatsapp:hover {
  opacity: 0.9;
  color: #FFFFFF;
}

/* --- Hero --- */
.hero {
  background-color: var(--color-primary);
  color: #FFFFFF;
  padding: 14rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero > picture {
  position: absolute;
  inset: 0;
}

.hero > picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: #FFFFFF;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

/* --- Featured Spotlight / Carousel --- */
/* Featured spotlight — reserved for future use */

/* --- Buttons --- */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.btn-whatsapp:hover {
  background: #1EBE5A;
  text-decoration: none;
  color: #FFFFFF;
}

.btn-whatsapp svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- Vehicle Card --- */
.vehicle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.vehicle-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.vehicle-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vehicle-card picture,
.vehicle-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.vehicle-card-body {
  padding: 1rem;
}

.vehicle-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.vehicle-card-body .vehicle-year {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.vehicle-card-body .vehicle-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.vehicle-card-body .vehicle-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.vehicle-card-body .vehicle-mileage {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.vehicle-card-body .btn-whatsapp {
  width: 100%;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

/* --- Article Card --- */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.article-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow var(--transition);
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: var(--color-primary);
}

.article-card h3 a:hover {
  color: var(--color-accent);
}

.article-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.breadcrumb li::after {
  content: '\203A';
  margin-left: 0.25rem;
  color: var(--color-text-light);
}

.breadcrumb li:last-child::after {
  content: '';
}

.breadcrumb a {
  color: var(--color-text-light);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

/* --- Trust Badges --- */
.trust-badges {
  background: var(--color-bg-alt);
  padding: 2rem 0;
}

.trust-badges-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  text-align: center;
}

.trust-badge {
  padding: 1rem;
}

.trust-badge .badge-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.trust-badge h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.trust-badge p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* --- Testimonials --- */
.testimonials {
  background: var(--color-bg-alt);
  padding: 3rem 0;
}

.testimonials h2 {
  text-align: center;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition);
}

.testimonial-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-light);
}

/* --- Floating WhatsApp Button --- */
.floating-wa {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 56px;
  height: 56px;
  background: var(--color-accent);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  animation: wa-pulse 1.5s ease-in-out 3s 3;
}

.floating-wa:hover {
  transform: scale(1.1);
  text-decoration: none;
  color: #FFFFFF;
}

.floating-wa svg {
  width: 28px;
  height: 28px;
  fill: #FFFFFF;
}

@keyframes wa-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 24px rgba(37, 211, 102, 0.8);
  }
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
}

.empty-state h2 {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-col p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Utility --- */
.text-center {
  text-align: center;
}

.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- Contact Page --- */
.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.contact-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: var(--color-accent);
}

.map-container {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.5rem;
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: 0;
}

/* --- Category Headers (Blog) --- */
.category-section {
  margin-bottom: 2rem;
}

.category-section h2 {
  margin-bottom: 0.25rem;
}

.category-section .category-desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

/* --- Vehicle Gallery --- */
.vehicle-gallery {
  padding: 1rem 0;
}

.gallery-main {
  max-height: 500px;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.gallery-main img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.gallery-thumb {
  width: 80px;
  height: 60px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  object-fit: cover;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity var(--transition), border-color var(--transition);
}

.gallery-thumb.active {
  border-color: var(--color-accent);
  opacity: 1;
}

.gallery-thumb:hover {
  opacity: 1;
}

/* --- Vehicle Detail Grid --- */
.vehicle-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.vehicle-specs {
  order: 1;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.specs-table th {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-weight: 500;
  width: 40%;
}

.specs-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
}

.vehicle-description {
  order: 2;
}

.vehicle-description h2 {
  margin-bottom: 0.75rem;
}

.vehicle-description p {
  line-height: 1.7;
  color: var(--color-text);
}

/* --- Detail Button (Vehicle Cards) --- */
.btn-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  width: 100%;
  margin-bottom: 0.5rem;
}

.btn-detail:hover {
  background: #333333;
  text-decoration: none;
  color: #FFFFFF;
}

/* ============================================
   Tablet Breakpoint (768px+)
   ============================================ */
@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }

  .hamburger {
    display: none;
  }

  .nav-overlay {
    display: none;
  }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    gap: 0;
    background: transparent;
  }

  .nav-links a {
    padding: 0.5rem 0.75rem;
    border-bottom: none;
  }

  .hero {
    padding: 14rem 0 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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

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

  .trust-badges-list {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

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

  .map-container iframe {
    height: 400px;
  }

  .vehicle-detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .gallery-main {
    max-height: 600px;
  }

  .gallery-main img {
    max-height: 600px;
  }

  .gallery-thumb {
    width: 100px;
    height: 75px;
  }
}

/* ============================================
   Desktop Breakpoint (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .vehicle-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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