/* ---------------------------------------------------------------------------
   Front page sections, in the order the reference runs them.
   --------------------------------------------------------------------------- */

/* ---------- 1. Hero slideshow ---------- */

.bs-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bs-black);
}

@media only screen and (min-width: 990px) {
  .bs-hero { min-height: 630px; align-items: center; }
}

.bs-hero__media { position: absolute; inset: 0; z-index: 0; }

.bs-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Two scrims, both neutral. Measured off the reference, which darkens its hero
   with #111 at 40% and adds a black gradient over the top third — and nothing
   else. The red belongs to the photograph.
   A red tint here compounds with it and the whole hero goes bright pillar-box. */
.bs-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bs-black);
  opacity: .4;
}

/* The second scrim: solid black at the very top, 80% immediately below it, out
   to nothing a third of the way down. It is what makes the white logo and the
   search pill legible over a bright photograph. */
.bs-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 33%;
  z-index: 2;
  background: linear-gradient(rgb(0, 0, 0), rgba(0, 0, 0, .8) .01%, rgba(0, 0, 0, 0));
  pointer-events: none;
}

.bs-hero__inner {
  position: relative;
  /* Above both scrims, which sit at 0 and 2. */
  z-index: 3;
  width: 100%;
  padding-block: 120px 56px;
  text-align: center;
  color: var(--bs-white);
}

@media only screen and (min-width: 990px) {
  .bs-hero__inner { padding-block: 176px 64px; }
}

/* 6px 14px, 2px of radius, no extra tracking — the reference's own numbers. */
.bs-hero__flag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 2px;
  background: var(--bs-red-announcement);
  color: var(--bs-white);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.bs-hero__lead { margin-top: 24px; font-size: 18px; font-weight: 500; }

@media only screen and (min-width: 990px) {
  .bs-hero__lead { font-size: 20px; }
}

.bs-hero__title {
  margin-top: 8px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
}

@media only screen and (min-width: 990px) {
  .bs-hero__title { font-size: 64px; }
}

.bs-hero__actions { margin-top: 32px; }

/* Countdown */

.bs-countdown {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

@media only screen and (min-width: 990px) {
  .bs-countdown { gap: 48px; }
}

.bs-countdown__unit { min-width: 56px; text-align: center; }
.bs-countdown__num { font-size: 28px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bs-countdown__label { font-size: 14px; }

/* ---------- 2. Benefits bar ---------- */

.bs-benefits {
  display: flex;
  flex-wrap: nowrap;
  gap: 32px;
  padding: 14px var(--bs-pad);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  font-size: 14px;
}

.bs-benefits::-webkit-scrollbar { display: none; }

.bs-benefits__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.bs-benefits__item svg { color: var(--bs-blue); }

@media only screen and (min-width: 990px) {
  .bs-benefits { justify-content: center; gap: 56px; }
}

/* ---------- 3. Category tiles ---------- */

/* scroll-padding matters as much as padding here: a mandatory snap container
   aligns the first item to the scrollport, not to the padding box, so Chrome
   opens the row already scrolled 48px along and the gutter disappears. */
.bs-cats {
  display: flex;
  gap: 16px;
  padding-inline: var(--bs-pad);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--bs-pad);
  scrollbar-width: none;
}

.bs-cats::-webkit-scrollbar { display: none; }

.bs-cat {
  flex: 0 0 168px;
  scroll-snap-align: start;
  text-align: center;
}

@media only screen and (min-width: 990px) {
  .bs-cat { flex: 0 0 212px; }
}

.bs-cat__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 16px;
  border-radius: 4px;
  background: var(--bs-gray-ultra-light);
  transition: background var(--bs-dur) var(--bs-ease);
}

.bs-cat:hover .bs-cat__media { background: var(--bs-gray-light); }
.bs-cat__media img { max-height: 100%; width: auto; object-fit: contain; }
.bs-cat__label { margin-top: 12px; font-size: 14px; font-weight: 500; }

/* ---------- 4. Product carousels ---------- */

/* An author `display: flex` outranks the browser's own `[hidden] { display:
   none }`, so without this every tab panel rendered, stacked — the "extra
   rows" of products, each one a 2,800px scroller. */
.bs-rail[hidden],
.bs-tabpanel[hidden] { display: none; }

/* Each scroller is the containing block for anything positioned inside it;
   an absolute box that escaped to the root is what widened the page. */
.bs-rail, .bs-cats, .bs-discover, .bs-benefits { position: relative; }

.bs-rail {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  padding-inline: var(--bs-pad);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--bs-pad);
  scrollbar-width: none;
}

.bs-rail::-webkit-scrollbar { display: none; }

