featured-collection,
product-recommendations {
    background-color: var(--background_color);
    color: var(--primary_text);
    display: block;
    width: 100%;
}

product-recommendations[hidden] {
  display: none !important;
}


/* Featured collection + product recommendations: header + swiper chrome host */
.featured-collection .featured-collection__header.product-carousel__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
  width: 100%;
  box-sizing: border-box;
  padding-inline: var(--px-m);
}

.featured-collection .pc__carousels {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
}

.featured-collection .pc__carousels > .swiper-scrollbar-wrapper.featured-collection__swiper-scrollbar {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-top: 1.75rem;
  padding-inline: var(--px-m);
  padding-top: 0;
}

@media screen and (min-width: 1025px) {
  /* Do not set justify-content on .swiper-wrapper here: flex-end + slidesPerView:4
     clips the first slide when slide count equals slidesPerView (e.g. 4 products). */

  .featured-collection .featured-collection__header.product-carousel__header,
  .featured-collection .pc__carousels > .swiper-scrollbar-wrapper.featured-collection__swiper-scrollbar {
    padding-inline: 0;
  }

  .featured-collection .swiper.product-carousel .swiper-wrapper {
    margin-top: var(--pc-cta-adjustment-d, 0px);
  }

  .featured-collection .pc__carousels > .swiper-scrollbar-wrapper.featured-collection__swiper-scrollbar {
    margin-top: 2.5rem;
  }


  .featured-collection .pc__carousels > .swiper-scrollbar-wrapper.pc__swiper-navigation--mobile-scrollbar-only {
    display: none;
  }
}

/* Equal-height slides: same row stretch as collection grid so ATC stays at card bottom */
.featured-collection .swiper.product-carousel .swiper-wrapper {
  align-items: stretch;
}

.featured-collection .swiper.product-carousel .swiper-slide {
  display: flex;
  flex-direction: column;
  height: auto;
}

.featured-collection .swiper.product-carousel .swiper-slide > .product-card {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

@media screen and (max-width: 1024px) {
  .featured-collection .swiper.product-carousel.product-carousel--single-slide {
    box-sizing: border-box;
    padding-inline: var(--px-m);
  }

  .featured-collection .swiper.product-carousel.product-carousel--single-slide .swiper-slide {
    width: 100% !important;
    max-width: 100%;
    margin-inline: 0;
  }
}


/* Editorial carousel: header + slide shell */
.product-carousel--template.product-carousel--editorial {
  .featured-collection__header-main {
    width: 100%;
    min-width: 0;
  } 

  /* Mobile: column header — align both text group and CTA from content-alignment */
  .featured-collection__header.product-carousel__header {
    align-items: flex-start;
  }

  .featured-collection__header.product-carousel__header:has(.content-alignment--center) {
    align-items: center;
  }

  .featured-collection__header.product-carousel__header:has(.content-alignment--right) {
    align-items: flex-end;
  }

  .featured-collection__header-action {
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
    align-self: auto;
  }

  .featured-collection__header-action .Button {
    padding: 0.25rem 0.5rem;
  }

  .featured-collection__header-main .group-text-button__block-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;

    &.content-alignment--center {
      align-items: center;
      text-align: center;
    }

    &.content-alignment--right {
      align-items: flex-end;
      text-align: end;
    }

    > .heading-block {
      max-width: 27.6875rem;
      width: 100%;
      box-sizing: border-box;
    }

    > .heading-block:first-of-type :where(p, h1, h2, h3, h4, h5, h6) {
      margin: 0;
    }
  }

  .featured-collection__header-action a.Button.Button--PrimaryOnLight,
  .featured-collection__header-main .group-text-button__block-wrapper > a.Button.Button--PrimaryOnLight {
    border-radius: 0;
    background-color: var(--primary_text);
    border-color: var(--primary_text);

    &:hover {
      background-color: var(--primary_text);
      opacity: 0.92;
    }

    .button-txt {
      color: var(--background_color);
    }
  }

  @media screen and (min-width: 1025px) {
    .featured-collection__header.product-carousel__header,
    .featured-collection__header.product-carousel__header:has(.content-alignment--center),
    .featured-collection__header.product-carousel__header:has(.content-alignment--right) {
      flex-direction: row;
      align-items: flex-end;
      justify-content: space-between;
      gap: 1.5rem;
    }

    .featured-collection__header-main {
      flex: 1 1 auto;
      min-width: 0;
    }

    .featured-collection__header-action {
      flex: 0 0 auto;
      width: auto;
      align-self: flex-end;
      display: block;
    }

    .featured-collection__header-action .Button.adjustment {
      margin-top: 0;
      position: relative;
      top: var(--pc-cta-adjustment-d, 0px);
    }
  }

  .product-carousel__cell {
    box-sizing: border-box;
    height: auto;
    align-self: stretch;
    background-color: var(--background_color_2);
  }
}
