.teahouse-gallery {
  --th-green: #005a40;
  --th-gold: #b99745;
  width: 100%;
  margin: 32px 0;
  color: var(--th-green);
}

.teahouse-gallery__head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  margin-bottom: 12px;
}
.teahouse-gallery__nav { display: flex; flex: 0 0 auto; gap: 8px; }

.teahouse-gallery .teahouse-gallery__arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid #e9ece8;
  border-radius: 3px;
  background: #f7f9f8;
  color: var(--th-green);
  box-shadow: none;
  cursor: pointer;
  font: normal 21px/1 Arial, sans-serif;
  transition: background-color .18s ease, color .18s ease;
}

.teahouse-gallery .teahouse-gallery__arrow span { font: inherit; }
.teahouse-gallery .teahouse-gallery__arrow:hover:not(:disabled) { background: var(--th-green); color: #fff; }
.teahouse-gallery .teahouse-gallery__arrow:disabled { opacity: .38; cursor: default; }
.teahouse-gallery button:focus-visible, .teahouse-gallery a:focus-visible, .teahouse-gallery__track:focus-visible { outline: 2px solid var(--th-gold); outline-offset: 3px; }

.teahouse-gallery__viewport { overflow: hidden; }
.teahouse-gallery__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}
.teahouse-gallery__track::-webkit-scrollbar { display: none; }

.teahouse-gallery__slide {
  flex: 0 0 clamp(220px, 30%, 292px);
  min-width: 0;
  margin: 0;
  aspect-ratio: 320 / 230;
  overflow: hidden;
  background: #f4f6f2;
  scroll-snap-align: start;
}

.teahouse-gallery__open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.teahouse-gallery .teahouse-gallery__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.teahouse-gallery__open:hover .teahouse-gallery__image { transform: scale(1.035); }

.teahouse-gallery__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; padding-top: 9px; color: #66776c; font-size: 12px; line-height: 1.3; }
.teahouse-gallery__count strong { color: var(--th-green); font-weight: 700; }
.teahouse-gallery__dots { display: flex; align-items: center; gap: 7px; }
.teahouse-gallery .teahouse-gallery__dot { display: block; width: 8px; height: 8px !important; min-width: 8px; min-height: 8px !important; max-height: 8px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: #cbd5cf; box-shadow: none; cursor: pointer; transition: width .18s ease, background-color .18s ease; }
.teahouse-gallery .teahouse-gallery__dot.is-active { width: 22px; background: var(--th-gold); }

.teahouse-gallery__lightbox { position: fixed; inset: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(12, 27, 21, .96); color: #fff; }
.teahouse-gallery__lightbox::backdrop { background: rgba(12, 27, 21, .85); }
.teahouse-gallery__lightbox-inner { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 55px 70px 52px; box-sizing: border-box; }
.teahouse-gallery .teahouse-gallery__lightbox-image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.teahouse-gallery .teahouse-gallery__lightbox-close, .teahouse-gallery .teahouse-gallery__lightbox-prev, .teahouse-gallery .teahouse-gallery__lightbox-next { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; margin: 0; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 3px; background: rgba(255,255,255,.08); color: #fff; box-shadow: none; cursor: pointer; font: normal 24px/1 Arial,sans-serif; }
.teahouse-gallery .teahouse-gallery__lightbox-close { top: 14px; right: 18px; font-size: 30px; }
.teahouse-gallery .teahouse-gallery__lightbox-prev { top: 50%; left: 18px; transform: translateY(-50%); }
.teahouse-gallery .teahouse-gallery__lightbox-next { top: 50%; right: 18px; transform: translateY(-50%); }
.teahouse-gallery .teahouse-gallery__lightbox-close:hover, .teahouse-gallery .teahouse-gallery__lightbox-prev:hover:not(:disabled), .teahouse-gallery .teahouse-gallery__lightbox-next:hover:not(:disabled) { background: rgba(255,255,255,.24); }
.teahouse-gallery .teahouse-gallery__lightbox-prev:disabled, .teahouse-gallery .teahouse-gallery__lightbox-next:disabled { opacity: .3; cursor: default; }
.teahouse-gallery__lightbox-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #e5e6df; font-size: 13px; }

@media (max-width: 600px) {
  .teahouse-gallery { margin: 25px 0; }
  .teahouse-gallery__head { margin-bottom: 12px; }
  .teahouse-gallery__slide { flex-basis: 80%; }
  .teahouse-gallery .teahouse-gallery__arrow { width: 38px; height: 38px; min-width: 38px; }
  .teahouse-gallery__lightbox-inner { padding: 60px 12px 65px; }
  .teahouse-gallery .teahouse-gallery__lightbox-prev { top: auto; bottom: 12px; left: 16px; transform: none; }
  .teahouse-gallery .teahouse-gallery__lightbox-next { top: auto; bottom: 12px; right: 16px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .teahouse-gallery .teahouse-gallery__image, .teahouse-gallery .teahouse-gallery__dot, .teahouse-gallery .teahouse-gallery__arrow { transition: none; }
}