.bs-rail > * {
  flex: 0 0 300px;
  scroll-snap-align: start;
}

@media only screen and (min-width: 990px) {
  .bs-rail > * { flex: 0 0 318px; }
}

/* Two or three rows: the same rail, wrapping into a grid of four instead of
   scrolling. Flex, with the card width worked out from the gap. */
.bs-rail--grid {
  flex-wrap: wrap;
  row-gap: 40px;
  overflow: visible;
  scroll-snap-type: none;
}

.bs-rail--grid > * { flex: 0 0 calc((100% - 24px) / 2); scroll-snap-align: none; }

@media only screen and (min-width: 700px) {
  .bs-rail--grid > * { flex: 0 0 calc((100% - 48px) / 3); }
}

@media only screen and (min-width: 990px) {
  .bs-rail--grid > * { flex: 0 0 calc((100% - 72px) / 4); }
}

/* The heading block keeps the page gutter; only the rail bleeds to the edge. */
.bs-section--rail > .bs-container { margin-bottom: 0; }

.bs-section__aside { display: flex; align-items: center; gap: 24px; }

.bs-rail__nav { display: none; gap: 8px; }

/* Only where there is a pointer to click with; a thumb swipes the rail. */
@media only screen and (min-width: 990px) and (hover: hover) {
  .bs-rail__nav { display: flex; }
}

.bs-rail__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--bs-gray-light);
  border-radius: 50%;
  background: var(--bs-white);
  color: var(--bs-black);
  cursor: pointer;
  transition: border-color var(--bs-dur) var(--bs-ease), background var(--bs-dur) var(--bs-ease);
}

.bs-rail__arrow:hover { border-color: var(--bs-black); }

/* Smooth for the arrows; the CSS property is what scrollBy() honours. */
.bs-rail { scroll-behavior: smooth; }

/* ---------- 5. Discover tiles ---------- */

.bs-discover {
  display: flex;
  gap: 24px;
  padding-inline: var(--bs-pad);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.bs-discover::-webkit-scrollbar { display: none; }

.bs-discover__item {
  position: relative;
  flex: 0 0 280px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

@media only screen and (min-width: 990px) {
  .bs-discover__item { flex: 1 1 0; aspect-ratio: 16 / 11; }
}

.bs-discover__item img { width: 100%; height: 100%; object-fit: cover; }

.bs-discover__name {
  position: absolute;
  bottom: 20px; left: 0; right: 0;
  color: var(--bs-white);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}

/* The first tile is a flat petrol panel, not a photo. */
.bs-discover__intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--bs-blue);
  color: var(--bs-white);
}

.bs-discover__title { font-size: 24px; font-weight: 700; line-height: 30px; }
.bs-discover__arrow { color: var(--bs-gold); }

/* ---------- 6. Showcase ---------- */

.bs-showcase {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 560px;
  padding: 32px var(--bs-pad);
  overflow: hidden;
}

@media only screen and (min-width: 990px) {
  .bs-showcase { min-height: 696px; }
}

.bs-showcase__media { position: absolute; inset: 0; }
.bs-showcase__media img { width: 100%; height: 100%; object-fit: cover; }

.bs-showcase__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 580px;
  padding: 40px 32px;
  background: var(--bs-white);
}

@media only screen and (min-width: 990px) {
  .bs-showcase__content { padding: 56px 48px; }
}

.bs-showcase__text { margin-top: 20px; color: var(--bs-black-light); font-size: 14px; line-height: 1.7; }

.bs-showcase__list { margin-top: 32px; }

.bs-showcase__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--bs-gray-light);
  font-size: 14px;
}

.bs-showcase__row:last-child { border-bottom: 1px solid var(--bs-gray-light); }
.bs-showcase__row svg { flex: none; color: var(--bs-black); }

.bs-showcase__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }

.bs-textlink {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 4px;
}

/* ---------- 7. Long-form text ---------- */

.bs-text { padding-block: 40px; }

/* ---------- 8. Banner ---------- */

.bs-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 486px;
  padding: 40px var(--bs-pad);
  overflow: hidden;
  background: var(--bs-gray-light);
}

.bs-banner__media { position: absolute; inset: 0; }
.bs-banner__media img { width: 100%; height: 100%; object-fit: cover; }

.bs-banner__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding: 32px;
  background: rgba(245, 245, 245, .92);
}

@media only screen and (min-width: 990px) {
  .bs-banner__content { padding: 40px; }
}

.bs-banner__text { margin-top: 16px; font-size: 14px; line-height: 1.7; }
.bs-banner__text p { margin: 0 0 12px; }
.bs-banner__actions { margin-top: 24px; }
