.film-catalogue.ecb-gallery {
  padding-block: 0 clamp(4rem, 8.3vw, 8.75rem);
  overflow-x: clip;
  background: var(--paper);
}

.ecb-gallery .ecb-gallery__hero {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  align-items: center;
  gap: clamp(2.2rem, 6.2vw, 7.2rem);
  padding-block: clamp(2rem, 5.45vw, 5.8rem);
  margin-block-end: clamp(1.6rem, 4vw, 3.5rem);
  color: var(--paper);
}

.ecb-gallery__hero::before {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-start: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 72% 51%, #293b60, #17243f 38%, transparent 72%), var(--night);
  content: '';
  pointer-events: none;
}

.ecb-gallery__intro { min-width: 0; }
.ecb-gallery__hero :focus-visible { outline-color: var(--crimson-light); }

.ecb-gallery .ecb-gallery__intro h1 {
  max-width: 10ch;
  margin: 0 0 clamp(1.25rem, 3vw, 2.7rem);
  color: var(--paper);
  font: 530 clamp(3.55rem, 7.35vw, 7.7rem)/.89 var(--sans);
  letter-spacing: -.079em;
  word-spacing: .035em;
  overflow-wrap: anywhere;
}

.ecb-gallery .ecb-gallery__intro h1 em {
  color: var(--crimson-light);
  font: italic 400 1.11em/.95 var(--serif);
  letter-spacing: -.027em;
  word-spacing: 0;
}

.ecb-gallery .ecb-gallery__copy {
  max-width: 40ch;
  padding: 0;
  color: var(--night-copy);
  font-size: clamp(1rem, 1.35vw, 1.21rem);
  line-height: 1.58;
}

.ecb-gallery .ecb-gallery__copy a {
  margin-inline-end: 1.08rem;
  margin-block-start: .32rem;
  color: var(--crimson-light);
}

.ecb-gallery__jump {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-block-size: 2.75rem;
  margin-block-start: .7rem;
  color: var(--paper);
  font-size: .93rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
}

.ecb-gallery__jump:is(:hover, :focus-visible) { color: var(--crimson-light); }

.ecb-gallery__stage {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: clamp(16rem, 31vw, 31rem);
  margin: 0;
  aspect-ratio: 8 / 7;
  overflow: clip;
  background: transparent;
}

.ecb-gallery__stage > :is(.ecb-gallery__still, canvas) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ecb-gallery__stage > .ecb-gallery__still { object-fit: contain; object-position: center; }
.ecb-gallery__stage > canvas { z-index: 1; opacity: 0; pointer-events: none; }
.ecb-gallery__stage[data-stage-live]:not([data-stage-live='false']) > canvas { opacity: 1; }
.ecb-gallery__stage[data-stage-live]:not([data-stage-live='false']) > .ecb-gallery__still { opacity: 0; }
.ecb-gallery__stage[data-stage-live] { touch-action: pan-y; cursor: grab; }
.ecb-gallery__stage[data-orbit-dragging] { cursor: grabbing; }

.ecb-gallery__orbit {
  position: absolute;
  z-index: 2;
  inset-inline-start: 50%;
  inset-block-end: .25rem;
  width: max-content;
  max-width: 95%;
  margin: 0;
  transform: translateX(-50%);
  color: var(--night-copy);
  font-size: .78rem;
  pointer-events: none;
}
.ecb-gallery__stage > [hidden] { display: none; }

.ecb-gallery__categories {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem clamp(.35rem, 1.4vw, .95rem);
  align-items: center;
  margin-block-end: clamp(1.9rem, 4.3vw, 4rem);
  scroll-margin-block-start: 1rem;
}

.ecb-gallery__categories a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-block-size: 2.75rem;
  padding: .48rem clamp(.65rem, 1.6vw, 1.1rem);
  border-radius: 2rem;
  background: #edf0f7;
  color: var(--ink);
  font-size: clamp(.78rem, 1.3vw, .95rem);
  font-weight: 650;
  line-height: 1.22;
  text-decoration: none;
  touch-action: manipulation;
}

