/* ============================
   Página de categoría
============================ */
.cat-hero {
  background: var(--black); color: var(--white);
  text-align: center; padding: 46px 24px 34px;
}
.cat-hero h1 { font-size: 2rem; font-weight: 800; }
.cat-hero p { margin-top: 8px; color: rgba(255,255,255,.7); font-size: .9rem; }

.cat-wrap { max-width: 1240px; margin: 0 auto; padding: 32px 24px 60px; }
.cat-promo-banner {
  background: #fff2f0; border: 1px solid #ffd6d6; color: var(--red-dark);
  font-size: .82rem; font-weight: 700; padding: 10px 16px; border-radius: 8px; margin-bottom: 20px;
}

.cat-toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-bottom: 22px;
}
.cat-count { font-size: .85rem; color: var(--gray-700); }
.cat-sort select {
  padding: 8px 12px; border-radius: 6px; border: 1px solid var(--gray-300);
  font-family: inherit; font-size: .82rem;
}

.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.product-card {
  position: relative;
  border: 1px solid var(--gray-100); border-radius: var(--radius); overflow: hidden;
  background: var(--white); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.fav-btn {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.9); color: var(--gray-500); font-size: .9rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.fav-btn:hover { color: var(--red); }
.fav-btn.active { color: var(--red); }
.product-img {
  position: relative; aspect-ratio: 1/1; background: var(--gray-50);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: var(--white); font-size: .68rem; font-weight: 800;
  padding: 4px 9px; border-radius: 4px; letter-spacing: .3px;
}
.product-badge.badge-img { background: none; padding: 0; }
.product-badge.badge-img img { width: 46px; height: auto; }
.product-info { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name { font-size: .88rem; font-weight: 600; color: var(--red); line-height: 1.35; min-height: 2.6em; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; }
.price-old { font-size: .78rem; color: var(--red); text-decoration: line-through; }
.price-new { font-size: 1.05rem; font-weight: 800; color: var(--black); }
.product-stock-out { font-size: .74rem; color: var(--red); font-weight: 700; }
.btn-add {
  margin-top: auto; background: var(--red); color: var(--white); border: none;
  padding: 10px; border-radius: 6px; font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-add:hover { background: var(--red-dark); }
.btn-add:disabled { background: var(--gray-300); color: var(--gray-700); cursor: not-allowed; }

.cat-empty {
  text-align: center; padding: 70px 20px; color: var(--gray-500);
}
.cat-empty i { font-size: 2.2rem; margin-bottom: 14px; color: var(--gray-300); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination button {
  width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--gray-300);
  background: var(--white); font-weight: 700; font-size: .82rem;
}
.pagination button.active { background: var(--red); border-color: var(--red); color: var(--white); }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
