/* ===============================
   CLEAN MODERN CATEGORY DESIGN
   Only rounded-square container
================================= */

:root {
  --ec-text: #111827;
  --ec-muted: #6b7280;
  --ec-border: rgba(0, 0, 0, 0.06);
  --ec-bg-soft: #f4f6fb;
  --ec-bg-soft-2: #e9edf5;
}

/* ===============================
   Slider Wrapper
================================= */

#main_categs_section .swiper-wrapper {
  overflow-y: auto;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

/* ===============================
   Horizontal Slider
================================= */

.ec_cat_slider {
  display: grid !important;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 16px;

  overflow-x: auto;
  overflow-y: hidden;

  padding: 12px 8px;

  scroll-snap-type: x mandatory;
}

.ec_cat_slider .categ-item {
  width: 130px;
  scroll-snap-align: start;
}

/* Hide scrollbar mobile */
@media (max-width: 768px) {
  .ec_cat_slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .ec_cat_slider::-webkit-scrollbar {
    display: none;
  }
}

/* ===============================
   Grid Layout
================================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
  margin: 0 auto;
  max-width: 1100px;
}

/* ===============================
   Remove Outer Card Completely
================================= */

.category-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: center;
  cursor: pointer;
}

.category-item::before,
.category-item::after {
  display: none !important;
}

/* ===============================
   ONLY Visible Container
   Rounded Square Modern Box
================================= */

.ec-card-image-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px !important;

  background: linear-gradient(145deg, var(--ec-bg-soft), var(--ec-bg-soft-2));
  border: 1px solid var(--ec-border);

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.07),
    inset 0 3px 6px rgba(255, 255, 255, 0.7);

  transition: all 0.25s ease;
}

/* Hover Effect */
.category-item:hover .ec-card-image-wrap {
  transform: translateY(-6px) scale(1.04);

  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.15),
    inset 0 3px 6px rgba(255, 255, 255, 0.7);
}

/* ===============================
   Icon Inside
================================= */

.category-item img {
  width: 65px;
  height: 65px;
  object-fit: contain;

  border-radius: 10px !important;

  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;

  transition: transform 0.2s ease;
}

.category-item:hover img {
  transform: scale(1.05);
}

/* ===============================
   Title
================================= */

.category-item h6 {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ec-text);

  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

/* ===============================
   Responsive
================================= */

@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .ec-card-image-wrap {
    width: 100px;
    height: 100px;
    border-radius: 10px !important;
  }

  .category-item img {
    width: 55px;
    height: 55px;
  }

  .category-item h6 {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  #main_categs_section .swiper-wrapper {
    overflow-y: visible;
  }

  .ec_cat_slider {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 0;
  }

  .ec_cat_slider .categ-item {
    width: auto;
    min-width: 130px;
    flex: 1 1 0;
  }

  .ec-card-image-wrap {
    width: 130px;
    height: 130px;
  }

  .category-item img {
    width: 70px;
    height: 70px;
  }
}
