/* main-category / view «Доріжки» (template/blocks/main-category/_lanes.twig, settings.view_lanes; shown by data-grid-view="lanes", _axes.css).
   Price lanes side by side: the budget at a glance. A lane — its range in large figures, the number of products, the spread of its prices
   (bars), then the products of the page: the leader larger, the rest dense rows. The colour of a lane is the accent of the design turned
   along the hue wheel (cool → warm), only on the rule and the bars, never under text. The width of the listing box decides (container
   .et-listing__lanes): 4 → 2 → 1 lanes in a row; one lane in a row — every product a row (the price of the first one on the first screen
   of a phone). Tokens only. Motion: none. */
.et-lanes { display: grid; grid-template-columns: repeat(var(--et-lanes-n, 4), minmax(0, 1fr)); gap: 1rem; align-items: start; margin-top: 0.75rem; }
.et-lanes__lane { --lane-c: var(--et-accent); --lane-c: oklch(from var(--et-accent) l c calc(h - 40 + var(--et-lane, 0) * 30));
  min-width: 0; border-top: 3px solid var(--lane-c); border-radius: var(--et-card-radius, var(--et-radius)); background: var(--et-surface); box-shadow: inset 0 0 0 1px var(--et-border); }
.et-lanes__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.25rem 0.75rem; padding: 1rem 1rem 0.75rem; border-bottom: 1px solid var(--et-border); }
.et-lanes__range { grid-column: 1 / -1; margin: 0; color: var(--et-text); font: var(--et-heading-weight, 700) clamp(1.125rem, 2.2cqi, 1.5rem)/1.15 var(--et-font-price, var(--et-font-display)); font-variant-numeric: tabular-nums; }
.et-lanes__count { margin: 0; color: var(--et-text-secondary); font-size: var(--et-text-sm); }
.et-lanes__only { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--et-text); font-size: var(--et-text-sm); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.et-lanes__bars { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 2px; height: 1.5rem; margin-top: 0.5rem; }
.et-lanes__bars i { flex: 1 1 0; height: max(2px, var(--h)); border-radius: 2px 2px 0 0; background: var(--lane-c); }
.et-lanes__list { display: grid; gap: 0.25rem; margin: 0; padding: 0.5rem; list-style: none; }
.et-lanes__list:empty::before { content: attr(data-empty); padding: 0.5rem; color: var(--et-text-secondary); font-size: var(--et-text-sm); }
.et-lanes__item { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.625rem; padding: 0.375rem; border-radius: var(--et-radius-sm, 8px); }
.et-lanes__item:hover { background: var(--et-surface-2); }
.et-lanes__img img { display: block; width: 3.5rem; height: 3.5rem; object-fit: contain; border-radius: var(--et-media-radius, 8px); background: var(--et-media-box, var(--et-surface-2)); }
.et-lanes__body { display: grid; gap: 0.25rem; min-width: 0; }
.et-lanes__name { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--et-text); font-size: var(--et-text-sm); line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.et-lanes__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.et-lanes__price { color: var(--et-text); font-variant-numeric: tabular-nums; }
.et-lanes__price b { font: var(--et-heading-weight, 700) 1.0625rem/1.1 var(--et-font-price, var(--et-font-display)); }
.et-lanes__price b.is-sale { color: var(--et-sale, var(--et-accent)); }
.et-lanes__price s { margin-left: 0.25rem; color: var(--et-text-muted); font-size: var(--et-text-xs); }
.et-lanes__add { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; border: 0;
  border-radius: var(--et-btn-radius, 10px); background: var(--et-accent); color: var(--et-accent-contrast); font: inherit; font-size: var(--et-text-sm); font-weight: 700; cursor: pointer; }
.et-lanes__add:hover { background: var(--et-accent-hover, var(--et-accent)); }
.et-lanes__add:disabled { opacity: 0.55; cursor: default; }
.et-lanes__add-t { display: none; }
.et-lanes :is(a, button):focus-visible { outline: 2px solid var(--et-accent); outline-offset: 2px; }

/* lanes side by side: the first product of a lane is its leader — the photo across the lane, «Купити» with its word */
@container (min-width: 30rem) {
  .et-lanes__item:first-child { grid-template-columns: minmax(0, 1fr) auto; padding: 0.5rem 0.5rem 0.75rem; }
  .et-lanes__item:first-child .et-lanes__img { grid-column: 1 / -1; }
  .et-lanes__item:first-child .et-lanes__img img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .et-lanes__item:first-child .et-lanes__name { -webkit-line-clamp: 3; font-size: var(--et-text-base); font-weight: 600; }
  .et-lanes__item:first-child .et-lanes__price b { font-size: 1.375rem; }
  .et-lanes__item:first-child .et-lanes__add-t { display: inline; }
}
@container (max-width: 52rem) {
  .et-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 30rem) {
  .et-lanes { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .et-lanes__head { padding: 0.75rem 0.75rem 0.5rem; }
}
