/* PDP image gallery — shared base styles. Each brand layout loads
 * this AFTER its own CSS so brand-specific overrides on
 * `.pdp-gallery__thumb*` win on specificity tie. The active-thumb
 * border color uses CSS custom property `--pdp-gallery-accent` so
 * brand palettes can theme it without rewriting the rule.
 *
 * Selector contract (matches the JS in
 * app/assets/javascripts/brand_chrome.js → bindPdpGallery):
 *   [data-pdp-gallery]               main image wrapper
 *   img[data-pdp-main]               the main image whose src+alt swap
 *   .pdp-gallery__thumbs             the thumbnail strip
 *   button[data-pdp-thumb]           one per gallery image
 *   .pdp-gallery__thumb              base thumb
 *   .pdp-gallery__thumb--active      currently-displayed thumb
 *
 * Operator request 2026-05-08: every brand PDP uses this pattern,
 * not just glam.
 */

.pdp-gallery__main img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.pdp-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pdp-gallery__thumb {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 200ms ease, opacity 200ms ease;
  overflow: hidden;
}

.pdp-gallery__thumb:hover {
  border-color: var(--pdp-gallery-accent, rgba(0, 0, 0, 0.35));
}

.pdp-gallery__thumb--active {
  border-color: var(--pdp-gallery-accent, rgba(0, 0, 0, 0.65));
}

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

/* Tighten spacing between PDP image area and content column.
   Operator 2026-05-08: "decrease space between pdp image and content".
   The thumb strip was pushing 12px below the main image, plus brand
   chrome added more padding. Pull thumbs closer + cap mobile gap so
   the right-column content sits tighter against the gallery. */
.pdp-gallery__thumbs {
  margin-top: 6px;
}
@media (max-width: 991px) {
  .pdp-gallery__main {
    margin-bottom: 8px;
  }
}
