@import url('https://fonts.googleapis.com/css2?family=TikTok+Sans:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
  scroll-behavior: smooth;
}

body {
  font-family: "TikTok Sans", sans-serif;
  background-image: url('images/fondo1.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* ====== HEADER ====== */

.header,
.autos-recientes,
.quienes-somos,
.footer-content {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 30px 30px;
  margin-top: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  transition: box-shadow 0.4s ease;
  backdrop-filter: saturate(180%) blur(10px);
}

.header:hover,
.autos-recientes:hover,
.quienes-somos:hover,
.footer-content:hover {
  box-shadow: 0 12px 45px rgba(0,0,0,0.25);
}

.menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
}

.logo {
  font-size: 32px;
  font-weight: 800;
  color: #007BFF;
  letter-spacing: 2px;
  user-select: none;
  text-transform: uppercase;
  cursor: default;
}

.menu-icono {
  width: 32px;
  cursor: pointer;
  display: none;
  transition: transform 0.3s ease;
}

.menu-icono:hover {
  transform: rotate(90deg);
}

/* ====== NAVBAR ====== */

.navbar {
  margin-bottom: 40px;
}

.navbar ul {
  display: flex;
  gap: 30px;
  font-weight: 700;
}

.navbar a {
  color: #007BFF;
  position: relative;
  font-size: 18px;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

.navbar a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: #00a1ff;
  left: 0;
  bottom: 0;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navbar a:hover {
  color: #0056b3;
}

.navbar a:hover::after {
  width: 100%;
}

/* ====== HEADER CONTENT ====== */

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 30px;
  gap: 20px;
}

.header-txt {
  flex: 1 1 50%;
  padding: 20px;
  animation: fadeInLeft 1s ease forwards;
  opacity: 0;
}

.header-txt.visible {
  opacity: 1;
}

.header-txt h1 {
  font-size: 42px;
  margin-bottom: 20px;
  color: #007BFF;
  letter-spacing: 1.5px;
  line-height: 1.2;
}

.header-txt span {
  color: #0056b3;
  font-weight: 900;
}

.header-txt p {
  font-size: 18px;
  margin-bottom: 30px;
  color: #333;
}

.header-img {
  flex: 1 1 45%;
  padding: 20px;
  animation: fadeInRight 1s ease forwards;
  opacity: 0;
}

.header-img.visible {
  opacity: 1;
}

.header-img img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,123,255,0.25);
  transition: transform 0.4s ease;
  cursor: pointer;
}

.header-img img:hover {
  transform: scale(1.07) rotate(1deg);
}

/* ====== BOTONES ====== */

.btn-1,
.btn-3,
.stock-card button,
#limpiarFiltrosBtn {
  display: inline-block;
  background: linear-gradient(135deg, #007BFF 0%, #00a1FF 100%);
  color: #fff;
  padding: 14px 34px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border: none;
  box-shadow:
    0 0 18px rgba(0, 123, 255, 0.6),
    0 6px 20px rgba(0, 123, 255, 0.4);
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-1::before,
.btn-3::before,
.stock-card button::before,
#limpiarFiltrosBtn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.4) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.7s ease;
  pointer-events: none;
  z-index: 2;
}

.btn-1:hover,
.btn-3:hover,
.stock-card button:hover,
#limpiarFiltrosBtn:hover {
  background: linear-gradient(135deg, #00a1FF 0%, #007BFF 100%);
  box-shadow:
    0 0 25px rgba(0, 162, 255, 0.9),
    0 8px 30px rgba(0, 162, 255, 0.7);
  transform: translateY(-3px) scale(1.07);
  z-index: 10;
}

.btn-1:hover::before,
.btn-3:hover::before,
.stock-card button:hover::before,
#limpiarFiltrosBtn:hover::before {
  left: 125%;
  transition: all 0.7s ease;
}

/* ====== AUTOS DESTACADOS ====== */

.autos-recientes h2,
.quienes-somos h2 {
  font-size: 34px;
  margin-bottom: 35px;
  text-align: center;
  color: #004a99;
  letter-spacing: 1.1px;
  font-weight: 800;
  text-transform: uppercase;
}

.autos-content {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.auto-card {
  width: 30%;
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.auto-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(45deg, rgba(0,123,255,0.1), rgba(0,162,255,0.15));
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  border-radius: 20px;
}

.auto-card:hover {
  transform: scale(1.08) translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,123,255,0.25);
}

.auto-card:hover::after {
  opacity: 1;
}

.auto-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.auto-card img:hover {
  transform: scale(1.1);
}

.auto-card h3 {
  margin-top: 18px;
  font-size: 20px;
  font-weight: 700;
  color: #007BFF;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.auto-card:hover h3 {
  color: #0056b3;
}

/* ====== QUIENES SOMOS ====== */

.quienes-somos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 60px;
}

