/* ==== ESTILOS PRINCIPALES CEALTECH ==== */

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f7f7f7;
  color: #333;
  line-height: 1.6;
  padding: 0 30px; /* 🔹 Espacio lateral visible en pantallas grandes */
}

@media (max-width: 768px) {
  body {
    padding: 0 100px; /* 🔹 Menor espacio en móviles */
  }
}

.banner {
  width: 100%;
  height: 200px;

  background-size: cover;
  background-position: center;
  display: block;
}

@media (max-width: 768px) {
  .banner {
    height: 150px;
  }
}

/* ==== NAVBAR ==== */
nav {
  background-color: #f2f2f2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

/* ==== BOTONES ==== */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #BD4C37, #ED2802);
  color: white;
  text-decoration: none;
  padding: 4px 55px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-weight: 500;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75px;
  width: 50px;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  transform: skewX(-20deg);
  transition: left 0.4s ease;
}

.btn:hover::after {
  left: 120%;
}

.btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

/* ==== CONTENEDOR GENERAL ==== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
  text-align: center;
}

/* ==== TARJETAS ==== */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* ==== FOOTER ==== */
footer {
  background-color: #222;
  color: #eee;
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
}

/* ==== BOTÓN WHATSAPP FLOTANTE ==== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 999;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* ==== CATEGORÍAS ==== */
.categorias-container {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
  margin-top: 30px;
}

.categoria {
  flex: 1 1 30%;
  max-width: 350px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  padding: 15px;
  transition: all 0.3s ease;
}

.categoria img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.categoria h3 {
  font-size: 1.3rem;
  margin: 0;
}

.categoria:hover {
  transform: translateY(-6px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* ==== GRID DE LAPTOPS ==== */
.laptops-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); /* 🔹 4 columnas en PC */
  gap: 25px;
  margin-top: 30px;
  justify-items: center;
}

.laptop-card {
  background: #fff;
  border-radius: 12px;
  text-align: center;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: #333;
  max-width: 270px; /* 🔹 ancho reducido */
}

.laptop-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.laptop-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.laptop-card p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.laptop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* ==== DETALLE DE LAPTOP ==== */
.laptop-detail {
  text-align: left;
}

.laptop-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.laptop-images #img-main {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
}

