/* WIWU Perú · Catálogo: mezcla de 3sixteen (texto sobrio, paneles grises, nada que distraiga) y ETQ
   (categorías con miniatura, "Ver todo · línea (n)", "Ocultar filtros" y "Ordenar por", cuadraditos de color).
   Sin precios. Paleta de la portada: fondo #f7faff, panel #edf2f9, tinta #0d1424, texto secundario #4c5568. */
.cl {
  --cl-ink: #0d1424;
  --cl-soft: #4c5568;
  --cl-panel: #edf2f9;
  --cl-line: rgba(13, 20, 36, .12);
  --cl-ease: cubic-bezier(.23, 1, .32, 1);
  --cl-side: 228px;
  padding: clamp(14px, 2.4vw, 28px) 0 clamp(3rem, 6vw, 5rem);
  background: var(--bg, #f7faff);
  color: var(--cl-ink);
}

/* Barra superior: dónde estoy y cuántos hay (izquierda), filtros y orden (derecha) */
.cl-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin-bottom: clamp(16px, 2.4vw, 28px);
}
.cl-crumb { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 1.02rem; }
.cl-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--cl-ink); text-decoration: none; }
.cl-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cl-sep { width: 1px; height: 18px; background: var(--cl-line); }
.cl-crumb__now { font-weight: 700; }
.cl-crumb__now span { color: var(--cl-soft); font-weight: 500; }
.cl-tools { display: flex; align-items: center; gap: 6px 18px; }
.cl-tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  border: 0; background: none; color: var(--cl-ink); font: inherit; font-size: .98rem; cursor: pointer;
  touch-action: manipulation;
}
.cl-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cl-sort { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.cl-sort select {
  min-height: 44px; padding: 0 22px 0 0; border: 0; background: transparent; color: var(--cl-ink);
  font: inherit; font-size: 16px; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.cl-sort::after { content: ""; position: absolute; right: 4px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border: solid var(--cl-ink); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); pointer-events: none; }
.cl-open { display: none; }

/* Filtros activos */
.cl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; }
.cl-chips:empty { display: none; }
.cl-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 14px;
  border: 1px solid var(--cl-line); border-radius: 99px; background: #fff; color: var(--cl-ink);
  font: inherit; font-size: .9rem; cursor: pointer; touch-action: manipulation;
}
.cl-chip span { color: var(--cl-soft); font-size: 1.1rem; line-height: 1; }
.cl-clear { min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--cl-soft); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Diseño en dos columnas */
.cl-layout { display: grid; grid-template-columns: var(--cl-side) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.cl.is-hidden .cl-layout { grid-template-columns: minmax(0, 1fr); }
.cl.is-hidden .cl-side { display: none; }
.cl-side { position: sticky; top: calc(var(--header-h, 72px) + 20px); display: grid; gap: 22px; max-height: calc(100dvh - var(--header-h, 72px) - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-right: 6px; }
.cl-side::-webkit-scrollbar { display: none; }

/* Categorías con miniatura (ETQ) */
.cl-cats { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cl-cat {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 56px; padding: 4px 6px 4px 4px; border-radius: 10px;
  color: var(--cl-soft); text-decoration: none; font-size: .98rem;
  transition: background-color 160ms ease, color 160ms ease;
}
.cl-cat img, .cl-cat__all { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--cl-panel); }
.cl-cat .cl-cat__all { padding: 10px; object-fit: contain; }
.cl-cat small { color: var(--cl-soft); font-size: .82rem; }
.cl-cat[aria-current="page"] { color: var(--cl-ink); font-weight: 700; background: var(--cl-panel); }

/* Grupos de filtros */
.cl-groups { display: grid; gap: 4px; border-top: 1px solid var(--cl-line); padding-top: 10px; }
.cl-group summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px;
  font-weight: 700; font-size: .98rem; cursor: pointer; list-style: none;
}
.cl-group summary::-webkit-details-marker { display: none; }
.cl-group summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform 200ms var(--cl-ease); }
.cl-group[open] summary::after { transform: rotate(-135deg); }
.cl-group__n { margin-left: 4px; margin-right: auto; color: var(--cl-soft); font-weight: 500; }
.cl-group ul { display: grid; gap: 0; margin: 0 0 10px; padding: 0; list-style: none; }
.cl-opt {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 40px; padding: 0 2px; border: 0; background: none;
  color: var(--cl-soft); font: inherit; font-size: .94rem; text-align: left; cursor: pointer; touch-action: manipulation;
}
.cl-opt small { font-size: .82rem; }
.cl-opt__box { width: 16px; height: 16px; border: 1.5px solid rgba(13, 20, 36, .35); border-radius: 4px; }
.cl-opt__dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(13, 20, 36, .18); }
.cl-opt[aria-pressed="true"] { color: var(--cl-ink); font-weight: 700; }
.cl-opt[aria-pressed="true"] .cl-opt__box { border-color: var(--cl-ink); background: var(--cl-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.cl-opt[aria-pressed="true"] .cl-opt__dot { box-shadow: 0 0 0 2px var(--bg, #f7faff), 0 0 0 3.5px var(--cl-ink); }
.cl-opt:disabled { opacity: .4; cursor: default; }

/* Cuadrícula de productos (3sixteen: panel gris, nombre y una línea) */
.cl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(12px, 1.4vw, 20px); }
.cl.is-hidden .cl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cl-card { display: grid; align-content: start; gap: 12px; min-width: 0; }
.cl-card__media {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0;
  border: 0; border-radius: 6px; overflow: hidden; background: var(--cl-panel); cursor: pointer;
  touch-action: manipulation;
}
.cl-card__img {
  position: absolute; inset: 9% 8%; width: 84%; height: 82%; object-fit: contain; mix-blend-mode: multiply;
  transition: opacity 260ms ease, transform 400ms var(--cl-ease);
}
.cl-card__img--alt { opacity: 0; }
/* Productos con video: marca arriba a la izquierda; el video está al final de su ficha */
.cl-card__video {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px;
  border-radius: 99px; background: rgba(255, 255, 255, .94); color: #0d1424;
  font-size: .8rem; font-weight: 700; pointer-events: none;
}
.cl-card__video svg { width: 18px; height: 18px; padding: 4px 3px 4px 5px; border-radius: 50%; background: #0d1424; color: #fff; fill: currentColor; }
/* Flechitas a los lados de la foto para pasar de color (siempre visibles: en el teléfono no hay "pasar el mouse") */
.cl-card__stage { position: relative; }
.cl-card__arrow {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #0d1424; cursor: pointer;
  box-shadow: 0 2px 10px rgba(13, 20, 36, .16); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: scale 140ms var(--cl-ease), background-color 160ms ease;
}
.cl-card__arrow::before { content: ""; position: absolute; inset: -6px; }       /* zona de toque de 46 px */
.cl-card__arrow--prev { left: 8px; }
.cl-card__arrow--next { right: 8px; }
.cl-card__arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cl-card__arrow:active { scale: .92; }
.cl-card__info { display: grid; gap: 3px; padding: 0 2px; }
.cl-card__name { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.cl-card__name button { position: relative; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cl-card__name button::after { content: ""; position: absolute; inset: -12px -4px; }                      /* zona de toque de 45 px de alto */
.cl-card__meta { margin: 0; color: var(--cl-soft); font-size: .92rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-card__colors { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--cl-soft); font-size: .86rem; }
.cl-card__dots { display: inline-flex; gap: 3px; }
.cl-card__dots span { width: 9px; height: 9px; box-shadow: inset 0 0 0 1px rgba(13, 20, 36, .2); }
/* El color que coincide con el filtro queda marcado con un anillo */
.cl-card__dots span.is-on { outline: 1.5px solid #0d1424; outline-offset: 1.5px; }

.cl-empty { display: grid; justify-items: start; gap: 10px; padding: 40px 0; color: var(--cl-soft); }
.cl-empty[hidden] { display: none; }
.cl-empty strong { color: var(--cl-ink); font-size: 1.2rem; }
.cl-empty button { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--cl-ink); border-radius: 99px; background: none; color: var(--cl-ink); font: inherit; font-weight: 700; cursor: pointer; }

/* Pestañas de categoría del teléfono y hoja de filtros */
.cl-tabs { display: none; }
.cl-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(13, 20, 36, .35); }
.cl-scrim[hidden] { display: none; }
.cl-done { display: none; }
.cl-sheethead { display: none; }

.cl a:focus-visible, .cl button:focus-visible, .cl select:focus-visible, .cl summary:focus-visible { outline: 2px solid #4d74b8; outline-offset: 2px; border-radius: 6px; }
.cl-chip:active, .cl-empty button:active { transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  .cl-card__arrow:hover { background: #fff; }
  .cl-card__media:hover .cl-card__img { transform: scale(1.03); }
  .cl-card__media:hover .cl-card__img--alt { opacity: 1; }
  .cl-card__media:hover .cl-card__img:not(.cl-card__img--alt):has(+ .cl-card__img--alt) { opacity: 0; }
  .cl-card__name button:hover { text-decoration: underline; text-underline-offset: 3px; }
  .cl-cat:hover { color: var(--cl-ink); }
  .cl-opt:not(:disabled):hover { color: var(--cl-ink); }
  .cl-chip:hover { border-color: rgba(13, 20, 36, .35); }
}

@media (max-width: 1100px) {
  .cl-grid, .cl.is-hidden .cl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl.is-hidden .cl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .cl-layout { grid-template-columns: minmax(0, 1fr); }
  .cl-back, .cl-sep { display: none; }
  .cl-bar { gap: 2px 16px; }
  .cl-toggle { display: none; }
  .cl-open { display: inline-flex; }
  .cl-tabs {
    display: flex; gap: 8px; margin: 0 calc(var(--gutter, 16px) * -1) 14px; padding: 0 var(--gutter, 16px);
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .cl-tabs::-webkit-scrollbar { display: none; }
  .cl-tab {
    flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
    border: 1px solid var(--cl-line); border-radius: 99px; background: #fff; color: var(--cl-soft);
    font-size: .92rem; text-decoration: none; white-space: nowrap;
  }
  .cl-tab[aria-current="page"] { border-color: var(--cl-ink); background: var(--cl-ink); color: #fff; font-weight: 700; }
  .cl-side {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 61;
    max-height: 82dvh; padding: 0 var(--gutter, 16px) calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 -12px 40px rgba(13, 20, 36, .16);
    transform: translateY(102%); visibility: hidden;
    transition: transform 320ms cubic-bezier(.32, .72, 0, 1), visibility 0s linear 320ms;
  }
  .cl-side.is-open { transform: none; visibility: visible; transition: transform 320ms cubic-bezier(.32, .72, 0, 1); }
  .cl-side .cl-cats { display: none; }
  .cl-sheethead { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; padding: 16px 0 8px; background: #fff; font-weight: 800; font-size: 1.15rem; }
  .cl-groups { border-top: 0; padding-top: 0; }
  .cl-done {
    display: flex; align-items: center; justify-content: center; position: sticky; bottom: 0;
    min-height: 52px; margin-top: 8px; border: 0; border-radius: 99px; background: var(--cl-ink); color: #fff;
    font: inherit; font-weight: 700; cursor: pointer;
  }
  .cl-grid { gap: 26px 12px; }
  .cl-card__meta { -webkit-line-clamp: 1; }
}
html.cl-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .cl-card__img, .cl-cat, .cl-group summary::after, .cl-side { transition: none !important; }
}

/* Objetivos táctiles de 44 px en filtros, opciones y pestañas (pantallas táctiles y celulares); con ratón en escritorio se conserva la altura compacta */
@media (pointer: coarse), (max-width: 860px) {
  .cl-chip, .cl-clear, .cl-opt, .cl-tab { min-height: 44px; }
}

/* Precio de la tarjeta */
.cl-card__price { margin: 3px 0 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -.005em; font-variant-numeric: tabular-nums; }
