.catalog-section {
  --catalog-light-height: 100svh;
  isolation: isolate;
  overflow: clip;
  background: var(--ink);
}

.catalog-section::before {
  content: "";
  position: sticky;
  inset-block-start: 0;
  z-index: -1;
  display: block;
  block-size: var(--catalog-light-height);
  margin-block-end: calc(-1 * var(--catalog-light-height));
  pointer-events: none;
  background:
    radial-gradient(ellipse at 91% 66%, rgb(194 128 57 / .22), transparent 57%),
    radial-gradient(ellipse at 8% 39%, rgb(161 115 64 / .17), transparent 58%),
    radial-gradient(ellipse at 48% 84%, rgb(213 161 95 / .13), transparent 54%);
  mask-image: linear-gradient(transparent, #000 18% 82%, transparent);
  transform: scale(1.06);
}

@media (prefers-reduced-motion: no-preference) {
  .catalog-section::before {
    animation: catalog-light-drift 36s ease-in-out infinite alternate;
  }
}

@keyframes catalog-light-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1.06); }
  to { transform: translate3d(5%, 4%, 0) scale(1.16); }
}

.catalog-card + .catalog-card { margin-block-start: clamp(3.25rem, 7vw, 8rem); }
.catalog-card__body .product-layout {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  border: 0;
  background: transparent;
}

.catalog-card__body .product-layout--text { grid-template-columns: minmax(0, 1fr); }
.catalog-card__body .gallery { align-self: center; background: transparent; }
.gallery__stage { position: relative; }
.catalog-card__body .gallery__media {
  min-block-size: 0;
  max-block-size: min(82svh, 60rem);
  aspect-ratio: 4 / 3;
  isolation: isolate;
}

.catalog-card__body .gallery__media:not([data-zoomed]) img { object-position: left center; }
.gallery__media[data-gallery-swipe]:not([data-zoomed]) { touch-action: pan-y pinch-zoom; }
.gallery__media :is(.gallery__image--incoming, .gallery__image--outgoing) {
  transition: opacity 420ms var(--ease-out);
}
.gallery__media .gallery__image--incoming { opacity: 0; mix-blend-mode: plus-lighter; }
.gallery__media .gallery__image--incoming.is-crossfading { opacity: 1; }
.gallery__media .gallery__image--outgoing.is-crossfading { opacity: 0; }

.gallery__arrow {
  position: absolute;
  inset-block-start: 50%;
  z-index: 1;
  display: grid;
  inline-size: clamp(2.75rem, 4.1vw, 3.4rem);
  block-size: clamp(2.75rem, 4.1vw, 3.4rem);
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgb(237 209 166 / .46);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgb(20 16 13 / .82);
  cursor: pointer;
  transition: background-color 180ms, border-color 180ms, color 180ms;
}

