/* ═══════════════════════════════════════════════════════════════════════
   PDP mini gallery - phone only (2026-10-30, Drago)

   The options column under the gallery is very tall on a phone. Once 75% of
   the main image has scrolled away, a small copy of the gallery is pinned
   under the floating header: the current image on the left (about 35% of
   the main image's height) and the six product views on the right, two
   columns of three. Built by assets/js/pdp-mini-gallery.js; the height comes
   in as --mini-h. Images are never cropped (object-fit: contain).
   ═══════════════════════════════════════════════════════════════════════ */

.pdp-mini-gallery {
  --mini-h: 110px;
  --mini-gap: 4px;
  --mini-cell: calc((var(--mini-h) - var(--mini-gap) * 2) / 3);
  position: fixed;
  top: var(--mini-top, 88px);
  left: var(--vh-header-float, 12px);
  right: var(--vh-header-float, 12px);
  z-index: calc(var(--vh-z-header, 200) - 1);
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 6px;
  background: var(--vh-white, #fff);
  border: 1px solid rgba(184, 181, 174, 0.35);
  border-radius: var(--vh-radius-lg, 14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.pdp-mini-gallery.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.pdp-mini-gallery__main {
  flex: 0 1 auto;
  height: var(--mini-h);
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.pdp-mini-gallery__main img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--vh-radius-md, 8px);
}

.pdp-mini-gallery__thumbs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, calc(var(--mini-cell) * 1.5));
  grid-template-rows: repeat(3, var(--mini-cell));
  gap: var(--mini-gap);
}

.pdp-mini-gallery__thumb {
  padding: 0;
  overflow: hidden;
  border: 1.5px solid rgba(184, 181, 174, 0.4);
  border-radius: 6px;
  background: var(--vh-white, #fff);
  cursor: pointer;
}

.pdp-mini-gallery__thumb.active {
  border-color: transparent;
  background:
    linear-gradient(var(--vh-white, #fff), var(--vh-white, #fff)) padding-box,
    linear-gradient(135deg, #2563EB, #7C3AED, #DB2777, #F97316) border-box;
}

.pdp-mini-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 768px) {
  .pdp-mini-gallery { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-mini-gallery,
  .pdp-mini-gallery.is-visible { transition: none; transform: none; }
}
