/* =========================================================
   KT12 Category Sections (Swiper version)
   - Keep your existing look
   - Make Swiper behave perfectly (no clipping / no weird widths)
   ========================================================= */

/* Base wrapper */
.kt12-category-sections-wrapper{
  position: relative;
  width: 100%;
  background:#eef3fb;
  padding: 26px 56px;
  border-radius: 18px;
}

/* Default (non-slider) grid */
.kt12-category-sections-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

/* Tile */
.kt12-category-section-tile{
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  min-height: 320px;
  text-decoration: none;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: none;
  transform: none;
  transition: transform .18s ease;
}

.kt12-category-section-tile:hover{
  transform: translateY(-2px);
}

.kt12-category-section-tile::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.18) 28%,
    rgba(0,0,0,0) 55%
  );
  pointer-events:none;
  z-index: 1; /* ✅ add */
}

.kt12-category-section-inner{
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  z-index: 2; /* ✅ add */
}

.kt12-category-section-title{
  position:absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3; /* ✅ (optional but recommended) */
}


.kt12-category-section-title{
  position:absolute;
  left: 18px;
  bottom: 16px;
  background: transparent;
  padding: 0;
  color:#fff;
  font-size: 1.05rem;
  font-weight: 600;
  text-align:left;
  border-radius: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  z-index: 2;
}

/* ---------------------------------------------------------
   Swiper-specific styling (ONLY when slider is enabled)
   --------------------------------------------------------- */

/* Ensure Swiper clips properly and doesn't get chopped weirdly */
.kt12-slider-enabled .kt12-cs-swiper-instance{
  overflow: hidden;
}

/* Swiper wrapper should not add unexpected overflow */
.kt12-slider-enabled .kt12-cs-swiper-instance .swiper-wrapper{
  align-items: stretch;
}

/* Each slide should behave like a normal block */
.kt12-slider-enabled .kt12-cs-swiper-instance .swiper-slide{
  height: auto;
}

/* Tile fills the slide */
.kt12-slider-enabled .kt12-cs-swiper-instance .swiper-slide .kt12-category-section-tile{
  width: 100%;
}

/* Arrows */
.kt12-slider-enabled .kt12-slider-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;
  background:#fff;
  color:#111;
  border-radius:50%;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.kt12-slider-enabled .kt12-slider-prev{ left: 14px; }
.kt12-slider-enabled .kt12-slider-next{ right: 14px; }

.kt12-slider-enabled .kt12-slider-arrow:hover{
  background:#fff;
  color:#111;
  transform: translateY(-50%) scale(1.04);
}

/* Dots (Swiper will generate bullets using these classes) */
.kt12-slider-dots{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:14px;
}

.kt12-slider-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  border:0;
  padding:0;
  cursor:pointer;
  opacity:.35;
}

.kt12-slider-dot.is-active{
  opacity:1;
  transform:scale(1.25);
}

/* Optional disabled arrows (Swiper may apply disabled state) */
.kt12-slider-enabled .kt12-slider-arrow:disabled,
.kt12-slider-enabled .kt12-slider-arrow.swiper-button-disabled{
  opacity:.35;
  cursor:not-allowed;
}

/* Responsive tweaks */
@media (max-width: 900px){
  .kt12-category-sections-wrapper{ padding: 18px 18px; }
  .kt12-category-section-tile{ min-height: 240px; }
}

@media (max-width: 600px){
  .kt12-category-section-tile{ min-height: 200px; }
  .kt12-category-section-title{ font-size: 1rem; }
}
