/* ==========================================================================
   auswahl.css: Fotoraster, Filter und Vergrößerung für auswahl.html.

   Nur das, was die Seite zusätzlich zu assets/css/styles.css braucht, ausschließlich
   mit den Variablen aus styles.css. Das Raster steht als echtes Markup in der Seite
   (Quelle: scripts/galerie_export.py), ohne JavaScript sind alle Fotos sichtbar,
   assets/js/auswahl.js ergänzt nur Filter und Vergrößerung.
   ========================================================================== */

.galerie-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.galerie-chip {
  padding: .45rem 1rem;
  border: 1px solid var(--hairline-hi);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: .88rem;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.galerie-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.galerie-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.galerie-chip:focus-visible {
  outline: 2px solid var(--accent-hot);
  outline-offset: 2px;
}

.galerie-count {
  margin-left: auto;
  font-size: var(--t-small);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.galerie-grid {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

@media (min-width: 720px) {
  .galerie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
  }
}

@media (min-width: 1100px) {
  .galerie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.galerie-item[hidden] {
  display: none;
}

.galerie-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
}

.galerie-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .galerie-open img {
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  }
  .galerie-open:hover img {
    transform: scale(1.035);
  }
}

.galerie-open:focus-visible {
  outline: 2px solid var(--accent-hot);
  outline-offset: 2px;
}

/* --- Vergrößerung ------------------------------------------------------ */

.galerie-box {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}

.galerie-box:not([open]) {
  display: none;
}

.galerie-box::backdrop {
  background: rgba(20, 14, 12, .94);
}

.galerie-box-img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 5.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  touch-action: pan-y;
}

.galerie-box-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  transition: background-color .16s ease;
}

.galerie-box-btn:hover {
  background: rgba(255, 255, 255, .24);
}

.galerie-box-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.galerie-box-close {
  top: 1rem;
  right: 1rem;
}

.galerie-box-prev,
.galerie-box-next {
  top: 50%;
  translate: 0 -50%;
}

.galerie-box-prev {
  left: 1rem;
}

.galerie-box-next {
  right: 1rem;
}

.galerie-box-count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.1rem;
  margin: 0;
  text-align: center;
  font-size: var(--t-small);
  color: rgba(255, 255, 255, .7);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 719px) {
  .galerie-box-img {
    max-width: 100vw;
    border-radius: 0;
  }
  .galerie-box-prev,
  .galerie-box-next {
    top: auto;
    bottom: .6rem;
    translate: none;
    width: 2.75rem;
    height: 2.75rem;
  }
  .galerie-box-prev {
    left: 1rem;
  }
  .galerie-box-next {
    right: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Handy zuerst (18.10.2026)
   -------------------------------------------------------------------------- */

.galerie-kopf-cta {
  margin-top: 1.5rem;
}

/* Filterleiste: auf dem Handy eine Zeile zum seitlichen Wischen statt mehrerer Zeilen */
@media (max-width: 719px) {
  .galerie-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -1.25rem;
    padding: .25rem 1.25rem .5rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .galerie-filter::-webkit-scrollbar {
    display: none;
  }

  .galerie-chip {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 1.1rem;
    scroll-snap-align: start;
  }

  .galerie-count {
    display: none;
  }

  .galerie-grid {
    margin-top: 1rem;
    gap: .375rem;
  }
}

/* Waschtische-Abschnitt unter dem Raster */
.waschtische-band h2 {
  max-width: 20ch;
}

.waschtische-band .wt-facts {
  margin-top: 1.75rem;
  max-width: 34rem;
  padding: 0;
}

.waschtische-band .wt-facts li {
  font-variation-settings: 'wdth' 106, 'wght' 650;
  font-weight: 650;
  font-size: 1.125rem;
}

.waschtische-text {
  margin-top: 1.5rem;
  max-width: 62ch;
  color: var(--ink-muted);
}

.waschtische-band .btn {
  margin-top: 1.75rem;
}

/* Beim Springen zum Raster nicht unter der festen Navigation verschwinden */
.galerie-sektion {
  scroll-margin-top: 80px;
}
