/* ═══════════════════════════════════════════════════════════
   CALESAN — CATEGORIAS PAGE CSS
   <link rel="stylesheet" href="/css/calesan.categorias.css">
═══════════════════════════════════════════════════════════ */

/* ── BUSCADOR EN HERO ── */
.search-cat-wrap { position: relative; }
.search-cat-input {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 10px 14px 10px 40px;
  font-size: 14px;
  font-family: var(--f-body);
  color: var(--text);
  width: 260px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search-cat-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,40,26,0.08);
}
.search-cat-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text3); pointer-events: none;
}

/* ── FILTROS BAR ── */
.cat-filters-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 68px;
  z-index: 50;
}
.cat-filters-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-filter-btn {
  display: inline-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;
  white-space: nowrap;
  font-family: var(--f-body);
  transition: all var(--ease);
}
.cat-filter-btn .filter-count {
  background: var(--border);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--text3);
}
.cat-filter-btn:hover { border-color: var(--red); color: var(--red); }
.cat-filter-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.cat-filter-btn.active .filter-count { background: rgba(255,255,255,0.25); color: #fff; }

/* ── SECCIÓN PRINCIPAL ── */
.cats-section { padding: 56px 0 88px; }

/* ── GRUPO DE CATEGORÍAS ── */
.cat-group { margin-bottom: 64px; }
.cat-group:last-child { margin-bottom: 0; }

.cat-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.cat-group-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cat-group-icon svg { width: 22px; height: 22px; }
.cat-group-icon--red   { background: var(--red-light); color: var(--red); }
.cat-group-icon--blue  { background: var(--steel-l);   color: var(--steel); }
.cat-group-icon--green { background: var(--green-l);   color: var(--green); }
.cat-group-icon--gold  { background: #FDF6E3;          color: var(--gold); }
.cat-group-icon--steel { background: var(--bg3);       color: var(--text2); }

.cat-group-title {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 3px;
}
.cat-group-sub { font-size: 14px; color: var(--text2); line-height: 1.4; }

/* ── GRILLA DE CARDS ── */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── CARD DE CATEGORÍA ── */
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}
.cat-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border2);
  transform: translateY(-4px);
}

/* ── IMAGEN ── */
.cat-card-img {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}
.cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.cat-card:hover .cat-card-img img { transform: scale(1.06); }

.cat-card-overlay {
  position: absolute; inset: 0;
  background: rgba(192,40,26,0.82);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--ease);
}
.cat-card-overlay svg { width: 32px; height: 32px; color: #fff; }
.cat-card:hover .cat-card-overlay { opacity: 1; }

/* ── CUERPO ── */
.cat-card-body {
  padding: 18px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cat-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.cat-card-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  flex: 1;
}
.cat-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-top: 8px;
  transition: gap var(--ease);
  display: inline-flex;
  align-items: center;
}

/* ── SIN RESULTADOS ── */
.no-results {
  text-align: center;
  padding: 80px 24px;
  color: var(--text3);
}
.no-results svg { width: 56px; height: 56px; margin: 0 auto 16px; opacity: 0.4; }
.no-results h3 { font-size: 20px; font-weight: 700; color: var(--text2); margin-bottom: 8px; }
.no-results p  { font-size: 15px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-filters-bar { position: static; }
  .cat-card-img { height: 140px; }
  .cat-group-title { font-size: 20px; }
  .search-cat-input { width: 200px; }
  .cats-section { padding: 40px 0 64px; }
}
@media (max-width: 480px) {
  .cats-grid { grid-template-columns: 1fr; }
}