.quienes-somos .header-txt {
  flex: 1 1 55%;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

.quienes-somos .header-txt.visible {
  opacity: 1;
}

.quienes-somos .header-img {
  flex: 1 1 40%;
  animation: fadeInDown 1s ease forwards;
  opacity: 0;
}

.quienes-somos .header-img.visible {
  opacity: 1;
}

.quienes-somos .header-img img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,123,255,0.25);
}

/* ====== FOOTER ====== */

.footer-content {
  text-align: center;
  background-color: rgba(51, 51, 51, 0.95);
  color: white;
  margin-top: 60px;
  border-radius: 15px;
  padding: 40px 25px;
  font-weight: 600;
  letter-spacing: 1px;
}

.footer-content a {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-content a:hover {
  text-decoration: underline;
  color: #00a1ff;
}

/* ====== FILTROS ====== */

.filtros {
  max-width: 1200px;
  margin: 40px auto 30px auto;
  padding: 20px 25px;
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  gap: 35px;
  flex-wrap: wrap;
  user-select: none;
}

.filtro-item {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.filtro-item:hover {
  transform: scale(1.05);
}

.filtro-item label {
  font-weight: 700;
  font-size: 18px;
  color: #004a99;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.filtro-item select {
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #ccc;
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fefefe;
  font-weight: 600;
}

.filtro-item select:focus {
  outline: none;
  border-color: #007BFF;
  box-shadow: 0 0 12px rgba(0,123,255,0.4);
}

/* Botón Limpiar filtros */

#limpiarFiltrosBtn {
  margin-left: 10px;
  min-width: 180px;
  background: linear-gradient(45deg, #FF4E50, #F9D423);
  box-shadow:
    0 0 15px rgba(255, 78, 80, 0.8),
    0 6px 20px rgba(249, 212, 35, 0.7);
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  font-weight: 700;
  cursor: pointer;
}

#limpiarFiltrosBtn:hover {
  background: linear-gradient(45deg, #F9D423, #FF4E50);
  box-shadow:
    0 0 25px rgba(249, 212, 35, 1),
    0 8px 28px rgba(255, 78, 80, 0.9);
  transform: translateY(-4px) scale(1.08);
}

#limpiarFiltrosBtn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  background: #ccc;
  color: #666;
  transform: none;
  pointer-events: none;
}

/* ====== STOCK (PÁGINA DE VEHÍCULOS) ====== */

.stock-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.stock-container h1 {
  font-size: 38px;
  font-weight: 900;
  color: #004a99;
  text-align: center;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
}

.stock-card {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.stock-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 50px rgba(0,123,255,0.3);
}

.stock-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid #007BFF;
  transition: transform 0.3s ease;
}

.stock-card img:hover {
  transform: scale(1.12);
}

.stock-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stock-card-content h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #007BFF;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.stock-card-content p {
  font-size: 16px;
  color: #444;
  margin-bottom: 25px;
  flex-grow: 1;
  line-height: 1.4;
}

.stock-card-price {
  font-size: 20px;
  font-weight: 900;
  color: #222;
  margin-bottom: 20px;
  letter-spacing: 1.2px;
}

.stock-card button {
  background: linear-gradient(45deg, #007BFF, #00a1FF);
  color: white;
  padding: 14px 0;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 0 15px rgba(0,123,255,0.7),
    0 6px 25px rgba(0,123,255,0.5);
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  user-select: none;
  overflow: hidden;
  position: relative;
}

.stock-card button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.4) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.7s ease;
  pointer-events: none;
  z-index: 2;
}

.stock-card button:hover {
  background: linear-gradient(45deg, #00a1FF, #007BFF);
  box-shadow:
    0 0 25px rgba(0, 162, 255, 0.9),
    0 8px 30px rgba(0, 162, 255, 0.7);
  transform: translateY(-4px) scale(1.07);
  z-index: 10;
}

.stock-card button:hover::before {
  left: 120%;
  transition: all 0.7s ease;
}

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

/* Smartphones */
@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  .header-txt, .header-img {
    flex: 1 1 100%;
    padding: 10px 0;
  }
  .auto-card, .stock-card {
    width: 100% !important;
  }
  .navbar ul {
    flex-direction: column;
    gap: 15px;
  }
  .menu-icono {
    display: block;
  }
  .navbar {
    display: none;
  }
  .navbar.active {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.97);
    position: absolute;
    top: 70px;
    right: 20px;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    z-index: 99;
  }
  .filtros {
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }
  .filtro-item {
    min-width: 100%;
  }
  #limpiarFiltrosBtn {
    min-width: 100%;
    margin-left: 0;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  .header-txt, .header-img {
    flex: 1 1 100%;
    padding: 15px 0;
  }
  .auto-card {
    width: 45% !important;
  }
  .filtros {
    gap: 20px;
  }
}
