/**
 * WC Product Gallery Styles
 * Version: 1.0.4
 */

/* ---------------------------------
   WRAPPER
--------------------------------- */
.wc-gallery {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  max-width: 100%;
}

/* ---------------------------------
   MAIN IMAGE + SLIDER TRACK
--------------------------------- */
.wc-main {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.wc-main-track {
  display: flex;
  transition: transform 0.35s ease;
}

.wc-slide {
  min-width: 100%;
  user-select: none;
}

.wc-slide img {
  width: 100%;
  display: block;
  border-radius: 12px;
  background: var(--base-2, #f5f5f5);
  padding: 4px;
  border: 1px solid var(--base, #e0e0e0);
  transition: all 0.25s ease;
}

/* ---------------------------------
   THUMBNAILS (Desktop)
--------------------------------- */
.wc-thumbs {
  width: 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 450px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--contrast-3, #999) var(--base, #f0f0f0);
}

/* Scrollbar (Chrome/Safari/Edge) */
.wc-thumbs::-webkit-scrollbar {
  width: 6px;
}

.wc-thumbs::-webkit-scrollbar-track {
  background: var(--base, #f0f0f0);
}

.wc-thumbs::-webkit-scrollbar-thumb {
  background: var(--contrast-3, #999);
  border-radius: 10px;
}

.wc-thumb {
  cursor: pointer;
  border: 2px solid var(--base, #e0e0e0);
  background: var(--base-3, #fafafa);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wc-thumb:hover {
  border-color: var(--contrast-2, #666);
}

.wc-thumb.active {
  border-color: var(--contrast, #000);
}

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

/* ---------------------------------
   MOBILE RESPONSIVE
--------------------------------- */
@media (max-width: 768px) {
  .wc-gallery {
    flex-direction: column;
    gap: 10px;
  }

  .wc-main {
    order: 1;
  }

  .wc-thumbs {
    order: 2;
    min-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    gap: 8px;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .wc-thumbs::-webkit-scrollbar {
    height: 4px;
  }

  .wc-thumb {
    min-width: 70px;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

/* ---------------------------------
   TABLET (Optional)
--------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .wc-thumbs {
    width: 80px;
  }

  .wc-gallery {
    gap: 15px;
  }
}
