/* =====================================================
   GRID DE PRODUCTOS
===================================================== */
.products-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 👈 5 en pantallas grandes */
  gap: clamp(2px, 1.5vw, 10px);
  padding: clamp(5px, 3vw, 15px);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}


/* =====================================================
   TARJETA PRODUCTO
===================================================== */
.product-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

/* =====================================================
   IMAGEN
===================================================== */
.img-box {
  position: relative;
  width: 100%;
  height: clamp(140px, 20vw, 200px);
  overflow: hidden;
  padding: 10px;
  background: white;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* =====================================================
   INFO GENERAL
===================================================== */
.producto-info {
  display: flex;
  flex-direction: column;
  gap: clamp(0px, 1vw, 8px);
  background: #ffffff;
  padding: 15px !important;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* =====================================================
   FILA SUPERIOR (nombre + likes)
===================================================== */
.info-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -10px !important;
}

/* =====================================================
   LIKES
===================================================== */
.likes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(10px, 2.5vw, 13px);
  font-weight: 600;
  color: #777;
}

.likes i {
  font-size: clamp(11px, 2.5vw, 14px);
  color: #fe6665;
}

/* Desktop */
.likes-text {
  display: inline;
}

/* Mobile */
.likes-num {
  display: none;
}

/* =====================================================
   PERFIL (USUARIO)
===================================================== */
.perfil {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 6px);
  padding: clamp(6px, 1vw, 10px);
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 600;
  white-space: nowrap;
}

.perfil-img {
  width: clamp(16px, 2vw, 20px);
  height: clamp(16px, 2vw, 20px);
}

.perfil a {
  text-decoration: none;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =====================================================
   ETIQUETAS DIAGONALES
===================================================== */

.etiqueta {
  position: absolute;
  top: clamp(15px, 2vw, 18px) !important;
  left: clamp(15px, 2vw, 15px) !important;
  background: #fff;
  font-size: clamp(8px, 3vw, 11px);
  padding: 3px 7px;
  border-radius: 6px;
  color: #333;
  z-index: 5;
}

.etiqueta.oferta { background: #e11a2b; color: white;}
.etiqueta.promo2x1 { background: #28a745; color: white;}


/* =====================================================
   INFO PRODUCTO
===================================================== */
.producto-info {
  padding: clamp(8px, 1.5vw, 5px);
}

.producto-info h3 {
  line-height: 1.2;
  font-size: clamp(14px, 2.7vw, 17px);
  text-transform: capitalize;
  gap: 2px;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  color: #222;
}

/* =====================================================
   CALIFICACIONES
===================================================== */

.calificaciones {
  font-size: clamp(9px, 1vw, 11px);
}

/* =====================================================
   TAGS (DEBAJO DEL NOMBRE)
===================================================== */
.tag-desc,
.tag-2x1 {
  display: inline-block;
  font-size: clamp(9px, 1vw, 11px);
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  width: 50%;
  margin-bottom: -4px;
}

.tag-desc { background: #e11a2b; }
.tag-2x1 { background: #28a745; }


/* =====================================================
   PRECIO
===================================================== */
.precio {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 5px;
  font-weight: bold;
}

.precio .moneda {
  font-size: clamp(9px, 1vw, 12px);
}

.precio .entero {
  font-size: clamp(14px, 2vw, 20px);
}

.precio .decimal {
  font-size: clamp(10px, 1vw, 12px);
}

.precio .antes-moneda {
  font-size: clamp(8px, 1vw, 12px);
}

.precio .antes {
  font-size: clamp(9px, 1vw, 14px);
  color: #a1a3a5;
  text-decoration: line-through;
}

.precio .x2 {
  font-size: clamp(10px, 1vw, 12px);
  color: #28a745;
}

/* =====================================================
   TARJETA AGREGAR PRODUCTO
===================================================== */
.product-card.agregar-producto {
  display: flex;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}

.product-card.agregar-producto .img-box {
  display: flex;
  align-items: center;
  justify-content: center;

  height: clamp(140px, 20vw, 180px);
  border-radius: 12px;

  background-image: url("../../img/agregar_producto.jpg");
  background-size: 120%;
  background-position: center;
  background-repeat: no-repeat;

  border: 3px solid #2196f3;
}

.product-card.agregar-producto i {
  font-size: clamp(30px, 4vw, 50px);
  color: #2196f3;
}

/* =====================================================
   MENU CONFIG
===================================================== */
.menu-producto {
  position: absolute;
  top: clamp(40px, 7vw, 50px);
  right: clamp(5px, 1vw, 12px);
  display: none;
  flex-direction: column;
  padding: 5px;
  border-radius: 5px;
  z-index: 9999;
  background: white;
}

.menu-producto button {
  font-size: clamp(9px, 1vw, 11px);
  padding: 6px;
  border: none;
  cursor: pointer;
  background: white;
}

.menu-producto button:hover {
  background: #7256cf;
  color: white;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (min-width: 1000px) {
  .products-container {
    width: 90%;
  }
}

/* Laptop */
@media (max-width: 1200px) {
  .products-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet */
@media (max-width: 992px) {
  .products-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Móvil */
@media (max-width: 768px) {
  .products-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Móvil pequeño */
@media (max-width: 480px) {
  .products-container {
    gap: 8px;
    padding: 8px;
  }
}

/* Extra pequeño */
@media (max-width: 340px) {
  .products-container {
    gap: 6px;
  }
}