/* ============================================================
   tienda.css — Tienda (2026-11-28)
   Escaparate de categorías + resultados paginados. Markup en
   js/tienda-core.js (mismo en navegador y servidor). Prefijo .td-.

   Identidad del sitio: fondo casi negro, tinta clara, rojo SOLO en la
   acción, Bebas Neue en títulos y Barlow en texto. La calidad sale de
   la fotografía (producto recortado sobre un gris neutro común), la
   tipografía y el orden. Sin degradados, brillos, inclinaciones 3D ni
   animaciones de entrada.
   ============================================================ */
.products-page.tienda {
  --td-bg: #0b0b0c;
  --td-s1: #131315;
  --td-s2: #19191c;
  --td-line: rgba(255,255,255,.08);
  --td-line2: rgba(255,255,255,.16);
  --td-ink: #f2f1ee;
  --td-mut: rgba(242,241,238,.64);
  --td-faint: rgba(242,241,238,.46);
  --td-tile: #efeeea;
  --td-red: var(--red, #e50914);
  --td-red-h: #c40812;
  --td-m: 32px;
  max-width: none !important;
  margin: 0 !important;
  padding: var(--nav-h) 0 0 !important;
  background: var(--td-bg);
  color: var(--td-ink);
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
}
.tienda *, .tienda *::before, .tienda *::after { box-sizing: border-box; }
.tienda a { color: inherit; }
.tienda :focus-visible { outline: 2px solid var(--td-ink); outline-offset: 2px; }
.td-wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--td-m); }
.td-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Ruta ───────────────────────────────────────────────────── */
.td-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--td-faint); }
.td-crumb a { color: var(--td-mut); text-decoration: none; }
.td-crumb a:hover { color: var(--td-ink); text-decoration: underline; text-underline-offset: 3px; }
.td-crumb [aria-current] { color: var(--td-ink); }

/* ── Encabezado de la tienda ────────────────────────────────── */
.td-hero { padding: 26px 0 34px; border-bottom: 1px solid var(--td-line); }
.td-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 18px; }
.td-h1 { font-family: var(--font-display, 'Bebas Neue', Impact, sans-serif); font-weight: 400; font-size: clamp(40px, 4.3vw, 60px);
  line-height: .98; letter-spacing: .01em; text-transform: uppercase; color: #fff; margin: 0; }
.td-h1 .accent { color: var(--td-red); }
.td-lead { font-size: 16px; line-height: 1.55; color: var(--td-mut); margin: 12px 0 0; max-width: 62ch; }
.td-hero-help { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 14.5px;
  color: var(--td-mut); text-decoration: none; }
.td-hero-help span { color: var(--td-ink); font-weight: 600; }
.td-hero-help svg { color: var(--td-red); transition: transform .2s ease; }
.td-hero-help:hover span { text-decoration: underline; text-underline-offset: 3px; }
.td-hero-help:hover svg { transform: translateX(3px); }

/* ── Buscador ───────────────────────────────────────────────── */
.td-search { position: relative; display: flex; align-items: center; max-width: 780px; margin-top: 24px;
  background: var(--td-s1); border: 1px solid var(--td-line2); border-radius: 10px; transition: border-color .18s ease; }
.td-search:focus-within { border-color: rgba(255,255,255,.72); box-shadow: 0 0 0 1px rgba(255,255,255,.72); }
/* El foco lo marca el recuadro completo; sin el contorno heredado del sitio en el campo. */
.tienda .td-search input:focus, .tienda .td-search input:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; }
.td-search-ico { display: grid; place-items: center; width: 48px; color: var(--td-faint); flex: none; }
.td-search input { flex: 1; min-width: 0; height: 52px; padding: 0 8px 0 0; background: none; border: 0; outline: 0;
  color: var(--td-ink); font: inherit; font-size: 16px; }
