/* === 🧭 TÍTULOS DE CATEGORÍA === */
.category .title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  margin-bottom: 10px;
}

.category .title h2 {
  font-size: 18px;
  font-weight: 700;
  color: #3a2a0a;
}

/* === 🎠 CARRUSEL HORIZONTAL DE TARJETAS === */
.category .cards {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  gap: 16px;
  padding-bottom: 14px;
  padding-right: 8px;
}

.category .cards::-webkit-scrollbar {
  display: none; /* oculta scrollbar */
}

/* === 💳 TARJETAS DE PLATILLOS === */
.category .card {
  flex: 0 0 auto;
  width: 190px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.category .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* === 🖼️ IMAGEN DEL PLATILLO === */
.card .img {
  width: 100%;
  height: 165px;  /* antes 130px — un cuarto más alto */
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  cursor: pointer;
  transition: transform 0.3s ease; /* opcional: animación suave */
}

.card:hover .img {
  transform: scale(1.02); /* leve aumento al pasar el mouse */
}


/* === 🏷️ NOMBRE DEL PLATILLO === */
.card .info {
  padding: 8px 10px 0;
  text-align: left;
}

.card .info .name {
  font-size: 14px;
  font-weight: 600;
  color: #3a2a0a;
  line-height: 1.3em;
  height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* === 💰 PRECIO Y BOTÓN === */
.card .body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 14px;
}

.card .body .price {
  font-size: 15px;
  font-weight: 800;
  color: #3a2a0a;
}

.card .body .add {
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  background: #b91c1c;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(185, 28, 28, 0.3);
  transition: background 0.2s ease, transform 0.15s ease;
}

.card .body .add:hover {
  background: #9b1414;
  transform: scale(1.05);
}

/* === 🧩 ESTADO AGOTADO === */
.card.agotado {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.card .agotado-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #00000099;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

/* === ✨ EFECTO DEGRADADO LATERAL (para scroll) === */
.category {
  position: relative;
  overflow: hidden;
  padding-top: 4px;      /* antes 8px — reduce espacio superior */
  margin-bottom: 16px;   /* antes 30px — reduce espacio entre categorías */
}


.category .title {
  position: relative;
  z-index: 10;
  background: #fff;
}

/* Capas de sombra izquierda y derecha */
.category::before,
.category::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 90%;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s ease;
}

/* Degradado izquierdo */
.category::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: var(--left-shadow, 0);
}

/* Degradado derecho */
.category::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: var(--right-shadow, 1);
}

/* === 🎯 BARRA DE CATEGORÍAS === */
.categorias-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 10px 10px 12px;
  scroll-behavior: smooth;
  justify-content: flex-start;
  border-bottom: 1px solid #eee;
}

.categorias-bar::-webkit-scrollbar {
  display: none;
}

/* Botones */
.categorias-bar button {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  border: 1.8px solid #b91c1c;
  border-radius: 20px;
  background: #fff;
  color: #b91c1c;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  min-width: fit-content;
}

/* Hover */
.categorias-bar button:hover {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.25);
}

/* Activo */
.categorias-bar button.active {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 3px 8px rgba(185, 28, 28, 0.35);
}

/* === 📱 RESPONSIVE === */
@media (max-width: 1024px) {
  .category .card {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .category .card {
    width: 160px;
  }
  .card .img {
    height: 140px;
  }
  .card .body .add {
    padding: 5px 10px;
    font-size: 12px;
  }
  .categorias-bar {
    gap: 6px;
    padding: 10px 8px;
  }
  .categorias-bar button {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .category .card {
    width: 150px;
  }
  .card .img {
    height: 125px;
  }
  .card .info .name {
    font-size: 13px;
  }
  .card .body .price {
    font-size: 14px;
  }
}


/* === Selects de guarniciones (modal agregar) === */
#eco-selects select {
  width: 100%;
  appearance: none; /* Oculta la flecha nativa */
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff url('data:image/svg+xml;utf8,<svg fill="%23b91c1c" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 12px center;
  background-size: 16px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#eco-selects select:hover {
  border-color: #f59e0b;
}

#eco-selects select:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.25);
  outline: none;
}

/* Espaciado entre selects */
#eco-selects select + select {
  margin-top: 10px;
}

/* === Animación de aparición del bloque de guarniciones === */
#eco-selects {
  transition: all 0.3s ease;
}

#eco-selects.hidden {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

#eco-selects:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

/* === BOTÓN LUPA PARA AMPLIAR FOTO === */
.img-container {
  position: relative;
}

.ver-foto {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}

.ver-foto:hover {
  background: rgba(0,0,0,0.75);
}
