/* ===== LAYOUT BASE ===== */
.custom-woo-gallery {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  align-items: start;
  width: 100%;
  --thumbs-viewport-height: auto;
}

/* ===== THUMBS DESKTOP ===== */
.custom-woo-thumbs-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  height: 100%;
  width: 100%;
}

.custom-woo-arrow {
  border: 1px solid #343434;
  background: transparent;
  color: #343434;
  border-radius: 0;
  padding: 2px 4px;
  font-size: 11px;
  line-height: 1.1;
  width: 100%;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.custom-woo-arrow:hover {
  color: #111;
  background: transparent;
}

.custom-woo-arrow:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
  color: #999;
  border-color: transparent;
}

.custom-woo-arrow:disabled:hover {
  color: #999;
  background: transparent;
  border-color: transparent;
}

.custom-woo-arrow.is-hidden {
  display: none;
}

.custom-woo-thumbs-viewport {
  overflow: hidden;
  height: var(--thumbs-viewport-height, auto);
  max-height: var(--thumbs-viewport-height, none);
  width: 100%;
  flex: 1;
}

.custom-woo-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s ease;
}

.custom-woo-thumbs .thumb {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.custom-woo-thumbs .thumb.active {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.custom-woo-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (min-width: 769px) {
  .custom-woo-gallery.few-thumbs .custom-woo-thumbs {
    height: 100%;
    justify-content: stretch;
  }

  .custom-woo-gallery.few-thumbs .custom-woo-thumbs .thumb {
    flex: 1 1 0;
    min-height: 0;
  }

  .custom-woo-gallery.few-thumbs .custom-woo-thumbs img {
    height: 100%;
  }
}

/* ===== IMAGEM PRINCIPAL ===== */
.custom-woo-main {
  position: relative;
  width: 100%;
}

.custom-woo-main .slide {
  display: none;
}

.custom-woo-main .slide.active {
  display: block;
}

.custom-woo-main img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0;
  background: transparent;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .custom-woo-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .custom-woo-thumbs-wrapper {
    order: 2;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .custom-woo-thumbs-viewport {
    max-height: none;
  }

  .custom-woo-arrow {
    display: none;
  }

  .custom-woo-thumbs {
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }

  .custom-woo-thumbs .thumb {
    flex: 0 0 calc((100% - (4 * 8px)) / 5);
    max-width: calc((100% - (4 * 8px)) / 5);
  }
}
