.home-banners:not([hidden]) { margin-block: 14px; }
.home-banners-frame { position: relative; }
.home-banners-track {
  display: flex;
  direction: rtl;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 16px;
  background: #eef3f7;
  aspect-ratio: 3 / 1;
}
.home-banners-track::-webkit-scrollbar { display: none; }
.home-banners-track > .home-banner-item {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}
.home-banner-item { display: block; overflow: hidden; }
.home-banner-item img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-banner-item:focus-visible { outline: 2px solid #203449; outline-offset: -3px; }
.home-banners-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: clamp(35px, 3.2vw, 49px);
  height: clamp(64px, 22%, 100px);
  padding: 0;
  border: 1px solid #dae2e9;
  background: #fff;
  color: #354658;
  box-shadow: 0 2px 8px #20344920;
}
.home-banners-arrow[hidden] { display: none; }
.home-banners-arrow::before {
  content: '';
  width: 12px;
  height: 12px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
}
.home-banners-prev { left: 0; border-radius: 0 12px 12px 0; }
.home-banners-prev::before { transform: translateX(2px) rotate(135deg); }
.home-banners-next { right: 0; border-radius: 12px 0 0 12px; }
.home-banners-next::before { transform: translateX(-2px) rotate(-45deg); }
.home-banners-arrow:hover:not(:disabled) { background: #f5f8fb; }
.home-banners-arrow:focus-visible { outline: 2px solid #203449; outline-offset: -4px; }
.home-banners-arrow:disabled { opacity: .55; cursor: default; }
.home-banners-dots {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  align-items: center;
  background: #10253add;
  border-radius: 24px;
  padding: 0 3px;
}
.home-banners-dots:not([hidden]) { display: flex; }
.home-banners-dots button { display: grid; place-items: center; width: 23px; height: 28px; padding: 0; border: 0; background: none; }
.home-banners-dots button::after { content: ''; width: 7px; height: 7px; border-radius: 10px; background: #c5d2dd; }
.home-banners-dots button[aria-current="true"]::after { width: 16px; background: #fff; }
.home-banner-grid:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-block: 0 16px;
}

.special-sale:not([hidden]) ~ .home-banner-grid:not([hidden]) {
  margin-block-start: clamp(12px, 2vw, 24px);
}

.home-banner-grid .home-banner-item {
  aspect-ratio: 4 / 3;
  background: #eef3f7;
  border-radius: 12px;
}

@media (width > 900px) {
  /* The Easy Purchase artwork has extra space around its text and fans. */
  .home-banner-grid .home-banner-item > img[src$="3977a7ae783d3b3e03e212732c5248964dfc2d074f8edc7a56fd342b4f74e5e0.webp"] {
    transform: scale(1.07);
  }

  .home-banners-track {
    --banner-gap: 8px;
    direction: ltr;
    gap: var(--banner-gap);
    aspect-ratio: auto;
    border-radius: 0;
    background: none;
    scroll-snap-type: inline proximity;
  }

  .home-banners-track > :is(.home-banner-item, .home-banners-card, .home-banners-skeleton-card) {
    flex: 0 0 calc((100% - 5 * var(--banner-gap)) / 5.16);
    width: auto;
    height: auto;
    min-width: 0;
    aspect-ratio: 5 / 8;
    border-radius: 12px;
    background-color: #eef3f7;
    scroll-snap-align: start;
  }

  .home-banners-track > :is(.home-banner-item, .home-banners-card, .home-banners-skeleton-card):first-child {
    margin-left: auto;
  }

  .home-banners-card {
    direction: rtl;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    padding: 14px;
    color: #203449;
    font-size: clamp(16px, 1.8vw, 26px);
    font-weight: 800;
    line-height: 1.35;
    overflow: hidden;
  }

  .home-banners-card:nth-child(2) { background-color: #f8e8d9; }
  .home-banners-card:nth-child(3) { background-color: #dfeaf8; }
  .home-banners-card:nth-child(4) { background-color: #e2ece7; }

  .home-banners-card img { display: block; width: 100%; height: 100%; object-fit: contain; }

  .home-banners-card:focus-visible {
    outline: 2px solid #203449;
    outline-offset: -3px;
  }

}

@media (max-width: 900px) {
  #storeHome > .hero .hero-intro { display: none; }
  #storeHome > .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0 !important;
  }

  .home-banners-track { aspect-ratio: 2 / 1; border-radius: 12px; }
  :is(.home-banners-track--mobile-cards, #homeBannerSkeleton .home-banners-track) {
    gap: 8px;
    aspect-ratio: auto;
    border-radius: 0;
    background: none;
    scroll-snap-type: x proximity;
  }

  :is(.home-banners-track--mobile-cards, #homeBannerSkeleton .home-banners-track)
    > :is(.home-banner-item, .home-banners-skeleton-card) {
    flex: 0 0 clamp(96px, 36%, 152px);
    aspect-ratio: 5 / 8;
    border-radius: 10px;
  }

  .home-banners-track--mobile-cards > .home-banner-item { background-color: #eef3f7; }
  .home-banners-arrow { display: none; }

  .home-banner-grid:not([hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-block-end: 10px;
  }

  .home-banner-grid .home-banner-item { aspect-ratio: 2 / 1; }
}
