.gallery-page .season-page{padding-top:36px}
.gallery-page .season-page-heading{margin-bottom:32px}
.gallery-page .season-page-heading h1{font-size:clamp(40px,5vw,64px);margin-bottom:12px}
.gallery-page .season-page-heading>p{margin:0 0 18px}
.gallery-sections{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-top:26px}
.gallery-sections a{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 14px;background:#fff;border:1px solid #cfceca;color:#171718;font-size:12px;line-height:1.35;font-weight:700}
.gallery-sections small{font-size:10px;letter-spacing:.08em;color:#67676d}
.gallery-sections a[aria-current]{background:#18181b;color:#fff;border-color:#18181b;box-shadow:inset 0 -3px var(--red)}
.gallery-sections a[aria-current] small{color:#c2c2c6}
.gallery-sections a:hover{border-color:var(--red)}
.gallery-sections a:focus-visible,.gallery-category a:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.gallery-category[hidden],.gallery-controls[hidden]{display:none}
.gallery-summary{max-width:710px;margin:0 0 26px;font-size:16px;line-height:1.6;color:#4e4e54}
.ice-gallery .gallery-summary{color:#dedee1}
.gallery-block-count{text-transform:uppercase}
.gallery-enquiry{margin:28px 0 0}
.gallery-enquiry a{white-space:normal}
#dyno-programs .photo-gallery{max-width:984px;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
.ice-gallery{background:#111114;color:#fff;padding:38px 0 44px;scroll-margin-top:90px}
.gallery-block-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:26px}
.gallery-block-heading .season-kicker{margin:0 0 10px;color:#99999e;font-size:10px;letter-spacing:.15em}
.gallery-block-heading h2{font-family:var(--display);font-size:clamp(36px,4vw,56px);line-height:1.05;letter-spacing:-.025em;text-transform:uppercase;margin:0}
.gallery-block-heading h2>span{color:var(--red)}
.gallery-block-count{font-size:10px;letter-spacing:.15em;font-weight:700;color:#aaa}
.ice-film-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;max-width:1060px;margin:auto}
.ice-film{min-width:0}.ice-film-play{display:block;position:relative;background:#222;overflow:hidden;isolation:isolate}
.ice-film-play>img{display:block;width:100%;height:auto;aspect-ratio:9/16;object-fit:contain}
.ice-play-icon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:rgba(15,15,18,.7);border:1px solid rgba(255,255,255,.8);transition:background .2s}
.ice-play-icon svg{width:27px;height:27px;fill:#fff;margin-left:-3px}
.ice-film-action{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:50px 20px 19px;background:linear-gradient(transparent,rgba(0,0,0,.87));color:#fff;font-size:11px;font-weight:750;letter-spacing:.1em;text-transform:uppercase}
.ice-film-play:hover .ice-play-icon{background:var(--red)}.ice-film-play:focus-visible{outline:3px solid var(--red);outline-offset:5px}
.ice-film-caption{display:flex;align-items:baseline;gap:13px;padding-top:17px}.ice-film-number{font-size:10px;font-weight:700;color:#999}.ice-film-caption h3{font-size:18px;line-height:1.3;margin:0;font-weight:650}
.collection-gallery{background:#f2f2ef;padding:38px 0 44px;scroll-margin-top:90px}.collection-gallery .gallery-block-heading>p{color:#68686e;font-size:13px}
.ice-dialog{width:min(820px,96vw);max-width:96vw;max-height:96dvh;padding:16px 22px 20px;border:1px solid #45454b;background:#101013;color:#fff;overflow:auto}
.ice-dialog::backdrop{background:rgba(0,0,0,.92)}
.ice-dialog>header{display:flex;gap:20px;align-items:center;justify-content:space-between;margin-bottom:12px}.ice-dialog h2{font-size:18px;margin:0;line-height:1.4}
.ice-dialog button{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;border:1px solid #777;background:transparent;color:#fff;font-size:30px;cursor:pointer}
.ice-dialog button:focus-visible,.ice-original-link:focus-visible{outline:2px solid #fff;outline-offset:3px}
.ice-player{height:min(72dvh,800px);background:#000;display:flex;justify-content:center}.ice-player video,.ice-player iframe{width:100%;height:100%;display:block;border:0;object-fit:contain}
.ice-original-link{display:inline-block;color:#bdbdc4;font-size:12px;line-height:1.6;margin-top:15px;text-decoration:underline;text-underline-offset:3px}
.ice-playback-help{font-size:13px;color:#fff;margin:12px 0 0}
@media(max-width:780px){.ice-film-grid{gap:16px}.ice-gallery{padding:30px 0}.gallery-block-heading{gap:16px}.ice-play-icon{width:50px;height:50px}.ice-film-caption h3{font-size:15px}.ice-film-action{padding:35px 12px 15px;font-size:10px}.gallery-sections{grid-template-columns:repeat(3,minmax(0,1fr))}.collection-gallery .gallery-block-heading{align-items:start;flex-direction:column;gap:8px}}
@media(max-width:600px){.ice-film-grid{grid-template-columns:1fr;gap:30px;max-width:390px}.ice-film-caption h3{font-size:18px}.ice-gallery .gallery-block-heading{align-items:center}.ice-dialog{padding:10px 12px 16px}.ice-dialog h2{font-size:16px}.ice-player{height:72dvh}.gallery-block-heading{margin-bottom:22px}.collection-gallery{padding-top:36px}}
@media(prefers-reduced-motion:reduce){.ice-play-icon{transition:none}}

@media(max-width:600px){.gallery-sections{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.gallery-sections a{padding:9px 12px}}

/* The complete frame opens in the viewer. Each Carbon thumbnail has its own crop. */
#carbon .photo-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 22px);
}
#carbon .photo-gallery img { object-fit: cover; height: auto; }
#carbon .photo-gallery figcaption {
  align-items: baseline;
  gap: 8px;
  padding: 13px 12px;
  line-height: 1.4;
}
#carbon .photo-gallery figcaption small { color: #626268; flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
#carbon .photo-gallery figcaption > span:last-child { color: #9d1b22; margin-inline-start: auto; }
.gallery-dialog figure img { height: min(67dvh, 780px); touch-action: pan-y pinch-zoom; }
@media (max-width: 1100px) {
  #carbon .photo-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  #carbon .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #carbon .photo-gallery figcaption { padding: 10px 8px; gap: 5px; font-size: 12px; }
  #carbon .photo-gallery figcaption > span:last-child { display: none; }
  .gallery-dialog { padding: 50px 10px 14px; }
}

[data-gallery-video] figure { position: relative; }
.gallery-film-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  background: #17171ae8;
  color: white;
  font: 700 12px/1.4 system-ui, sans-serif;
}
.gallery-dialog figure img[hidden] { display: none; }
.gallery-dialog figure video {
  display: block;
  width: 100%;
  height: min(67dvh, 780px);
  object-fit: contain;
  background: #080809;
}

#clubsport-r .ice-film-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}
#clubsport-r .ice-film-grid + .photo-gallery { margin-top: 24px; }

#cars-for-sale .photo-gallery img { height: auto; }

#showroom-lausanne { margin-top: clamp(32px, 5vw, 64px); }
#showroom-title { margin: 0 0 20px; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; }
#showroom-lausanne .photo-gallery img { aspect-ratio: 1; height: auto; object-fit: cover; }
#showroom-lausanne figcaption small { color: #666; }
#showroom-lausanne figcaption > span:last-child { margin-left: auto; }

/* Keep gallery media free of visible captions in cards and the image viewer. */
.gallery-category .photo-gallery figcaption,
.gallery-category .ice-film-caption,
.gallery-dialog figcaption { display: none !important; }

.ice-playlist:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}
.ice-playlist button { font-size: 21px; line-height: 1; }
.ice-playlist button:hover { background: #29292e; }
.ice-playlist [role="status"] { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; }
.ice-dialog:has(.ice-playlist:not([hidden])) .ice-player {
  height: min(67dvh, max(100px, calc(96dvh - 190px)));
  touch-action: pan-y pinch-zoom;
}
