/* ==========================================================================
   多圖獨立捲動燈箱樣式
   ========================================================================== */

/* 1. 滿版黑底外殼 (毛玻璃效果) */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.popup-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* 2. 燈箱主包裹器 */
.popup-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.popup-overlay.is-active .popup-wrapper {
  transform: scale(1.3);
}

/* 3. 核心：限制高度並開啟內部獨立捲動區 */
.popup-scroll-content {
  width: 100%;
  max-height: 65vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  border-radius: 25px;
}

/* 隱藏預設粗糙的捲動條，改用現代細緻風格 */
.popup-scroll-content::-webkit-scrollbar {
  width: 6px;
}
.popup-scroll-content::-webkit-scrollbar-track {
  background: transparent;
}
.popup-scroll-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

/* 4. 圖片容器：讓 3~4 張圖片由上到下無縫垂直排列 */
#popup-image-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#popup-image-container img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

/* 5. 絕對定位關閉按鈕：死死鎖在包裹器右上角，不受捲動影響 */
.popup-close-btn {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 44px;
  height: 44px;
  background-color: #ffffff;
  color: #111111;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10; /* 確保在圖片之上 */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
}

.popup-close-btn:hover {
  background-color: #111111;
  color: #ffffff;
  transform: scale(1.1) rotate(90deg);
}

/* 手機版 RWD 調校：防止關閉按鈕飛出螢幕 */
@media (max-width: 768px) {
  .popup-overlay {
    padding: 20px 10px;
  }
  .popup-wrapper {
    max-width: 430px;
    width: 80%;
  }
  .popup-close-btn {
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    font-size: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
  }
  .popup-scroll-content {
    max-height: 60vh;
  }
  .ld-popup-section-oils .breakLine {
    display: none;
  }
}

/* ==========================================================================
   Emplir 全系列產品圖文彈窗 (Popup Components) 整合樣式表
   適用於：moist / smooth 全系列洗、護、油、乳共 6 款元件
   ========================================================================== */

/* ─── 1. 全域容器基本設定  ─── */
.ld-popup-container {
  background-color: #ffffff;
  font-family: 'Noto Serif TC', 'Noto Serif', 'BiKai', 'MingLiU', serif;
  -webkit-font-smoothing: antialiased;
  color: #333333;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding-bottom: 5%;
}

/* ─── 2. 頂部核心：純白去背瓶身疊圖區 ─── */
.ld-popup-hero {
  position: relative;
  background-color: #ffffff;
  width: 100%;
  padding-top: 20px;
  text-align: center;
}

