/* Gallery views + slideshow loupe. Hover clips stay in loom.css. */

.view-switch {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}
.view-switch button {
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border, #e6d4a0);
  color: var(--muted, #8a7344);
  padding: 8px 12px;
  min-height: 40px;
  cursor: pointer;
}
.view-switch button[aria-pressed="true"],
.view-switch button:hover {
  border-color: var(--gold, #c9a24e);
  color: var(--halo-bright, #4a3a18);
}

.mason.is-slides {
  columns: unset;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 0 18px;
  -webkit-overflow-scrolling: touch;
}
.mason.is-slides .tile {
  flex: 0 0 min(78vw, 420px);
  margin: 0;
  scroll-snap-align: center;
  break-inside: unset;
}
.mason.is-slides .tile.clip { flex-basis: min(86vw, 560px); }

.loupe {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1100px);
}
.loupe::backdrop { background: rgba(255, 248, 235, 0.9); }
.loupe-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--gold, #c9a24e);
  padding: 12px 48px 12px;
  box-shadow: 0 20px 80px rgba(47, 127, 179, 0.2);
}
.loupe-card img,
.loupe-card video {
  max-width: 86vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}
.loupe-card p {
  margin: 8px 4px 0;
  color: var(--muted, #8a7344);
  font-size: 0.85rem;
  text-align: center;
}
.loupe-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--gold, #c9a24e);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.loupe-nav:hover { transform: translateY(-50%) scale(1.05); box-shadow: 0 0 16px rgba(201,162,78,0.5); }
.loupe-prev { left: 6px; }
.loupe-next { right: 6px; }
.loupe-x {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--halo, #5c4a22);
  font-size: 1.4rem;
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
}

@media (max-width: 700px) {
  .loupe-card { padding: 36px 8px 10px; }
  .loupe-prev { left: 0; top: auto; bottom: 8px; transform: none; }
  .loupe-next { right: 0; top: auto; bottom: 8px; transform: none; }
  .loupe-nav:hover { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .loupe-nav:hover { transform: none; }
}