.gallery__arrow:hover { border-color: var(--gold-light); color: #fff3db; background: #33271c; }
.gallery__arrow:active { background: #57402a; }
.gallery__arrow--prev { inset-inline-start: clamp(.55rem, 1.75vw, 2rem); }
.gallery__arrow--next { inset-inline-end: clamp(.55rem, 1.75vw, 2rem); }
.gallery__arrow::before {
  content: "";
  display: block;
  inline-size: .56rem;
  block-size: .56rem;
  border-block-start: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
}
.gallery__arrow--prev::before { transform: translateX(.13rem) rotate(-135deg); }
.gallery__arrow--next::before { transform: translateX(-.13rem) rotate(45deg); }

.catalog-card__body .gallery__footer {
  min-block-size: 0;
  padding-block: .65rem .35rem;
  padding-inline: var(--gutter) clamp(1.35rem, 3vw, 3.25rem);
  border: 0;
}

.catalog-card__body [data-gallery-caption]:empty { display: none; }
.gallery__navigation {
  display: flex;
  align-items: center;
  max-inline-size: 100%;
  min-inline-size: 0;
  gap: .35rem;
  margin-inline-start: auto;
}
.catalog-card__body .gallery__controls {
  flex-wrap: nowrap;
  gap: .38rem;
  padding: .25rem;
  min-inline-size: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.catalog-card__body .gallery__button {
  flex: 0 0 auto;
  inline-size: clamp(3.2rem, 5.2vw, 5.1rem);
  block-size: clamp(2.75rem, 3.7vw, 3.6rem);
  border: 1px solid var(--line);
  padding: 2px;
  background: #171411;
  opacity: .72;
  transition: opacity 180ms, border-color 180ms, background-color 180ms;
}

.catalog-card__body .gallery__button::before { content: none; }
.catalog-card__body .gallery__button img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.catalog-card__body .gallery__button:hover { opacity: 1; border-color: var(--gold-line); }
.catalog-card__body .gallery__button[aria-pressed="true"] { opacity: 1; border-color: var(--gold-light); background: #3a2c1d; }
.catalog-card__body .gallery__button:focus-visible { outline-offset: 1px; }
.gallery__rotation {
  display: grid;
  flex: 0 0 auto;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
}
.gallery__rotation:hover { border-color: var(--gold-line); background: rgb(213 173 118 / .08); }
.gallery__rotation::before {
  content: "";
  inline-size: .63rem;
  block-size: .8rem;
  border-inline: 2px solid currentColor;
}
.gallery__rotation[data-paused]::before {
  inline-size: 0;
  block-size: 0;
  margin-inline-start: .15rem;
  border: .41rem solid transparent;
  border-inline-start: .67rem solid currentColor;
  border-inline-end: 0;
}
.gallery__announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.catalog-card__body .product-details {
  align-self: center;
  padding: clamp(1.65rem, 3.8vw, 5.5rem);
  border: 0;
}

.catalog-card__body .product-layout--text .product-details {
  min-block-size: clamp(11rem, 20vw, 21rem);
  padding-inline: var(--gutter);
}

.catalog-card__body .product-layout--text .product-price { max-inline-size: 28rem; }

.catalog-card__body .cable-product-layout { grid-template-columns: minmax(0, 1fr); }
.catalog-card__body .cable-product-layout :is(.gallery, .product-details) { align-self: start; }
.cable-product-layout__section {
  width: 100%;
  max-width: 40rem;
  margin: clamp(1.1rem, 1.9vw, 2rem) 0 0;
}
.cable-product-layout__order { justify-self: start; }
.headphone-material-details { width: 100%; }

.headphone-product-layout {
  width: min(calc(100% - 2 * var(--gutter)), 95rem);
  margin-inline: auto;
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: center;
}

.catalog-card__body .headphone-product-layout :is(.gallery, .product-details) { align-self: center; }
.catalog-card__body .headphone-product-layout .product-details {
  width: min(100%, 40rem);
  max-width: 100%;
  margin-inline: auto;
  padding: 0;
}

.headphone-product-layout .product-details h3 { max-width: none; }
.headphone-product-layout .headphone-material-picker { justify-content: flex-start; }
.headphone-product-layout .gallery__media:not([data-zoomed]) img { object-position: center; }
.catalog-card__body .headphone-product-layout .gallery__footer {
  flex-direction: column;
  justify-content: center;
  padding-inline: 0;
  text-align: center;
}
.headphone-product-layout .gallery__navigation { margin-inline-start: 0; }

:is([data-catalog-card="xlr"], [data-catalog-card="headphones"]):focus-visible { outline: none; }
:is([data-catalog-card="xlr"], [data-catalog-card="headphones"]):focus-visible .product-details h3 {
  text-decoration: underline 1px var(--gold-line);
  text-underline-offset: .2em;
}

@media (min-width: 58rem) {
  .catalog-card__body .cable-product-layout:not(.product-layout--text) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 48.001rem) {
  .catalog-card__body .product-layout:not(.cable-product-layout) .gallery:not(:has([data-gallery-diagram]:not([hidden]))) .gallery__media:not([data-zoomed]) {
    mask-image: linear-gradient(to right, #000 95%, rgb(0 0 0 / .72));
  }
}

@media (max-width: 48rem) {
  .catalog-card__body .product-layout { grid-template-columns: minmax(0, 1fr); }
  .catalog-card__body .gallery__media { max-block-size: none; }
  .catalog-card__body .gallery__media:not([data-zoomed]) img { object-position: center; }
  .catalog-card__body .gallery__footer { padding-inline: var(--gutter); }
  .catalog-card__body .product-details { padding: 1.45rem var(--gutter) 0; }
  .catalog-card__body .product-layout--text .product-details {
    min-block-size: 0;
    padding-block: 2rem;
  }
}