/* 產品去背主圖縮放限制 */
.ld-popup-hero .ld-hero-img {
  display: block;
  width: 85%;
  max-width: 380px;
  height: auto;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(2px 4px 6px #bbb);
}

/* 橫跨下方的粉藍色文字底色塊 */
.ld-popup-hero-title-box {
  margin-top: -150px;
  padding: 130px 20px 30px 20px;
  position: relative;
  z-index: 1;
}

.ld-popup-hero-title-box.moist {
  background-color: #e4f2ff;
}

.ld-popup-hero-title-box.smooth {
  background-color: #e4f8ff;
}

/* 活字大標題 */
.ld-popup-hero-title-box h2 {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 3px;
  margin: 0 0 3px 0;
  line-height: 1.3;
}

/* 活字英文副標 */
.ld-popup-hero-title-box p {
  font-size: 16px;
  letter-spacing: 1.25px;
  font-weight: 800;
  margin: 0;
}

/* ─── 3. 中後段：所有圖文內容區塊與間距整合 ─── */
.ld-popup-section-oils,
.ld-popup-section-repair,
.ld-popup-section-extracts,
.ld-popup-section-wash,
.ld-popup-section-collagen,
.ld-popup-section-heat {
  padding: 35px 25px 20px 25px;
  text-align: center;
  background-color: #ffffff;
  box-sizing: border-box;
}

/* 標題整合：控制全站所有 h3 主標題的文字、字級、行高與間距 */
.ld-popup-section-oils h3,
.ld-popup-section-repair h3,
.ld-popup-section-extracts h3,
.ld-popup-section-wash h3,
.ld-popup-section-collagen h3,
.ld-popup-section-heat h3 {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 2px;
  margin: 0 auto 0 auto;
  color: #222222;
  max-width: 90%;
}

.ld-popup-section-oils .breakLine {
  display: block;
}

/* 敘述整合：控制全站所有內文介紹小字 */
.ld-popup-container .ld-section-desc {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 1.25px;
  margin: 10px auto 25px auto;
  max-width: 95%;
}

/* 素材圖防爆控制：控制全站所有成分圈圈圖、PPT環狀圖、吹風機原理圖 */
.ld-oils-grid-img,
.ld-repair-grid-img,
.ld-extracts-grid-img,
.ld-wash-grid-img,
.ld-collagen-img,
.ld-heat-diagram-img {
  display: block;
  width: 90%;
  max-width: 450px;
  height: auto;
  margin: 0 auto;
  padding: 2.5% 1%;
}

.ld-img-medium {
  width: 80%;
}

.ld-img-small {
  width: 70%;
}

/* ─── 4. 細節修飾：段落專屬小備註與底部腳註 ─── */
/* 圖片下方緊跟著的微型說明文字 */
.ld-section-note {
  font-size: 8px;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.5px;
  margin: 30px auto 20px auto;
  text-align: center;
  max-width: 90%;
  font-family: 'Noto Sans TC';
}

/* 最底部的大合體備註區塊 */
.ld-popup-footnotes {
  padding: 10px 30px 35px 30px;
  text-align: left;
  background-color: #ffffff;
}

.ld-popup-footnotes p {
  font-size: 8px;
  font-weight: 500;
  line-height: 1.6;
  margin: 0 0 5px 0;
  letter-spacing: 0.5px;
  text-align: left;
  font-family: 'Noto Sans TC';
}

.ld-popup-footnotes p.tac {
  text-align: center;
}

/* 全站右上角小上標工具 */
.ld-sup {
  font-size: 0.35em;
  vertical-align: super;
  position: relative;
  top: -0.1em;
  font-weight: normal;
}

/* ─── 5. 極致 RWD 手機版字級、重疊比例同步調校 ─── */
@media (max-width: 480px) {
  .popup-wrapper {
    max-width: 400px;
    width: 70%;
  }
  .popup-close-btn {
    top: -10px;
    right: -10px;
  }
  .ld-popup-hero-title-box h2 {
    font-size: 20px;
  }

  .ld-popup-section-oils h3,
  .ld-popup-section-repair h3,
  .ld-popup-section-extracts h3,
  .ld-popup-section-wash h3,
  .ld-popup-section-collagen h3,
  .ld-popup-section-heat h3 {
    font-size: 18px;
  }

  .ld-popup-section-oils,
  .ld-popup-section-repair,
  .ld-popup-section-extracts,
  .ld-popup-section-wash,
  .ld-popup-section-collagen,
  .ld-popup-section-heat {
    padding: 30px 10px 15px;
  }

  .ld-popup-hero-title-box {
    padding: 50px 20px 20px 20px;
    margin-top: -65px;
    padding-top: 65px;
  }

  .ld-img-medium {
    width: 95%;
  }
  .ld-img-small {
    width: 90%;
  }
}

/* popArea pop區塊用CSS */
.popUpArea {
  text-align: center;
}
.popTitle {
  font-size: clamp(1.2rem, 2.5vw, 2.4rem);
  background-image: linear-gradient(
    to right,
    #eeeeef,
    var(--background-light-2),
    #eeeeef
  );
  margin-bottom: 2rem;
  padding: clamp(0.375rem, 0.1171rem + 1.0582vw, 0.625rem) 0;
  font-family: var(--main-font);
  font-weight: 700;
  letter-spacing: 4px;
}
.popUpArea {
  margin-bottom: clamp(3.125rem, -0.0992rem + 13.2275vw, 6.25rem);
}
.popUpArea h2 {
  margin: clamp(6.25rem, -0.1984rem + 26.455vw, 12.5rem) auto
    clamp(1.875rem, -0.0595rem + 7.9365vw, 3.75rem);

  /* font-size: clamp(1.875rem, -0.0595rem + 7.9365vw, 3.75rem); */
  font-size: clamp(1.5625rem, 0.5952rem + 3.9683vw, 2.5rem);
}

@media (min-width: 768px) {
  .popTitle {
    padding: clamp(0.625rem, 0rem + 1.3021vw, 1.5625rem) 0;
  }
  .popUpArea h2 {
    margin: clamp(12.5rem, 11.875rem + 1.3021vw, 13.4375rem) auto
      clamp(3.75rem, 1.875rem + 3.9063vw, 6.5625rem);

    font-size: 64px;
  }
  .popUpArea {
    margin-bottom: clamp(6.25rem, -0.8333rem + 14.7569vw, 16.875rem);
  }
}
/* @media (min-width: 1024px) {
  .popUpArea h2 {
    margin: 100px auto;
  }
} */
.popBox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .popBox {
    flex-direction: row;
  }
}

