/*
 * GALLERY SLIDER – MAIN + THUMBS
 */

/* Wrapper chung */
.hdvp-gallery-slider {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 20px;
}

/* Bố cục: PC ngang, Mobile dọc (MAIN trên, THUMBS dưới) */
.hdvp-gallery-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

/* THUMBS */
.hdvp-gallery-thumbs {
  flex-shrink: 0;
  width: 110px; /* chiều rộng cột thumbnails trên PC */
  max-height: 500px;
  position: relative;
  overflow: hidden;
}

.hdvp-gallery-thumbs .swiper-wrapper {
  align-items: flex-start;
}

.hdvp-gallery-thumbs .swiper-slide {
  cursor: pointer;
  opacity: 0.7;
}

.hdvp-gallery-thumbs .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Slide đang active */
.hdvp-gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #002c5f;
  border-radius: 6px;
}

/* NAV THUMBS */
.hdvp-thumbs-nav .hdvp-thumbs-prev,
.hdvp-thumbs-nav .hdvp-thumbs-next {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  z-index: 5;
}

.hdvp-thumbs-nav .hdvp-thumbs-prev {
  top: 4px;
}

.hdvp-thumbs-nav .hdvp-thumbs-next {
  bottom: 4px;
}

.hdvp-thumbs-nav .hdvp-thumbs-prev::before,
.hdvp-thumbs-nav .hdvp-thumbs-next::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* Mũi tên trên */
.hdvp-thumbs-nav .hdvp-thumbs-prev::before {
  transform: rotate(-135deg);
}

/* Mũi tên dưới */
.hdvp-thumbs-nav .hdvp-thumbs-next::before {
  transform: rotate(45deg);
}

/* MAIN */
.hdvp-gallery-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.hdvp-gallery-main .swiper-slide {
  text-align: center;
}

.hdvp-gallery-main .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* NAV MAIN */
.hdvp-gallery-main-nav .hdvp-gallery-prev,
.hdvp-gallery-main-nav .hdvp-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  cursor: pointer;
  z-index: 10;
}

.hdvp-gallery-main-nav .hdvp-gallery-prev {
  left: 12px;
}

.hdvp-gallery-main-nav .hdvp-gallery-next {
  right: 12px;
}

.hdvp-gallery-main-nav .hdvp-gallery-prev::before,
.hdvp-gallery-main-nav .hdvp-gallery-next::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* Mũi tên trái */
.hdvp-gallery-main-nav .hdvp-gallery-prev::before {
  transform: rotate(-135deg);
}

/* Mũi tên phải */
.hdvp-gallery-main-nav .hdvp-gallery-next::before {
  transform: rotate(45deg);
}

/* Pagination (dots) */
.hdvp-gallery-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  z-index: 8;
}

.hdvp-gallery-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
}

/* ======================
 * MOBILE
 * ====================*/
@media (max-width: 767px) {
  .hdvp-gallery-layout {
    flex-direction: column;
  }

  /* MAIN trên, THUMBS dưới */
  .hdvp-gallery-main {
    order: 1;
  }

  .hdvp-gallery-thumbs {
    order: 2;
    width: 100%;
    max-height: none;
  }

  /* Thumbs nằm ngang dưới */
  .hdvp-gallery-thumbs .swiper-wrapper {
    align-items: center;
  }

  .hdvp-thumbs-nav .hdvp-thumbs-prev,
  .hdvp-thumbs-nav .hdvp-thumbs-next {
    display: none; /* Mobile vuốt ngang là đủ */
  }
}
/* Fix nền đen / xám trên Mobile (và mọi nơi khác) */
.hdvp-gallery-main,
.hdvp-gallery-main .swiper,
.hdvp-gallery-main .swiper-slide {
  background: transparent !important;
}

/* Chắc chắn ảnh luôn hiển thị đúng tỉ lệ */
.hdvp-gallery-main .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Mobile: ép main full chiều rộng, tránh bị co kéo lạ */
@media (max-width: 767px) {
  .hdvp-gallery-main {
    width: 100%;
    max-width: 100%;
  }
}