[id] {
  scroll-margin: calc(var(--header-height) + 2rem);
}

.slider-layout {
  overflow: hidden;
  margin: 2rem calc(var(--edge) * -1) 2rem;
  text-align: center;
  position: relative;
  --swiper-navigation-sides-offset: calc(var(--swiper-navigation-size) / 2);
  --swiper-theme-color: #ffffff;
  --swiper-pagination-bullet-inactive-color: var(--accent);
  --swiper-pagination-color: var(--secondary);
  .swiper-button-next,
  .swiper-button-prev {
    background-color: var(--primary);
    width: var(--swiper-navigation-size);
    opacity: 0.75;
    &:after {
      font-size: 1rem;
    }
  }

  .swiper-button-next.swiper-button-disabled,
  .swiper-button-prev.swiper-button-disabled {
    opacity: 0.3;
  }

  &:has(.btn-text + .btn.pri-btn) {
    .btn.pri-btn {
      margin-top: 0;
    }
  }

  .filter-hide {
    display: none;
  }

  .btn-text {
    margin-top: auto;
  }
  /* &:last-child {
    margin-bottom: 0;
  } */
}

.slider-layout:not(.swiper-initialized):not(.rewards-slider) {
  .swiper-button-prev,
  .swiper-button-next {
    visibility: hidden;
  }
  .swiper-wrapper {
    display: flex;
    gap: 20px;
  }
  .swiper-slide {
    flex: 1;
  }
  .swiper-slide:nth-child(3) ~ .swiper-slide {
    display: none;
  }
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  opacity: 1;
  color: white;
}

.swiper-button-disabled {
  background-color: #1d1c1a;
  border-color: #1d1c1a;
}

.swiper-button-disabled::after {
  color: white;
  font-size: 1rem;
}

.slider-wrapper {
  container-type: inline-size;
}

.slider-layout article {
  position: relative;
  display: flex;
  flex-direction: column;
  /* background-color: var(--background-muted); */
  height: 100%;
}

.slider-layout article.with-btn-overlay {
  margin-bottom: 1.5rem;
}

.slider-layout .img-container {
  /* margin-top: -3rem; */
  /* padding: 0 1.5rem; */
}

.slider-layout .description {
  padding-block: 1.25rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.slider-layout .description p {
  /* display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 80px;
  line-height: 26px; */
}

.slider-layout .description .price {
  color: var(--primary);
  margin-top: auto;
  font-weight: 600;
  font-size: var(--text-lg);
}

.slider-layout .description .price:has(+ .action-layout-2) {
  margin-top: 0;
}

.slider-layout .description > *:last-child {
  /* margin-top: auto; */
  /* place-self: end;
	align-self: flex-end; */
}

/* .slider-layout .description > *:has(+ :last-child) {
	margin-bottom: 2rem;
} */

.slider-layout {
  h4 {
    font-size: var(--text-xl);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 60px;
    font-family: var(--text-sans);
    margin-top: 0;
    &:has(+ .date) {
      margin-bottom: 0;
    }
    a {
      color: inherit;
    }
  }
  .date {
    font-size: var(--text-sm);
    color: var(--accent-foreground);
  }
  .swiper-slide {
    align-self: stretch;
    height: auto;
  }
  .swiper-wrapper {
    container-type: inline-size;
  }
}

.slider-layout .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tag-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.category-tag {
  display: flex;
  font-size: var(--text-base);
  color: var(--accent-foreground);
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
}

.category-tag svg {
  width: 1.25rem;
  height: 1.25rem;
}

.category-tag:hover {
  /* color: var(--background); */
}

.slider-layout-2 {
  .img-container {
    position: relative;
  }

  .img-container:before {
    content: "";
    display: block;
    position: absolute;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 60%, var(--primary));
  }

  .img-holder {
    position: relative;
    z-index: 1;
  }

  .description {
    position: relative;
  }

  .info {
    z-index: 3;
    position: absolute;
    bottom: 100%;
    text-align: center;
    width: 100%;
    padding: 2rem;
    color: white;
  }
}

.slider-layout .description .description-group {
  margin: 0 0 0.75rem;

  > * {
    margin: 0.25rem 0;
  }
}

.slider-layout .description .description-group:last-child {
  margin-bottom: 0;
}

.slider-layout .description .action-layout-2 {
  margin-top: auto;
}

.slider-layout .slider-hidden {
  display: none;
}

.slider-layout.grid-layout:not(.swiper-initialized) {
  .swiper-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    .swiper-slide {
      flex: 1 1 350px;
      display: block;
    }
  }
}

.action-layout-2 {
  padding-bottom: 10px;
  position: relative;
  justify-content: center;
}

.action-layout-2 .btn-overlay {
  position: absolute;
  top: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.action-layout-2 .btn-overlay .btn {
  width: 50%;
}

.action-layout-2 .btn-text {
  margin: auto;
  color: var(--primary);
}

@media only screen and (min-width: 550px) {
  .slider-layout {
    padding-inline: var(--edge);
  }
}
@media only screen and (min-width: 768px) {
  .slider-layout {
    padding-inline: calc(var(--swiper-navigation-size) / 2);
  }

  .slider-layout.swiper-destroyed {
    .swiper-wrapper {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }
    [class*="swiper-button"] {
      display: none;
    }
  }
}
@media only screen and (min-width: 1024px) {
  .slider-layout {
    margin-inline: 0;
    overflow: hidden;
    --swiper-navigation-sides-offset: 0;
  }
  .slider-layout.swiper-destroyed {
    .swiper-wrapper {
      grid-template-columns: 1fr 1fr 1fr;
    }
  }
  .slider-layout.onhover {
    padding: 0;
    .img-container {
      z-index: 0;
    }
    .description {
      opacity: 0;
      background-color: rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(5px);
      z-index: 1;
      padding: 2rem;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      height: 100%;
      width: 100%;
      place-content: center;
      color: white;
      transition: opacity 350ms ease-in-out;
      > * {
        color: inherit;
        transition: transform 350ms ease-in-out;
        transform: translateY(1rem);
      }
    }
    .swiper-slide:hover {
      .description {
        opacity: 1;
        > * {
          transform: translateY(0);
        }
      }
    }
  }

  .slider-layout:not(.swiper-initialized):not(.rewards-slider) {
    .swiper-slide {
      max-width: calc(33.33% - 20px);
    }
  }

  .slider-layout:not(:has(.swiper-slide:nth-child(3))) {
    .swiper-wrapper {
      justify-content: center;
    }
  }

  .omnibus-offers-swiper:has(.swiper-slide:only-child) {
    .swiper-slide {
      width: 66.66% !important;
      article {
        flex-direction: row;
        gap: 2rem;
        align-items: center;
        text-align: left;
        .category-tag {
          justify-content: flex-start;
        }
        /* .img-container {
          flex: 0 1 350px;
        } */
        > * {
          flex: 1 1 50%;
        }
      }
    }
  }
}
