/* ═══════════════════════════════════════════════════════════════
   CATALOG PAGE — Punto Digital
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────── */
.catalog-hero {
  background: linear-gradient(135deg, var(--black-bg) 0%, var(--black-light) 100%);
  padding: 170px 16px 40px;
  text-align: center;
}
.catalog-hero h1 {
  font-size: clamp(26px, 6vw, 48px);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--gold-primary);
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.catalog-hero p {
  font-size: 14px;
  color: var(--text-gray);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Container & layout ───────────────────────────────────────── */
.catalog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Filter toggle (mobile only) ─────────────────────────────── */
.filter-toggle-btn {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--black-card);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: 10px;
  color: var(--text-white);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
.filter-toggle-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.filter-toggle-btn i { transition: transform 0.3s ease; }
.filter-toggle-btn.open i.fa-chevron-down { transform: rotate(180deg); }

/* ── Filters sidebar ──────────────────────────────────────────── */
.filters-sidebar {
  background: var(--black-card);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(212,168,67,0.1);
  position: sticky;
  top: 90px;
}
.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.filters-header h3 { color: var(--text-white); font-size: 16px; font-weight: 600; }
.clear-filters {
  background: none; border: none;
  color: var(--gold-primary); cursor: pointer;
  font-size: 13px; font-family: var(--font-family);
  text-decoration: underline;
}
.filter-group { margin-bottom: 20px; }
.filter-group h4 {
  color: var(--text-white); font-size: 14px; font-weight: 600;
  margin-bottom: 12px; display: flex; align-items: center; gap: 7px;
}
.filter-group h4 i { color: var(--gold-primary); font-size: 12px; }
.filter-options { display: flex; flex-direction: column; gap: 6px; }
.filter-option {
  display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer;
}
.filter-option input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--gold-primary); flex-shrink: 0;
}
.filter-option label {
  color: var(--text-gray); cursor: pointer; font-size: 13px;
  display: flex; justify-content: space-between; width: 100%;
}
.filter-count { color: var(--text-dark); font-size: 11px; }

.price-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px; align-items: center;
}
.price-input {
  background: var(--black-light);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 9px 10px;
  color: var(--text-white); font-size: 14px;
  width: 100%; font-family: var(--font-family);
}
.price-input:focus { outline: none; border-color: var(--gold-primary); }
.price-separator { color: var(--text-gray); font-size: 14px; text-align: center; }

/* ── Catalog main ─────────────────────────────────────────────── */
.catalog-main { min-height: 400px; }

.catalog-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 20px;
  gap: 12px; flex-wrap: wrap;
}
.results-info { color: var(--text-gray); font-size: 13px; flex-shrink: 0; }
.catalog-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.search-bar { position: relative; flex: 1; min-width: 180px; }
.search-input {
  width: 100%; padding: 10px 42px 10px 14px;
  background: var(--black-card);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: 10px; color: var(--text-white);
  font-size: 14px; font-family: var(--font-family);
  transition: border-color 0.2s ease;
}
.search-input:focus { outline: none; border-color: var(--gold-primary); }
.search-btn {
  position: absolute; right: 5px; top: 50%;
  transform: translateY(-50%);
  background: var(--gold-primary); border: none;
  color: var(--black-bg); width: 32px; height: 32px;
  border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}

.sort-select {
  background: var(--black-card);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: 10px; color: var(--text-white);
  padding: 9px 12px; font-size: 13px;
  font-family: var(--font-family); cursor: pointer;
}
.view-toggle {
  display: flex; background: var(--black-card);
  border-radius: 10px; border: 1px solid rgba(212,168,67,0.2);
  overflow: hidden; flex-shrink: 0;
}
.view-btn {
  background: none; border: none; color: var(--text-gray);
  padding: 9px 12px; cursor: pointer;
  transition: all 0.2s ease; font-size: 14px;
}
.view-btn.active { background: var(--gold-primary); color: var(--black-bg); }

