/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f7f7f7;
  color: #333;
}

/* Contenedor principal */
.contenedor-principal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

/* Títulos */
.titulo-principal {
  font-size: 2em;
  margin-bottom: 10px;
}

.subtitulo {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #555;
}

.titulo-seccion {
  font-size: 1.5em;
  margin: 40px 0 20px;
  color: #222;
}

/* Banner */
.banner {
  margin-bottom: 30px;
}

.banner-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 10px;
}

/* Carrusel */
.carousel {
  position: relative;
  margin-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.carousel-item img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

/* Botones del carrusel */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  border: none;
  padding: 10px;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
}

.prev { left: 15px; }
.next { right: 15px; }

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Indicadores del carrusel */
.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background-color: gold;
}

/* Grid de productos */
.grid-productos {
  text-align: center;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Tarjetas de producto */
.tarjeta-producto {
  background-color: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border 0.25s ease;
  position: relative;
}

/* 🔥 Efecto combinado hover */
.tarjeta-producto:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4); /* tono dorado */
  border: 1px solid #ffc107;
}

/* Imagen del producto */
.producto-img {
  max-height: 120px;
  width: auto;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

/* Pequeño zoom en la imagen también */
.tarjeta-producto:hover .producto-img {
  transform: scale(1.08);
}

.producto-nombre {
  font-size: 1.1em;
  margin-bottom: 8px;
  color: #000;
}

.producto-descripcion {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 10px;
}

.producto-precio {
  font-size: 1.1em;
  color: #e53935;
  font-weight: bold;
}

.mensaje {
  text-align: center;
  font-size: 1.2rem;
  color: #555;
  margin: 40px auto;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.contenedor-mensaje {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
}

/* Cuando no hay productos */
.contenedor-principal.sin-productos {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  text-align: center;
}

/* Dropdown de categorías */
.dropdown-categorias {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background-color: #444;
  color: #fff;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}

.dropdown-btn:hover {
  background-color: #333;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  margin-top: 5px;
  border-radius: 4px;
  overflow: hidden;
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu li a {
  color: #333;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

.dropdown-categorias:hover .dropdown-menu {
  display: block;
}

/* Botón agregar al carrito */
.form-carrito {
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.btn-carrito {
  background-color: #ffc107;
  border: none;
  padding: 6px 8px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.btn-carrito:hover {
  background-color: #e0a800;
}

/* Evita scroll lateral */
html, body {
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}
