/* ===== Section ===== */
.categories-section {
  padding: 60px 0;
}

/* ===== Container ===== */
.categories-section .container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

.categories-wrapper {
  margin-top: 40px;
}

/* ===== Grid ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===== Card ===== */
.category-card {
  position: relative;
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between; 
  text-decoration: none;
  z-index: 1;
  height: 220px; 
}

/* ===== Background Shape ===== */
.bg-shape {
  position: absolute;
  top: 15%;
  left: 23%;
  width: 55%;
  height: 112px;
  background: var(--background);
  z-index: -1;
  transition: all 0.5s ease-in-out;
}

.category-card:hover .bg-shape {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===== Image ===== */
.category-image {
  height: 176px;
  width: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

/* ===== Title ===== */
.category-title {
  margin-top: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  color: var(--color);
}

@media (min-width: 768px) {
  .category-title {
    font-size: 18px;
  }
}

/* ===== Dark Mode ===== */
body.dark .bg-shape,
html.dark .bg-shape,
[data-theme="dark"] .bg-shape {
  background: var(--background-dark);
}

body.dark .category-title,
html.dark .category-title,
[data-theme="dark"] .category-title {
  color: var(--color-dark);
}

/* ===== Swiper ===== */
.categories-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  overflow: hidden !important;
}
@media (max-width: 480px) {
    .category-card {
        height: 200px;
        padding: 10px;
    }

    .category-title {
        font-size: 14px;
    }

    .bg-shape {
        height: 100px;
    }
}