/* ── Catalog card compacta ────────────────────────────────────── */
.catalog-card {
  padding: 0; text-align: left; cursor: pointer;
  border-radius: 14px; overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(212,168,67,0.18);
  border-color: rgba(212,168,67,0.4);
}
.catalog-card-img {
  position: relative; width: 100%; height: 180px;
  background: var(--black-light); overflow: hidden;
}
.catalog-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease; display: block;
}
.catalog-card:hover .catalog-card-img img { transform: scale(1.05); }
.catalog-card-body {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.catalog-card-name {
  font-size: 14px; font-weight: 600; color: var(--text-white);
  line-height: 1.3; margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-card-price {
  font-size: 16px; font-weight: 700;
  color: var(--gold-primary); margin: 0;
}
.catalog-card-actions { display: flex; gap: 8px; margin-top: 4px; }
.catalog-card-actions .btn-view-details {
  flex: 1; padding: 9px 12px; font-size: 12px;
  font-weight: 700; letter-spacing: 0.5px; border-radius: 8px;
  border: 1.5px solid var(--gold-primary);
  background: rgba(212,168,67,0.08); color: var(--gold-primary);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 6px; transition: all 0.2s ease;
  font-family: var(--font-family); text-transform: uppercase;
}
.catalog-card-actions .btn-view-details:hover {
  background: var(--gold-primary); color: var(--black-bg);
}
.catalog-card-actions .btn-add-cart {
  width: 38px; height: 38px; border-radius: 8px;
  border: 1.5px solid rgba(212,168,67,0.3);
  background: rgba(212,168,67,0.06); color: var(--gold-primary);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 14px;
  transition: all 0.2s ease; flex-shrink: 0;
}
.catalog-card-actions .btn-add-cart:hover {
  background: var(--gold-primary); color: var(--black-bg);
  border-color: var(--gold-primary);
}

/* ── Products grid ────────────────────────────────────────────── */
.catalog-main .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.catalog-main .products-grid.list-view { grid-template-columns: 1fr; }
.catalog-main .products-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  text-align: left;
}
.catalog-main .products-grid.list-view .product-image { margin-bottom: 0; height: 140px; }

/* Resetear estilos de cards.css para tarjetas dentro del catálogo */
.catalog-main .product-card {
  padding: 0;
  text-align: left;
  overflow: hidden;
  border-radius: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.catalog-main .product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(212,168,67,0.18);
  border-color: rgba(212,168,67,0.4);
}
/* Quitar el ::before animado de cards.css en el catálogo */
.catalog-main .product-card::before { display: none; }

/* ── No results ───────────────────────────────────────────────── */
.no-results { text-align: center; padding: 60px 20px; color: var(--text-gray); }
.no-results i { font-size: 44px; color: var(--gold-primary); margin-bottom: 16px; display: block; }
.no-results h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-white); }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex; justify-content: center;
  align-items: center; gap: 6px;
  margin-top: 24px; flex-wrap: wrap;
}
.pagination button {
  background: var(--black-card);
  border: 1px solid rgba(212,168,67,0.2);
  color: var(--text-white); padding: 8px 13px;
  border-radius: 8px; cursor: pointer; font-size: 13px;
  font-family: var(--font-family); transition: all 0.2s ease; min-width: 38px;
}
.pagination button:hover,
.pagination button.active {
  background: var(--gold-primary); color: var(--black-bg);
  border-color: var(--gold-primary);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Light theme ──────────────────────────────────────────────── */
[data-theme="light"] .filters-sidebar,
[data-theme="light"] .search-input,
[data-theme="light"] .sort-select,
[data-theme="light"] .view-toggle,
[data-theme="light"] .pagination button { background: #ffffff; }
[data-theme="light"] .price-input { background: #f8f9fa; color: #212529; }
[data-theme="light"] .filter-toggle-btn { background: #ffffff; }
[data-theme="light"] .catalog-card-name { color: #212529; }
[data-theme="light"] .catalog-card-actions .btn-view-details {
  border-color: var(--gold-dark); color: var(--gold-dark);
  background: rgba(184,147,68,0.06);
}
[data-theme="light"] .catalog-card-actions .btn-view-details:hover {
  background: var(--gold-dark); color: #fff;
}
[data-theme="light"] .catalog-card-actions .btn-add-cart {
  border-color: rgba(184,147,68,0.3); color: var(--gold-dark);
}
[data-theme="light"] .catalog-card-actions .btn-add-cart:hover {
  background: var(--gold-dark); color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 1fr; gap: 0; }
  .filter-toggle-btn { display: flex; }
  .filters-sidebar {
    position: static; display: none;
    margin-bottom: 20px; border-radius: 12px;
  }
  .filters-sidebar.mobile-open { display: block; }
  .catalog-main { order: 1; }
}

/* Mobile ≤ 640px */
@media (max-width: 640px) {
  .catalog-hero { padding: 140px 14px 32px; }
  .catalog-container { padding: 16px 12px 32px; }
  .catalog-main .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .catalog-main .products-grid.list-view { grid-template-columns: 1fr; }
  .catalog-main .products-grid.list-view .product-card { grid-template-columns: 100px 1fr; gap: 12px; }
  .catalog-main .products-grid.list-view .product-image { height: 100px; }
  .catalog-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .catalog-controls { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
  .search-bar { min-width: 0; }
  .sort-select { font-size: 12px; padding: 9px 8px; }
  .catalog-card-img { height: 140px; }
  .catalog-card-body { padding: 10px 10px 12px; gap: 5px; }
  .catalog-card-name { font-size: 13px; }
  .catalog-card-price { font-size: 14px; }
  .catalog-card-actions .btn-view-details { font-size: 11px; padding: 8px; }
  .catalog-card-actions .btn-add-cart { width: 34px; height: 34px; font-size: 13px; }
  .product-image { height: 130px !important; }
  .product-content { padding: 10px 8px 12px; gap: 5px; }
  .product-content h4, .product-content .product-name { font-size: 12px; line-height: 1.3; }
  .product-description, .product-rating { display: none; }
  .product-brand { font-size: 10px; }
  .current-price { font-size: 13px; }
  .original-price { font-size: 11px; }
  .product-stock { font-size: 11px; }
  .product-actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
  .btn-view-details { font-size: 11px; padding: 8px 10px; }
  .btn-add-cart { width: 34px; height: 34px; padding: 0; display: flex; align-items: center; justify-content: center; }
  .product-badge, .product-discount { font-size: 9px; padding: 3px 6px; }
  .pagination { gap: 4px; }
  .pagination button { padding: 7px 10px; font-size: 12px; min-width: 34px; }
  .filters-sidebar { padding: 16px; }
  .filter-group h4 { font-size: 13px; }
  .filter-option label { font-size: 12px; }
  .price-inputs { gap: 6px; }
  .price-input { padding: 8px; font-size: 13px; }
}

/* Small mobile ≤ 380px */
@media (max-width: 380px) {
  .catalog-main .products-grid { grid-template-columns: 1fr; gap: 12px; }
  .catalog-controls { grid-template-columns: 1fr auto; }
  .view-toggle { display: none; }
}