.popCard {
  display: flex;
  flex-direction: row;
  width: 100%;
  padding: 1rem;
  background-color: #fff;
  align-items: center;
  letter-spacing: 2px;
  row-gap: 2rem;
  column-gap: 1rem;
  border-radius: 12px;
}
@media (min-width: 1024px) {
  .popCard {
    flex-direction: column;
    letter-spacing: 3px;
    padding: 1.5rem;
    padding-bottom: clamp(2.5rem, 1.0714rem + 2.2321vw, 3.75rem);
  }
}

.popPic {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex: 1;
  position: relative;
  border-radius: 5%;
  margin-bottom: 0%;
}
.popPic img {
  position: absolute;
  width: 35%;
  right: -5%;
  bottom: -5%;
  filter: drop-shadow(8px 4px 5px rgba(0, 0, 0, 0.2));
}
@media (min-width: 1024px) {
  .popPic {
    width: 100%;
    margin-bottom: 65%;
  }
  .popPic img {
    position: absolute;
    width: 50%;
    right: 25%;
    top: 35%;
  }
}
.popText {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0 auto;
  text-wrap: pretty;
  width: 100%;
  font-family: var(--main-font);
  font-weight: 700;
  letter-spacing: 3px;
}
.popText > span:nth-child(1) {
  font-size: clamp(1.25rem, -0.0397rem + 5.291vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
}
.popText > span:nth-child(2) {
  font-size: clamp(0.875rem, 0.1657rem + 2.9101vw, 1.5625rem);
  margin-top: clamp(0.75rem, -0.0883rem + 3.4392vw, 1.5625rem);
  margin-bottom: clamp(0.75rem, -0.0883rem + 3.4392vw, 1.5625rem);

  line-height: 1.35;
  font-family: var(--body-font);
}
.popText button {
  background-color: #fff;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  padding: 8px 8px;
  border: 1.5px solid black;
  cursor: pointer;
  display: inline;
  margin: 0 auto;
  letter-spacing: 2px;
  width: 80%;
  font-weight: 700;
  font-family: var(--main-font);
  margin-top: auto;
  height: auto;
}
.popBox .popCard:nth-child(1) .popPic {
  background-image: url('../images/260610/images/PC/products_1/products_6.png');
}

.popBox .popCard:nth-child(2) .popPic {
  background-image: url('../images/260610/images/PC/products_1/products_7.png');
}

.popBox .popCard:nth-child(3) .popPic {
  background-image: url('../images/260610/images/PC/products_1/products_8.png');
}
.popText .view-more-btn {
  /* background-color: #fff; */
  font-size: clamp(0.8125rem, 0.0097rem + 3.2937vw, 1.590625rem);
  padding: 8px 8px;
  border: 1px solid black;
  cursor: pointer;
  margin: 0 auto;
  letter-spacing: 2px;
  width: 75%;
  font-weight: 700;
  font-family: var(--main-font);
  margin-top: auto;
  height: clamp(1.8875rem, 0.0109rem + 6.8783vw, 3.3125rem);
}
@media (min-width: 768px) {
  .popText .view-more-btn {
    height: clamp(3.3125rem, 3.8542rem + -1.1285vw, 2.5rem);
    font-size: clamp(1.590625rem, 1.511rem + 0.1658vw, 1.71rem);
  }
}