.ecb-gallery__categories a span { color: var(--crimson); }
.ecb-gallery__categories a:is(:hover, :focus-visible) { background: #f8eaf0; color: var(--crimson); }

.ecb-gallery .film-catalogue__category {
  display: grid;
  grid-template-columns: minmax(0, .31fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.15rem, 3.65vw, 3.6rem);
  margin-block-end: clamp(2.65rem, 6.9vw, 6.5rem);
  padding-block-start: clamp(1.25rem, 3vw, 3.1rem);
  border-color: var(--paper-line);
  scroll-margin-block-start: 1rem;
}

.ecb-gallery .film-catalogue__category:last-child { margin-block-end: 0; }
.ecb-gallery .film-catalogue__category-head { display: grid; gap: .8rem; margin: 0; }

.ecb-gallery .film-catalogue__category-head h2 {
  margin: 0;
  color: var(--ink);
  font: 550 clamp(2.15rem, 3.55vw, 3.85rem)/.99 var(--sans);
  letter-spacing: -.068em;
  word-spacing: .035em;
  text-wrap: balance;
}

.ecb-gallery .film-catalogue__category-head p {
  max-width: 29ch;
  font-size: clamp(.95rem, 1.18vw, 1.075rem);
}

.ecb-gallery .film-catalogue__items {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  grid-template-rows: repeat(2, minmax(clamp(8rem, 11.5vw, 10rem), 1fr));
  align-items: stretch;
  gap: clamp(.55rem, 1.25vw, 1.05rem);
}

.ecb-gallery .film-catalogue__item {
  display: flex;
  align-self: stretch;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.ecb-gallery__item--lead { grid-row: span 2; }

.ecb-gallery__card {
  --catalogue-card: #eef1f7;
  --catalogue-arrow: var(--crimson);
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
  width: 100%;
  min-width: 0;
  min-height: 0;
  isolation: isolate;
  border-radius: clamp(.65rem, 1.4vw, 1.2rem);
  background: var(--catalogue-card);
  color: var(--ink);
  text-decoration: none;
}

.ecb-gallery__card:focus-visible,
.ecb-gallery__categories a:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }

.ecb-gallery__card--lead {
  --catalogue-card: radial-gradient(ellipse at 46% 31%, #fffaf0, #f0e7db 91%);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

#egg-powders .ecb-gallery__card--lead { --catalogue-card: radial-gradient(ellipse at 44% 34%, #fffaf2, #efe8df 88%); }

.ecb-gallery__photo {
  position: relative;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
}

.catalogue-story__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ecb-gallery__photo > .catalogue-story__canvas,
.catalogue-story__canvas[data-catalogue-story-flight] { display: none; }

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-catalogue-story-stage]:is([data-catalogue-story-live], [data-catalogue-story-pending]) > img { visibility: hidden; }
  [data-catalogue-story-stage][data-catalogue-story-live] > .catalogue-story__canvas { display: block; }
  .ecb-gallery[data-catalogue-shell-progress]:not([data-catalogue-shell-progress='0.000']) .ecb-gallery__orbit { opacity: 0; }
  .catalogue-story__canvas[data-catalogue-story-flight] {
    position: fixed;
    z-index: 9;
    display: block;
  }
}

.ecb-gallery .film-catalogue__item .ecb-gallery__photo > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  padding: clamp(.48rem, 1.35vw, 1.15rem);
  object-fit: contain;
  mix-blend-mode: multiply;
}

.ecb-gallery .film-catalogue__item .ecb-gallery__card--lead .ecb-gallery__photo > img {
  padding: clamp(.75rem, 2.25vw, 2rem) clamp(1.15rem, 3.3vw, 3.2rem) .35rem;
}

.ecb-gallery__card-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem;
  min-height: 3rem;
  padding: .85rem clamp(.65rem, 1.35vw, 1.2rem) .85rem 0;
}

.ecb-gallery__card--lead .ecb-gallery__card-foot {
  padding: .55rem clamp(1rem, 2vw, 1.85rem) clamp(.9rem, 1.9vw, 1.65rem);
}

