/**
 * CSS: Product Image Lightbox & Gallery Popup
 * Package: Flatsome Lite
 * Author: Xe nâng Khuê Đăng / Antigravity
 */

/* Khung Popup sản phẩm */
.mfp-figure.product-lightbox-figure {
  position: relative;
  background: transparent;
  padding: 40px 0 60px 0;
  text-align: center;
}

.mfp-figure.product-lightbox-figure .mfp-img {
  max-height: calc(100vh - 160px) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  background: #ffffff;
}

/* Nút Xem Chi Tiết nổi bật bên dưới ảnh */
.mfp-figure.product-lightbox-figure .mfp-product-actions {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  width: 100%;
  text-align: center;
  z-index: 1050;
  pointer-events: none;
}

.mfp-figure.product-lightbox-figure .mfp-product-actions .mfp-btn-detail {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--primary-color, #dd3333) !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  border-radius: 99px !important;
  padding: 8px 24px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.mfp-figure.product-lightbox-figure .mfp-product-actions .mfp-btn-detail:hover {
  background-color: #ffffff !important;
  color: var(--primary-color, #dd3333) !important;
  border-color: var(--primary-color, #dd3333) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

/* Thanh tiêu đề và đếm ảnh dưới cùng */
.mfp-figure.product-lightbox-figure .mfp-bottom-bar {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 8px;
  color: #f1f1f1;
  font-size: 13px;
  line-height: 20px;
}

.mfp-figure.product-lightbox-figure .mfp-title {
  font-weight: 400;
  color: #ffffff;
  padding-right: 48px;
  text-align: left;
}

.mfp-title-heading {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.mfp-title-caption {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  word-break: break-word;
}

.mfp-figure.product-lightbox-figure .mfp-counter {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* Con trỏ zoom trên hình ảnh sản phẩm khi bật tính năng Lightbox */
.has-product-image-lightbox .product-small .box-image,
.has-product-image-lightbox .product-small .box-image img {
  cursor: zoom-in;
}

/* Mobile responsive */
@media (max-width: 549px) {
  .mfp-figure.product-lightbox-figure {
    padding: 20px 0 70px 0;
  }
  .mfp-figure.product-lightbox-figure .mfp-img {
    max-height: calc(100vh - 180px) !important;
  }
  .mfp-figure.product-lightbox-figure .mfp-product-actions {
    bottom: 16px;
  }
  .mfp-figure.product-lightbox-figure .mfp-product-actions .mfp-btn-detail {
    padding: 6px 18px !important;
    font-size: 13px !important;
  }
}
