.product-carousel {
  --product-toolbar-space: clamp(62px, 6vw, 76px);
  --product-edge: clamp(8px, 1.8vw, 24px);
  position: relative;
  background: #010109;
  color: #fff;
}

.product-carousel[data-enhanced] .product-slides {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.product-carousel[data-enhanced] .product-slide {
  grid-area: 1 / 1;
  visibility: hidden;
}

.product-carousel[data-enhanced] .product-slide.is-current,
.product-carousel[data-enhanced] .product-slide.is-leaving {
  visibility: visible;
}

.product-slide.is-entering {
  z-index: 1;
  animation: product-enter .46s ease both;
}

.product-slide.is-leaving {
  animation: product-leave .46s ease both;
  pointer-events: none;
}

.product-slides.is-backward {
  --product-direction: -1;
}

@keyframes product-enter {
  from { transform: translateX(calc(100% * var(--product-direction, 1))); }
  to { transform: translateX(0); }
}

@keyframes product-leave {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% * var(--product-direction, 1))); }
}

.product-carousel .grammar-showcase {
  display: grid;
  align-items: center;
  background: #07274b url("grammar/starfield.png") center / cover no-repeat !important;
}

.product-carousel .grammar-showcase h2 {
  margin: 0;
  color: #fff !important;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.product-carousel .grammar-showcase .showcase-screen::before,
.product-carousel .grammar-showcase .showcase-screen::after {
  display: none;
}

.product-carousel .grammar-showcase img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.product-carousel .showcase-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.animations-ready .product-carousel .showcase-card,
.animations-ready .product-carousel .showcase-copy > * {
  animation: none;
  opacity: 1;
  transform: none;
}

.product-carousel .site-language-toolbar {
  inset-inline-end: max(12px, calc((100% - 1200px) / 2));
  top: 12px;
  max-width: min(290px, calc(100% - 24px));
}

.product-carousel .hero.hero-showcase .hero-shell {
  padding-top: var(--product-toolbar-space) !important;
}

.product-controls {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.product-controls button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: #04172e99;
  border: 1px solid #ffffff85;
  border-radius: 50%;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.product-controls [data-step] {
  top: 50%;
  transform: translateY(-50%);
}

.product-controls [data-step="-1"] {
  inset-inline-start: var(--product-edge);
}

.product-controls [data-step="1"] {
  inset-inline-end: var(--product-edge);
}

.product-controls button:hover {
  background: #fff;
  color: #07274b;
}

.product-controls button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.product-carousel .product-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.grammar-home-link {
  margin: 0;
  text-align: center;
}

.home-product-page .grammar-home-section .section-title {
  margin-inline: auto !important;
  text-align: center !important;
  text-wrap: balance;
}

@media (max-width: 760px) {
  .home-product-page .compare-row .compare-cell[data-product-label]::before {
    content: attr(data-product-label);
  }
}

@media (max-width: 680px) {
  .product-controls [data-step] {
    top: calc(var(--product-toolbar-space) + clamp(55px, 24vw, 145px));
  }

  .product-carousel .hero.hero-showcase .showcase-card {
    grid-row: 1;
  }

  .product-carousel .grammar-showcase {
    align-items: start;
  }

  .product-carousel .hero-showcase .showcase-copy :is(h1, h2) {
    text-align: center !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-slide.is-entering,
  .product-slide.is-leaving {
    animation: none;
  }
}
