/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f7f9fc;
  color: #1b253f;
}

/* Hero */
.hero {
  background: url('../media/fondo.png') center/cover no-repeat;
  height: 40vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.hero .overlay {
  background-color: rgba(0, 0, 0, 0.6);
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  transition: transform 0.3s ease, color 0.3s ease;
}

.logo:hover {
  transform: scale(1.1);
  color: #ff9900;
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s, transform 0.2s;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
  color: #ff9900;
}

.hero-content {
  text-align: center;
  margin-top: auto;
  margin-bottom: 10vh;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Categorías */
.categorias {
  background-color: #ffffff;
  padding: 1rem 2rem;
  text-align: center;
}

.grid-categorias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin: 0 auto;
}

.categoria {
  background-color: #f4f6f8;
  padding: 1.5rem;
  border-radius: 10px;
  font-size: 1.1rem;
  color: #1b253f;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.categoria:hover {
  background-color: #ff9900;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Layout principal */
.contenedor-con-sidebar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 2rem;
  gap: 2rem;
}

.contenido-principal {
  flex: 1;
  min-width: 0;
}

.sidebar {
  flex-basis: 320px;
  flex-shrink: 0;
}

/* Producto horizontal */
.product-horizontal {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
  margin-bottom: 3rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-wrap: nowrap; /* esto obliga todo a mantenerse en una sola línea */
  margin: 1%;
  margin-bottom: 2%;
}


.product-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}


.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.product-info .descripcion {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.rating {
  font-size: 1.2rem;
  color: #ff9900;
  margin-bottom: 1rem;
}

.caracteristicas {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.caracteristicas li {
  margin-bottom: 0.5rem;
}

.product-extra {
  margin-top: 2rem;
}

.product-extra h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.product-extra ul {
  padding-left: 1.5rem;
  list-style-type: disc;
}

/* Comentarios */
.comentarios {
  margin-top: 2rem;
  background-color: #f2f4f8;
  padding: 1rem;
  border-left: 4px solid #ff9900;
  border-radius: 6px;
}

.comentarios h4 {
  margin-bottom: 0.5rem;
}

/* Botones */
button {
  background-color: #ff9900;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

button:hover {
  background-color: #e68300;
  transform: scale(1.05);
}

/* Recomendaciones como producto */
.sidebar .product {
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar .reco-item {
  margin: 0.5rem 0;
  font-size: 1rem;
  text-align: left;
  padding-left: 1rem;
}

.sidebar .anuncio-interno img {
  width: 100%;
  border-radius: 8px;
  margin: 0.5rem 0;
}

/* Footer */
footer {
  background-color: #1b253f;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
}

/* Carrusel */
.hero-carousel {
  position: relative;
  height: 40vh;
  overflow: hidden;
}

.carousel-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 1s ease-in-out;
  height: 100%;
}

.carousel-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  color: white;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar nav a {
  margin-left: 1rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.topbar nav a:hover {
  transform: scale(1.1);
  color: #ff9900;
}

.hero-content {
  font-size: 1.5rem;
  text-align: center;
}

.contenido-legal {
  max-width: 960px;
  margin: 3rem auto;
  background-color: #fff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  line-height: 1.6;
  color: #1b253f;
}

.contenido-legal h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #111827;
}

.contenido-legal h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
  color: #1f2937;
}

.contenido-legal p, 
.contenido-legal ul {
  margin-top: 0.75rem;
  font-size: 1rem;
}

.contenido-legal a {
  color: #2563eb;
  text-decoration: underline;
}

.product-img {
  flex-shrink: 0;
  width: 280px;
}


.product-img img {
  width: 100%;
  object-fit: contain;
}

.img-movil img {
  max-width: 350px;
  max-height: 350px;
  margin: 0 auto;
  display: block;
}

.img-monitor img {
  max-width: 280px;
  margin: 0 auto;
  display: block;
  padding: 0 10px;
}

.caracteristicas-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 2rem;
  padding: 1rem 0;
  font-size: 0.95rem;
}

.caracteristicas-grid-3 div {
  background-color: #f7f9fc;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-layout-flex {
  display: flex;
  gap: 2rem;
  flex: 1;
  align-items: flex-start;
}

.product-layout-flex .product-info {
  flex: 2;
  min-width: 0;
}


.product-layout-flex .info-resumen-lateral {
  flex: 0.75;
  min-width: 260px;
}

.info-resumen-lateral h4 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  color: #1b253f;
}

.boton-bajo-imagen {
  text-align: center;
  margin-top: 1rem;
}

.product-img {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Centrar imagen y botón con misma altura del contenido */
.product-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Mejorar legibilidad en sección más información */
.info-resumen-lateral p {
  margin-bottom: 1rem;
  text-align: justify;
  line-height: 1.2;
}






/* Estilos para los bloques de marcas */
details {
  margin-bottom: 2rem;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

details summary {
  font-size: 1.3rem;
  font-weight: bold;
  padding: 1rem 1.5rem;
  cursor: pointer;
  background-color: #f4f6f8;
  color: #1b253f;
  border-bottom: 1px solid #e5e7eb;
  user-select: none;
}

details[open] summary {
  background-color: #ff9900; /* Azul eléctrico */
  color: rgb(0, 0, 0);
}


details summary:hover {
  background-color: #ff9900; /* azul más claro al pasar */
}


details article {
  padding: 0 1.5rem 1.5rem 1.5rem;
}
.icono-marca {
  width: 25px;
  height: 25px;
  object-fit: contain;
  margin-right: 8px;
  vertical-align: middle;
}
.icono-marca-samsung {
  width: 100px;
  height: 25px;
  object-fit: contain;
  margin-right: 8px;
  vertical-align: middle;
}





.galeria-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.producto {
  background-color: #f5f5f5;
  border-radius: 8px;
  text-align: center;
  padding: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.producto:hover {
  transform: scale(1.03);
}

.producto img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 6px;
  margin: auto;
  display: block;
  background-color: white; /* Fondo por si la imagen no llena todo */
}


.producto a {
  display: block;
  margin-top: 0.5rem;
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

.producto a:hover {
  color: #007bff;
}




@media screen and (max-width: 768px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .grid-categorias {
    grid-template-columns: 1fr 1fr;
    padding: 1rem;
  }

  .contenedor-con-sidebar {
    flex-direction: column;
  }

  .sidebar {
    flex-basis: 100%;
  }

  .galeria-productos {
    grid-template-columns: repeat(2, 1fr);
  }

  .producto img {
    width: 100px;
    height: 100px;
  }

  .producto a {
    font-size: 0.9rem;
  }

  .product-horizontal {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-img {
    width: 100%;
    max-width: 250px;
  }

  .product-layout-flex {
    flex-direction: column;
    align-items: center;
  }

  .info-resumen-lateral {
    min-width: auto;
    width: 100%;
    margin-top: 1rem;
  }

  .caracteristicas-grid-3 {
    grid-template-columns: 1fr;
  }
}