.ecb-gallery .ecb-gallery__card-foot .film-catalogue__product-heading {
  display: block;
  margin: 0;
  color: inherit;
  font-size: clamp(1.12rem, 1.65vw, 1.52rem);
  font-weight: 620;
  line-height: 1.12;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.ecb-gallery :is(.ecb-gallery__card--lead, .ecb-gallery__card--shell) .film-catalogue__product-heading {
  font-size: clamp(1.36rem, 2.37vw, 2.45rem);
}

.ecb-gallery .ecb-gallery__card-foot .film-catalogue__product-name { padding: 0; border: 0; }

.ecb-gallery__arrow {
  color: var(--catalogue-arrow);
  font-size: clamp(1.05rem, 1.73vw, 1.55rem);
  line-height: 1;
}

.ecb-gallery__card:is(:hover, :focus-visible) .ecb-gallery__card-foot { color: var(--catalogue-arrow); }

.ecb-gallery .ecb-gallery__shell .film-catalogue__items { grid-template: auto / minmax(0, 1fr); }
.ecb-gallery__card--shell {
  --catalogue-card: radial-gradient(ellipse at 76% 47%, #323e58, #1c263b 46%, #131e36 76%);
  --catalogue-arrow: var(--crimson-light);
  grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr);
  min-height: clamp(12rem, 22vw, 19rem);
  overflow: clip;
  color: var(--paper);
}

.ecb-gallery__card--shell .ecb-gallery__photo { grid-column: 2; grid-row: 1; overflow: clip; }
.ecb-gallery__card--shell .ecb-gallery__card-foot {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  padding: clamp(1rem, 3.4vw, 3rem);
}
.ecb-gallery .film-catalogue__item .ecb-gallery__card--shell img {
  padding: 0;
  object-fit: contain;
  mix-blend-mode: normal;
}

.ecb-gallery__photo[data-catalogue-shell-stage] > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

[data-catalogue-shell-stage][data-catalogue-shell-live] > img { visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .ecb-gallery[data-gallery-ready] .ecb-gallery__hero [data-gallery-reveal][data-entered],
  [data-gallery-ready] .ecb-gallery .ecb-gallery__hero [data-gallery-reveal][data-entered] {
    animation: ecb-gallery-arrive 520ms cubic-bezier(.2, .75, .25, 1) both;
  }

  @keyframes ecb-gallery-arrive {
    from { transform: translate3d(0, .85rem, 0); opacity: .68; }
    to { transform: none; opacity: 1; }
  }

  .ecb-gallery .ecb-gallery__categories > a {
    --range-entry-y: .4rem;
    --range-entry-duration: 320ms;
  }

  .ecb-gallery .ecb-gallery__categories > a:nth-child(2) { --range-entry-delay: 38ms; }
  .ecb-gallery .ecb-gallery__categories > a:nth-child(3) { --range-entry-delay: 76ms; }

  .ecb-gallery .film-catalogue__item {
    --range-entry-y: 1.15rem;
    --range-entry-scale: .982;
    --range-entry-duration: 510ms;
    --range-entry-delay: 66ms;
  }

  .ecb-gallery .film-catalogue__item:nth-child(n+2) {
    --range-entry-x: .55rem;
    --range-entry-y: .8rem;
    --range-entry-scale: .99;
    --range-entry-duration: 450ms;
    --range-entry-delay: 124ms;
  }

  .ecb-gallery .film-catalogue__item:nth-child(n+3) { --range-entry-delay: 172ms; }

  .ecb-gallery :is(.ecb-gallery__categories > a, .film-catalogue__category-head, .film-catalogue__item)[data-entered=''] {
    animation: ecb-range-arrive var(--range-entry-duration, 410ms) cubic-bezier(.2, .75, .25, 1) var(--range-entry-delay, 0ms) backwards;
  }

  @keyframes ecb-range-arrive {
    from {
      transform: translate3d(var(--range-entry-x, 0px), var(--range-entry-y, .75rem), 0) scale(var(--range-entry-scale, 1));
      opacity: .48;
    }
    to { transform: none; opacity: 1; }
  }
}

@media (max-width: 650px) and (prefers-reduced-motion: no-preference) {
  .ecb-gallery :is(.ecb-gallery__categories > a, .film-catalogue__category-head, .film-catalogue__item)[data-entered=''] {
    --range-entry-x: 0px;
    --range-entry-y: .5rem;
    --range-entry-scale: 1;
    animation-duration: 320ms;
    animation-delay: 0ms;
  }

  .ecb-gallery :is(.ecb-gallery__categories > a, .film-catalogue__item):nth-child(2)[data-entered=''] { animation-delay: 18ms; }
  .ecb-gallery :is(.ecb-gallery__categories > a, .film-catalogue__item):nth-child(3)[data-entered=''] { animation-delay: 36ms; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ecb-gallery .film-catalogue__item .ecb-gallery__photo > img { transition: transform 360ms cubic-bezier(.22, .65, .32, 1); }
  .ecb-gallery__card:is(:hover, :focus-visible) .ecb-gallery__photo > img {
    transform: perspective(65rem) rotateX(var(--gallery-tilt-x, 0deg)) rotateY(var(--gallery-tilt-y, 0deg)) scale(1.04);
  }
  .ecb-gallery__arrow { transition: transform 180ms ease-out; }
  .ecb-gallery__card:is(:hover, :focus-visible) .ecb-gallery__arrow { transform: translate(.12rem, -.12rem); }
}

@media (max-width: 1070px) {
  .ecb-gallery .film-catalogue__category { grid-template-columns: minmax(0, 1fr); }
  .ecb-gallery .film-catalogue__category-head { display: flex; flex-wrap: wrap; align-items: baseline; }
  .ecb-gallery .film-catalogue__category-head p { max-width: none; }
}

@media (max-width: 760px) {
  /* Keep the catalogue in place when WoodMart removes the sticky row from flow. */
  body.ecb-migration-page:has(.ecb-gallery) .whb-header { min-height: var(--ecb-header-flow-height, 0px); }
  .ecb-gallery .ecb-gallery__hero { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .ecb-gallery__hero::before { background: radial-gradient(ellipse at 59% 73%, #26385b, #182741 35%, transparent 70%), var(--night); }
  .ecb-gallery .ecb-gallery__intro h1 { font-size: clamp(3.15rem, 10.75vw, 6.1rem); }
  .ecb-gallery__stage { aspect-ratio: 8 / 5; min-height: 12.5rem; }
}

@media (max-width: 650px) {
  .ecb-gallery__categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ecb-gallery__categories a {
    justify-content: center;
    gap: .25rem;
    padding-inline: .35rem;
    text-align: center;
  }
  .ecb-gallery .film-catalogue__category-head { display: grid; gap: .55rem; }
  .ecb-gallery .film-catalogue__items { grid-template: none / minmax(0, 1fr); grid-auto-rows: auto; }
  .ecb-gallery__item--lead { grid-row: auto; }
  .ecb-gallery__card { grid-template-columns: minmax(0, 33%) minmax(0, 1fr); min-height: 5.2rem; }
  .ecb-gallery__card--lead,
  .ecb-gallery__card--shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; }
  .ecb-gallery__card--shell { --catalogue-card: radial-gradient(ellipse at 52% 23%, #323e58, #1c263b 53%, #131e36 84%); }
  .ecb-gallery__card--lead .ecb-gallery__photo { aspect-ratio: 2.05; }
  .ecb-gallery__card--shell .ecb-gallery__photo { grid-column: 1; grid-row: 1; aspect-ratio: 2.05; }
  .ecb-gallery__card--shell .ecb-gallery__card-foot { grid-column: 1; grid-row: 2; padding-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ecb-gallery__stage[data-stage-live] > canvas { display: none; }
  .ecb-gallery__stage[data-stage-live]:not([data-stage-live='false']) > .ecb-gallery__still { opacity: 1; }
  [data-catalogue-shell-stage][data-catalogue-shell-live] > img { visibility: visible; }
  .ecb-gallery__photo[data-catalogue-shell-stage] > canvas { display: none; }
}
