/* ============================================================
   CATALOG.CSS
   Tarjetas de producto, grid del catálogo y filtros
   ============================================================ */

/* ---- Grid de productos ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

/* ---- Tarjeta de producto ---- */
.product-card {
  position: relative;
  background-color: #fff;
 /* border-radius: var(--radius-md);*/
 border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(14, 13, 15, 0.06);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.product-card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--color-charcoal);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card-image img.loaded {
  opacity: 1;
}

.badge-new {
  background-color: var(--color-gold);
  color: var(--color-noir);
}

.product-card:hover .product-card-image img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background-color: var(--color-noir);
  color: var(--color-ivory);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.product-badge.out-of-stock {
  background-color: var(--color-rose);
  color: var(--color-noir);
}

.product-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.product-card-category {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.product-card-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--color-noir);
  font-weight: 500;
}

.product-card-brand {
  font-size: 0.8rem;
  color: var(--color-mist);
}

.product-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  gap: 0.6rem;
}

.product-card-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-noir);
  font-weight: 500;
}

.product-card-availability {
  font-size: 0.75rem;
  color: var(--color-mist);
}

.product-card-availability.low {
  color: var(--color-rose);
}

.product-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

/*Estilos para botones en catalogo*/
.product-card-actions .btn {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 0.72rem;
border-radius: 10px;
}

.product-card-actions .btn-icon-only {
  flex: 0 0 auto;
  width: 44px;
  padding: 0;
}

.product-card-actions .btn-icon-only svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0 !important;
}

/* ============================================================
   BARRA DE FILTROS Y BÚSQUEDA
   ============================================================ */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(14, 13, 15, 0.08);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.6rem 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(14, 13, 15, 0.15);
  border-radius: 999px;
  color: var(--color-noir);
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.filter-tab.active {
  background-color: var(--color-noir);
  color: var(--color-ivory);
  border-color: var(--color-noir);
}

/* ---- Buscador ---- */
.search-box {
  position: relative;
  min-width: 240px;
  flex: 1;
  max-width: 360px;
}

.search-box input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  border: 1px solid rgba(14, 13, 15, 0.15);
  border-radius: 999px;
  font-size: 0.9rem;
  background-color: #fff;
  color: var(--color-noir);
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--color-gold);
  outline: none;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--color-mist);
  fill: none;
  stroke-width: 1.5;
}

/* ---- Ordenamiento ---- */
.sort-select {
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(14, 13, 15, 0.15);
  border-radius: 999px;
  font-size: 0.85rem;
  background-color: #fff;
  color: var(--color-noir);
  cursor: pointer;
}

/* ---- Estado vacío ---- */
.empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  grid-column: 1 / -1;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto;
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .product-card-actions {
    flex-direction: column;
  }

  .product-card-actions .btn-icon-only {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-card-actions .btn {
    font-size: 0.7rem;
    padding: 0.65rem 0.8rem;
  }

  .product-card-actions svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
  }
}
/* Stagger para grids */
.product-grid [data-reveal]:nth-child(1) { transition-delay: 0s; }
.product-grid [data-reveal]:nth-child(2) { transition-delay: 0.05s; }
.product-grid [data-reveal]:nth-child(3) { transition-delay: 0.1s; }
.product-grid [data-reveal]:nth-child(4) { transition-delay: 0.15s; }
