/* Tienda y listados: cabecera, riel de talles, filtros, barra de orden, grilla, vacío, paginado, 404. */

/* 1. Cabecera del listado */
.sch-shop { padding-bottom: calc(var(--sch-s-7) + 40px); } /* aire para que el botón flotante no tape la última fila */
.sch-shop__head { padding-block: var(--sch-s-3) 0; }
.sch-shop__title {
  font-size: clamp(2.125rem, 10vw, 5rem);
  font-stretch: 62%;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.sch-shop__title:focus { outline: none; }
.sch-shop__lead { max-width: 60ch; margin-top: 4px; color: var(--sch-gray-700); font-size: var(--sch-fs-14); overflow-wrap: anywhere; }
.sch-shop__rail { margin: var(--sch-s-3) calc(var(--sch-gutter) * -1) 0; }
.sch-shop__rail-label {
  margin-bottom: 6px;
  padding-inline: var(--sch-gutter);
  font-size: var(--sch-fs-11);
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sch-shop__side { display: none; }
.sch-shop__results { min-width: 0; }

/* 2. Almanaque de talles */
.sch-almanac {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--sch-ink);
  border-left: 1px solid var(--sch-line);
  list-style: none;
}
.sch-almanac__item { min-width: 0; }
.sch-almanac__cell {
  position: relative; /* contiene la unidad oculta (absolute) dentro de la fila que scrollea */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 58px;
  padding: 6px 4px 5px 6px;
  border-right: 1px solid var(--sch-line);
  border-bottom: 1px solid var(--sch-line);
  background: var(--sch-paper);
  color: inherit;
  text-decoration: none;
  transition: background var(--sch-fast) var(--sch-ease), color var(--sch-fast) var(--sch-ease);
}
.sch-almanac__cell:hover { background: var(--sch-ink); color: var(--sch-on-ink); }
.sch-almanac__cell:hover .sch-almanac__count { color: var(--sch-on-ink-2); }
.sch-almanac__cell.is-selected,
.sch-almanac__cell.is-selected:hover { background: var(--sch-rojo); color: var(--sch-on-rojo); }
.sch-almanac__cell.is-selected .sch-almanac__count { color: var(--sch-on-rojo); }
.sch-almanac__num { font-size: 1.75rem; font-stretch: 62%; font-weight: 900; line-height: 0.95; text-transform: uppercase; }
.sch-almanac__count { color: var(--sch-gray-700); font-size: var(--sch-fs-11); font-stretch: 80%; font-weight: 500; white-space: nowrap; }
.sch-almanac__cell--empty {
  color: var(--sch-gray-500);
  background-image: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--sch-line) calc(50% - 0.5px), var(--sch-line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.sch-almanac__cell--empty .sch-almanac__count { color: var(--sch-gray-500); }
.sch-almanac__caption {
  margin: var(--sch-s-3) 0 6px;
  font-size: var(--sch-fs-11);
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sch-almanac--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sch-almanac--compact .sch-almanac__cell {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  min-height: var(--sch-tap);
  padding: 10px 8px 0;
}
.sch-almanac--compact .sch-almanac__num { font-size: 1.375rem; }
.sch-almanac--compact .sch-almanac__unit,
.sch-almanac--rail .sch-almanac__unit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sch-almanac--rail {
  display: flex;
  padding-left: var(--sch-gutter);
  border-left: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--sch-gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sch-almanac--rail::-webkit-scrollbar { display: none; }
.sch-almanac--rail::after { content: ""; flex: 0 0 var(--sch-gutter); }
.sch-almanac--rail .sch-almanac__item { flex: 1 0 62px; max-width: 110px; scroll-snap-align: start; }
.sch-almanac--rail .sch-almanac__item:first-child .sch-almanac__cell { border-left: 1px solid var(--sch-line); }

/* 3. Barra de herramientas: filtros (celular), etiquetas activas y orden */
.sch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 10px;
}
.sch-toolbar__filtros { display: inline-flex; align-items: center; gap: 6px; min-height: var(--sch-tap); }
.sch-toolbar__badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  background: var(--sch-rojo);
  color: var(--sch-on-rojo);
  font-size: var(--sch-fs-11);
  font-weight: 800;
  line-height: 1;
}
.sch-toolbar__chips { flex: 1 1 100%; order: 3; margin: 0; padding: 0; list-style: none; }
.sch-toolbar .sch-chip { min-height: var(--sch-tap); }
.sch-chip__x { font-size: 1.125rem; font-weight: 400; line-height: 1; }
.sch-chip-clear {
  display: inline-flex;
  align-items: center;
  min-height: var(--sch-tap);
  padding-inline: 4px;
  color: inherit;
  font-size: var(--sch-fs-12);
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
}
.sch-toolbar__sort { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sch-toolbar__sort-label {
  font-size: var(--sch-fs-11);
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
select.sch-select--orden {
  height: var(--sch-tap);
  max-width: 100%;
  padding: 0 34px 0 12px;
  border: 1.5px solid var(--sch-ink);
  border-radius: 0;
  background: var(--sch-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center / 12px 8px;
  color: inherit;
  font: inherit;
  font-size: var(--sch-fs-14);
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.sch-is-ready .sch-filters__submit { display: none; }

/* 4. Formulario de filtros */
.sch-filters { min-width: 0; }
.sch-filters__group {
  min-width: 0;
  margin: 0;
  padding: 12px 0 14px;
  border: 0;
  border-top: 2px solid var(--sch-ink);
}
.sch-filters__group:first-of-type { padding-top: 0; border-top: 0; }
.sch-filters__legend {
  float: left;
  width: 100%;
  margin-bottom: 6px;
  padding: 0;
  font-size: var(--sch-fs-11);
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sch-filters .sch-check { clear: both; }
.sch-filters .sch-check__n { margin-left: auto; color: var(--sch-gray-700); font-size: var(--sch-fs-12); font-variant-numeric: tabular-nums; }
.sch-filters__cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 6px;
  clear: both;
}
.sch-filters__cells .sch-check--cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--sch-tap);
  padding: 6px 4px;
  text-align: center;
  user-select: none;
}
.sch-filters__cells .sch-check__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.sch-filters__cells .sch-check--cell:has(.sch-check__input:focus-visible) { outline: 2px solid var(--sch-focus); outline-offset: 2px; }
.sch-filters__cells .sch-check__text { font-size: var(--sch-fs-16); font-weight: 700; line-height: 1; }
.sch-filters__cells .sch-check__n { margin: 0; font-size: var(--sch-fs-11); line-height: 1; }
.sch-filters__cells .sch-check--cell:has(:checked) .sch-check__n { color: var(--sch-on-ink-2); }
.sch-filters__actions { display: grid; gap: 10px; margin-top: var(--sch-s-3); }
.sch-filters__limpiar { justify-self: start; min-height: var(--sch-tap); display: inline-flex; align-items: center; font-size: var(--sch-fs-14); }

/* 5. Hojas: filtros y talle */
.sch-hoja-filtros__foot { display: flex; gap: 8px; }
.sch-hoja-filtros__ver { flex: 1; }
.sch-hoja-talle__lead { margin-bottom: var(--sch-s-4); color: var(--sch-gray-700); font-size: var(--sch-fs-14); }
.sch-hoja-talle__actions { display: flex; flex-wrap: wrap; gap: var(--sch-s-3) var(--sch-s-5); margin-top: var(--sch-s-4); }
.sch-hoja-talle__actions .sch-link { display: inline-flex; align-items: center; min-height: var(--sch-tap); margin: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* 6. Grilla y tarjeta */
.sch-grid--shop { margin: 0; padding: 0; list-style: none; }
.sch-grid--shop > .sch-grid__item { min-width: 0; }
.sch-card__strip--marca { padding-top: 10px; }
.sch-card__strip--marca + .sch-card__body { padding-top: 4px; }
.sch-grid--shop .sch-card__name { min-height: 2.5em; } /* dos renglones: los precios quedan alineados entre tarjetas */
.sch-card__brand {
  color: var(--sch-gray-700);
  font-size: var(--sch-fs-11);
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sch-card__nostock {
  display: inline-flex;
  align-items: center;
  height: 22px;
  color: var(--sch-gray-500);
  font-size: var(--sch-fs-11);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 7. Vacío, avance y paginado */
.sch-empty {
  display: grid;
  gap: var(--sch-s-3);
  max-width: 560px;
  margin-top: var(--sch-s-4);
  padding: var(--sch-s-5) var(--sch-s-4);
  border: 2px solid var(--sch-ink);
}
.sch-empty__title { font-size: var(--sch-fs-32); font-stretch: 62%; font-weight: 900; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.sch-empty__text { color: var(--sch-gray-700); overflow-wrap: anywhere; }
.sch-empty__options { display: grid; gap: 8px; justify-items: start; }
.sch-more { display: grid; justify-items: center; gap: 10px; margin-top: var(--sch-s-6); }
.sch-more__text { font-size: var(--sch-fs-14); font-weight: 600; }
.sch-more__text--fin { color: var(--sch-gray-700); font-weight: 500; }
.sch-more__bar {
  width: min(240px, 100%);
  height: 3px;
  background: linear-gradient(var(--sch-ink), var(--sch-ink)) no-repeat left / var(--sch-progress, 20%) 100% var(--sch-line);
}
.sch-more .sch-pager { margin-top: 6px; }

/* 8. Búsqueda general (respaldo) */
.sch-results__list { display: grid; gap: var(--sch-s-3); margin: var(--sch-s-5) 0 0; padding: 0; list-style: none; }
.sch-results__item { padding-bottom: var(--sch-s-3); border-bottom: 1px solid var(--sch-line); }
.sch-results__link { font-size: var(--sch-fs-18); font-weight: 700; color: inherit; }
.sch-results__excerpt { margin-top: 4px; color: var(--sch-gray-700); font-size: var(--sch-fs-14); }

/* 9. 404 */
.sch-error { padding-bottom: var(--sch-s-7); }
.sch-error .sch-notfound { padding-block: var(--sch-s-6) var(--sch-s-5); }
.sch-error__buscar { max-width: 560px; margin: var(--sch-s-5) auto 0; text-align: left; }
.sch-atajos {
  display: grid;
  margin-top: var(--sch-s-5);
  padding: 0;
  border-top: 2px solid var(--sch-ink);
  list-style: none;
}
.sch-atajo {
  display: flex;
  align-items: center;
  gap: var(--sch-s-3);
  min-height: 72px;
  padding: var(--sch-s-3) 0;
  border-bottom: 1px solid var(--sch-line);
  color: inherit;
  text-decoration: none;
}
.sch-atajo:hover .sch-atajo__titulo { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sch-atajo .sch-icon { flex: none; }
.sch-atajo--wa > .sch-icon:first-child { color: var(--sch-wa-dark); }
.sch-atajo__texto { flex: 1; min-width: 0; }
.sch-atajo__titulo { display: block; font-size: var(--sch-fs-18); font-weight: 700; line-height: 1.2; }
.sch-atajo__bajada { display: block; margin-top: 2px; color: var(--sch-gray-700); font-size: var(--sch-fs-14); }
.sch-atajo__flecha { color: var(--sch-gray-500); }
.sch-error__volver { margin-top: var(--sch-s-5); text-align: center; }

/* 10. Pantallas medianas y grandes */
@media (min-width: 600px) {
  .sch-shop__rail { margin-inline: 0; }
  .sch-shop__rail-label { padding-inline: 0; }
  .sch-almanac--rail { padding-left: 0; border-left: 1px solid var(--sch-line); }
  .sch-almanac--rail::after { content: none; }
  .sch-almanac--rail .sch-almanac__item:first-child .sch-almanac__cell { border-left: 0; }
  .sch-empty__options { grid-auto-flow: column; }
}

@media (min-width: 900px) {
  .sch-shop__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 32px;
    padding-block: var(--sch-s-2);
  }
  .sch-shop__lead { font-size: var(--sch-fs-16); }
  .sch-shop__rail .sch-almanac__cell { min-height: 68px; }
  .sch-shop__layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--sch-s-6);
    align-items: start;
    margin-top: var(--sch-s-4);
  }
  .sch-shop__side {
    display: block;
    position: sticky;
    top: calc(var(--sch-header-h) + 16px);
    max-height: calc(100vh - var(--sch-header-h) - 32px);
    padding-right: 8px;
    overflow-y: auto;
  }
  .sch-shop__side .sch-filters__group--talle { display: none; }
  .sch-toolbar { padding-top: 0; }
  .sch-toolbar__filtros { display: none; }
  .sch-toolbar__chips { flex: 1 1 auto; order: 0; }
  .sch-almanac--compact { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .sch-atajos { grid-template-columns: 1fr 1fr; column-gap: var(--sch-s-6); }
}

@media (min-width: 1200px) {
  .sch-shop__layout { grid-template-columns: 240px minmax(0, 1fr); gap: var(--sch-s-7); }
}

/* plantillas: en celular los números van arriba y "Anterior" / "Siguiente" abajo, de a mitad, sin uno solo en un renglón. */
@media (max-width: 599.98px) {
  .sch-pager > .sch-pager__link:not(.sch-pager__link--word),
  .sch-pager > .sch-pager__gap { order: 1; }
  .sch-pager::after { content: ""; order: 1; flex: 0 0 100%; height: 0; }
  .sch-pager > .sch-pager__link--word { order: 2; flex: 1 1 calc(50% - 3px); }
}
