
/* ========== VARIABLES GENERALES ========== */
:root {
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-red: #B22222; /* rojo oscuro firebrick */
  --color-gray-light: #CCCCCC;
  --font-main: 'Barlow', sans-serif;
}

/* ========== RESET GLOBAL ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-white);
  color: var(--color-black);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADER ========== */
header {
  background-color: #111;
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  border-bottom: 1px solid #333;
  z-index: 1000;
}

.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo-text .sub {
  font-weight: bold;
  font-size: 1.2rem;
}

nav {
  display: flex;
}

  nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }

nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: background 0.3s ease;
}

nav a:hover {
  background-color: #333;
}

/* ========== MENÚ HAMBURGUESA ========== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background-color: red;
  border: none;
  padding: 0.5rem;
  border-radius: 6px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}




/* Efecto mágico en enlaces del nav */
nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  position: relative;
  transition: color 0.3s ease;
}

nav a::before {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background: #B22222; /* rojo firebrick */
  transition: width 0.3s ease;
  border-radius: 2px;
}

nav a:hover,
nav a:focus {
  color: #ff6b6b;
  animation: navGlow 1s infinite alternate;
}

nav a:hover::before,
nav a:focus::before {
  width: 100%;
}

/* Brillo suave animado */
@keyframes navGlow {
  0% {
    text-shadow: 0 0 5px #ff6b6b, 0 0 10px #b22222, 0 0 15px #ff6b6b;
  }
  100% {
    text-shadow: 0 0 10px #ff6b6b, 0 0 20px #b22222, 0 0 30px #ff6b6b;
  }
}


/* BOTÓN VOLVER A STOCK */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 18px;
  border-radius: 30px;
  background: #ffffff;
  color: #000000;

  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;

  box-shadow: 0 6px 18px rgba(255, 8, 8, 0.12);
  transition: all 0.25s ease;

  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
}

.btn-back:hover {
  background: #ff0000;
  color: #000;
  transform: translateX(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* MOBILE: MISMO TAMAÑO, ABAJO */
@media (max-width: 768px) {
  .btn-back {
    top: auto;
    bottom: 16px;
    left: 16px;
  }
}






  /* =====================================================
   VEHICLE DETAIL – GALERÍA PROFESIONAL (FULL RESPONSIVE)
   ===================================================== */

/* ================= VEHICLE DETAIL ================= */
.vehicle-detail {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ================= GALERÍA ================= */
.vehicle-gallery {
  background-color: #000; /* más consistente */
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); /* sombra más elegante */
  overflow: hidden; /* evita que algo sobresalga del borde redondeado */
}

/* ================= CARRUSEL ================= */
#autoCarousel {
  border-radius: 15px;
  overflow: hidden;
  background: #000;
}

/* NO forzar alto */
#autoCarousel .carousel-inner {
  background: #000;
}

/* item normal */
#autoCarousel .carousel-item {
  text-align: center;
}

/* imagen */
#autoCarousel .carousel-item img {
  display: block;
  margin: auto;

  width: 100%;
  max-width: 1000px;
  max-height: 480px;

  object-fit: contain;
}
@media (max-width: 768px) {
  #autoCarousel .carousel-item img {
    max-height: 260px;
  }
}


/* ================= FLECHAS ================= */
.carousel-control-prev,
.carousel-control-next {
  width: 10%;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1; /* efecto hover más visible */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-size: 70% 70%;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
  border-radius: 50%;
}

/* ================= MINIATURAS ================= */

.carousel-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-bottom: 6px;

  overflow-x: auto;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.carousel-thumbs::-webkit-scrollbar {
  height: 6px;
}

.carousel-thumbs::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 10px;
}

.carousel-thumbs img {
  flex: 0 0 auto;
  width: 105px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;

  opacity: 0.55;
  border: 2px solid transparent;
  transition: all 0.25s ease;

  scroll-snap-align: start;
}

.carousel-thumbs img:hover {
  opacity: 0.85;
  transform: translateY(-3px);
}

.carousel-thumbs img.active {
  opacity: 1;
  border-color: #b22222;
  box-shadow: 0 10px 25px rgba(178,34,34,0.45);
}

/* ================= INFO VEHÍCULO ================= */

.vehicle-info {
  background: #ffffff;
  border-radius: 22px;
  padding: 34px;
  margin-top: 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.vehicle-info h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #000000;
}

