/* ====================================================
   寫真圖集預覽區
   ==================================================== */

/* 預覽條：橫向滾動，固定高度同影片封面 */
.actress-gallery-strip {
  display: flex;
  flex-direction: row;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  height: 6.13333rem;
  padding: 0 0 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.actress-gallery-strip::-webkit-scrollbar { display: none; }

.actress-gallery-strip .thumb {
  flex-shrink: 0;
  height: 100%;
  width: auto;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.actress-gallery-strip .thumb img {
  height: 100%;
  width: auto;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  transition: opacity 0.2s;
}
.actress-gallery-strip .thumb:hover img { opacity: 0.85; }

/* 查  全部按鈕 */
.actress-gallery-more {
  flex-shrink: 0;
  height: 100%;
  min-width: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #00a0e9;
  text-align: center;
  line-height: 1.4;
  padding: 0 0.5rem;
  border: 1px solid #e0e0e0;
}
.actress-gallery-more:hover { background: #e8f4ff; }

/* ====================================================
   Lightbox 遮罩
   ==================================================== */
#gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.95);
  flex-direction: column;
}
#gallery-lightbox.active { display: flex; }

.gl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  flex-shrink: 0;
}
.gl-counter {
  color: #fff;
  font-size: 14px;
  opacity: 0.8;
}
.gl-close {
  color: #fff;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.8;
}
.gl-close:hover { opacity: 1; }

.gl-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.gl-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  user-select: none;
}
.gl-prev, .gl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.gl-prev { left: 10px; }
.gl-next { right: 10px; }
.gl-prev:hover, .gl-next:hover { background: rgba(255,255,255,0.3); }

.gl-thumbs {
  display: flex;
  flex-direction: row;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 72px;
  align-items: center;
}
.gl-thumbs::-webkit-scrollbar { display: none; }
.gl-thumbs img {
  height: 54px;
  width: auto;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
  object-fit: cover;
}
.gl-thumbs img.active {
  opacity: 1;
  border-color: #3097fd;
}
.gl-thumbs img:hover { opacity: 0.85; }

/* ====================================================
   桌面版 >=768px
   ==================================================== */
@media screen and (min-width: 768px) {
  .actress-gallery-strip {
    height: 180px;
    gap: 10px;
  }
  .gl-thumbs { height: 90px; }
  .gl-thumbs img { height: 70px; }
  .gl-prev, .gl-next { width: 52px; height: 52px; font-size: 26px; }
}

/* ====================================================
   手機版 <=767px
   ==================================================== */
@media screen and (max-width: 767px) {
  .row-gallery .mod_z .th_z {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 3% 0;
  }
  .row-gallery .tb_z {
    padding-bottom: 2%;
    clear: both;
    width: 100%;
    display: block;
  }
  .actress-gallery-strip .thumb img {
    height: 100%;
    width: auto;
    object-fit: cover;
  }
}