/* ─── Customer Gallery (product page — horizontal scroll) ─── */
.customer-gallery {
  padding: var(--theme-space-md) 0;
  border-top: var(--theme-border-width) solid var(--theme-color-border);
}

.customer-gallery__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--theme-space-sm);
}

.customer-gallery__heading {
  font-family: var(--theme-font-heading);
  font-size: var(--theme-text-lg);
  font-weight: var(--theme-weight-semibold);
  color: var(--theme-color-text-secondary);
  margin: 0;
}

.customer-gallery__arrows {
  display: flex;
  gap: var(--theme-space-2xs);
}

.customer-gallery__arrow {
  width: 36px;
  height: 36px;
  border-radius: var(--theme-radius-full);
  border: var(--theme-border-width) solid var(--theme-color-border);
  background: var(--theme-color-bg-card, #fff);
  color: var(--theme-color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--theme-duration-fast);
}

.customer-gallery__arrow:hover {
  background: var(--theme-color-brand-dark);
  color: var(--theme-color-white);
  border-color: var(--theme-color-brand-dark);
}

.customer-gallery__track {
  display: flex;
  gap: var(--theme-space-sm);
  overflow-x: auto;
  /* scroll-snap-type: x mandatory; */
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--theme-space-xs);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  /* Peek: show partial next item */
  scroll-padding-left: var(--theme-space-sm);
}

.customer-gallery__track::-webkit-scrollbar {
  height: 4px;
}

.customer-gallery__track::-webkit-scrollbar-thumb {
  background: var(--theme-color-border);
  border-radius: 2px;
}

.customer-gallery__track:active {
  cursor: grabbing;
}

.customer-gallery__item {
  flex: 0 0 auto;
  width: 280px;
  aspect-ratio: 4 / 3;
  border-radius: var(--theme-radius-lg);
  overflow: hidden;
  /* scroll-snap-align: start; */
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--theme-color-bg-surface);
  transition: transform var(--theme-duration-fast), box-shadow var(--theme-duration-fast);
}

.customer-gallery__item:hover {
  transform: scale(1.02);
  box-shadow: var(--theme-shadow-md);
}

.customer-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

@media (max-width: 767px) {
  .customer-gallery__item {
    width: 220px;
  }

  .customer-gallery__arrows {
    display: none;
  }
}

/* ─── Gallery Grid (horizontal scroll with filters) ─── */
.gallery-grid {
  padding: var(--theme-space-lg) 0;
}

.gallery-grid__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--theme-space-sm);
}

.gallery-grid__heading {
  font-family: var(--theme-font-heading);
  font-size: var(--theme-text-xl);
  font-weight: var(--theme-weight-bold);
  color: var(--theme-color-text-primary);
  margin: 0;
}

.gallery-grid__arrows {
  display: flex;
  gap: var(--theme-space-2xs);
}

.gallery-grid__arrow {
  width: 36px;
  height: 36px;
  border-radius: var(--theme-radius-full);
  border: var(--theme-border-width) solid var(--theme-color-border);
  background: var(--theme-color-bg-card, #fff);
  color: var(--theme-color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--theme-duration-fast);
}

.gallery-grid__arrow:hover {
  background: var(--theme-color-brand-dark);
  color: var(--theme-color-white);
  border-color: var(--theme-color-brand-dark);
}

.gallery-grid__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-xs);
  margin-bottom: var(--theme-space-sm);
}

.gallery-grid__filter {
  padding: var(--theme-space-3xs) var(--theme-space-sm);
  border: var(--theme-border-width) solid var(--theme-color-border);
  border-radius: var(--theme-radius-full);
  background: none;
  font-family: var(--theme-font-ui);
  font-size: var(--theme-text-sm);
  font-weight: var(--theme-weight-semibold);
  color: var(--theme-color-text-secondary);
  cursor: pointer;
  transition: all var(--theme-duration-fast);
}

.gallery-grid__filter--active {
  background: var(--theme-color-brand-dark);
  color: var(--theme-color-white);
  border-color: var(--theme-color-brand-dark);
}

.gallery-grid__track {
  display: flex;
  gap: var(--theme-space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding-bottom: var(--theme-space-xs);
}

.gallery-grid__track::-webkit-scrollbar {
  height: 4px;
}

.gallery-grid__track::-webkit-scrollbar-thumb {
  background: var(--theme-color-border);
  border-radius: 2px;
}

.gallery-grid__item {
  flex: 0 0 auto;
  width: 280px;
  aspect-ratio: 4 / 3;
  border-radius: var(--theme-radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--theme-color-bg-surface);
  transition: transform var(--theme-duration-fast), box-shadow var(--theme-duration-fast);
}

.gallery-grid__item:hover {
  transform: scale(1.02);
  box-shadow: var(--theme-shadow-md);
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

@media (max-width: 767px) {
  .gallery-grid__item {
    width: 220px;
  }

  .gallery-grid__arrows {
    display: none;
  }
}

.gallery-grid__load-more {
  display: flex;
  justify-content: center;
  margin-top: var(--theme-space-xl);
}

@media (max-width: 767px) {
  .gallery-grid__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Gallery Lightbox ─── */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--theme-z-modal);
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gallery-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: none;
  outline: none;
  display: block;
}

.gallery-lightbox__close {
  position: absolute;
  top: var(--theme-space-md);
  right: var(--theme-space-md);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  padding: var(--theme-space-xs) var(--theme-space-sm);
  border-radius: var(--theme-radius-md);
  line-height: 1;
  z-index: 2;
  transition: background var(--theme-duration-fast);
}

.gallery-lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.gallery-lightbox__nav--prev {
  left: var(--theme-space-md);
}

.gallery-lightbox__nav--next {
  right: var(--theme-space-md);
}

.gallery-lightbox__bottom {
  position: absolute;
  bottom: var(--theme-space-md);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--theme-space-3xs);
  z-index: 2;
}

.gallery-lightbox__caption {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--theme-font-ui);
  font-size: var(--theme-text-md);
  font-weight: var(--theme-weight-semibold);
  text-align: center;
  max-width: 80vw;
}

.gallery-lightbox__counter {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--theme-font-ui);
  font-size: var(--theme-text-xs);
}
