/* =============================================
   OK AUTOPARTES – STYLESHEET
   ============================================= */

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── VARIABLES ──────────────────────────────── */
:root {
  --red:        #E31E24;
  --navy:       #1B3066;
  --navy-dark:  #0F1E4A;
  --yellow:     #FFD000;
  --white:      #ffffff;
  --light-bg:   #EEF2FF;
  --text-dark:  #1a1a2e;
  --text-gray:  #6B7280;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.08);
  --header-h:   88px;
  --ease:       .25s ease;
}

/* ── CONTAINER ──────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: opacity var(--ease), transform var(--ease);
  white-space: nowrap;
}
.btn:hover  { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--navy   { background: var(--navy); color: var(--white); }
.btn--yellow { background: var(--yellow); color: var(--text-dark); }

.btn--send {
  background: var(--navy);
  color: var(--white);
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 1rem;
  border-radius: 8px;
  margin-top: 8px;
}

.text-red { color: var(--red); }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: box-shadow var(--ease);
}
.header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.14); }

.header__inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 32px;
  position: relative;
}

.header__logo {
  flex-shrink: 0;
  z-index: 1;
}

.header__logo img {
  height: 70px;
  width: auto;
}

.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
}

.nav__list {
  display: flex;
  gap: 32px;
  align-items: center;
  white-space: nowrap;
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: color var(--ease);
  white-space: nowrap;
}
.nav__link:hover { color: var(--red); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
  z-index: 1;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
  white-space: nowrap;
}
.header__phone svg { color: var(--navy); flex-shrink: 0; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--ease);
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ══════════════════════════════════════════════
   HERO CAROUSEL
══════════════════════════════════════════════ */
.hero {
  position: relative;
  background: #070c1a;
  overflow: hidden;
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel__track {
  display: flex;
  width: 100%;
  transition: transform .6s cubic-bezier(.25,.1,.25,1);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1920 / 560;
  max-height: 560px;
  position: relative;
  overflow: hidden;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease);
  z-index: 10;
  padding-bottom: 2px;
}
.carousel__btn:hover { background: rgba(255,255,255,.32); }
.carousel__btn--prev { left: 20px; }
.carousel__btn--next { right: 20px; }

.carousel__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--ease), transform var(--ease);
}
.carousel__dot.active {
  background: var(--red);
  transform: scale(1.25);
}

/* ══════════════════════════════════════════════
   TICKER STRIP
══════════════════════════════════════════════ */
.ticker {
  background: var(--red);
  overflow: hidden;
  white-space: nowrap;
  padding: 13px 0;
  border-top: 2px solid rgba(255,255,255,.1);
}

.ticker__track {
  display: inline-flex;
  align-items: center;
  animation: ticker-scroll 40s linear infinite;
  will-change: transform;
}
.ticker__track:hover { animation-play-state: paused; }

.ticker__item {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  padding: 0 20px;
}

.ticker__sep {
  color: rgba(255,255,255,.6);
  font-size: 0.75rem;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════
   BRANDS SECTION
══════════════════════════════════════════════ */
.brands {
  padding: 72px 0 56px;
  background: var(--white);
  overflow: hidden;
}

.brands__header {
  text-align: center;
  margin-bottom: 44px;
}

.brands__title {
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: .02em;
}

.brands__accent {
  width: 56px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  margin: 14px auto 16px;
}

.brands__subtitle {
  color: var(--text-gray);
  font-size: 1rem;
}

.brands__carousel-wrap {
  overflow: hidden;
  padding: 8px 0 16px;
}

.brands__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: brands-scroll 22s linear infinite;
}
.brands__track:hover { animation-play-state: paused; }

@keyframes brands-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.brand-logo {
  padding: 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  height: 68px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  transition: transform var(--ease), filter var(--ease);
  filter: grayscale(10%);
}
.brand-logo img:hover {
  transform: scale(1.08);
  filter: grayscale(0%);
}

/* ══════════════════════════════════════════════
   LOGISTICS SECTION
══════════════════════════════════════════════ */
.logistics {
  padding: 88px 0;
  background: var(--white);
}

.logistics__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.logistics__map-wrap {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.16);
}
.logistics__map-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.logistics__eyebrow {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.logistics__title {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.12;
  margin-bottom: 20px;
}

.logistics__desc {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 10px;
}

.logistics__buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 36px;
}

.logistics__stats {
  display: flex;
  gap: 36px;
  padding-top: 28px;
  border-top: 1.5px solid #E5E7EB;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-item__label {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
}
.stat-item__label--red { color: var(--red); }

