/* Precium · site design · chips in a row that wraps (v17-chips, 18-11-2026). Every rule scoped to [data-site-design="nuevo"],
   no colour of its own: only how a chip that is longer than its row fits in it. Linked by DesignScope after the base sheet
   (lib/site-design/chips.ts), so the base sheet keeps its name and no cached page is left behind.

   The base draws a chip on one line (white-space: nowrap) with a fixed height and never lets it shrink (flex: none). In a row
   that wraps (.sd-chip-row--wrap, and the rankings' .sd-rk-chips) a chip whose text is longer than the row was wider than the
   page on a phone: «Accesorios y recambios de electrodomésticos 116» in «Categorías con ofertas de MediaMarkt» (437 px at
   390), «Perfumes de hombre con menor precio por 100 ml» on /mejores (398 px), and the whole page scrolled sideways.

   Here such a chip is never wider than its row and its text goes to a second line inside it, whole and in balanced lines
   (nothing is cut or hidden: what is seen is what the screen reader reads); its icon, its photo and its count keep their
   size, the count at its right. A chip that fits keeps its one line, its width and its height exactly as today: it still
   takes its own width (max-content), its minimum height is the one of its kind and the padding above and below fits inside
   it (36: 18 + 2 × 6 and the icon 20 + 2 × 6; small 32: 20 + 2 × 6; brand 28: 16 + 2 × 6; photo 36: 28 + 2 × 4). A chip
   on two lines is 48 px high. Only a chip longer than its row changes, so nothing moves elsewhere.

   The home's «Lo que más se busca» is a sliding strip on a phone (its own sheet): there a chip keeps its line as today. */
[data-site-design="nuevo"] :is(.sd-chip-row--wrap, .sd-rk-chips) > li { min-width: 0; max-width: 100%; }
[data-site-design="nuevo"] :is(.sd-chip-row--wrap, .sd-rk-chips) .sd-chip {
  max-width: 100%; height: auto; min-height: var(--sd-h-36); padding-top: var(--sd-s-6); padding-bottom: var(--sd-s-6);
  white-space: normal; overflow-wrap: anywhere; text-wrap: balance;
}
[data-site-design="nuevo"] :is(.sd-chip-row--wrap, .sd-rk-chips) > .sd-chip { align-self: flex-start; }
[data-site-design="nuevo"] :is(.sd-chip-row--wrap, .sd-rk-chips) .sd-chip--small { min-height: var(--sd-h-32); }
[data-site-design="nuevo"] :is(.sd-chip-row--wrap, .sd-rk-chips) .sd-chip--brand { min-height: var(--sd-h-28); }
[data-site-design="nuevo"] :is(.sd-chip-row--wrap, .sd-rk-chips) .sd-chip--photo { padding-top: var(--sd-s-4); padding-bottom: var(--sd-s-4); }
[data-site-design="nuevo"] :is(.sd-chip-row--wrap, .sd-rk-chips) .sd-chip__count { flex: none; }
@media (max-width: 767px) {
  [data-site-design="nuevo"] .sd-hp-searched .sd-chip-row--wrap .sd-chip { max-width: none; white-space: nowrap; }
}
