/* ===== Gallery block (jg-*) ===== */
.wrap{ width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.section{ padding: 44px 0; position: relative; }

.fantasy-block{
  border-radius: 28px;
  background:
    radial-gradient(900px 360px at 20% 10%, rgba(255,90,214,.14), transparent 60%),
    radial-gradient(700px 420px at 90% 15%, rgba(0,229,255,.12), transparent 58%),
    radial-gradient(800px 460px at 40% 95%, rgba(255,154,60,.12), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.70));
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 22px 80px rgba(10,10,30,.16);
  padding: 28px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(8px);
}

.sec-title{ display:flex; align-items:flex-end; gap:12px; margin-bottom: 16px; user-select:none; }
.sec-title h2{ margin:0; font-family:"Cinzel", serif; letter-spacing:.5px; font-size: 30px; line-height: 1; }
.sec-title .spark{ font-size: 18px; opacity:.9; transform: translateY(-2px); }
.sec-sub{ margin:0 0 22px 0; color: rgba(20,20,40,.70); font-size: 14px; }

.jg-gallery{ display:grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.jg-card{
  grid-column: span 4;
  position: relative;
  border-radius: 22px;
  overflow:hidden;
  background: #000;
  box-shadow: 0 14px 40px rgba(10,10,30,.10);
  border: 1px solid rgba(255,255,255,.55);
  cursor:pointer;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  min-height: 190px;
}
.jg-card:hover{ transform: translateY(-4px) scale(1.01); box-shadow: 0 18px 60px rgba(10,10,30,.18); filter: saturate(1.08); }
.jg-card img{ width:100%; height: 260px; object-fit: cover; transform: scale(1.03); }

.jg-card::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.02) 0%, rgba(0,0,0,.08) 35%, rgba(0,0,0,.88) 100%);
  pointer-events:none;
}

.jg-info{
  position:absolute;
  left: 14px; right: 14px; bottom: 12px;
  z-index:2;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 14px;
  padding: 10px 10px;
  border-radius: 18px;
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0,0,0,.28);
}

.jg-name .th{ font-size: 20px; font-weight: 1000; color:#fff; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 10px 26px rgba(0,0,0,.55); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height: 1.15; }
.jg-name .en{ font-size: 12px; font-weight: 800; color: rgba(255,255,255,.90); text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 10px 22px rgba(0,0,0,.50); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.jg-price{
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 14px;
  color: rgba(255,255,255,.98);
  font-weight: 1000;
  font-size: 13px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 38px rgba(0,0,0,.30);
  text-align:right;
  line-height:1.15;
}
.jg-price small{ display:block; font-weight: 800; font-size: 11px; opacity: .92; margin-top: 2px; }

/* Lightbox */
.jg-lightbox{
  position: fixed; inset: 0;
  display:none;
  z-index: 9999;
  background:
    radial-gradient(900px 600px at 15% 15%, rgba(255,47,179,.18), transparent 60%),
    radial-gradient(900px 600px at 85% 25%, rgba(0,229,255,.15), transparent 62%),
    radial-gradient(1100px 700px at 50% 100%, rgba(122,44,255,.18), transparent 66%),
    rgba(7, 8, 14, .72);
  backdrop-filter: blur(12px);
}
.jg-lightbox.open{ display:block; }

.jg-lb-wrap{
  width: min(1120px, calc(100% - 20px));
  margin: 18px auto;
  height: calc(100% - 36px);
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.jg-lb-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  color:#fff;
  padding: 10px 8px;
  user-select:none;
}
.jg-lb-brand{ display:flex; align-items:center; gap:10px; font-weight:900; }
.jg-lb-dot{ width:10px; height:10px; border-radius:50%; background: linear-gradient(90deg, var(--pink), var(--cyan)); box-shadow: 0 0 18px rgba(255,47,179,.45); }
.jg-lb-actions{ display:flex; gap:8px; align-items:center; }

.jg-btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.10);
  color:#fff;
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
  backdrop-filter: blur(10px);
}
.jg-btn:hover{ background: rgba(255,255,255,.16); transform: translateY(-1px); }
.jg-btn.close{ background: rgba(255,90,214,.16); border-color: rgba(255,90,214,.28); }

.jg-stage{
  position: relative;
  flex: 1;
  border-radius: 26px;
  overflow:hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.25);
}
.jg-stage img{ width:100%; height:100%; object-fit:cover; display:block; transform: scale(1.01); user-select:none; -webkit-user-drag:none; }

.jg-stage::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.10), transparent 35%),
    linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.18) 38%, rgba(0,0,0,.78) 100%);
  pointer-events:none;
  z-index:1;
}
.jg-caption{
  position:absolute;
  left:18px; right:18px; bottom:16px;
  z-index:2;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
}
.jg-cap-title{ margin:0; font-size:26px; font-weight:1000; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.jg-cap-sub{ margin:6px 0 0; font-size:13px; color: rgba(255,255,255,.86); font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.jg-cap-price{
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.36);
  border: 1px solid rgba(255,255,255,.18);
  color:#fff;
  font-weight:900;
  text-align:right;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  flex: 0 0 auto;
}
.jg-cap-price span{ display:block; font-size:16px; }
.jg-cap-price small{ display:block; font-size:12px; opacity:.88; margin-top:2px; font-weight:800; }

.jg-nav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  z-index:3;
  width:44px; height:44px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease;
  user-select:none;
}
.jg-nav:hover{ background: rgba(255,255,255,.18); transform: translateY(-50%) scale(1.03); }
.jg-nav.prev{ left:14px; } .jg-nav.next{ right:14px; }
.jg-nav svg{ width:22px; height:22px; fill: rgba(255,255,255,.95); filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }

.jg-thumbs{ display:flex; gap:10px; padding:10px 6px 4px; overflow:auto; }
.jg-thumb{
  flex:0 0 auto;
  width:96px; height:62px;
  border-radius:16px;
  overflow:hidden;
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  opacity:.78;
  transition: opacity .18s ease, transform .18s ease, outline .18s ease;
}
.jg-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.jg-thumb.active{ opacity:1; transform: translateY(-2px); outline:2px solid rgba(255,90,214,.55); outline-offset:2px; }

@media (max-width:980px){
  .jg-card{ grid-column: span 6; }
  .jg-card img{ height:230px; }
  .jg-cap-title{ font-size:22px; }
}
@media (max-width:640px){
  .fantasy-block{ padding:18px; }
  .jg-card{ grid-column: span 12; }
  .jg-card img{ height:240px; }
  .jg-name .th{ font-size:18px; }
  .jg-nav{ display:none; }
  .jg-thumb{ width:84px; height:58px; }
}

/* ===== FIX: gallery image too dark ===== */

/* 1) กันตัวรูปโดน filter/opacity จากพ่อแม่ */
#jgStage img,
#jgStage video{
  filter: none !important;
  opacity: 1 !important;
}

/* 2) ปิด overlay มืดที่มักทับบน stage */
#jgStage::before,
#jgStage::after,
.jg-stage::before,
.jg-stage::after{
  content: none !important;
  display: none !important;
}

/* 3) ถ้ามีเลเยอร์ overlay ชื่อพวกนี้ ให้ทำโปร่งใส */
.jg-overlay,
.jg-vignette,
.stageOverlay{
  opacity: 0 !important;
  background: transparent !important;
}

/* 4) ถ้าคุณอยากคงความ “คม” แต่ไม่มืด ให้ใช้เงาเบาๆแทน */
#jgStage{
  background: transparent !important;
}

#jgStage img{ filter: brightness(1.08) contrast(1.02) !important; }