/* =========================
   RESET (กัน Elementor แทรก)
========================= */
.lv-gallery-grid,
.lv-gallery-grid * {
  box-sizing: border-box;
}

/* =========================
   FIX Elementor Flex (สำคัญมาก)
========================= */
.lv-tab-content,
.lv-tab-content.active {
  display: block !important;
  width: 100%;
}

/* กัน parent flex มายุ่ง */
.lv-tab-content .lv-gallery-grid {
  display: block !important;
}

/* =========================
   Tabs
========================= */
.lv-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid #ddd;
}

.lv-tab {
  padding: 8px 16px;
  cursor: pointer;
  background: #eee;
  border-radius: 4px;
  color: #555;
  font-size: 14px;
  transition: 0.2s;
}

.lv-tab:hover {
  background: #ddd;
}

.lv-tab.active {
  background: #000;
  color: #fff;
}

/* =========================
   Masonry Grid
========================= */
.lv-gallery-grid {
  position: relative;
  width: 100% !important;
  min-width: 1px;
}

/* column base */
.lv-sizer {
  width: 33.333%;
}

/* item */
.lv-item {
  width: 33.333%;
  position: absolute !important;
  margin-bottom: 20px;
  overflow: hidden;
}

/* =========================
   Image
========================= */
.lv-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* =========================
   Video
========================= */
.lv-video {
  position: relative;
  cursor: pointer;
}

.lv-video img {
  width: 100%;
  display: block;
}

/* play button */
.lv-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  color: #fff;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  padding: 10px 14px;
  pointer-events: none;
}

/* =========================
   Caption
========================= */
.lv-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 14px;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  transform: translateY(100%);
  transition: 0.3s;
}

.lv-item:hover .lv-caption {
  transform: translateY(0);
}

/* =========================
   Responsive
========================= */
@media (max-width: 1024px) {
  .lv-sizer,
  .lv-item {
    width: 50%;
  }
}

@media (max-width: 600px) {
  .lv-sizer,
  .lv-item {
    width: 100%;
  }
}

/* =========================
   Debug Helper (optional)
========================= */
/*
.lv-item {
  outline: 1px solid red;
}
*/