.td-search input::placeholder { color: var(--td-faint); }
.td-search input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.td-search-btn { flex: none; height: 40px; margin-right: 6px; padding: 0 20px; border: 0; border-radius: 7px; cursor: pointer;
  background: var(--td-red); color: #fff; font: inherit; font-weight: 600; font-size: 15px; transition: background-color .18s ease; }
.td-search-btn:hover { background: var(--td-red-h); }
.td-search--compact { margin-top: 18px; max-width: 640px; }
.td-search--compact input { height: 46px; }
.td-search--compact .td-search-btn { height: 36px; }

/* Sugerencias */
.td-suggest { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 60; max-height: min(70vh, 520px); overflow: auto;
  background: #161618; border: 1px solid var(--td-line2); border-radius: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.5); padding: 6px 0; }
.td-sg-sec { padding: 6px 0; border-bottom: 1px solid var(--td-line); }
.td-sg-h { margin: 4px 16px 6px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--td-faint); }
.td-sg-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 14px 6px; }
.td-sg-tag { padding: 6px 11px; border: 1px solid var(--td-line2); border-radius: 6px; font-size: 14px; text-decoration: none; color: var(--td-ink); }
.td-sg-tag--brand { color: var(--td-mut); }
.td-sg-tag:hover, .td-sg-tag.is-active { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.04); }
.td-sg-item { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 8px 16px; text-decoration: none; }
.td-sg-item:hover, .td-sg-item.is-active { background: rgba(255,255,255,.05); }
.td-sg-img { width: 44px; height: 44px; border-radius: 6px; background: var(--td-tile); display: grid; place-items: center; overflow: hidden; }
.td-sg-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 3px; }
.td-sg-txt { min-width: 0; display: flex; flex-direction: column; }
.td-sg-name { font-size: 14.5px; font-weight: 500; color: var(--td-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-sg-meta { font-size: 12.5px; color: var(--td-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-sg-price { font-size: 13.5px; font-weight: 600; color: var(--td-ink); white-space: nowrap; }
.td-sg-all { display: block; padding: 12px 16px 8px; font-size: 14.5px; font-weight: 600; color: var(--td-ink); text-decoration: none; }
.td-sg-all:hover, .td-sg-all.is-active { text-decoration: underline; text-underline-offset: 3px; }
.td-sg-none { margin: 0; padding: 12px 16px; font-size: 14.5px; color: var(--td-mut); }

/* ── Secciones de la portada ────────────────────────────────── */
.td-sec { padding: 40px 0 8px; }
.td-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.td-h2 { font-family: var(--font-condensed, 'Barlow Condensed', sans-serif); font-weight: 600; font-size: 22px; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase; color: var(--td-ink); margin: 0; }

/* Categorías: 5 × 3 en escritorio (15 categorías reales) */
.td-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.td-cat { display: flex; flex-direction: column; min-width: 0; text-decoration: none; background: var(--td-s1);
  border: 1px solid var(--td-line); border-radius: 10px; overflow: hidden; transition: border-color .2s ease; }
/* La foto va en posición absoluta dentro del recuadro: con height:100% sobre un
   contenedor de aspect-ratio el alto no se resolvía y la imagen se salía. */
.td-cat-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--td-tile); overflow: hidden; }
.td-cat-media img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; mix-blend-mode: multiply;
  transform: scale(var(--td-zoom, 1)); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.td-cat-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.td-cat-name { font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--td-ink); }
.td-cat-n { font-size: 13px; color: var(--td-faint); }
.td-cat:hover { border-color: rgba(255,255,255,.26); }
.td-cat:hover .td-cat-media img { transform: scale(calc(var(--td-zoom, 1) * 1.04)); }
.td-cat:hover .td-cat-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.4); }

.td-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; }
.td-more a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--td-line); border-radius: 10px;
  background: var(--td-s1); font-weight: 600; font-size: 15px; text-decoration: none; transition: border-color .2s ease; }
.td-more a span { font-weight: 400; font-size: 13.5px; color: var(--td-faint); }
.td-more a:hover { border-color: rgba(255,255,255,.26); }

/* Marcas */
.td-sec--brands { padding-top: 36px; }
.td-brands { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.td-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 0 16px;
  border: 1px solid var(--td-line); border-radius: 8px; text-decoration: none; transition: border-color .2s ease, background-color .2s ease; }
