@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --primary-color: #ffffff;      
  --secondary-color: #f8fafc;    
  --accent-color: #1e293b;       
  --accent-hover: #0f172a;       
  --ag-blue: #0B192C;            
  --brand-red: #E51A1A;
  --brand-red-hover: #C81414;
  --text-color: #334155;         
  --text-muted: #64748b;
  --white: #ffffff;
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --glass-bg: #0B192C;
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--primary-color);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.hero-content h1,
.car-info h3,
.modal-info h2,
.info-card h3 {
  font-family: var(--font-heading);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   MOBILE-FIRST DEFAULT STYLES 
   ========================================= */

/* Header & Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--glass-border);
}

header.scrolled {
  padding: 10px 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.logo img {
  height: 24px;
}

.menu-toggle {
  display: block;
  font-size: 24px;
  color: var(--white);
  cursor: pointer;
  background: none;
  border: none;
}

.nav-links {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 20px;
  box-shadow: 0 10px 10px rgba(0,0,0,0.1);
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path 0.3s ease-in-out;
  border-bottom: 1px solid var(--glass-border);
}

.nav-links.active {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.header-btn {
  display: none; 
}

/* Buttons */
.btn-primary {
  padding: 12px 28px;
  background-color: transparent;
  color: var(--ag-blue);
  border: 1.5px solid var(--ag-blue);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--ag-blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-solid {
  background-color: var(--brand-red);
  color: var(--white);
  border: none;
}
.btn-solid:hover {
  background-color: var(--brand-red-hover);
  color: var(--white);
  box-shadow: 0 6px 15px rgba(229, 26, 26, 0.35);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border: 1.5px solid var(--white);
}
.btn-outline-white:hover {
  background-color: var(--white);
  color: var(--ag-blue);
}

/* Hero Advanced */
.hero-advanced {
  position: relative;
  width: 100%;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 60px;
}

.hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.1) 100%);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  color: var(--white);
}

.hero-content h1 {
  font-size: 1.85rem;
  font-weight: 300;
  margin-bottom: 18px;
  line-height: 1.25;
  max-width: 600px;
}

.hero-content h1 span {
  font-weight: 600;
  color: var(--white);
}

.hero-content p {
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* Categories Section */
.categories-section {
  padding: -40px 20px 40px;
  margin-top: -60px;
  position: relative;
  z-index: 5;
}

.category-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.cat-card {
  background: var(--white);
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  flex: 1;
  min-width: 200px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--ag-blue), var(--accent-color));
  transition: var(--transition);
}

.cat-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.cat-card:hover::before {
  height: 100%;
  opacity: 0.05;
}

.cat-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.cat-card h3 {
  font-size: 1.3rem;
  color: var(--ag-blue);
  margin-bottom: 5px;
}

.cat-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Stock Filters */
.stock-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1.5px solid #e2e8f0;
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.filter-btn.active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: var(--white);
}

/* Sections General */
section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 1.85rem;
  color: var(--ag-blue);
  margin-bottom: 40px;
  position: relative;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--font-heading);
}

/* Stock Grid & Cards */
.stock-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.car-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.car-img-container {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.car-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
  letter-spacing: 0.3px;
}

.car-badge-0km {
  background: #dbeafe;
  color: #1e40af;
}

.car-badge-usado {
  background: #f1f5f9;
  color: #475569;
}

.car-badge-oportunidad {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.car-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.car-info {
  padding: 18px 20px 0;
}

.car-info h3 {
  color: var(--ag-blue);
  margin-bottom: 6px;
  font-size: 1.1rem;
  font-weight: 400;
}

.car-info h3 strong {
  font-weight: 700;
}

.car-info p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: var(--text-muted);
  font-weight: 400;
}

.card-action-link {
  display: block;
  padding: 14px 20px;
  margin-top: 14px;
  border-top: 1px solid #f1f5f9;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-action-link:hover {
  color: var(--brand-red);
}

/* Vehicle Details Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background: var(--white);
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(50px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  color: var(--white);
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--accent-color);
}

/* Modal Carousel */
.modal-carousel {
  width: 100%;
  height: 300px;
  position: relative;
  background: #000;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.carousel-img.active {
  display: block;
  animation: fadeIn 0.5s;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--ag-blue);
  z-index: 5;
  transition: background 0.3s ease;
}
.carousel-btn:hover {
  background: var(--white);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.modal-info {
  padding: 30px;
}

.modal-info h2 {
  color: var(--ag-blue);
  font-size: 2rem;
  margin-bottom: 10px;
}

.modal-info .modal-specs {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-weight: 600;
}
.modal-info .modal-desc {
  line-height: 1.6;
  margin-bottom: 25px;
  color: var(--text-color);
}
.modal-info .btn-primary {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
}

/* =============================================
   INFO SECTION (Financiación + Vendé/Consigná)
   ============================================= */
.info-section {
  background: var(--secondary-color);
  padding: 60px 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.info-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.info-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.info-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--brand-red);
}

