/* ==========================================================
   Autos Bernada — sistema de diseño
   Tipografía: Archivo (titulares) + Inter (cuerpo)
   Paleta: azul acero / marfil / óxido
   ========================================================== */

:root{
  --ink:        #101820;
  --navy:       #1F3B57;
  --navy-dark:  #142B40;
  --ford-blue:      #003478;
  --ford-blue-dark: #00265A;
  --paper:      #F6F5F2;
  --paper-dim:  #ECEAE4;
  --white:      #FFFFFF;
  --grey:       #5B6470;
  --rust:       #B54B2C;
  --rust-dark:  #963B21;
  --line:       #DAD7CF;

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }
section[id], #taller, #top{ scroll-margin-top: var(--header-height, 80px); }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

h1, h2, h3{
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1{ font-size: clamp(2.25rem, 4.2vw, 3.4rem); font-weight: 800; }
h2{ font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; }
h3{ font-size: 1.15rem; font-weight: 700; }

p{ margin: 0 0 1em; color: var(--grey); max-width: 62ch; }

a{ color: inherit; }

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

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible{
  outline: 2px solid var(--ford-blue);
  outline-offset: 3px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary{
  background: var(--ford-blue);
  color: var(--white);
}
.btn-primary:hover{ background: var(--ford-blue-dark); }

.btn-outline{
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover{ background: var(--navy); color: var(--white); }

.btn-on-dark{
  border-color: rgba(255,255,255,.55);
  color: var(--white);
}
.btn-on-dark:hover{ background: var(--white); color: var(--navy-dark); border-color: var(--white); }

.btn-ghost{
  color: var(--navy);
  font-weight: 700;
  padding: 8px 4px;
  border: none;
}

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark{
  width: 14px;
  height: 26px;
  background: var(--rust);
  border-radius: 1px;
  flex: none;
}
.brand-name{
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.main-nav{
  display: flex;
  gap: 26px;
}
.main-nav a{
  position: relative;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 0;
}
.main-nav a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--ford-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after{ transform: scaleX(1); }
.nav-dropdown-menu a::after{ content: none; }

.nav-dropdown{ position: relative; }
.nav-dropdown-toggle{ display: flex; align-items: center; gap: 4px; }
.nav-dropdown-arrow{ font-size: 0.7em; color: var(--grey); transition: transform .15s ease; }
.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown:focus-within .nav-dropdown-arrow{ transform: rotate(180deg); }
.nav-dropdown-menu{
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  min-width: 150px;
  box-shadow: 0 10px 24px rgba(16,24,32,.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a{
  display: block;
  padding: 8px 12px !important;
  border-bottom: none !important;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover{ background: var(--paper); border-color: transparent; }

.header-phone{ white-space: nowrap; }

.lang-switcher{ flex: none; }
.lang-select{
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 12px;
  cursor: pointer;
}

.whatsapp-float{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 500;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(16,24,32,.25);
  transition: transform .15s ease;
}
.whatsapp-float:hover{ transform: scale(1.06); }
.whatsapp-float svg{ width: 30px; height: 30px; }

.chatbot-float{
  position: fixed;
  right: 20px;
  bottom: 86px;
  z-index: 501;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(16,24,32,.25);
  cursor: pointer;
  transition: transform .15s ease;
}
.chatbot-float:hover{ transform: scale(1.06); }
.chatbot-float svg{ width: 26px; height: 26px; }

.chatbot-panel{
  position: fixed;
  right: 20px;
  bottom: 150px;
  z-index: 502;
  width: min(360px, calc(100vw - 40px));
  height: min(480px, 70vh);
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(16,24,32,.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chatbot-panel.is-open{ display: flex; }

.chatbot-header{
  background: var(--navy);
  color: var(--white);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.94rem;
}
.chatbot-close{
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.chatbot-cita-btn{
  display: block;
  text-align: center;
  background: var(--ford-blue);
  color: var(--white);
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  padding: 9px 12px;
}
.chatbot-cita-btn:hover{ background: var(--ford-blue-dark); }

.chatbot-messages{
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
}

.chatbot-msg{
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.chatbot-msg-assistant{
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}
.chatbot-msg-user{
  align-self: flex-end;
  background: var(--navy);
  color: var(--white);
}

.chatbot-config-btn{
  align-self: flex-start;
  display: inline-block;
  background: var(--white);
  border: 1.5px solid var(--ford-blue);
  color: var(--ford-blue);
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}
.chatbot-config-btn:hover{ background: var(--ford-blue); color: var(--white); }

.chatbot-nav-btn{
  align-self: flex-start;
  display: inline-block;
  background: var(--white);
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}
.chatbot-nav-btn:hover{ background: var(--navy); color: var(--white); }

/* ---------- Galería ---------- */
.galeria-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.galeria-thumb{
  border: none;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  background: var(--paper);
}
.galeria-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
}
.galeria-thumb:hover img{ transform: scale(1.05); }

.galeria-lightbox{
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(16,20,24,.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.galeria-lightbox.is-open{ display: flex; }

/* ---------- Zoom de fotos en fichas de producto ---------- */
.product-zoom-overlay{
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(16,20,24,.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.product-zoom-overlay.is-open{ display: flex; }
.product-zoom-overlay img{
  max-width: min(90vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  cursor: default;
}
.product-zoom-close{
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.product-zoom-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.product-zoom-arrow:hover{ background: rgba(255,255,255,.24); }
.product-zoom-prev{ left: 16px; }
.product-zoom-next{ right: 16px; }
@media (max-width: 640px){
  .product-zoom-overlay{ padding: 16px; }
  .product-zoom-arrow{ width: 38px; height: 38px; font-size: 1.5rem; }
}
.vd-gallery-main{ cursor: zoom-in; }

/* ---------- Fondos de sección personalizables ---------- */
.section-bg-image{
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: background-position;
}
.section-bg-image::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0, var(--section-overlay-opacity, 0.45));
  z-index: 0;
  pointer-events: none;
}
.section-bg-image > .wrap{ position: relative; z-index: 1; }
.section-bg-image .section-head h2, .section-bg-image .section-head p{ color: var(--white); }
.galeria-lightbox-figure{
  margin: 0;
  max-width: min(90vw, 1000px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.galeria-lightbox-figure img{
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
}
.galeria-lightbox-figure figcaption{
  color: var(--white);
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
}
.galeria-lightbox-close{
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.galeria-lightbox-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.galeria-lightbox-arrow:hover{ background: rgba(255,255,255,.24); }
.galeria-lightbox-prev{ left: 16px; }
.galeria-lightbox-next{ right: 16px; }
@media (max-width: 640px){
  .galeria-lightbox{ padding: 16px; }
  .galeria-lightbox-arrow{ width: 38px; height: 38px; font-size: 1.5rem; }
}

.chatbot-typing{ display: flex; gap: 4px; align-items: center; padding: 12px; }
.chatbot-typing span{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grey);
  animation: chatbot-bounce 1.1s infinite ease-in-out;
}
.chatbot-typing span:nth-child(2){ animation-delay: .15s; }
.chatbot-typing span:nth-child(3){ animation-delay: .3s; }
@keyframes chatbot-bounce{
  0%, 60%, 100%{ transform: translateY(0); opacity: .5; }
  30%{ transform: translateY(-4px); opacity: 1; }
}

.chatbot-input-row{
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.chatbot-input{
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper);
}
.chatbot-send-btn{
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}
.chatbot-send-btn:hover{ background: var(--navy-dark); }
.chatbot-send-btn:disabled{ opacity: .6; cursor: not-allowed; }

@media (max-width: 540px){
  .chatbot-panel{
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 140px;
    height: min(480px, 65vh);
  }
  .chatbot-float{ right: 16px; bottom: 82px; }
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span{
  display: block;
  height: 2px;
  background: var(--ink);
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
  background: var(--paper);
  transition: color .3s ease;
}
.hero-inner{ position: relative; z-index: 2; max-width: 760px; }

/* ---------- Carrusel de fondo (solo activo cuando hay imágenes) ---------- */
.hero-carousel{
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.is-active{ opacity: 1; }
.hero-slide-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  background: linear-gradient(180deg, rgba(16,24,32,.62) 0%, rgba(16,24,32,.72) 55%, rgba(16,24,32,.85) 100%);
}

.hero.has-carousel{
  min-height: 640px;
  display: flex;
  align-items: center;
  padding: 96px 0 84px;
}
.hero.has-carousel .hero-overlay{ display: block; }
.hero.has-carousel .hero-kicker{ color: #E8956F; }
.hero.has-carousel .hero-title{ color: var(--white); }
.hero.has-carousel .hero-lede{ color: rgba(255,255,255,.86); }
.hero.has-carousel .hero-road{ display: none; }

/* ---------- Controles del carrusel ---------- */
.hero-controls{
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.hero-arrow{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.12);
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hero-arrow:hover{ background: rgba(255,255,255,.28); }

.hero-dots{ display: flex; gap: 8px; }
.hero-dot{
  width: 8px;
  height: 8px;
  border-radius: 4px;
  border: none;
  background: rgba(255,255,255,.45);
  padding: 0;
  cursor: pointer;
  transition: width .2s ease, background-color .2s ease;
}
.hero-dot.is-active{ width: 22px; background: var(--white); }

.hero-kicker{
  font-weight: 600;
  color: var(--rust);
  margin-bottom: 14px;
  font-size: 0.98rem;
  transition: color .3s ease;
}
.hero-title{ margin-bottom: 20px; }
.hero-lede{ font-size: clamp(1rem, 1.6vw, 1.08rem); max-width: 56ch; }
.hero-actions{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.hero-actions .btn{ flex: 0 1 auto; }

.hero-road{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: var(--navy);
  z-index: 2;
}
.road-line{
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--paper) 0 28px,
    transparent 28px 56px
  );
  mix-blend-mode: normal;
}
.road-line::before{ content: none; }
.hero-road::after{
  content: "";
  position: absolute;
  top: 2px;
  left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--paper) 0 22px, transparent 22px 44px);
}

/* ---------- Stats ---------- */
.stats{
  background: var(--navy);
  padding: 40px 0;
}
.stats-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
}
.stat{
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 2px solid rgba(255,255,255,.25);
  padding-left: 16px;
  min-width: 0;
}
.stat-num{
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--white);
}
.stat-label{
  font-size: 0.86rem;
  color: rgba(255,255,255,.7);
  line-height: 1.35;
}

/* ---------- Services ---------- */
.services{ padding: 92px 0; }
.section-head{ max-width: 640px; margin-bottom: 44px; }
.section-head p{ font-size: 1.02rem; }

.service-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card{
  background: var(--paper);
  padding: 30px 26px;
  min-width: 0;
}
.service-card p{ font-size: 0.94rem; margin-bottom: 0; }
.service-card h3{ margin-bottom: 10px; }

.service-cta{
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Taller mecánico ---------- */
.taller{ padding: 92px 0; background: var(--paper); }

/* ---------- Limpieza y Detailing ---------- */
.limpieza{ padding: 92px 0; background: var(--paper-dim); }

.limpieza-tiers{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.limpieza-tier{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}
.limpieza-tier h3{
  font-size: 1.1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.limpieza-prices{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.limpieza-prices div{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--grey);
}
.limpieza-prices strong{
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--ford-blue);
}
.limpieza-includes{ font-size: 0.88rem; color: var(--grey); margin: 0; line-height: 1.55; }
.limpieza-includes strong{ color: var(--ink); }

.limpieza-extra{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.limpieza-upholstery, .limpieza-notes{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.limpieza-upholstery h4, .limpieza-notes h4{ font-size: 1rem; margin-bottom: 12px; }
.limpieza-upholstery-price{ font-size: 0.94rem; color: var(--grey); margin-bottom: 12px; }
.limpieza-upholstery-price strong{ font-family: var(--font-head); font-size: 1.15rem; color: var(--ford-blue); }
.limpieza-upholstery ul, .limpieza-notes ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink);
}
.limpieza-notes ul{ list-style: disc; padding-left: 18px; color: var(--grey); }
.limpieza-upholstery li.no{ color: var(--grey); }

.limpieza-classification{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}
.limpieza-classification h4{ font-size: 1rem; margin-bottom: 18px; }
.limpieza-classification-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}
.limpieza-classification-grid strong{ display: block; font-size: 0.92rem; margin-bottom: 4px; }
.limpieza-classification-grid p{ font-size: 0.86rem; color: var(--grey); margin: 2px 0; }
.limpieza-examples{ font-size: 0.82rem !important; }
.limpieza-vat-note{ font-size: 0.8rem; color: var(--grey); margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Citas ---------- */
.citas-section{
  padding: 92px 0;
  background: var(--paper-dim);
}

.cita-form{
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
}

.cita-form label{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.cita-form input,
.cita-form select,
.cita-form textarea{
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 400;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.cita-form textarea{ resize: vertical; }

.cita-form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cita-form-error{
  min-height: 1.2em;
  color: var(--danger, #B3261E);
  font-size: 0.88rem;
  margin: 0;
}
.cita-form-success{
  min-height: 1.2em;
  color: #1E6B32;
  font-size: 0.94rem;
  font-weight: 600;
  margin: 0;
}

.cita-form button[type="submit"]{
  align-self: flex-start;
}
.cita-form button[type="submit"]:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Ofertas (dark band) ---------- */
.ofertas{
  background: var(--navy-dark);
  padding: 72px 0;
}
.ofertas-text{ max-width: 620px; }
.ofertas h2{ color: var(--white); }
.ofertas p{ color: rgba(255,255,255,.78); font-size: 1.02rem; }

/* ---------- Nosotros ---------- */
.nosotros{ padding: 92px 0; }
.galeria{ padding: 92px 0; }
.nosotros-inner{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}
.nosotros-copy, .nosotros-facts{ min-width: 0; }
.nosotros-copy p{ font-size: 1rem; }
.nosotros-facts{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.fact{
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}
.fact span{
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--grey);
  margin-bottom: 4px;
}

/* ---------- Contacto ---------- */
.contacto{ padding: 92px 0 100px; background: var(--paper-dim); }
.contact-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}
.contact-card{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 26px;
}
.contact-card p{ margin: 0; font-size: 0.96rem; }
.contact-card a{ text-decoration: none; color: var(--navy); font-weight: 600; }
.contact-card a:hover{ color: var(--rust); }

.contact-map{
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.contact-map iframe{ display: block; width: 100%; }

/* ---------- Estados genéricos ---------- */
.loading-text{ font-size: 0.94rem; color: var(--grey); }
.empty-state{
  font-size: 0.94rem;
  color: var(--grey);
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
}
.no-photo{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: 0.84rem;
  background: var(--paper-dim);
}

/* ---------- Stock (listado real de vehículos) ---------- */
.stock{ padding: 92px 0; }
.stock-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  margin-top: 8px;
}
.stock-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stock-card:hover{ transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16,24,32,.1); }
.stock-card-link{ text-decoration: none; color: inherit; display: block; }
.stock-card-thumb{
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-dim);
}
.stock-card-thumb img{ width: 100%; height: 100%; object-fit: contain; display: block; }
.stock-card-badge{
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--rust);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 3px;
}
.stock-card-body{ padding: 16px 18px 20px; }
.stock-card-body h3{
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.stock-card-meta{ font-size: 0.86rem; margin-bottom: 8px; }
.stock-card-price{
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--rust);
  margin: 0;
}

/* ---------- Modal de ficha de vehículo ---------- */
.vehicle-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(16,24,32,.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}
.vehicle-modal-overlay[hidden]{ display: none; }
.vehicle-modal{
  position: relative;
  background: var(--white);
  border-radius: 8px;
  max-width: 980px;
  width: 100%;
  padding: 40px;
  margin: auto;
}
.vehicle-modal-close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}
.vehicle-modal-close:hover{ background: var(--paper-dim); }

/* ---------- Ficha de vehículo (compartida modal + página) ---------- */
.vehicle-detail{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}
.vd-gallery-main{
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper-dim);
}
.vd-gallery-main img{ width: 100%; height: 100%; object-fit: contain; display: block; }
.vd-gallery-empty{
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  position: relative;
  background: var(--paper-dim);
}
.vd-gallery-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(16,24,32,.55);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vd-gallery-prev{ left: 12px; }
.vd-gallery-next{ right: 12px; }
.vd-gallery-arrow:hover{ background: rgba(16,24,32,.8); }
.vd-gallery-thumbs{
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.vd-thumb{
  width: 64px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: none;
}
.vd-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-thumb.is-active{ border-color: var(--rust); }

.vd-kicker{ font-weight: 600; color: var(--rust); font-size: 0.9rem; margin-bottom: 6px; }
.vd-title{ font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 10px; }
.vd-price{
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 20px;
}
.vd-specs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.vd-spec{ display: flex; flex-direction: column; gap: 2px; }
.vd-spec span{ font-size: 0.76rem; color: var(--grey); text-transform: uppercase; letter-spacing: .03em; }
.vd-spec strong{ font-family: var(--font-head); font-size: 0.98rem; }

.vd-extras{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.vd-extra-tag{
  font-size: 0.82rem;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--ink);
}

.vd-description{ font-size: 0.96rem; margin-bottom: 24px; white-space: pre-line; line-height: 1.6; }
.vd-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Página independiente de ficha ---------- */
.vehicle-page{ padding: 48px 0 92px; }
.vd-back{
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.vd-back:hover{ color: var(--rust); }

/* ---------- Banner del vehículo destacado en el Hero ---------- */
.hero-vehicle-banner{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 12px 18px 12px 12px;
  max-width: 420px;
  text-decoration: none;
  color: var(--white);
  transition: background .15s ease;
}
.hero-vehicle-banner:hover{ background: rgba(255,255,255,.18); }
.hero-vehicle-banner img{
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  flex: none;
}
.hero-vehicle-info{ display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hero-vehicle-kicker{ font-size: 0.68rem; text-transform: uppercase; letter-spacing: .04em; color: #E8956F; font-weight: 700; }
.hero-vehicle-info strong{ font-family: var(--font-head); font-size: 0.94rem; }
.hero-vehicle-price{ font-size: 0.84rem; color: rgba(255,255,255,.8); }
.hero-vehicle-cta{ font-size: 0.78rem; font-weight: 700; white-space: nowrap; color: var(--white); }

/* ---------- Preloader ---------- */
.site-preloader{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ford-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .45s ease;
}
.site-preloader.is-hidden{ opacity: 0; pointer-events: none; }
.preloader-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.preloader-brand{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.preloader-brand-mark{
  width: 26px;
  height: 47px;
  background: var(--rust);
  border-radius: 2px;
  flex: none;
  display: inline-flex;
  overflow: hidden;
}
.preloader-brand-text{
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  color: var(--white);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.preloader-progress{
  width: 220px;
  height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-progress-fill{
  width: 0%;
  height: 100%;
  background: var(--white);
  transition: width .3s ease;
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--ink);
  color: rgba(255,255,255,.65);
  padding: 34px 0;
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner .brand-name{ color: var(--white); }
.footer-inner p{ color: rgba(255,255,255,.55); font-size: 0.86rem; margin: 4px 0 0; }
.footer-note{ font-size: 0.82rem; }

.footer-legal{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.footer-legal-nav{ display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal-nav a{
  color: rgba(255,255,255,.6);
  font-size: 0.82rem;
  text-decoration: none;
}
.footer-legal-nav a:hover{ color: var(--white); }
.footer-copyright{ font-size: 0.78rem; color: rgba(255,255,255,.5); margin: 0; }

.footer-social{
  display: flex;
  justify-content: center;
  gap: 14px;
  padding-top: 14px;
}
.footer-social-icon{
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,.65);
}
.footer-social-icon:hover{ color: var(--white); }
.footer-social-icon svg,
.footer-social-icon img{ width: 100%; height: 100%; }

/* ---------- Páginas legales ---------- */
.legal-page{ padding: 48px 0 92px; }
.legal-content{ max-width: 760px; }
.legal-content h1{ margin-bottom: 8px; }
.legal-content .legal-updated{ color: var(--grey); font-size: 0.88rem; margin-bottom: 32px; }
.legal-content h2{ font-size: 1.2rem; margin-top: 32px; }
.legal-content p{ max-width: none; }
.legal-content ul{ color: var(--grey); padding-left: 20px; margin: 0 0 1em; }
.legal-content li{ margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px){
  .main-nav, .header-phone{ display: none; }
  .nav-toggle{ display: flex; }

  .site-header.nav-open .main-nav{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    gap: 0;
    border-bottom: 1px solid var(--line);
  }
  .site-header.nav-open .main-nav > *{ grid-column: 1 / -1; }
  .site-header.nav-open .main-nav > *:first-child{ grid-column: 1; grid-row: 1; }
  .site-header.nav-open .main-nav a{
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
  }

  .site-header.nav-open .nav-dropdown{ position: static; }
  .site-header.nav-open .nav-dropdown-arrow{ display: none; }
  .site-header.nav-open .nav-dropdown-menu{
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    background: var(--paper);
  }
  .site-header.nav-open .nav-dropdown-menu a{
    padding: 12px 24px 12px 42px !important;
    font-size: 0.88rem;
    color: var(--grey);
  }

  .site-header.nav-open .lang-switcher{
    grid-column: 2;
    grid-row: 1;
    padding: 12px 20px 12px 10px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
  }
  .site-header.nav-open .lang-select{ width: auto; }

  .nosotros-inner{ grid-template-columns: 1fr; }
}

@media (max-width: 540px){
  .hero{ padding: 52px 0 64px; }
  .hero.has-carousel{ min-height: 520px; padding: 64px 0 60px; }
  .hero-controls{ bottom: 18px; gap: 12px; }
  .services{ padding: 64px 0; }
  .taller{ padding: 64px 0; }
  .limpieza{ padding: 56px 0; }
  .ofertas{ padding: 56px 0; }
  .nosotros{ padding: 64px 0; }
  .galeria{ padding: 64px 0; }
  .contacto{ padding: 64px 0 72px; }
  .wrap{ padding: 0 18px; }
  .hero-actions .btn,
  .service-cta .btn{ flex: 1 1 100%; justify-content: center; text-align: center; }
  .hero-vehicle-banner{ max-width: none; }
  .cita-form{ padding: 22px; }
  .cita-form-row{ grid-template-columns: 1fr; }
  .cita-form button[type="submit"]{ width: 100%; justify-content: center; }
  .vehicle-modal{ padding: 24px 18px; }
  .vehicle-detail{ grid-template-columns: 1fr; gap: 24px; }
  .vd-specs{ grid-template-columns: 1fr; }
  .preloader-brand-text{ font-size: 1.5rem; }
  .preloader-brand-mark{ width: 20px; height: 36px; }
  .preloader-progress{ width: 180px; }
  .nosotros-facts{ grid-template-columns: 1fr 1fr; gap: 16px 22px; }
  .footer-inner{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px){
  h1{ font-size: 1.9rem; }
  .btn{ padding: 12px 18px; font-size: 0.9rem; }
  .nosotros-facts{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .btn{ transition: none; }
}
.brand-mark{ opacity: 0; transition: opacity .2s ease; }
.brand-mark.is-ready{ opacity: 1; }
.preloader-brand-mark{ opacity: 0; transition: opacity .2s ease; }
.preloader-brand-mark.is-ready{ opacity: 1; }
.preloader-brand-text{ opacity: 0; transition: opacity .2s ease; }
.preloader-brand-text.is-ready{ opacity: 1; }


/* ---------- Ford Economy Service ---------- */
.ford-economy{ padding: 92px 0; background: var(--paper); }

.ford-economy-gallery{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 40px 0;
}
.ford-economy-gallery img{
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}

.ford-economy-pricing{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  margin-bottom: 40px;
}
.ford-economy-pricing h3{ font-size: 1.1rem; margin-bottom: 18px; }
.ford-economy-price-table{ width: 100%; border-collapse: collapse; }
.ford-economy-price-table th, .ford-economy-price-table td{
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.ford-economy-price-table th{
  color: var(--grey);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ford-economy-price-table td:last-child{
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--ford-blue);
  font-weight: 700;
}

/* ---------- Sustitución (vehículos de cortesía) ---------- */
.sustitucion-subsection{ margin-top: 36px; }
.sustitucion-subsection:first-of-type{ margin-top: 0; }
.sustitucion-subsection h3{
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 18px;
}
.vd-conditions{
  margin-bottom: 24px;
  padding: 16px 18px;
  background: var(--paper-dim);
  border-radius: 10px;
}
.vd-conditions h4{
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.vd-condition-item{ margin-bottom: 10px; }
.vd-condition-item:last-child{ margin-bottom: 0; }
.vd-condition-item span{
  display: block;
  font-size: 0.76rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 2px;
}
.vd-condition-item p{ font-size: 0.92rem; line-height: 1.5; margin: 0; }

#nav-sustitucion-link[hidden]{ display: none !important; }

/* ---------- Badge "Vendido" en vehiculos de ocasion ---------- */
.stock-card-badge-sold{
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  background: var(--grey);
}
.vd-sold-badge{
  display: inline-block;
  background: var(--grey);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
}

/* Taller: tarjetas en 2 filas de 3 */
.taller .service-grid{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px){
  .taller .service-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px){
  .taller .service-grid{ grid-template-columns: 1fr; }
}

/* Pegatina "Vendido" sobre la foto de la ficha */
.vd-sold-sticker{
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  background: #fff;
  color: #d0021b;
  border: 3px solid #d0021b;
  border-radius: 6px;
  padding: 8px 20px;
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(-8deg);
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
  pointer-events: none;
}

/* Listado de stock: pegatina "Vendido" (stock-card-sold-sticker) */
.stock-card .stock-card-badge.stock-card-badge-sold{
  top: 14px;
  left: 14px;
  right: auto;
  z-index: 2;
  background: #fff;
  color: #d0021b;
  border: 2px solid #d0021b;
  border-radius: 5px;
  padding: 4px 12px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  transform: rotate(-8deg);
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  pointer-events: none;
}
/* Vendido y destacado a la vez: se oculta "Destacado" */
.stock-card-thumb:has(.stock-card-badge-sold) .stock-card-badge:not(.stock-card-badge-sold){
  display: none;
}
/* Foto ligeramente atenuada en vendidos */
.stock-card-thumb:has(.stock-card-badge-sold) img{
  filter: grayscale(.6) opacity(.85);
}
/* marcador para detectar que el bloque ya está aplicado */
.stock-card-sold-sticker{}
