/* -------------------------------------------
   TIENDA - CSS
-------------------------------------------- */
/* FUENTES */
@import url('/taggi/assets/fonts.css');

/* ESTILOS PARA SCROLL */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #3c7f78;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #2b6058;
}

/* Reset básico */
body,
html {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #f9f9f9;
  color: #565656;
}

/* Encabezado de la tienda */
.pagina-tienda {
  padding: 0px 20px 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Título con efecto */
.titulo-tienda {
  font-size: 3.5rem;
  color: #3ecb85;
  text-align: center;
  margin-bottom: 50px;
  font-family: 'Lilita One Regular';
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.titulo-tienda:after {
  content: '';
  position: absolute;
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #3ecb85, transparent);
  bottom: -15px;
  left: 20%;
}

/* Grid de productos */
.grid-productos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

/* Card de cada producto - Nueva versión */
.grid-item {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.grid-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(62, 203, 133, 0.2);
}

/* Contenedor de imagen con overlay */
.image-container {
  position: relative;
  height: 250px;
  overflow: hidden;
  background-color: #f8f8f8;
}

/* Imagen de producto mejorada */
.grid-item-imagen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.8s ease;
}

.grid-item:hover .grid-item-imagen {
  transform: scale(1.08);
}

/* Badge de destacado */
.destacado-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #ffc667;
  color: #333;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Contenido del producto */
.product-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

/* Título del producto mejorado */
.grid-item-titulo {
  font-size: 1.2rem;
  color: #333;
  margin: 0 0 12px 0;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.grid-item:hover .grid-item-titulo {
  color: #3ecb85;
}

/* Descripción corta mejorada */
.grid-item-descripcion {
  font-size: 0.85rem;
  color: #777;
  margin: 0 0 15px 0;
  line-height: 1.6;
  flex-grow: 1;
}

/* Línea divisoria elegante */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  margin: 5px 0 15px;
}

/* Fila de precio y acciones */
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Precio mejorado */
.grid-item-precio {
  font-size: 1.4rem;
  font-weight: 700;
  color: #3c7f78;
  margin: 0;
  display: flex;
  align-items: center;
}

.currency {
  font-size: 0.9rem;
  margin-left: 4px;
  font-weight: 500;
}

/* Botones de acción */
.botones-producto {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botón Añadir al carrito mejorado */
.btn-anadir {
  background-color: #3ecb85;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(62, 203, 133, 0.3);
}

.btn-anadir:hover {
  background-color: #28a76d;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(62, 203, 133, 0.4);
}

.btn-anadir:active {
  transform: translateY(0);
}

/* Icono carrito */
.cart-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Quick view button */
.quick-view {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(60, 127, 120, 0.9);
  color: white;
  text-align: center;
  padding: 12px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.grid-item:hover .quick-view {
  transform: translateY(0);
}

.quick-view:hover {
  background-color: rgba(60, 127, 120, 1);
}

/* Stock indicator */
.stock-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 128px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 500;
  margin-bottom: 10px;
}

/* verde: > 15 ud */
.stock-ok {
  background: #e8f7f0;
  color: #28a76d;
}

/* naranja: 1-15 ud */
.stock-low {
  background: #fff6e8;
  color: #f5b041;
}

/* rojo: 0 ud */
.stock-none {
  background: #fdecea;
  color: #e74c3c;
}

/* Botón Ver Producto (preservado del código original) */
.btn-ver-producto {
  background-color: #ffc667;
  color: #000;
  padding: 10px 25px;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-ver-producto:hover {
  background-color: #fbbd08;
  transform: scale(1.03);
}

.not-decoration {
  text-decoration: none;
}

/* Popover carrito mejorado */
.popover-carrito {
  position: absolute;
  background-color: #ffffff !important;
  color: #333;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 14px;
  animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  border-left: 4px solid #3ecb85;
}

.popover-carrito img {
  width: 60px;
  height: 60px;
  margin-right: 15px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.popover-info {
  display: flex;
  flex-direction: column;
}

.popover-title {
  font-weight: 600;
  margin: 0 0 5px 0;
}

.popover-qty {
  font-size: 0.85rem;
  color: #777;
}

.popover-success {
  display: flex;
  align-items: center;
  color: #28a76d;
  font-size: 0.85rem;
  margin-top: 5px;
}

.success-icon {
  width: 16px;
  height: 16px;
  fill: #28a76d;
  margin-right: 5px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive: Tablets */
@media (min-width: 600px) {
  .grid-productos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive: Escritorio */
@media (min-width: 900px) {
  .grid-productos {
    grid-template-columns: repeat(3, 1fr);
  }
}

.toast-stock {
  position: fixed;
  top: 20px;
  /* sitio visible */
  right: 20px;
  z-index: 10000;
  /* sobre todo lo demás */
  background: #e74c3c;
  /* rojo avisos */
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  font-size: 14px;
  animation: fadein .3s ease-out;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.disabled {
  background-color: #bbb;
  box-shadow: 0 4px 12px rgba(187, 187, 187, 0.3);
}

.disabled:hover {
  background-color: #bbb;
}
