/* Single-product gallery only. The catalog and home sliders keep their own styles. */
.inhi-product-gallery { min-width: 0; }
.inhi-gallery {
  --gallery-accent: var(--inhi-copper, #c99a78);
  --gallery-border: var(--inhi-border, #d7c7ba);
  --gallery-ink: var(--inhi-espresso, #211a17);
  width: 100%;
  min-width: 0;
  color: var(--gallery-ink);
}
.inhi-gallery [hidden] { display: none !important; }
.inhi-gallery .inhi-product-gallery__main {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
}
.inhi-gallery [data-gallery-open] {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: zoom-in;
}
.inhi-gallery .inhi-product-gallery__main img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
}
.inhi-gallery__navigation { position: relative; margin-top: 12px; }
.inhi-gallery [data-gallery-strip] {
  display: flex;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 2px;
  box-sizing: border-box;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--gallery-border) transparent;
  -webkit-overflow-scrolling: touch;
}
.inhi-gallery button[data-gallery-thumb] {
  flex: 0 0 calc((100% - 30px) / 4);
  min-width: 0;
  aspect-ratio: 1;
  display: grid;
  padding: 4px;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 2px;
  background: #fff;
  color: var(--gallery-ink);
  box-shadow: inset 0 0 0 1px var(--gallery-border);
  cursor: pointer;
  scroll-snap-align: start;
}
.inhi-gallery button[data-gallery-thumb][aria-pressed="true"] {
  border-color: var(--gallery-accent);
  box-shadow: none;
}
.inhi-gallery [data-gallery-thumb] img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: contain;
}
.inhi-gallery button[data-gallery-scroll] {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 32px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--gallery-border);
  border-radius: 3px;
  background: var(--inhi-white, #fffaf5);
  color: var(--gallery-ink);
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  box-shadow: 0 2px 6px #211a1720;
}
.inhi-gallery [data-gallery-scroll="-1"] { left: 0; }
.inhi-gallery [data-gallery-scroll="1"] { right: 0; }
.inhi-gallery button[data-gallery-scroll]:disabled { opacity: .35; cursor: default; }
.inhi-gallery button:focus-visible,
.inhi-gallery a:focus-visible,
.inhi-gallery [data-gallery-pan]:focus-visible {
  outline: 2px solid var(--gallery-ink);
  outline-offset: 2px;
}
.inhi-gallery .inhi-gallery__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.inhi-gallery dialog[data-gallery-dialog] {
  position: fixed;
  inset: 0;
  width: min(96vw, 1440px);
  height: 92vh;
  height: 92dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid var(--gallery-border);
  border-radius: 4px;
  background: var(--inhi-white, #fffaf5);
  color: var(--gallery-ink);
  overflow: hidden;
}
.inhi-gallery dialog[data-gallery-dialog][open] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inhi-gallery dialog::backdrop { background: #211a17d9; }
.inhi-gallery .inhi-gallery__toolbar,
.inhi-gallery .inhi-gallery__preview-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
}
.inhi-gallery .inhi-gallery__toolbar { justify-content: space-between; }
.inhi-gallery [data-gallery-dialog] button {
  min-height: 44px;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid var(--gallery-border);
  border-radius: 3px;
  background: #fff;
  color: var(--gallery-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
}
.inhi-gallery [data-gallery-dialog] button:disabled { opacity: .4; cursor: default; }
.inhi-gallery [data-gallery-zoom][aria-pressed="true"] { border-color: var(--gallery-accent); }
.inhi-gallery [data-gallery-pan] {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  scrollbar-width: auto;
}
.inhi-gallery [data-gallery-preview] {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  margin: 0 auto;
}
.inhi-gallery [data-gallery-pan].is-zoomed [data-gallery-preview] {
  width: var(--gallery-full-width);
  height: var(--gallery-full-height);
  max-width: none;
  max-height: none;
  object-fit: fill;
}
@media (max-width: 600px) {
  .inhi-gallery button[data-gallery-thumb] { flex-basis: calc((100% - 20px) / 3); }
  .inhi-gallery dialog[data-gallery-dialog] { width: 100%; height: 100vh; height: 100dvh; padding: 10px; border-radius: 0; }
  .inhi-gallery .inhi-gallery__toolbar { gap: 8px; }
  .inhi-gallery [data-gallery-dialog] button { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .inhi-gallery [data-gallery-strip] { scroll-behavior: auto; }
}