.td-brand-name { font-family: var(--font-condensed, 'Barlow Condensed', sans-serif); font-weight: 600; font-size: 17px; letter-spacing: .02em;
  color: var(--td-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-brand-n { font-size: 12.5px; color: var(--td-faint); }
.td-brand:hover { border-color: rgba(255,255,255,.26); background: rgba(255,255,255,.02); }
.td-brands-all { margin-top: 12px; }
.td-brands-all summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; padding: 8px 0;
  font-size: 14.5px; font-weight: 600; color: var(--td-ink); }
.td-brands-all summary::-webkit-details-marker { display: none; }
.td-brands-all summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.td-brands-all[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.td-brands-all ul { list-style: none; margin: 8px 0 0; padding: 14px 0 0; border-top: 1px solid var(--td-line); columns: 4; column-gap: 28px; }
.td-brands-all li { break-inside: avoid; }
.td-brands-all li a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 14.5px; color: var(--td-mut); text-decoration: none; }
.td-brands-all li a span { color: var(--td-faint); font-size: 12.5px; }
.td-brands-all li a:hover { color: var(--td-ink); }

/* Asesoría */
.td-help { margin-top: 44px; padding: 34px 0; background: var(--td-s1); border-top: 1px solid var(--td-line); border-bottom: 1px solid var(--td-line); }
.td-help-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 40px; }
.td-help-copy p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--td-mut); max-width: 56ch; }
.td-help-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.td-help-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 0; font-size: 14px; }
.td-help-links a { color: var(--td-mut); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.25); }
.td-help-links a:hover { color: var(--td-ink); }

.td-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 8px; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.td-btn--primary { background: var(--td-red); color: #fff; }
.td-btn--primary:hover { background: var(--td-red-h); }
.td-btn--wa { background: #25d366; color: #052713; }
.td-btn--wa:hover { background: #1fb457; }
.td-btn--ghost { border-color: var(--td-line2); color: var(--td-ink); background: transparent; }
.td-btn--ghost:hover { border-color: rgba(255,255,255,.45); }

/* ── Resultados ─────────────────────────────────────────────── */
.td-list-head { padding: 24px 0 6px; }
.td-list-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 16px; }
.td-h1--list { font-size: clamp(34px, 3.4vw, 50px); }
.td-list-n { margin: 0; font-size: 15px; color: var(--td-faint); }
.td-list-desc { margin: 8px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--td-mut); max-width: 70ch; }

.td-chips { margin-top: 18px; }
.td-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.td-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 1px solid var(--td-line2);
  border-radius: 8px; font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--td-ink); white-space: nowrap;
  transition: border-color .18s ease, background-color .18s ease; }
.td-chip span { font-size: 12.5px; color: var(--td-faint); font-weight: 400; }
.td-chip:hover { border-color: rgba(255,255,255,.45); }
.td-chip.is-on { background: var(--td-ink); border-color: var(--td-ink); color: #111; }
.td-chip.is-on span { color: rgba(0,0,0,.55); }

.td-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 36px; padding-top: 22px; padding-bottom: 8px; }
.td-body > .td-results:first-child { grid-column: 1 / -1; }

/* Filtros (escritorio: columna fija) */
.td-filters { position: sticky; top: calc(var(--nav-h) + 16px); align-self: start; max-height: calc(100vh - var(--nav-h) - 32px); overflow: auto;
  padding-right: 6px; scrollbar-width: thin; }
.td-filters-head, .td-filters-foot { display: none; }
.td-f-group { padding: 4px 0 18px; margin-bottom: 14px; border-bottom: 1px solid var(--td-line); }
.td-f-group:last-of-type { border-bottom: 0; }
.td-f-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--td-faint); }
.td-f-list { list-style: none; margin: 0; padding: 0; }
.td-f-opt { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 0; font-size: 14.5px; color: var(--td-ink); text-decoration: none; }
.td-f-box { flex: none; width: 17px; height: 17px; border: 1.5px solid rgba(255,255,255,.38); border-radius: 4px; display: grid; place-items: center;
  transition: background-color .15s ease, border-color .15s ease; }
.td-f-opt[role="radio"] .td-f-box { border-radius: 50%; }
.td-f-opt.is-on .td-f-box { background: var(--td-red); border-color: var(--td-red); }
.td-f-opt.is-on .td-f-box::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.td-f-opt[role="radio"].is-on .td-f-box::after { width: 7px; height: 7px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.td-f-label { flex: 1; min-width: 0; line-height: 1.3; }
.td-f-n { font-size: 12.5px; color: var(--td-faint); }
.td-f-opt:hover .td-f-label { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }
.td-f-more { display: none; }
.td-f-group.is-expanded .td-f-more { display: list-item; }
.td-f-toggle { margin-top: 4px; padding: 6px 0; background: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--td-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.3); }

