/* Tarjeta de producto (.best-sellers), usada en Home, catálogo y productos relacionados. Portado de plantilla/assets/css/main.css (Best Sellers Section) + ajustes de theme.css. */

.best-sellers .product-card {
  position: relative;
  height: 100%;
  background-color: var(--surface-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.best-sellers .product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.best-sellers .product-card:hover .default-image {
  opacity: 0;
}

.best-sellers .product-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background-color: #f8f9fa;
}

.best-sellers .product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.best-sellers .product-image .default-image {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.best-sellers .product-tags {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.best-sellers .product-tags .badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 500;
  border-radius: 4px;
  margin-right: 5px;
}

.best-sellers .product-tags .bg-accent {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

.best-sellers .product-tags .bg-sale {
  background-color: #ff6b6b;
  color: var(--contrast-color);
}

.best-sellers .product-tags .bg-sold-out {
  background-color: #6c757d;
  color: var(--contrast-color);
}

.best-sellers .product-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  z-index: 2;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.best-sellers .product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.best-sellers .product-info {
  padding: 1.25rem;
}

.best-sellers .product-title {
  font-family: var(--heading-font);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  height: 2.4rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.best-sellers .product-title a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.best-sellers .product-title a:hover {
  color: var(--accent-color);
}

.best-sellers .product-price {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.best-sellers .product-price .current-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading-color);
}

.best-sellers .product-price .original-price {
  font-size: 0.875rem;
  text-decoration: line-through;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
}

.best-sellers .btn-add-to-cart {
  width: 100%;
  padding: 0.6rem;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.best-sellers .btn-add-to-cart:hover {
  background-color: color-mix(in srgb, var(--accent-color), #000 10%);
}

.best-sellers .btn-add-to-cart i {
  font-size: 1rem;
}

.best-sellers .btn-add-to-cart.btn-disabled {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.best-sellers .btn-add-to-cart.btn-disabled:hover {
  background-color: #e9ecef;
}

@media (max-width: 991.98px) {
  .best-sellers .product-title {
      font-size: 0.95rem;
    }
}

@media (max-width: 767.98px) {
  .best-sellers .product-card {
      max-width: 320px;
      margin: 0 auto;
    }

  .best-sellers .product-actions {
      opacity: 1;
      transform: translateX(0);
    }
}

/* Ajustes de plantilla/assets/css/theme.css */

/* Solo hay una foto por producto: sin intercambio de imagen al hover */
.best-sellers .product-card:hover .default-image {
  opacity: 1;
}

.best-sellers .product-actions a,
.product-list .product-actions a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--surface-color);
  border: none;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.best-sellers .product-actions a:hover,
.product-list .product-actions a:hover {
  background-color: var(--accent-color);
  color: #fff;
}

.product-category-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-tertiary-text);
  margin-bottom: 0.25rem;
}

/* Enlace "Ver carrito" que WooCommerce añade tras agregar por AJAX */
.best-sellers .added_to_cart {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Botón de la tarjeta cuando es un enlace */
.best-sellers a.btn-add-to-cart {
  text-decoration: none;
}
