.hero-grid {
  display: flex;
}

/* Estilos del Carrusel */

/* Contenedor principal */
.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* La pista donde van los items */
.carousel-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 25px;
  padding: 20px 10px;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Las tarjetas */
.carousel-track .product-card {
  /* Flex: 0 0 auto significa: No crecer, No encoger, Base auto */
  flex: 0 0 auto;
  width: 280px;
  max-width: 280px;
}

/* Botones */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: white;
  border: 1px solid #ddd;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn.prev {
  left: 0;
}
.carousel-btn.next {
  right: 0;
}

@media (max-width: 768px) {
  .carousel-btn {
    display: none;
  }
}

.prod-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* O cover */
}

/* SECCIÓN CLIENTES SATISFECHOS */
.customer-success {
  position: relative;
  overflow: hidden;
  color: white;
}

.customer-success::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="70" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="20" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin: 50px 0;
  text-align: center;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 30px;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  opacity: 0.7;
  fill: white;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.testimonial-text {
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  padding-left: 20px;
}

.testimonial-text::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -5px;
  font-size: 2rem;
  color: var(--primary);
  font-family: serif;
}

.testimonial-author {
  margin-bottom: 15px;
}

.testimonial-author strong {
  color: white;
  display: block;
  margin-bottom: 5px;
}

.testimonial-author span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.stars {
  color: #ffd700;
  font-size: 1.2rem;
  margin-top: 10px;
}

/* =========================================
   HERO SLIDER DINÁMICO
   ========================================= */
.hero-slider-section {
  position: relative;
  overflow: hidden;
  background: #fff;
  width: 100%;
}

.hero-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1.5s ease-in-out,
    visibility 1.5s ease-in-out;
  display: flex;
  align-items: center;
}

.hero-slide-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Imagen de fondo con efecto de zoom lento */
.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  /* Zoom muy lento */
  transition: transform 8s ease-out;
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  -ms-transform: scale(1);
  -o-transform: scale(1);
}

.hero-slide-item.active .hero-slide-bg {
  transform: scale(1.08);
}

.hero-overlay-img {
  max-width: 180px;
  margin-bottom: 20px;
  display: block;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-buttons .btn-outline {
  border-color: white;
  color: white;
}

.hero-buttons .btn-outline:hover {
  background: white;
  color: var(--dark);
}

/* Controles (Flechas y Puntos) */
.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-control:hover {
  background: var(--primary);
}

.hero-prev {
  left: 20px;
}
.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.hero-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.stat-icon svg {
  width: 65px;
  height: 65px;
  margin-bottom: 20px;
  color: white; /* Hereda el color blanco */
  stroke-width: 1.5; /* Línea fina y elegante */
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

/* Pequeño efecto 3D al pasar el ratón por la tarjeta */
.stat-item:hover .stat-icon svg {
  transform: translateY(-5px);
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

/* =========================================
   ANIMACIÓN DE CARGA DEL HERO (LOADER)
   ========================================= */
.hero-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #050505; /* Fondo casi negro muy elegante */
  z-index: 100;
  transition: opacity 0.8s ease;
}

.spinner {
  animation: rotate 2s linear infinite;
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
}

.spinner .path {
  stroke: var(--primary); /* Usa tu color naranja/rojo */
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

.loader-text {
  color: #888;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: pulse-text 2s infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

@keyframes pulse-text {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .hero-control {
    display: none;
  } /* Ocultar flechas en móvil */
  .hero-buttons {
    flex-direction: column;
  }
  .hero-buttons .btn {
    width: 100%;
  }
}

/* RESPONSIVE PARA NUEVAS SECCIONES */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}
