/* templates/shop/products_list.html */

.filter-categories .filter-btn {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-categories .filter-btn.is-filter-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Saltos de fila: solo móvil */
.filter-row-break {
  display: none;
}

@media (max-width: 768px) {
  .filter-row-break {
    display: block;
    flex-basis: 100%;
    width: 100%;
    height: 0;
    /* Evita que el break sume gap doble entre filas */
    margin: -0.35rem 0;
    padding: 0;
    border: 0;
    overflow: hidden;
  }

  /* Todos: sola y centrada (mismo ancho que el resto) */
  .filter-btn--todos {
    margin-left: auto;
    margin-right: auto;
  }
}

/* En el celular los botones van de a dos: el texto largo tiene que entrar en ese ancho. */
@media (max-width: 576px) {
  .filter-categories .filter-btn {
    gap: 0.3rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    font-size: 0.78rem;
  }

  .filter-categories .filter-btn i {
    font-size: 0.8rem;
  }
}

.sort-icon.js-reset-filters {
  cursor: pointer;
}

.product-card-image-container--placeholder {
  position: relative;
}

/* Badges de variantes (tallas/colores) en esquina inferior izquierda */
.product-card-image-container {
  position: relative;
}

.variant-badges {
  --variant-badge-size-base: clamp(20px, 2.3vw, 32px);
  --variant-badge-size: calc(var(--variant-badge-size-base) * 0.8);
  --variant-badge-font: clamp(0.65rem, 1.4vw, 0.95rem);

  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 10;

  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  max-width: calc(100% - 56px); /* deja espacio al badge de stock a la derecha */
  pointer-events: none; /* no bloquear clics sobre la tarjeta */
}

.variant-badge-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--variant-badge-size);
  margin: 0 -2px; /* acerca el guion a los cuadros sin romper el gap */

  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.variant-badge {
  width: var(--variant-badge-size);
  height: var(--variant-badge-size);
  border-radius: 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid var(--white);
  background: rgba(255, 255, 255, 0.92);
  color: #111;

  font-weight: 900;
  font-size: var(--variant-badge-font);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Sin stock: mucho más pálido que las disponibles (negro #111 sobre blanco) */
.variant-badge.is-out {
  background: rgba(255, 255, 255, 0.26);
  color: rgba(200, 200, 200, 0.88);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  opacity: 1;
  filter: none;
}

/* Paleta rojo-burdeo, solo en el catálogo */
.filter-bar-compact {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(480px 160px at 0% 0%, rgba(220, 53, 69, 0.16), transparent 68%),
    linear-gradient(165deg, #fff 0%, #fff8f8 58%, #f7eef0 100%);
  border: 1px solid rgba(122, 26, 40, 0.22);
  box-shadow: 0 12px 28px rgba(28, 18, 20, 0.08);
}

.filter-bar-compact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #1c1214 16%, #dc3545 50%, #7a1a28 78%, transparent);
  pointer-events: none;
}

.filter-bar-compact .filter-btn {
  background: #fff;
  border-color: rgba(122, 26, 40, 0.22);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.filter-bar-compact .filter-btn:hover {
  background: linear-gradient(135deg, rgba(242, 93, 108, 0.14), rgba(220, 53, 69, 0.08));
  border-color: rgba(220, 53, 69, 0.5);
  box-shadow: 0 6px 14px rgba(220, 53, 69, 0.16);
}

.filter-bar-compact .filter-btn.active:not(.filter-packs) {
  background: linear-gradient(135deg, #f25d6c 0%, #ad3a4c 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(242, 93, 108, 0.28);
}

.filter-bar-compact .filter-btn.active:not(.filter-packs) i {
  color: #fff;
}

.filter-bar-compact .filter-btn.filter-offer {
  animation: catalog-offer-glow 2.8s ease-in-out infinite;
}

.filter-bar-compact .filter-btn.filter-offer.active {
  animation: catalog-offer-glow 2.8s ease-in-out infinite;
}

@keyframes catalog-offer-glow {
  0%, 100% { box-shadow: 0 3px 10px rgba(220, 53, 69, 0.18); }
  50% { box-shadow: 0 6px 16px rgba(220, 53, 69, 0.32); }
}

.filter-bar-compact .sort-select {
  border-color: rgba(122, 26, 40, 0.22);
  background-color: #fff;
}

.filter-bar-compact .sort-select:hover,
.filter-bar-compact .sort-select:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.product-card-wrapper .btn-view-detail {
  background: linear-gradient(135deg, #f25d6c 0%, #ad3a4c 100%);
  color: #fff;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 4px 10px rgba(242, 93, 108, 0.26);
}

.product-card-wrapper .btn-view-detail:hover {
  background: linear-gradient(135deg, #ff7a86 0%, #c44d5e 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(242, 93, 108, 0.38);
}

.product-card-wrapper .btn-add-cart {
  background: linear-gradient(135deg, #48c964 0%, #1e7e34 100%);
  color: #fff;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.28);
}

.product-card-wrapper .btn-add-cart:hover {
  background: linear-gradient(135deg, #62d97a 0%, #28a745 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(40, 167, 69, 0.4);
}

.pagination .page-link {
  color: #7a1a28;
  background: #fff;
  border: 1px solid rgba(122, 26, 40, 0.22);
  border-radius: 999px;
  margin: 0 0.2rem;
  min-width: 2.5rem;
  text-align: center;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.pagination .page-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #f25d6c 0%, #ad3a4c 100%);
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(242, 93, 108, 0.28);
}

.pagination .page-item.active .page-link {
  color: #fff;
  background: linear-gradient(135deg, #dc3545 0%, #7a1a28 100%);
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(220, 53, 69, 0.28);
}
