/* catalogo.css — Catálogo (usa los colores y la tarjeta .pc de store.css) */

.ct-page { max-width: var(--sx-max); margin: 0 auto; padding: 28px 24px 70px; }

/* Encabezado */
.ct-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ct-head-title { display: flex; align-items: baseline; gap: 12px; }
.ct-head-title h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 900; color: #fff; }
.ct-count { font-size: 14px; color: var(--sx-muted); }
.ct-head-tools { display: flex; gap: 10px; flex: 1; justify-content: flex-end; min-width: 280px; }
.ct-search, .ct-sort {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px;
  background: var(--sx-card); border: 1px solid var(--sx-line); transition: border-color .2s, box-shadow .2s;
}
.ct-search { flex: 1; max-width: 460px; }
.ct-search:focus-within, .ct-sort:focus-within { border-color: var(--sx-blue); box-shadow: 0 0 0 3px rgba(0, 123, 255, .18); }
.ct-search i, .ct-sort i { color: var(--sx-dim); }
.ct-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--sx-text); font-size: 14.5px; }
.ct-search input::placeholder { color: var(--sx-dim); }
.ct-sort select {
  appearance: none; -webkit-appearance: none; height: 100%; padding-right: 18px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239aa3b8' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right center;
  border: 0; outline: none; color: var(--sx-text); font-size: 14px; font-weight: 600; cursor: pointer;
}
.ct-sort select option { background: var(--sx-card); }
.ct-filter-btn {
  display: none; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  background: var(--sx-card); border: 1px solid var(--sx-line); color: var(--sx-text); font-size: 14px; font-weight: 700;
}
.ct-filter-btn span:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--sx-blue); color: #fff; font-size: 11px; }

/* Filtros rápidos */
.ct-quick { display: flex; gap: 8px; margin: 18px 0 22px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ct-quick::-webkit-scrollbar { display: none; }
.ct-quick button {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 999px; cursor: pointer;
  background: var(--sx-card); border: 1px solid var(--sx-line); color: var(--sx-text); font-size: 13.5px; font-weight: 600; transition: all .18s;
}
.ct-quick button i { color: var(--sx-blue-2); }
.ct-quick button:hover { border-color: var(--sx-line-2); }
.ct-quick button.is-on { background: var(--sx-blue); border-color: var(--sx-blue); color: #fff; }
.ct-quick button.is-on i { color: #fff; }
.ct-quick button.is-hot i { color: #ff7a4d; }
.ct-quick button.is-hot.is-on { background: linear-gradient(135deg, #ff3b3b, #ff7a1a); border-color: transparent; }
.ct-quick button.is-hot.is-on i { color: #fff; }

/* Distribución */
.ct-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; }
.ct-filters {
  position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin;
  padding: 18px; border-radius: var(--sx-radius); background: var(--sx-card); border: 1px solid var(--sx-line);
}
.ct-filters-head { display: none; }
.ct-fgroup { padding: 4px 0 14px; border-bottom: 1px solid var(--sx-line); margin-bottom: 14px; }
.ct-fgroup:last-of-type { border-bottom: 0; margin-bottom: 4px; }
.ct-fgroup h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sx-dim); }
.ct-opt { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 14px; color: #d3d8e4; }
.ct-opt:hover { background: rgba(255, 255, 255, .03); }
.ct-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--sx-blue); flex-shrink: 0; cursor: pointer; }
.ct-opt span { flex: 1; }
.ct-opt em { font-style: normal; font-size: 11.5px; color: var(--sx-dim); background: var(--sx-card-2); padding: 1px 8px; border-radius: 999px; }
.ct-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: #d3d8e4; padding: 4px; }
.ct-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ct-switch-ui { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--sx-line-2); transition: background .2s; flex-shrink: 0; }
.ct-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ct-switch input:checked + .ct-switch-ui { background: var(--sx-green); }
.ct-switch input:checked + .ct-switch-ui::after { transform: translateX(18px); }
.ct-switch input:focus-visible + .ct-switch-ui { box-shadow: 0 0 0 3px rgba(0, 123, 255, .35); }
.ct-filters-foot { display: flex; gap: 10px; }
.ct-clear { flex: 1; height: 40px; border-radius: 10px; cursor: pointer; background: transparent; border: 1px solid var(--sx-line-2); color: var(--sx-muted); font-size: 13px; font-weight: 600; }
.ct-clear:hover { color: #fff; border-color: var(--sx-muted); }
.ct-apply { display: none; }
.ct-backdrop { display: none; }

/* Filtros activos */
.ct-active { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ct-active:empty { display: none; }
.ct-active button {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: rgba(0, 123, 255, .12); border: 1px solid rgba(0, 123, 255, .35); color: #8cc4ff; font-size: 13px; font-weight: 600;
}
.ct-active button i { font-size: 11px; }
.ct-active button.is-clear { background: transparent; border-color: transparent; color: var(--sx-muted); text-decoration: underline; }

/* Rejilla */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }

/* Sin resultados */
.ct-empty { text-align: center; padding: 50px 20px; border-radius: var(--sx-radius); background: var(--sx-card); border: 1px dashed var(--sx-line-2); }
.ct-empty > i { font-size: 34px; color: var(--sx-blue-2); margin-bottom: 12px; }
.ct-empty h3 { margin: 0 0 6px; font-size: 20px; color: #fff; }
.ct-empty p { margin: 0 auto 18px; max-width: 420px; color: var(--sx-muted); font-size: 14px; }
.ct-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Celular / tablet: filtros en panel que sale desde abajo ───────────── */
@media (max-width: 900px) {
  .ct-page { padding: 18px 14px 60px; }
  .ct-head-tools { min-width: 100%; }
  .ct-search { max-width: none; }
  .ct-sort { padding: 0 10px; }
  .ct-filter-btn { display: inline-flex; }
  .ct-head-tools { flex-wrap: wrap; }
  .ct-search { flex-basis: 100%; }
  .ct-sort, .ct-filter-btn { flex: 1; justify-content: center; }
  .ct-sort select { flex: 1; min-width: 0; }
  .ct-layout { grid-template-columns: 1fr; }
  .ct-filters {
    position: fixed; z-index: 1001; left: 0; right: 0; bottom: 0; top: auto; max-height: 82vh; border-radius: 20px 20px 0 0;
    transform: translateY(105%); transition: transform .3s ease; padding: 0 18px 18px; box-shadow: 0 -20px 50px rgba(0, 0, 0, .6);
  }
  .ct-filters-head {
    position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0 12px; margin-bottom: 8px; background: var(--sx-card); border-bottom: 1px solid var(--sx-line);
  }
  .ct-filters-head strong { font-size: 16px; color: #fff; }
  .ct-filters-head strong i { color: var(--sx-blue-2); margin-right: 6px; }
  .ct-filters-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--sx-line-2); background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
  .ct-filters-foot { position: sticky; bottom: -18px; padding: 12px 0 18px; background: var(--sx-card); }
  .ct-apply { display: inline-flex; flex: 1.4; height: 44px; }
  .ct-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .6); opacity: 0; pointer-events: none; transition: opacity .3s; display: block; }
  body.ct-filters-open { overflow: hidden; }
  body.ct-filters-open .ct-filters { transform: none; }
  body.ct-filters-open .ct-backdrop { opacity: 1; pointer-events: auto; }
  .ct-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}
@media (max-width: 400px) {
  .ct-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pc-body { padding: 9px 10px 11px; }
  .pc-title { font-size: 13px; }
  .pc-price strong { font-size: 16px; }
}
