.gallery {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 0 2.75rem;
  gap: 1.625rem;
  background-color: var(--klv-color-bg-deep);
  overflow: clip;
}

@media (min-width: 810px) {
  .gallery {
    padding: 3.375rem 0;
    gap: 2.125rem;
  }
}

@media (min-width: 1200px) {
  .gallery {
    padding: 3.75rem 0;
  }
}
.gallery__heading {
  width: 100%;
  max-width: 22.875rem;
  margin-inline: auto;
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.98em;
  color: var(--klv-color-text-warm);
  text-wrap: balance;
}

@media (min-width: 810px) {
  .gallery__heading {
    max-width: 47.125rem;
    font-size: 3.875rem;
    line-height: 0.95em;
  }
}

@media (min-width: 1200px) {
  .gallery__heading {
    max-width: 68.75rem;
  }
}
.gallery__frame {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  min-height: 660px;
  background-color: rgb(11, 11, 11);
}

@media (min-width: 810px) {
  .gallery__frame {
    min-height: 820px;
  }
}
@media (min-width: 1100px) {
  .gallery__frame {
    flex-direction: row;
  }
}

@media (min-width: 1200px) {
  .gallery__frame {
    min-height: 760px;
  }
}
.gallery__viewer {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.gallery__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 90%;
  gap: 12px;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
}
.gallery__track::-webkit-scrollbar {
  display: none;
}
.gallery__track.is-dragging,
.gallery__track.is-dragging * {
  cursor: grabbing !important;
}
.gallery__track:focus-visible {
  outline: 2px solid var(--klv-color-accent);
  outline-offset: 2px;
}

@media (min-width: 520px) {
  .gallery__track {
    grid-auto-columns: 86%;
  }
}

@media (min-width: 980px) {
  .gallery__track {
    grid-auto-columns: 72%;
  }
}

.gallery__item {
  background-color: rgb(17, 17, 17);
  overflow: hidden;
  min-height: 0;
  position: relative;
}
.gallery__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.gallery__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
}
.gallery__controls[hidden] {
  display: none;
}

.gallery__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  color: var(--klv-color-text-bright);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    opacity 140ms ease;
}
.gallery__arrow:hover:enabled {
  background-color: rgba(185, 185, 185, 0.35);
}

.gallery__arrow:focus-visible {
  outline: 2px solid var(--klv-color-accent);
  outline-offset: 2px;
}
.gallery__arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gallery__counter {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgb(163, 163, 163);
}
.gallery__sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.25rem;
  background-color: rgb(17, 17, 17);
}

@media (min-width: 1100px) {
  .gallery__sidebar {
    flex: 0 0 21.25rem;
  }
}

.gallery__panel {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.gallery__eyebrow {
  font-size: 0.75rem;
  line-height: 1.1em;
  letter-spacing: 0.08em;
  color: rgb(163, 163, 163);
}

.gallery__title {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.1em;
  letter-spacing: -0.02em;
  color: var(--klv-color-text-bright);
}

.gallery__text {
  font-size: 0.9375rem;
  line-height: 1.4em;
  letter-spacing: -0.01em;
  color: rgb(207, 207, 207);
}
.gallery__colourways {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.gallery__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gallery__swatch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(90, 90, 90);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.04);
  color: rgb(163, 163, 163);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}
.gallery__swatch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.gallery__swatch:has(.gallery__swatch-input:checked) {
  border-color: var(--klv-color-text-bright);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.25);
  color: var(--klv-color-text-bright);
}
.gallery__swatch:has(.gallery__swatch-input:focus-visible) {
  outline: 2px solid var(--klv-color-accent);
  outline-offset: 2px;
}

.gallery__swatch-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}
.gallery__swatch-input[value='black'] + .gallery__swatch-dot {
  background-color: #111111;
}

.gallery__swatch-input[value='beige'] + .gallery__swatch-dot {
  background-color: #d4c2ac;
}

.gallery__swatch-input[value='blue'] + .gallery__swatch-dot {
  background-color: #a9cbea;
}
.gallery:has(.gallery__swatch-input[value='black']:checked)
  :is([data-colourway='beige'], [data-colourway='blue']),
.gallery:has(.gallery__swatch-input[value='beige']:checked)
  :is([data-colourway='black'], [data-colourway='blue']),
.gallery:has(.gallery__swatch-input[value='blue']:checked)
  :is([data-colourway='black'], [data-colourway='beige']) {
  display: none;
}
.js-reveal .gallery {
  transition: opacity 900ms, transform 900ms;
  transition-timing-function: var(--klv-ease-reveal);
  opacity: 0;
  transform: translateY(42px);
}

.js-reveal .gallery.is-revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal .gallery {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