/* Barra de resultados */
.td-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.td-bar-spacer { flex: 1; }
.td-filters-btn { display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--td-line2); border-radius: 8px;
  background: transparent; color: var(--td-ink); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.td-filters-btn span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--td-red); color: #fff; font-size: 12px; }
.td-active { flex: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.td-active a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 6px; background: var(--td-s2);
  border: 1px solid var(--td-line); font-size: 13.5px; text-decoration: none; }
.td-active a:hover { border-color: rgba(255,255,255,.35); }
.td-sort select { height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--td-line2); border-radius: 8px; background-color: var(--td-s1);
  color: var(--td-ink); font: inherit; font-size: 14.5px; cursor: pointer; color-scheme: dark; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f2f1ee' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }

/* Rejilla de productos (la tarjeta es la del sitio; aquí sin 3D ni entradas) */
.tienda .products-grid.td-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 16px !important; margin: 0; }
.tienda .td-grid .product-card { animation: none !important; transform: none; }
.tienda .td-grid .product-card:hover { transform: translateY(-2px) !important; }
.tienda .td-grid .img-shine { display: none !important; }

/* Paginación */
.td-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 32px 0 8px; }
.td-pg-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.td-pg-n { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border: 1px solid var(--td-line2); border-radius: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none; color: var(--td-ink); }
a.td-pg-n:hover { border-color: rgba(255,255,255,.45); }
.td-pg-n.is-on { background: var(--td-ink); border-color: var(--td-ink); color: #111; }
.td-pg-gap { display: grid; place-items: center; min-width: 24px; height: 42px; color: var(--td-faint); }
.td-pg-step { display: inline-flex; align-items: center; height: 42px; padding: 0 14px; border: 1px solid var(--td-line2); border-radius: 8px;
  font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--td-ink); }
a.td-pg-step:hover { border-color: rgba(255,255,255,.45); }
.td-pg-step.is-off { opacity: .35; }
.td-pg-info { flex-basis: 100%; text-align: center; margin: 4px 0 0; font-size: 13px; color: var(--td-faint); }

/* Sin resultados / cargando */
.td-empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--td-line2); border-radius: 10px; }
.td-empty h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--td-ink); }
.td-empty p { margin: 8px auto 0; max-width: 52ch; font-size: 15px; color: var(--td-mut); }
.td-empty-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px !important; }
.td-loading { display: flex; align-items: center; gap: 12px; min-height: 50vh; justify-content: center; color: var(--td-mut); font-size: 15px; }
.td-loading span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--td-line2); border-top-color: var(--td-ink); animation: tdSpin .8s linear infinite; }
@keyframes tdSpin { to { transform: rotate(360deg); } }

