/**
 * Atelier — Product gallery (C-gallery). Main image + thumbnail strip.
 */
.atl-gallery { display: flex; flex-direction: column; gap: 14px; }
.atl-gallery-main {
  aspect-ratio: 4/5;
  background: var(--atl-surface);
  border: 1px solid var(--atl-border);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.atl-gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.atl-gallery-thumb-wrap { padding: 0; border: none; background: none; cursor: pointer; }
.atl-gallery-thumb-wrap[aria-current="true"] { outline: 1px solid var(--atl-text); outline-offset: 2px; }
.atl-gallery-thumb-wrap:focus-visible { outline: 2px solid var(--atl-focus-ring); outline-offset: 2px; }
.atl-gallery-thumb {
  aspect-ratio: 1/1;
  background: var(--atl-surface);
  border: 1px solid var(--atl-border);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.atl-gallery-video {
  position: relative;
  display: block;
  aspect-ratio: 1/1;
  padding: 0;
  border: 1px solid var(--atl-border);
  background: var(--atl-surface);
  color: var(--atl-text);
  cursor: pointer;
  overflow: hidden;
}
.atl-gallery-video[hidden] { display: none; }
.atl-gallery-video:focus-visible { outline: 2px solid var(--atl-focus-ring); outline-offset: 2px; }
.atl-gallery-video-poster { position: absolute; inset: 0; }
.atl-gallery-video-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.atl-gallery-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: var(--atl-text);
}
.atl-gallery-video-play::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 15px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--atl-bg);
}
.atl-gallery-video-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--atl-text);
  color: var(--atl-bg);
}

.atl-video-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: var(--atl-text);
  overflow: visible;
}
.atl-video-dialog:not([open]) { display: none; }
.atl-video-dialog::backdrop { background: var(--atl-overlay-scrim); }
.atl-video-dialog-frame { aspect-ratio: 16/9; width: 100%; }
.atl-video-dialog-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.atl-video-dialog-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--atl-bg);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.atl-video-dialog-close:focus-visible { outline: 2px solid var(--atl-focus-ring); outline-offset: 2px; }

@media (max-width: 767px) {
  .atl-gallery-thumbs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}
