/* ---------- Página de catálogo ---------- */
.catalog { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 100px); }
.catalog__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.catalog__head .h2 { font-size: clamp(38px, 6vw, 84px); }

.search { position: relative; flex: 1 1 320px; max-width: 520px; }
.search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; min-height: 56px; padding: 0 20px 0 50px; border-radius: 999px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--bone); font-size: 16px;
}
.search input:focus { outline: none; border-color: var(--accent); }

.catalog__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.results { margin: 0 auto 0 0; color: var(--muted); font-size: 14px; }
.sort { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.sort select { min-height: 42px; padding: 0 14px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); color: var(--bone); font-weight: 600; }
.filters-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pill-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; display: inline-grid; place-items: center; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 14px; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.active-filters:empty { display: none; }
.apill { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); color: var(--bone); font-size: 13px; font-weight: 600; }
.apill:hover { border-color: var(--danger); }
.apill span { color: var(--muted); margin-left: 4px; }
.apill--clear { background: none; color: var(--muted); text-decoration: underline; border-color: transparent; }

.catalog__layout { display: grid; gap: 28px; margin-top: 12px; }
.catalog__grid .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.catalog-page .product__cat { color: var(--muted); }
.catalog-page .price .ask, .catalog-page .price s { color: var(--muted); }
.catalog-page .product__media { background: var(--ink-2); }

/* Filtros: panel lateral en PC, hoja deslizable en móvil */
.filters {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
  background: var(--ink); transform: translateX(-100%); transition: transform .35s var(--ease); visibility: hidden;
}
.filters.open { transform: none; visibility: visible; }
body.filters-open { overflow: hidden; }
.filters__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.filters__head h2 { margin: 0; font-size: 20px; text-transform: uppercase; font-stretch: 112%; }
.filters__body { flex: 1; overflow-y: auto; padding: 8px 20px 20px; }
.filters__foot { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.filters__foot .btn { flex: 1; }
.fgroup { padding: 18px 0; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--soft); font-size: 14px; font-weight: 600;
}
.fchip small { color: var(--muted); font-weight: 500; }
.fchip i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); }
.fchip:hover { border-color: color-mix(in srgb, var(--bone) 40%, transparent); }
.fchip.on { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.fchip.on small { color: var(--muted-dark); }
.fchip--size { min-width: 52px; justify-content: center; }
.price-range { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.price-range label { flex: 1; display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.price-range input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); color: var(--bone); font-size: 16px; }
.price-range input:focus { outline: none; border-color: var(--accent); }
.dash { padding-bottom: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 14px; }
.check input { position: absolute; opacity: 0; }
.check span { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--ink-2); display: grid; place-items: center; flex: 0 0 auto; }
.check input:checked + span { background: var(--accent); border-color: var(--accent); }
.check input:checked + span::after { content: ""; width: 10px; height: 6px; border: 2.5px solid var(--ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.empty-results { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 12px; justify-items: center; }
.empty-results p { margin: 0; color: var(--muted); }
.custom-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 40px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink);
}
.custom-cta h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-stretch: 112%; text-transform: uppercase; letter-spacing: -.02em; }
.custom-cta p { margin: 4px 0 0; }

@media (min-width: 760px) {
  .catalog__grid .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .catalog__layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .filters { position: sticky; top: 100px; inset: auto; z-index: 1; transform: none; visibility: visible; background: none; max-height: calc(100vh - 120px); }
  .filters__head, .filters__foot, .filters-btn { display: none !important; }
  .filters__body { padding: 0 6px 0 0; }
  .fgroup:first-child { padding-top: 0; }
}
@media (min-width: 1280px) {
  .catalog__grid .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