/* ── Tableta ────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .td-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .td-brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tienda .products-grid.td-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .td-brands-all ul { columns: 3; }
}

/* Filtros como panel lateral */
@media (max-width: 900px) {
  .td-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .td-filters { position: fixed; inset: 0 auto 0 0; z-index: 1300; width: min(360px, 88vw); max-height: none; padding: 0 20px;
    background: #0f0f11; border-right: 1px solid var(--td-line2); box-shadow: 24px 0 60px rgba(0,0,0,.6);
    transform: translateX(-102%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; overflow-y: auto; }
  .td-filters.is-open { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
  .td-filters-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1;
    margin: 0 -20px 12px; padding: 14px 20px; background: #0f0f11; border-bottom: 1px solid var(--td-line); }
  .td-filters-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
  .td-filters-x { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; color: var(--td-ink); cursor: pointer; }
  .td-filters-foot { display: block; position: sticky; bottom: 0; margin: 8px -20px 0; padding: 14px 20px; background: #0f0f11; border-top: 1px solid var(--td-line); }
  .td-filters-foot .td-btn { width: 100%; }
  .td-f-opt { min-height: 44px; }
  .td-filters-btn { display: inline-flex; }
  body.td-lock { overflow: hidden; }
  .td-help-in { grid-template-columns: minmax(0, 1fr); }
  .td-help-actions { justify-content: flex-start; }
}

/* ── Teléfono ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .products-page.tienda { --td-m: 16px; }
  .td-hero { padding: 18px 0 24px; }
  .td-hero-row { display: block; margin-top: 12px; }
  .td-h1 { font-size: 38px; }
  .td-lead { font-size: 15px; }
  .td-hero-help { margin-top: 6px; padding: 6px 0; }
  .td-search { margin-top: 16px; }
  .td-search input { height: 50px; font-size: 16px; }
  .td-search-btn { padding: 0 14px; }
  .td-suggest { position: fixed; left: 12px; right: 12px; top: auto; margin-top: 6px; max-height: 62vh; }
  .td-sec { padding-top: 28px; }
  .td-sec-head { margin-bottom: 12px; }
  .td-h2 { font-size: 19px; }

  .td-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .td-cat-media img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .td-cat-body { padding: 9px 11px 11px; }
  .td-cat-name { font-size: 14.5px; }
  .td-cat-n { font-size: 12.5px; }
  /* 15 categorías en 2 columnas: la última ocupa la fila completa en horizontal */
  .td-cat:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .td-cat:last-child:nth-child(odd) .td-cat-media { width: 46%; flex: none; aspect-ratio: 4 / 3; }
  .td-cat:last-child:nth-child(odd) .td-cat-body { justify-content: center; padding: 12px 14px; }

  .td-more { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .td-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .td-brand { min-height: 48px; padding: 0 12px; }
  .td-brand-name { font-size: 16px; }
  .td-brands-all ul { columns: 2; column-gap: 18px; }
  .td-help { margin-top: 32px; padding: 26px 0; }
  .td-help-actions .td-btn { flex: 1 1 100%; }

  .td-list-head { padding-top: 16px; }
  .td-chips { margin: 14px calc(var(--td-m) * -1) 0; }
  .td-chips ul { flex-wrap: nowrap; overflow-x: auto; padding: 0 var(--td-m) 4px; scrollbar-width: none; }
  .td-chips ul::-webkit-scrollbar { display: none; }
  .td-chip { min-height: 40px; }
  .td-body { padding-top: 16px; }
  .td-bar { gap: 8px; }
  .td-active { order: 3; flex-basis: 100%; }
  .td-sort { margin-left: auto; }
  .td-sort select { max-width: 200px; }
  .tienda .products-grid.td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .td-pg-step { padding: 0 12px; }
  .td-pg-n { min-width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .td-cat-media img, .td-hero-help svg { transition: none; }
  .td-filters { transition: none !important; }
}

/* ── Celular: un solo buscador ──────────────────────────────────
   En la tienda el buscador propio (con SKU y sugerencias) queda arriba;
   la fila de búsqueda del encabezado sería un segundo buscador seguido.
   Solo dentro de #page-products y solo en celular. */
@media (max-width: 860px) {
  body:has(#page-products.active) .hx-main .hx-wrap { grid-template-areas: "burger logo actions"; row-gap: 0; }
  body:has(#page-products.active) .hx-search { display: none; }
  body:has(#page-products.active) { --nav-h: var(--td-nav-compact, 78px); }
}
@media (max-width: 640px) {
  .td-search-btn { height: 44px; margin-right: 3px; }
}

/* La animación de entrada de las vistas (.page.active) deja un transform
   aplicado, y un transform convierte a la página en el marco de los
   position:fixed: el panel de filtros quedaba atrapado debajo del
   encabezado. En la tienda la vista entra sin animación. */
#page-products.page.active { animation: none !important; transform: none !important; }
/* "Destacado" se encimaba con la marca; en la tienda los destacados ya van primero. */
.tienda .product-card-badge { display: none !important; }
.tienda .product-card-badge + .product-card-promos { top: 12px; }
.td-filters-bg { display: none; }
@media (max-width: 900px) {
  .td-filters.is-open ~ .td-filters-bg { display: block; position: fixed; inset: 0; z-index: 1299; background: rgba(0,0,0,.6); }
}
@media (max-width: 900px) {
  /* align-self:start (columna fija de escritorio) dejaba el panel del alto de
     su contenido aunque tenga top/bottom 0: el pie "Ver N productos" caía
     fuera de la pantalla. */
  .td-filters { align-self: stretch; height: 100vh; height: 100dvh; }
}
