/* ===== Lightbox (ช่องลอย) ===== */
.ic-modal {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.88);
  z-index: 100000;
}
.ic-modal.ic-open { display: flex; }

.ic-stage {
  position: relative; max-width: 92vw; max-height: 92vh; overflow: hidden;
  cursor: grab; border-radius: 12px;
}
.ic-stage:active { cursor: grabbing; }

.ic-zoom-img {
  display: block; user-select: none;
  transform-origin: center center; will-change: transform;
  max-width: 92vw; max-height: 92vh;
}

.ic-modal .ic-toolbar { position: fixed; top: 12px; right: 12px; display: flex; gap: 8px; z-index: 2; }

.ic-modal .ic-btn{
  background: rgba(255,255,255,.12); color:#fff;
  border:0; cursor:pointer; border-radius:10px;
  padding:8px 10px; font-weight:700;
}
.ic-modal .ic-btn:hover{ background: rgba(255,255,255,.2); }

.ic-modal .ic-arrow{
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border:0; color:#fff;
  width:44px; height:44px; border-radius:999px; cursor:pointer; font-size:20px;
}
.ic-modal .ic-arrow.left{ left:16px; }
.ic-modal .ic-arrow.right{ right:16px; }
.ic-modal .ic-arrow:hover{ background: rgba(255,255,255,.2); }

body.ic-no-scroll { overflow: hidden; }

/* ===== Inline zoom (ซูมจากหน้าโดยไม่เปิดช่องลอย) ===== */
.ic-inline-zoom-wrap {
  position: relative;
  overflow: hidden;
  display: block;
  /* ปล่อย gesture ให้เรา control เอง */
  touch-action: none;
}
.ic-inline-zoom-wrap.zoomed { cursor: move; }
.ic-inline-zoom-wrap img.ic-inline-zoom-img {
  display: block; max-width: 100%;
  transform-origin: center center;
  will-change: transform;
  transition: transform .15s ease;
}
