/* ═══════════════════════════════════════════════════════════
   CALESAN — PRODUCTOS PAGE CSS
   <link rel="stylesheet" href="/css/calesan.productos.css">
═══════════════════════════════════════════════════════════ */

/* ── FILTROS ── */
.filters-bar {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 68px;
  z-index: 50;
}
.filters-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  font-family: var(--f-body);
}
.filter-btn:hover      { border-color: var(--red); color: var(--red); }
.filter-btn.active     { background: var(--red); border-color: var(--red); color: #fff; }
.filter-count          { background: var(--border); border-radius: 10px; padding: 1px 6px; font-size: 11px; color: var(--text3); }
.filter-btn.active .filter-count { background: rgba(255,255,255,0.2); color: rgba(255,255,255,0.9); }
.search-wrap           { margin-left: auto; position: relative; }
.search-input {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 8px 14px 8px 38px;
  font-size: 14px;
  font-family: var(--f-body);
  color: var(--text);
  width: 220px;
  outline: none;
  transition: border-color var(--ease);
}
.search-input:focus { border-color: var(--red); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); }
.search-icon svg { width: 16px; height: 16px; }

/* ── LAYOUT CATÁLOGO ── */
.catalog { padding: 48px 0 80px; }
.catalog-grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }

/* ── SIDEBAR ── */
.sidebar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: sticky;
  top: 140px;
}
.sidebar-section { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-section:last-child { border-bottom: none; }
.sidebar-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
}
.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--ease);
  margin-bottom: 2px;
}
.cat-link:hover        { background: var(--red-light); color: var(--red); }
.cat-link.active       { background: var(--red-light); color: var(--red); font-weight: 600; }
.cat-link-badge        { background: var(--bg3); border-radius: 10px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: var(--text3); }
.cat-link.active .cat-link-badge { background: var(--red-mid); color: var(--red); }
.sidebar-marcas        { display: flex; flex-direction: column; gap: 8px; }
.marca-check           { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 0; }
.marca-check input     { accent-color: var(--red); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.marca-check span      { font-size: 14px; color: var(--text2); font-weight: 500; }

/* ── TOOLBAR + GRID ── */
.products-main {}
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.products-count { font-size: 14px; color: var(--text3); }
.products-count strong { color: var(--text); font-weight: 600; }
.sort-select {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 8px 14px;
  font-size: 14px;
  font-family: var(--f-body);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--ease);
}
.sort-select:focus { border-color: var(--red); }
.view-toggle { display: flex; gap: 4px; }
.view-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: var(--bg2);
  color: var(--text3);
  transition: all var(--ease);
}
.view-btn:hover, .view-btn.active { border-color: var(--red); color: var(--red); background: var(--red-light); }
.view-btn svg { width: 16px; height: 16px; }

/* ── GRID DE PRODUCTOS ── */
.pg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pg.list-view { grid-template-columns: 1fr; }
.pg.list-view .product-card   { flex-direction: row; }
.pg.list-view .product-img-area { width: 180px; height: auto; border-bottom: none; border-right: 1px solid var(--border); }
.pg.list-view .product-info   { padding: 24px; justify-content: center; }
.pg.list-view .prod-name      { font-size: 17px; margin-bottom: 8px; }

/* ── PAGINACIÓN ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.page-btn {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  background: var(--bg2);
  font-family: var(--f-body);
  transition: all var(--ease);
}
.page-btn:hover       { border-color: var(--red); color: var(--red); }
.page-btn.active      { background: var(--red); border-color: var(--red); color: #fff; }
.page-dots            { color: var(--text3); font-size: 14px; padding: 0 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; flex-wrap: wrap; }
  .sidebar-section { flex: 1; min-width: 200px; }
  .pg { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .pg { grid-template-columns: 1fr; }
  .filters-bar { position: static; }
  .pg.list-view .product-card { flex-direction: column; }
  .pg.list-view .product-img-area { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}