.info-card h3 {
  color: var(--ag-blue);
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 800;
}

.info-subtitle {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 15px;
}

.info-card p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

.process-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 20px 0;
}

.process-steps li {
  counter-increment: step;
  padding: 12px 0 12px 50px;
  position: relative;
  color: var(--text-color);
  border-bottom: 1px solid var(--secondary-color);
}

.process-steps li:last-child {
  border-bottom: none;
}

.process-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, var(--ag-blue), var(--accent-color));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

/* =============================================
   ENTREGAS SECTION
   ============================================= */
.entregas-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.entregas-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 30px;
}

.entregas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.entrega-placeholder {
  background: var(--secondary-color);
  border-radius: 20px;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--text-muted);
  border: 2px dashed rgba(0,0,0,0.1);
  min-height: 250px;
}

.entrega-placeholder svg {
  opacity: 0.4;
}

/* =============================================
   MAP SECTION
   ============================================= */
.map-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.map-container {
  display: flex;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  flex-wrap: wrap;
}

.map-info {
  flex: 1;
  min-width: 300px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.map-info h3 {
  color: var(--ag-blue);
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.map-info p {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.map-iframe {
  flex: 1;
  min-width: 300px;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-section {
  background: var(--secondary-color);
  padding: 60px 20px;
  text-align: center;
}

.contact-subtitle {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1.05rem;
}

.contact-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  color: var(--white);
  background: var(--brand-red);
  box-shadow: 0 5px 15px rgba(229, 26, 26, 0.3);
}

.contact-btn:hover {
  transform: translateY(-3px);
  background: var(--brand-red-hover);
  box-shadow: 0 10px 25px rgba(229, 26, 26, 0.4);
}

.contact-whatsapp,
.contact-instagram,
.contact-tiktok {
  background: var(--brand-red);
  box-shadow: 0 5px 15px rgba(229, 26, 26, 0.3);
}
.contact-whatsapp:hover,
.contact-instagram:hover,
.contact-tiktok:hover {
  background: var(--brand-red-hover);
  box-shadow: 0 10px 25px rgba(229, 26, 26, 0.4);
}

/* =============================================
   STOCK FILTERS ADVANCED
   ============================================= */
.stock-filters-advanced {
  max-width: 700px;
  margin: 0 auto 30px;
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 140px;
}

.filter-group select {
  width: 100%;
  padding: 10px 15px;
  border-radius: 12px;
  border: 2px solid var(--glass-border);
  background: var(--white);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.filter-group select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(229, 26, 26, 0.15);
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 20px;
  background-color: var(--secondary-color);
  border-top: 1px solid rgba(0,0,0,0.05);
}
footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================
   DESKTOP STYLES (min-width: 768px)
   ========================================= */
@media (min-width: 768px) {
  
  header {
    padding: 15px 50px;
  }
  
  header.scrolled {
    padding: 10px 50px;
  }

  .logo img {
    height: 38px;
  }
  
  .hero-content h1 {
    font-size: 2.8rem;
    line-height: 1.2;
  }
  
  .menu-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    flex-direction: row;
    background: transparent;
    padding: 0;
    box-shadow: none;
    clip-path: none;
    width: auto;
    gap: 30px;
  }
  
  .nav-links a {
    font-size: 15px;
  }
  
  .header-btn {
    display: inline-block;
  }
  
  .btn-primary {
    font-size: 15px;
    padding: 10px 25px;
  }

  .hero {
    height: 100vh;
  }

  .hero-overlay {
    background: linear-gradient(to right, rgba(255,255,255,0.9) 10%, rgba(255,255,255,0.4) 60%, rgba(255,255,255,0.1));
  }

  .hero-content {
    text-align: left;
    padding: 0 50px;
  }

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

  .hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 0 40px 0;
  }

  .hero .btn-primary {
    width: auto;
    margin-right: 15px;
  }

  section {
    padding: 100px 50px;
  }
  .section-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 60px;
  }
  
  .stock-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
  }
  .car-info h3 {
    font-size: 1.15rem;
    font-weight: 400;
  }
  .car-info p {
    font-size: 0.9rem;
  }
  
  .modal-carousel {
    height: 450px;
  }
  .modal-info {
    padding: 40px;
  }
  .modal-info h2 {
    font-size: 2.5rem;
  }

  /* Info Section - 2 columnas en desktop */
  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .info-card {
    padding: 50px 40px;
  }
}

