/*!
 * kit-gallery-slider — admin-kit gallery 모듈의 프론트 슬라이더 스타일.
 * Swiper 6+ 기반. Swiper 자체는 사이트가 로드 (bundle 또는 CDN).
 *
 * 마크업(고정 클래스):
 *   <div class="kit-gallery-slider swiper">
 *     <div class="swiper-wrapper">
 *       <div class="swiper-slide"><img src="..."></div>
 *       ...
 *     </div>
 *     <div class="swiper-pagination"></div>
 *     <button class="kit-gallery-slider__btn kit-gallery-slider__btn--prev">…</button>
 *     <button class="kit-gallery-slider__btn kit-gallery-slider__btn--next">…</button>
 *   </div>
 *
 * 오버플로우 방지 규칙:
 *  - .kit-gallery-slider = width:100% + overflow:hidden + box-sizing:border-box
 *  - .swiper-slide       = flex-shrink:0 + width:100% + min-width:0 (flex 컨텍스트에서 컨텐츠가 튀어나오지 않도록)
 *  - img                 = max-width:100% + object-fit:contain (원본 비율 유지, 최대 크기 제한)
 *  - 사이트 CSS와 충돌 시에도 !important 로 layout 보호.
 */

.kit-gallery-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0 0 30px;
  border-radius: 6px;
  background: #f5f5f5;
}
.kit-gallery-slider *,
.kit-gallery-slider *::before,
.kit-gallery-slider *::after { box-sizing: border-box; }

/* Swiper wrapper — Swiper JS가 override 하지만 init 전 flash 방지 */
.kit-gallery-slider .swiper-wrapper {
  display: flex;
  width: 100%;
}
.kit-gallery-slider .swiper-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  min-width: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kit-gallery-slider .swiper-slide img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
}

/* 좌/우 화살표 버튼 */
.kit-gallery-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}
.kit-gallery-slider__btn:hover { background: rgba(22, 104, 255, 0.85); }
.kit-gallery-slider__btn:focus-visible { outline: 2px solid #1668FF; outline-offset: 2px; }
.kit-gallery-slider__btn svg { width: 20px; height: 20px; }
.kit-gallery-slider__btn--prev { left: 12px; }
.kit-gallery-slider__btn--next { right: 12px; }
.kit-gallery-slider__btn.swiper-button-disabled { opacity: 0.35; cursor: default; }

/* 페이지네이션 dot */
.kit-gallery-slider .swiper-pagination {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  line-height: 0;
}
.kit-gallery-slider .swiper-pagination-bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: #fff;
  opacity: 0.5;
  border-radius: 50%;
  cursor: pointer;
  transition: width 0.2s, opacity 0.2s, background 0.2s;
}
.kit-gallery-slider .swiper-pagination-bullet-active {
  opacity: 1;
  background: #1668FF;
  width: 22px;
  border-radius: 4px;
}

/* 모바일 */
@media (max-width: 640px) {
  .kit-gallery-slider__btn { width: 36px; height: 36px; }
  .kit-gallery-slider__btn svg { width: 16px; height: 16px; }
  .kit-gallery-slider__btn--prev { left: 8px; }
  .kit-gallery-slider__btn--next { right: 8px; }
  .kit-gallery-slider .swiper-slide img { max-height: 320px; }
}
