/* assets/css/pages/user/productos.css */

/* --- Layout del Contenedor del Catálogo --- */
.container-fluid.product-catalog {
  margin: 0;
}
.row.product-grid {
  margin: 0 !important;
  padding: 0 !important;
}

/* --- Estilos de la Tarjeta de Producto --- */
.product-card {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* --- Card clickeable con stretched-link --- */
.product-card-media {
  display: block;
  position: relative;
}
.product-card-media .stretched-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}
.product-card-media:hover .card-img-top {
  opacity: 0.9;
}
.product-card-media .video-cover {
  pointer-events: none;
}

/* Botón carrito por encima del stretched-link */
.product-card .quick-add-btn {
  position: relative;
  z-index: 2;
}

.product-card .card-img-top {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0;
  transition: opacity 0.2s;
}

/* --- Video de Producto --- */
.video-cover {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #000;
}
/* Las reglas de video-cover iframe están en components/video-covers.css */

/* --- Cuerpo de la Tarjeta --- */
.product-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
  min-height: 200px;
}
.card-body-content {
  flex: 0 0 auto;
}
.card-body-footer {
  margin-top: auto;
}

/* --- Clases para Precios y Texto (reemplazan estilos en línea) --- */
.product-price-final {
  font-size: 1.4rem;
}
.product-price-original {
  font-size: 0.9rem;
  text-decoration: line-through;
  margin-bottom: 4px;
}
.product-name {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* --- Botón "Ver más" --- */
.btn-vermas {
  width: 100%;
  background-color: #fff;
  border: 1px solid #000;
  color: #000;
  text-align: center;
  padding: 6px 12px;
  transition: background-color 0.3s, color 0.3s;
  font-size: 0.9rem;
  text-decoration: none;
  display: block;
}
.btn-vermas:hover {
  background-color: #000;
  color: #fff;
  text-decoration: none;
}

/* --- Etiquetas de Promoción --- */
.promo-tag {
  background: linear-gradient(45deg, #ff6b6b, #ff4757);
  color: #fff;
  border-radius: 4px;
  padding: 2px 4px 2px 2px;
  margin-left: 6px;
  font-size: 1rem;
  font-weight: 700;
  vertical-align: middle;
}
.free-shipping {
  font-size: 0.9rem;
  color: #28a745;
  display: inline-flex;
  align-items: center;
}
.free-shipping i {
  margin-right: 4px;
}
.cuotas-subtle {
  display: inline-block;
  font-size: 1rem;
  font-weight: bold;
  color: #777;
  margin-top: 6px;
}

/* --- Selector de Densidad de Grid --- */
.grid-selector {
  display: flex;
  gap: 4px;
}
.grid-selector button {
  padding: 6px 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  color: #999;
  font-size: 12px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.grid-selector button:hover {
  border-color: #999;
  color: #666;
}
.grid-selector button.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* --- Grid Densidades (Desktop) --- */
@media (min-width: 992px) {
  .product-grid.grid-compact > .col {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .product-grid.grid-normal > .col {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .product-grid.grid-large > .col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Tablet: ajustar densidades */
@media (min-width: 768px) and (max-width: 991.98px) {
  .product-grid.grid-compact > .col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .product-grid.grid-normal > .col {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .product-grid.grid-large > .col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}