/* ============================================
   Autorrecambios La Torre — tokens de diseño
   ============================================ */
:root {
  --bg:        #E3E4DF;   /* gris hormigón frío, no crema */
  --bg-deep:   #C9CBC3;   /* zona más oscura del hormigón */
  --panel:     #F0F0EC;   /* ficha / tarjeta */
  --ink:       #1B1D1B;   /* casi negro, frío */
  --ink-soft:  #4B4E49;   /* texto secundario */
  --line:      #9DA097;   /* hairline */
  --orange:    #B61412;   /* rojo corporativo (tomado del logotipo), acento principal */
  --orange-ink:#7A0D0C;   /* rojo oscuro para hover / texto de acento */
  --yellow:    #E7A324;   /* amarillo de aviso, acento secundario */
  --steel:     #6C6F68;
  --navy:      #002469;   /* azul corporativo GrupAuto, uso puntual */

  --display: "Oswald", "Arial Narrow", sans-serif;
  --body:    "Work Sans", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand-logo {
  /* Zona reservada para el logotipo de Auto Recambios La Torre */
  display: block;
  height: 48px;
  width: auto;
}
.brand-name {
  font-family: var(--display);
  font-size: 0.82rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.brand-name strong { color: var(--orange-ink); }

.nav {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav a { text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 4px; }
.nav a:hover { border-color: var(--orange); }

.phone-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.88rem;
  background: var(--orange);
  color: #fff;
  padding: 9px 16px;
  border-radius: 3px;
  white-space: nowrap;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: #25D366;
  color: #fff;
  text-decoration: none;
}
.whatsapp-cta svg { width: 20px; height: 20px; }

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

/* ============================================
   Hero — placa metálica estampada
   ============================================ */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  padding: 96px 0 84px;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.08;
}
.hero-inner { position: relative; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 18px;
}
.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700;
  line-height: 0.98;
}
.hero-title .accent { color: var(--orange); }
.hero-sub {
  max-width: 44ch;
  margin: 26px 0 0;
  color: #D9DAD3;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 3px;
  border: 2px solid transparent;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-ghost { border-color: var(--bg); color: var(--bg); }

.rivet {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--steel);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
.rivet-tl { top: 22px; left: 22px; }
.rivet-tr { top: 22px; right: 22px; }
.rivet-bl { bottom: 22px; left: 22px; }
.rivet-br { bottom: 22px; right: 22px; }

/* ============================================
   Secciones — cabecera común
   ============================================ */
section { padding: 84px 0; }
.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-ink);
  margin: 0 0 10px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.section-desc { color: var(--ink-soft); margin-top: 14px; }

/* ============================================
   Categorías — fichas tipo etiqueta de taller
   ============================================ */
.categorias { background: var(--bg-deep); }
.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.tag-card {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 26px 22px 22px;
}
.tag-hole {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--ink);
}
.tag-ref {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--orange-ink);
  margin: 0 0 14px 28px;
}
.tag-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.tag-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ============================================
   Marcas — logotipos de fabricantes con los que trabajamos
   Scroller horizontal: avanza solo despacio, y se puede
   arrastrar / desplazar manualmente en cualquier momento.
   ============================================ */
.marcas { background: var(--panel); border-top: 2px solid var(--bg-deep); border-bottom: 2px solid var(--bg-deep); }
.brand-scroller {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.brand-scroller.is-dragging { cursor: grabbing; }
.brand-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 4px 24px 8px;
  will-change: transform;
}
.brand-set {
  display: flex;
  gap: 20px;
  flex: 0 0 auto;
}
.brand-plate {
  /* Zona reservada para cada logotipo de marca */
  flex: 0 0 auto;
  width: 190px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 40px 32px;
  min-height: 190px;
}
.brand-plate img {
  max-height: 120px;
  max-width: 100%;
  width: auto;
  -webkit-user-drag: none;
  pointer-events: none;
}

@media (max-width: 600px) {
  .brand-plate { width: 150px; min-height: 150px; padding: 28px 22px; }
  .brand-plate img { max-height: 92px; }
}

/* ============================================
   Galería — fotos de la tienda con scroll horizontal
   ============================================ */
.galeria { background: var(--bg-deep); padding-bottom: 84px; }
.gallery-scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 24px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) var(--bg-deep);
}
.gallery-scroller::-webkit-scrollbar { height: 8px; }
.gallery-scroller::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 4px; }
.gallery-scroller::-webkit-scrollbar-track { background: var(--bg-deep); }
.gallery-item {
  flex: 0 0 auto;
  width: 320px;
  scroll-snap-align: start;
  border: 2px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel);
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}
@media (max-width: 600px) {
  .gallery-item { width: 240px; }
  .gallery-item img { height: 170px; }
}

/* ============================================
   Por qué nosotros — lista tipo ficha técnica
   ============================================ */
.spec-list { border-top: 2px solid var(--ink); }
.spec-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 2px solid var(--ink);
  align-items: start;
}
.spec-num {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--orange-ink);
  font-weight: 600;
}
.spec-row h3 { font-size: 1.1rem; margin-bottom: 6px; }
.spec-row p { margin: 0; color: var(--ink-soft); }

/* ============================================
   Contacto — albarán + mapa
   ============================================ */
.contacto { background: var(--ink); color: var(--bg); }
.contacto .section-kicker { color: var(--orange); }
.contacto-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.ticket {
  background: var(--panel);
  color: var(--ink);
  border-radius: 4px;
  padding: 32px;
  border: 2px solid var(--bg-deep);
}
.ticket h2 { font-size: 1.5rem; margin: 6px 0 24px; }
.ticket-list { margin: 0; display: grid; gap: 18px; }
.ticket-list dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.ticket-list dd { margin: 4px 0 0; font-size: 1rem; }
.ticket-list a { text-decoration: none; border-bottom: 1px solid var(--orange); }
.whatsapp-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  vertical-align: middle;
  background: #25D366;
  border-radius: 3px;
  color: #fff;
  border-bottom: none;
}
.whatsapp-inline svg { width: 14px; height: 14px; }

.map-frame {
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid var(--steel);
  min-height: 320px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ============================================
   Banda de grupo — pertenencia a GrupAuto
   ============================================ */
.group-band {
  background: var(--navy);
  border-top: 4px solid var(--orange);
  border-bottom: 4px solid var(--orange);
}
.group-band-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  padding: 40px 0;
  text-align: center;
}
.group-band-text {
  font-family: var(--display);
}
.group-band-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--yellow);
  margin: 0 0 6px;
}
.group-band-title {
  display: block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  font-weight: 700;
  color: #fff;
}
.group-band-logo {
  height: 64px;
  width: auto;
  background: #fff;
  border-radius: 6px;
  padding: 10px 20px;
}

@media (max-width: 600px) {
  .group-band-inner { padding: 32px 0; gap: 18px; }
  .group-band-logo { height: 48px; padding: 8px 14px; }
}

/* ============================================
   Footer
   ============================================ */
.site-footer { background: var(--bg-deep); border-top: 2px solid var(--ink); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 860px) {
  .contacto-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--ink);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; border-bottom: 1px solid var(--bg-deep); }
  .nav-toggle { display: flex; }
  .phone-cta span { display: none; }
  .phone-cta { padding: 9px 12px; }
}