.img-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.img-thumbs img {
  width: 80px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

.laptop-info {
  margin-top: 20px;
}

.laptop-info p {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* Botón de WhatsApp dentro de detalle */
.whatsapp-btn {
  margin-top: 15px;
  display: inline-block;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
  .laptops-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 600px) {
  .laptops-container {
    grid-template-columns: 1fr 1fr; /* 🔹 2 columnas en móvil */
  }
  .laptop-card {
    max-width: 100%;
  }
}

/* ==== DETALLE DE LAPTOP (PLANTILLA) ==== */
.detalle-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  width: 90%;
  max-width: 1300px;
  margin: 50px auto;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Galería */
.galeria {
  display: flex;
  flex-direction: column;  /* 🔥 Miniaturas debajo */
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 600px;
}
.miniaturas {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.miniaturas img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.2s;
}

.miniaturas img:hover {
  border-color: #ff4500;
  transform: scale(1.05);
}
.imagen-principal {
  width: 100%;
  max-width: 600px;
  height: 400px;           /* 🔥 ALTURA FIJA DEL CUADRO */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;        /* Evita que se salga */
  border-radius: 10px;
  background: #f4f4f4;     /* Fondo suave para que se vea profesional */
}

.imagen-principal img {
  width: 100%;
  height: 100%;
  object-fit: contain;     /* 🔥 Mantiene proporciones de las imágenes */
}
		
/* Información del producto */
.info-laptop {
  flex: 1;
 margin-left: 80px;
  min-width: 300px;
}

.info-laptop h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.condicion {
  font-size: 0.95rem;
  color: #666;
}

.codigo {
  font-size: 0.95rem;
  color: #666;
}
.precio {
  margin: 20px 0;
}

.precio-anterior {
 
  color: #999;
  font-size: 1rem;
}

.precio-actual {
  font-size: 1.6rem;
  color: #d32f2f;
  font-weight: bold;
}

.descuento {
  background: #d32f2f;
  color: white;
  font-size: 0.9rem;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 8px;
}

.caracteristicas {
  list-style: none;
  margin: 20px 0;
}

.caracteristicas li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.info-laptop .btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 1.1rem;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 900px) {
  .detalle-container {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }

  .galeria {
    flex-direction: column;
    align-items: center;
  }

  .imagen-principal img {
    width: 100%;
    max-width: 400px;
  }

  .miniaturas {
    flex-direction: row;
    justify-content: center;
  }
}


.miniatura {
  width: 70px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s, border 0.2s;
  border: 2px solid transparent;
}

.miniatura:hover {
  transform: scale(1.05);
}

.miniatura.activa {
  border: 2px solid red; /* Borde azul o del color de tu tema */
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.6);
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366; /* verde WhatsApp */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.whatsapp-icon {
  width: 60px;
  height:60px;
  filter: brightness(0) invert(1); /* 🔥 esto vuelve el logo blanco */
}
.hero-message {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1px 10px;
  background: linear-gradient(to right, red, #00bfff);
  color: white;
  margin-top: -5px;
  letter-spacing: 0.5px;
}

/* ==== OPTIMIZACIÓN EXTRA PARA MÓVILES - INDEX ==== */
@media (max-width: 600px) {
  body {
    padding: 0 10px;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    padding: 0;
  }

  .banner {
    height: 140px;
    background-size: cover;
    background-position: center;
  }

  .hero-message {
    font-size: 1rem;
    padding: 8px;
    margin-top: 0;
  }

  .categorias-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .categoria {
    flex: 1 1 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .categoria img {
    width: 100%;
    height: auto;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 24px;
    bottom: 15px;
    right: 15px;
  }

  .whatsapp-icon {
    width: 100%;
    height: auto;
  }

  footer {
    font-size: 13px;
    padding: 12px 0;
  }
}

.banner {
  background-image: url('../img/banner.png'); /* Banner de escritorio */
  height: 200px;
  background-size: cover;
  background-position: center;
}

/* Versión móvil */
@media (max-width: 600px) {
  .banner {
    background-image: url('../img/banner-mobile.png');
    height: 136px;
    background-size: cover;
    background-position: center;
  }
}

/* 🔥 Cambios SOLO en celulares */
@media (max-width: 768px) {

  /* Ocultar miniaturas en celular */
  .miniaturas {
    display: none !important;
  }

  /* Imagen principal estilo "slider" */
  .imagen-principal {
    width: 100%;
    height: 350px;
    max-width: 100%;
  }

  .imagen-principal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Puntitos (indicadores) */
  .puntos {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
  }

  .punto {
    width: 10px;
    height: 10px;
    background: #bbb;
    border-radius: 50%;
    transition: 0.3s;
  }

  .punto.activo {
    background: #ff4500; /* color CEALTECH */
    transform: scale(1.3);
  }
/* 🔥 Evitar desbordamiento horizontal en móviles */
html, body {
  overflow-x: hidden;
}

}

/* 🔥 Corrección para centrar la imagen principal en celulares */
@media (max-width: 768px) {

  /* Centrar la galería */
  .galeria {
    align-items: center !important;
    text-align: center;
    margin: 0 auto;
  }

  /* Centrar el contenedor de la imagen */
  .imagen-principal {
    margin: 0 auto !important;
  }

  /* Asegurar que la imagen esté centrada */
  .imagen-principal img {
    margin: 0 auto;
    display: block;
  }

  /* Quitar margen que rompe el diseño */
  .info-laptop {
    margin-left: 0 !important;
  }
}

/* 🔥 Navbar con botones iguales en móviles */
@media (max-width: 768px) {

  nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 10px;
  }

  nav .btn {
    width: 100%;
    text-align: center;
    padding: 3px 0 !important;  /* altura uniforme */
    border-radius: 10px;
  }
.detalle-container {
  margin: 10px auto; /* antes 50px */
}
}

