/* ── «Promocje LEGO» and its tabs (task 298, Pages/Lists/_Promotions; Figma 352:226825 / 352:226843): only where its blocks
   stand – the site's column (01-base.css; 1 200 px of its own until task 310), 32 px between the head, the tabs, the facets, the jump strip and each group; a group's head
   16 px over its row of four cards 24 px apart; the list's rows 16 apart. The head, the tabs, the facets, the cards, the
   section heads, the series' rows, the list's foot and «Zobacz też» are components (ui-hub-head, ui-tabs, ui-hub-facets, SetCard
   Deal, ui-section-header, ui-navlist, ui-list-foot, ui-hub-see-also in 01-components.css). ── */
.deals {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  /* Figma's 32 px over the head: the layout leaves 28. */
  padding-top: var(--space-1);
  padding-bottom: var(--space-7);
}

.deals-group,
.deals-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  scroll-margin-top: calc(var(--layout-header, 56px) + var(--space-4));
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4) var(--space-6);
}

/* Figma «Status tabs» 24 px apart; the jump strip's pills 8 apart. */
.deals-tabs {
  gap: var(--space-6);
}

.deals-jump {
  gap: var(--space-2);
}

.deals-list__title {
  margin: 0;
  color: var(--text);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.35;
}

.deals-series .ui-navlist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The list's foot stands right under the cards (the list's 16 px gap taken back): its hidden states and the 1 px sentinel
   leave the list's bottom where the cards end (Figma 429:193044: «Zobacz też» 32 px under them); a shown state brings its
   own 16 px (ui-list-foot). A column of flex, not grid: a grid's row keeps its gap whatever the item's margin, a flex line
   takes the negative margin off the list's height (48 px under the cards with the grid, 33 with this). */
.deals-list {
  display: flex;
  flex-direction: column;
}

.deals-list > * {
  min-width: 0;
}

.deals-list > .ui-list-foot {
  margin-top: calc(-1 * var(--space-4));
}

/* Figma 352:226843: 16 px between every block, a group's head 12 px over its two cards, the cards 16 apart. */
@media (max-width: 900px) {
  /* Figma's phone column is 16 px from the edges (the layout's 12) and starts 12 under the header (no desktop's 4). */
  .deals {
    gap: var(--space-4);
    padding-top: 0;
    padding-inline: var(--space-1);
  }

  .deals-group {
    gap: var(--space-3);
  }

  .deals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .deals-list__title {
    font-size: var(--text-lg);
  }

  .deals-series .ui-navlist {
    grid-template-columns: minmax(0, 1fr);
  }
}