.stat-item__value {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 500;
}

/* ══════════════════════════════════════════════
   CONTACT SECTION
══════════════════════════════════════════════ */
.contact {
  padding: 88px 0;
  background: var(--light-bg);
}

.contact__header {
  text-align: center;
  margin-bottom: 52px;
}

.contact__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.contact__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.15;
}

.contact__subtitle {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.7;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  gap: 28px;
  align-items: start;
}

/* Contacto Directo card */
.contact__card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.contact__card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.info-item:last-child { margin-bottom: 0; }

.info-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-item__icon--blue  { background: #EEF2FF; color: var(--navy); }
.info-item__icon--green { background: #DCFCE7; color: #16A34A; }

.info-item strong {
  display: block;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.info-item p {
  font-size: 0.85rem;
  color: var(--text-gray);
  line-height: 1.5;
}

.info-item--whatsapp {
  background: #F0FDF4;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 0;
  border: 1px solid #BBF7D0;
}

/* Form card */
.contact__form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}

.contact__form-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.contact__form-desc {
  color: var(--text-gray);
  font-size: 0.875rem;
  margin-bottom: 24px;
  line-height: 1.65;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group--full { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--ease);
  font-family: inherit;
  resize: vertical;
  min-height: 42px;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #9CA3AF; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,48,102,.08);
}

.form-group small {
  font-size: 0.73rem;
  color: #9CA3AF;
  line-height: 1.4;
}

.form-success {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  background: #DCFCE7;
  color: #166534;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #BBF7D0;
}
.form-success.show { display: block; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer {
  background: var(--navy);
  padding: 44px 0;
}

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

.footer__brand img {
  height: 80px;
  width: auto;
}

.footer__contact p {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.85);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.footer__contact p:last-child { margin-bottom: 0; }
.footer__contact svg { flex-shrink: 0; opacity: .7; }

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.3);
  color: var(--white);
  transition: background var(--ease), border-color var(--ease);
}
.footer__social-link:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
}

/* ══════════════════════════════════════════════
   WHATSAPP FAB
══════════════════════════════════════════════ */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #25D366;
  color: var(--white);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: transform var(--ease), box-shadow var(--ease);
}
.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,.55);
}

/* ══════════════════════════════════════════════
   RESPONSIVE – TABLET (≤1024px)
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .header__inner { gap: 20px; }
  .nav__list { gap: 20px; }
  .logistics__grid { gap: 40px; }
  .logistics__title { font-size: 2.2rem; }
  .contact__grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE – MOBILE (≤768px)
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --header-h: 72px; }

  /* Nav: mobile drawer */
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 998;
    overflow-y: auto;
    padding: 24px;
    box-shadow: -4px 0 24px rgba(0,0,0,.1);
  }
  .nav.open { transform: translateX(0); }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }
  .nav__link {
    display: block;
    padding: 18px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #F3F4F6;
  }

  /* Nav: drawer móvil */
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateX(100%);
    background: var(--white);
    transition: transform .3s ease;
    z-index: 998;
    overflow-y: auto;
    padding: 32px 24px;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
  }
  .nav.open { transform: translateX(0); }

  .nav-toggle { display: flex; }

  .header__actions { display: none; }

  /* Hero */
  .carousel__slide { aspect-ratio: 750 / 900; max-height: 600px; }
  .carousel__btn { width: 36px; height: 36px; font-size: 1.5rem; }
  .carousel__btn--prev { left: 10px; }
  .carousel__btn--next { right: 10px; }

  /* Brands */
  .brands { padding: 48px 0 36px; }
  .brand-logo { padding: 0 28px; }
  .brand-logo img { height: 50px; }

  /* Logistics */
  .logistics { padding: 56px 0; }
  .logistics__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .logistics__buttons { flex-direction: column; }
  .logistics__stats { gap: 20px; flex-wrap: wrap; }

  /* Contact */
  .contact { padding: 56px 0; }
  .form-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer__grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  /* FAB */
  .whatsapp-fab { bottom: 16px; right: 16px; width: 52px; height: 52px; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE – SMALL MOBILE (≤480px)
══════════════════════════════════════════════ */
@media (max-width: 480px) {
  .brands__title { font-size: 1.15rem; }
  .contact__form-card { padding: 24px 18px; }
  .contact__card { padding: 24px 18px; }
  .footer__grid { align-items: center; text-align: center; }
  .footer__contact p { justify-content: center; }
  .footer__social { justify-content: center; }
}
