/* v114 – price popup responsive / centered / scrollable (Cafe24) */
#m2PricePopup{display:none;position:fixed;inset:0;z-index:99999;font-family:inherit}
#m2PricePopup.open{display:block}
#m2PricePopup .m2-price-popup__overlay{position:absolute;inset:0;background:rgba(0,0,0,.65)}

#m2PricePopup .m2-price-popup__panel{
  position:relative;
  width:92vw;
  max-width:1200px;
  height:88vh;
  margin:6vh auto;
  background:#0b1020;
  border-radius:14px;
  padding:14px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:10px;
}

#m2PricePopup .m2-price-popup__close{
  position:absolute;
  top:10px;
  right:10px;
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(2,6,23,.9);
  color:#fff;
  font-size:22px;
  line-height:36px;
  cursor:pointer;
}

#m2PricePopup #m2PricePopupTitle{
  margin:0;
  padding:4px 44px 0 6px;
  font-size:18px;
  font-weight:700;
  color:#fff;
  letter-spacing:-.2px;
}

#m2PricePopup .m2-price-popup__zoombar{
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 6px;
}

#m2PricePopup .m2-price-popup__zoombar .m2z{
  padding:6px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(2,6,23,.9);
  color:#fff;
  cursor:pointer;
  font-size:13px;
}

#m2PricePopup .m2-price-popup__zoombar .m2z-val{
  margin-left:auto;
  padding-right:6px;
  color:rgba(255,255,255,.8);
  font-size:13px;
}

/* VIEWER: remove left blank space, true center */
#m2PricePopup .m2-price-popup__viewer{
  flex:1;
  min-height:0;
  overflow:auto;
  background:rgba(2,6,23,.6);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:14px;
  box-sizing:border-box;
  display:flex;
  justify-content:center;   /* center horizontally */
  align-items:flex-start;
}

#m2PricePopup .m2-price-popup__content{
  width:fit-content;
  max-width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;       /* center images */
  gap:14px;
  margin:0 auto;
  transform-origin:top center; /* important for zoom center */
}

#m2PricePopup .m2-price-popup__content img{
  width:100%;
  max-width:900px;          /* unified width */
  height:auto;
  display:block;
  border-radius:10px;
  background:#fff;
}

/* Mobile full screen */
@media (max-width:640px){
  #m2PricePopup .m2-price-popup__panel{
    width:100vw;
    height:100vh;
    max-width:100%;
    margin:0;
    border-radius:0;
    padding:12px;
  }
  #m2PricePopup #m2PricePopupTitle{font-size:15px}
  #m2PricePopup .m2-price-popup__viewer{padding:10px;border-radius:10px}
  #m2PricePopup .m2-price-popup__content img{max-width:100%}
}


/* === popup frame-fit + inner scroll === */
.popup-overlay{position:fixed;inset:0;background:rgba(0,0,0,.7);display:flex;justify-content:center;align-items:center;z-index:9999}
.popup-modal{width:100%;max-width:1200px;height:90vh;background:#0b1220;border-radius:12px;display:flex;flex-direction:column;overflow:hidden}
.popup-header,.popup-footer{flex-shrink:0}
.popup-body{flex:1;overflow-y:auto;overflow-x:hidden;display:flex;justify-content:center;padding:16px}
.price-img-wrap{width:100%;max-width:900px;margin:0 auto}
.price-img-wrap img{width:100%;height:auto;display:block}
@media(max-width:768px){
 .popup-modal{height:100vh;border-radius:0}
 .popup-body{padding:10px}
}


/* === FINAL popup fixes === */

/* footer text visibility */
.popup-footer,
.popup-footer *{
  color:#ffffff !important;
}

/* hide install-area text */
.popup-footer .install-area,
.popup-footer .install-text,
.popup-footer .region,
.popup-footer .install{
  display:none !important;
}

/* image should fit one screen, not overflow */
.popup-body{
  display:flex !important;
  align-items:center !important;
}

.price-img-wrap{
  max-width:100% !important;
  max-height:100% !important;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
}

.price-img-wrap img{
  max-width:100% !important;
  max-height:100% !important;
  width:auto !important;
  height:auto !important;
  object-fit:contain !important;
}

/* === FIX 2026-01 (popup footer visibility + single-image fit) === */
#m2PricePopup .m2-price-popup__footer{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:10px 6px 0;
}
#m2PricePopup .m2-price-popup__note{
  margin:0;
  font-size:14px;
  line-height:1.45;
  color:#FFD400; /* visible on dark bg */
}
#m2PricePopup .m2-price-popup__actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
#m2PricePopup .m2-price-popup__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  border:1px solid rgba(255,255,255,.18);
}
#m2PricePopup .m2-price-popup__btn--primary{
  background:#FFD400;
  color:#0b1020;
  border-color:rgba(255,212,0,.6);
}
#m2PricePopup .m2-price-popup__btn--primary:hover{
  filter:brightness(0.95);
}
#m2PricePopup .m2-price-popup__btn--ghost{
  background:transparent;
  color:#FFD400;
  border-color:rgba(255,212,0,.45);
}

/* one image fits in the visible viewer area; next images scroll */
#m2PricePopup .m2-price-popup__viewer{
  scroll-behavior:smooth;
}
#m2PricePopup .m2-price-popup__content{
  width:100%;
}
#m2PricePopup .m2-price-popup__content img{
  width:100%;
  max-width:none;
  height:auto;
  max-height:calc(100vh - 260px); /* panel(88vh)+margins 고려 여유값 */
  object-fit:contain;
  margin:0 auto 14px;
}


/* mobile initial scale 80% */
@media (max-width: 768px){
  .price-popup-content{
    transform: scale(0.8);
    transform-origin: top center;
  }
}

/* === mobile full image swipe === */
@media (max-width:768px){
  .price-slider{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;}
  .price-slide{flex:0 0 100%;scroll-snap-align:start;}
  .price-slide img{width:100vw;height:auto;max-height:90vh;object-fit:contain;}
  .price-dots{text-align:center;margin-top:10px;}
  .price-dots span{display:inline-block;width:8px;height:8px;border-radius:50%;background:#555;margin:0 4px;}
  .price-dots span.active{background:#FFD400;}
}

@media (max-width:768px){
  .m2-price-popup,
  .m2-price-popup__content,
  .m2-price-popup__viewer{
    width:100vw!important;
    max-width:100vw!important;
  }
  .m2-price-popup__viewer img{
    width:100vw!important;
    max-height:90vh!important;
    object-fit:contain;
  }
}


/* v132 FORCE VERTICAL SCROLL ON MOBILE */
@media (max-width:768px){
  .m2-price-popup__content{
    overflow-x:hidden !important;
    overflow-y:auto !important;
  }
  .m2-price-popup__content img{
    display:block;
    margin:0 auto 16px;
  }
}


/* v133 HARD VERTICAL ONLY + CENTER */
@media (max-width:768px){
  .m2-price-popup__content{
    overflow-x:hidden !important;
    overflow-y:auto !important;
    display:block !important;
  }
  .m2-price-popup__content img{
    display:block !important;
    margin:0 auto 24px auto !important;
    max-width:100% !important;
    height:auto !important;
  }
}

/* v137 REMOVE ZOOM CONTROLS (V133 BASE) */
@media (max-width:768px){
  .m2z-controls,
  .m2z-plus,
  .m2z-minus,
  .m2z-fit,
  .m2z-val{
    display:none !important;
  }
}
