/* Banner section: rich text and product carousel, independent of IDs. */
.content-management-section:has(.rich-text-component):has(.product-carousel-component) {
  position: relative;
  margin-top: 0;
  overflow: visible;
  background: #202124 url("https://cdn.blivakker.no/Media/CMS/SectionBackground/300/2ebef173-38ec-4583-ade5-161bfd546caf.png") center / cover no-repeat;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) > .content-management-section-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  min-height: 340px;
  margin: auto;
  padding: 3rem 4rem;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .content-management-component-wrapper {
  background: transparent;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) > .content-management-section-content > .component-type-rich-text {
  grid-column: 1;
  grid-row: 1;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) > .content-management-section-content > .component-type-product-carousel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

/* Banner text. */
.content-management-section:has(.rich-text-component):has(.product-carousel-component) .rich-text-component .heading {
  color: #ffe36c;
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .rich-text-content {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.35;
  letter-spacing: .04em;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .rich-text-content p {
  margin: 0;
}

/* Product cards. */
.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-carousel-component {
  gap: .75rem;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-carousel-component .title-component {
  width: 100%;
  text-align: center;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-carousel-component .title-component .heading {
  color: #fff;
  font-size: 1rem;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-carousel-component .title-component .text-black,
.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-carousel-component :is(.rating-wrapper, .product-card-icons, .product-card-price-container) {
  display: none;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .carousel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  overflow: visible;
  padding: 1rem .5rem;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card {
  flex: 0 1 145px;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px #0006;
  transition: translate 180ms ease, scale 180ms ease, box-shadow 180ms ease;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .card-image-wrapper {
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  background: #fff;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .card-image-wrapper > a {
  height: 100%;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .card-image-wrapper img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card-content {
  display: block;
  flex: none;
  padding: .5rem;
  color: #202124;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card h3 {
  font-size: .72rem;
  line-height: 1.2;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card-content :is(.heading, .product-name) {
  font-size: .7rem;
  line-height: 1.25;
}

/* Desktop fan. */
.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:first-child {
  transform: rotate(-7deg) translateY(10px);
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:nth-child(2) {
  position: relative;
  z-index: 1;
  transform: translateY(-5px);
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:nth-child(3) {
  transform: rotate(7deg) translateY(10px);
}

/* Hover and keyboard focus. */
.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:focus-within {
  outline: 3px solid #b04d00;
  outline-offset: -3px;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:has(:focus-visible) {
  position: relative;
  z-index: 3;
  box-shadow: 0 14px 32px #0009;
}

@media (hover: hover) and (pointer: fine) {
  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:hover {
    position: relative;
    z-index: 3;
    translate: 0 -6px;
    scale: 1.03;
    box-shadow: 0 14px 32px #0009;
  }
}

@media (min-width: 701px) {
  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:has(:focus-visible) {
    translate: 0 -6px;
    scale: 1.03;
  }
}

/* App Store and Google Play buttons. */
.content-management-section:has(.rich-text-component):has(.product-carousel-component) .early-access-app-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .rich-text-content p.early-access-app-links {
  margin-top: 1rem;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .early-access-app-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6rem 1rem;
  border: 1px solid #fff;
  border-radius: 4px;
  background: #fff;
  color: #202124;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .early-access-app-links a:hover {
  border-color: #ffe36c;
  background: #ffe36c;
}

.content-management-section:has(.rich-text-component):has(.product-carousel-component) .early-access-app-links a:focus-visible {
  outline: 3px solid #ffe36c;
  outline-offset: 3px;
}

/* Mobile: text first, centered three-card fan below. */
@media (max-width: 700px) {
  .content-management-section:has(.rich-text-component):has(.product-carousel-component) > .content-management-section-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 2rem 1rem;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) > .content-management-section-content > .component-type-rich-text {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) > .content-management-section-content > .component-type-product-carousel {
    grid-column: 1;
    grid-row: 2;
    padding: 0;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-carousel-component {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .carousel-container {
    min-width: 0;
    justify-content: center;
    align-items: stretch;
    gap: .35rem;
    overflow: visible;
    padding: 1.25rem .75rem;
    scroll-snap-type: none;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card {
    flex: 0 0 calc((100% + .75rem) / 3);
    min-width: 0;
    margin-inline: -.375rem;
    scroll-snap-align: none;
    transform: none !important;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:first-child {
    transform: rotate(-5deg) translateY(5px) !important;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:nth-child(2) {
    transform: translateY(-4px) !important;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:nth-child(3) {
    transform: rotate(5deg) translateY(5px) !important;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card-content {
    padding: .25rem;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card h3 {
    font-size: .7rem;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card-content :is(.heading, .product-name) {
    height: auto;
    max-height: none;
    white-space: normal;
    text-overflow: clip;
    font-size: .7rem;
    overflow-wrap: anywhere;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card-content .heading {
    display: block;
    overflow: visible;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card-content .product-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card {
    transition: none;
  }

  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:hover,
  .content-management-section:has(.rich-text-component):has(.product-carousel-component) .product-card:has(:focus-visible) {
    translate: none;
    scale: none;
  }
}