/* Etiquetas / specs */
.vehicle-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.vehicle-specs span {
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

/* Descripción */
.vehicle-info p {
  color: #444;
  line-height: 1.65;
  margin-bottom: 26px;
}

/* Precio */
.vehicle-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vehicle-price span {
  font-size: 0.85rem;
  color: #777;
}

.vehicle-price strong {
  font-size: 2.2rem;
  color: #b22222;
  font-weight: 800;
}

.vehicle-features span {
  background: linear-gradient(145deg, #f8f8f8, #eaeaea);
  border-radius: 18px;
  padding: 16px 14px;
  text-align: center;

  font-size: 0.82rem;
  font-weight: 700;
  color: #222;

  display: flex;
  flex-direction: column;
  gap: 6px;

  box-shadow:
    0 6px 14px rgba(0,0,0,0.08),
    inset 0 0 0 1px rgba(0,0,0,0.04);

  transition: all 0.25s ease;
  cursor: default;
}

.vehicle-features span:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 26px rgba(0,0,0,0.12),
    inset 0 0 0 1px #b22222;
}
.vehicle-features span small {
  font-size: 0.7rem;
  font-weight: 600;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vehicle-features span strong {
  font-size: 0.95rem;
  color: #111;
}



/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {
  #autoCarousel .carousel-inner {
    height: 420px;
  }
}

@media (max-width: 768px) {
  .vehicle-detail {
    margin: 40px auto;
  }

  #autoCarousel .carousel-inner {
    height: 320px;
  }

  .carousel-thumbs img {
    width: 78px;
    height: 52px;
  }

  .vehicle-info {
    padding: 24px;
  }

  .vehicle-info h1 {
    font-size: 1.45rem;
  }

  .vehicle-price strong {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  #autoCarousel .carousel-inner {
    height: 260px;
  }

  .vehicle-info {
    padding: 20px;
  }
}

/* ===== BOTÓN COMPARTIR ===== */

.share-btn {
  position: absolute;
  top: 20px;
  right: 20px;

  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 20;
  transition: all 0.3s ease;
}

.share-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.share-btn:hover {
  background: #b22222;
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(178,34,34,0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .share-btn {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }
}
/* ================= INFO PREMIUM ================= */

.vehicle-info {
  background: #fff;
  border-radius: 22px;
  padding: 36px;
  margin-top: 36px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.08);
}

/* HEADER */
.vehicle-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.vehicle-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #000000;
  margin: 0;
}

/* PRECIO */
.vehicle-price span {
  font-size: 0.8rem;
  color: #000000;
}

.vehicle-price strong {
  font-size: 2.4rem;
  font-weight: 800;
  color: #b22222;
}

/* FICHAS TÉCNICAS */
.vehicle-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.vehicle-features span {
  background: #f6f6f6;
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  box-shadow: inset 0 0 0 1px #e5e5e5;
}

/* DESCRIPCIÓN */
.vehicle-description {
  font-size: 0.95rem;
  color: #1d1c1c;
  line-height: 1.7;
  max-width: 780px;
}

/* CTA */
.vehicle-actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn-wsp {
  flex: 1;
  padding: 16px;
  border-radius: 50px;
  background: #25d366;
  color: #0c0c0c;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: 0.3s;
}

.btn-wsp:hover {
  background: #0bee298f;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(37,211,102,0.4);
}



/* MOBILE */
@media (max-width: 768px) {
  .vehicle-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .vehicle-price strong {
    font-size: 1.8rem;
  }
}
@media (max-width: 1024px) {
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Navegación fija lateral */
nav {
  padding-left: 1.5rem;
  padding-right: 1.5rem;

  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  color: #fff;
  z-index: 1000;
  border-radius: 0 0 0 20px;
}

/* Estado abierto del nav */
nav.open {
  transform: translateX(0);
}

/* Lista vertical del nav */
nav ul {
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: center;
  list-style: none;
  display: flex; /* para que flex-direction funcione */
}

/* Items del menú */
nav li {
  border-bottom: 1px solid #444;
}

/* Último item sin borde */
nav li:last-child {
  border-bottom: none;
}

/* Links del menú */
nav a {
  color: #fff;
  display: block;
  padding: 1.2rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  user-select: none;
  transition: background-color 0.3s ease;
}

nav a:hover,
nav a:focus {
  background-color: rgba(255, 0, 0, 0.3);
  outline: none;
}

/* Botón hamburguesa */
.hamburger {
  display: flex;
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: black;
  padding: 0.6rem;
  border-radius: 8px;
  box-shadow: 0 0 10px var(--color-red);
  z-index: 1100;
}


}

@media (max-width: 768px) {

  /* Box-sizing para todo */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  

  nav {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    padding-top: 80px;
    color: #fff;
    z-index: 1000;
    border-radius: 0 0 0 20px;
  }

  nav.open {
    transform: translateX(0);
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
    list-style: none;
  }

  nav li {
    border-bottom: 1px solid #444;
  }

  nav li:last-child {
    border-bottom: none;
  }

  nav a {
    color: #fff;
    display: block;
    padding: 1.2rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    user-select: none;
  }

  nav a:hover,
  nav a:focus {
    background-color: rgba(255, 0, 0, 0.3);
    outline: none;
  }

  .hamburger {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
     background-color: black;
    padding: 0.6rem;
    border-radius: 8px;
    box-shadow: 0 0 10px var(--color-red);
    z-index: 1100;
  }

}

