/* carrito.css */

/* Contenedor principal del carrito */
main.container {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Lista de ítems */
.carrito-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Cada ítem del carrito */
.item-carrito {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Imagen pequeña del producto */
.item-carrito .img-carrito {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

/* Información del ítem */
.item-carrito .info-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.item-carrito .info-item h3,
.item-carrito .info-item p {
  margin: 0;
  font-size: 0.9rem;
}

/* Botón eliminar dentro del ítem */
.item-carrito .eliminar-item {
  align-self: flex-end;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #a00;
  transition: color 0.2s;
}
.item-carrito .eliminar-item:hover {
  color: #e00;
}

/* Separador opcional */
.item-carrito hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 1rem 0;
}

/* Total */
.total-carrito {
  text-align: right;
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 1rem;
}

/* Mensaje mínimo de pedido */
.mensaje-error {
  text-align: center;
  color: #a00;
  font-size: 0.95rem;
}

/* Acciones del carrito */
.acciones-carrito {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Botones secundarios y WhatsApp */
.boton-secundario,
.boton-wpp {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.boton-secundario {
  background: #f5f5f5;
  color: #333;
}
.boton-secundario:hover {
  background: #e0e0e0;
}

.boton-wpp {
  background: #25D366;
  color: #fff;
}
.boton-wpp:hover {
  background: #1ebe5d;
}

/* Responsive: apilar ítems en pantallas pequeñas */
@media (max-width: 600px) {
  .item-carrito {
    flex-direction: column;
    align-items: center;
  }
  .item-carrito .info-item {
    align-items: center;
    text-align: center;
  }
  .total-carrito {
    text-align: center;
  }
  .acciones-carrito {
    justify-content: center;
  }
}