/* public/css/tienda/filtros.css — filtros de la tienda (categoría y catálogo): grupos que se abren y cierran,
   atajos arriba de los productos, filtros aplicados y, en el teléfono, barra fija + panel que sube desde abajo. */
.filter-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-chip {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-200);
  background: var(--off-white);
  font-size: .73rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--t);
  text-decoration: none;
}
.filter-chip:hover { border-color: var(--pink); color: var(--pink); }
.filter-chip.active { background: var(--pink); color: #fff; border-color: var(--pink); }
/* ── Filtros: grupos que se abren y cierran · atajos · filtros aplicados · panel del teléfono ── */
.cf-group > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0; user-select: none; }
.cf-group > summary::-webkit-details-marker { display: none; }
.cf-group > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--gray-400); border-bottom: 2px solid var(--gray-400); transform: rotate(45deg); margin: -4px 2px 0 8px; transition: transform .2s; flex: none; }
.cf-group[open] > summary { margin-bottom: 10px; }
.cf-group[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.filter-chip { position: relative; display: inline-flex; align-items: center; }
.filter-chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.filter-chip:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }
.cf-head, .cf-foot, .cf-sort-m, .fbar-btn { display: none; }
.fbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-width: 0; }
.fbar-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }   /* min-width: 0 → en el teléfono se desliza dentro de la barra (no estira la página) */
.fbar-chips .filter-chip, .cf-price-btn { font-size: .76rem; padding: 5px 12px; background: #fff; }
.fbar-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: var(--pink); color: #fff; font-size: .68rem; font-weight: 700; line-height: 1; }
.cf-short { display: none; }
.fbar-chips .filter-chip.active { background: var(--pink); color: #fff; }
.cf-applied { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; font-size: .78rem; color: var(--gray-500); }
.cf-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--pink-light); color: var(--pink); font-weight: 600; text-decoration: none; }
.cf-pill:hover { background: var(--pink); color: #fff; }
.cf-clear-all { color: var(--gray-500); text-decoration: underline; margin-left: 2px; }
/* Teléfono: el precio agrupado en «Precio ▾» y la flechita de «hay más» (en computadora no se ven) */
.cf-price-dd, .fbar-more { display: none; }
.cf-price-btn { gap: 4px; cursor: pointer; font-family: inherit; }
.cf-price-btn svg { width: 13px; height: 13px; transition: transform .2s; }
.cf-price-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.cf-price-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 180px; display: flex; flex-direction: column; padding: 6px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.cf-price-menu[hidden] { display: none; }
.cf-price-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: .88rem; color: var(--gray-800); text-decoration: none; }
.cf-price-menu a:hover { background: var(--gray-50); }
.cf-price-menu a.active { background: var(--pink-light); color: var(--pink); font-weight: 700; }
.cf-price-menu .cf-price-any { color: var(--gray-500); border-top: 1px solid var(--gray-100); margin-top: 4px; border-radius: 0 0 8px 8px; }
@media (max-width: 1024px) {
  .cf-price-dd { display: block; position: relative; flex: none; }
  .fbar { gap: 5px; }
  .fbar-btn { padding: 6px 8px; font-size: .78rem; gap: 4px; }
  .fbar-btn svg { width: 14px; height: 14px; }
  .fbar-count { margin-left: 0; min-width: 17px; height: 17px; padding: 0 4px; }
  .fbar-chips { gap: 4px; }
  .fbar-chips .filter-chip, .cf-price-btn { padding: 5px 9px; font-size: .74rem; }
  .cf-price-btn { gap: 2px; padding-right: 7px; }
  .cf-price-btn.active { background: var(--pink); color: #fff; }
  .fbar-chips .cf-desk-only { display: none; }   /* «Con mensaje»: en el teléfono está en el panel de «Filtrar» */
  .cf-price-btn .cf-long { display: none; } .cf-price-btn .cf-short { display: inline; }   /* «$40 – $80» → «$40–80» en el teléfono */
  .fbar-chips .cf-price-flat { display: none; }
  .fbar.has-more .fbar-chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
  .fbar-more { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--gray-200);
    background: #fff; color: var(--gray-700); align-items: center; justify-content: center; padding: 0; cursor: pointer; z-index: 2; }
  .fbar-more svg { width: 15px; height: 15px; }
  .fbar.has-more .fbar-more { display: flex; }
}
@media (max-width: 1024px) {
  .cf-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; max-height: 85vh; background: #fff; border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,.18); transform: translateY(105%); transition: transform .28s ease; display: flex; flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px); visibility: hidden; }
  .cf-sheet.open { transform: none; visibility: visible; }
  .cf-body { overflow-y: auto; padding: 0 16px 6px; overscroll-behavior: contain; }
  .cf-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; border-bottom: 1px solid var(--gray-100); }
  .cf-head strong { flex: 1; font-size: 1rem; }
  .cf-clear { background: none; border: none; color: var(--gray-500); text-decoration: underline; font-size: .82rem; cursor: pointer; font-family: inherit; }
  .cf-x { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--gray-100); font-size: .9rem; cursor: pointer; }
  .cf-sort-m { display: block; }
  .cf-foot { display: block; padding: 10px 16px 14px; border-top: 1px solid var(--gray-100); }
  .cf-apply { width: 100%; padding: 13px; border: none; border-radius: 12px; background: var(--graphite, #2E2A2C); color: #fff; font-weight: 700; font-size: .95rem; font-family: inherit; cursor: pointer; }
  .cf-apply:disabled { background: var(--gray-300); cursor: default; }
  .cf-sheet .cf-group { border: none; border-bottom: 1px solid var(--gray-100); border-radius: 0; padding: 14px 0; margin: 0; background: none; }
  .cf-sheet .cf-group:last-child { border-bottom: none; }
  .cf-sheet .filter-chip { font-size: .82rem; padding: 7px 13px; }
  .cf-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(17,17,17,.45); }
  .cf-backdrop[hidden] { display: none; }
  .fbar { position: sticky; top: var(--nav-h, 64px); z-index: 30; background: var(--off-white); margin: 0 -16px 8px; padding: 8px 16px; border-bottom: 1px solid var(--gray-200); }
  .fbar-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--gray-200); background: #fff; font-weight: 700; font-size: .82rem; color: var(--gray-900); cursor: pointer; font-family: inherit; }
  .fbar-btn svg { width: 16px; height: 16px; }
  .fbar-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .fbar-chips::-webkit-scrollbar { display: none; }
  .fbar-chips .filter-chip { white-space: nowrap; }
}
