/* ==========================================================
   Featured Category
========================================================== */

.shopcore-featured-category {
  width: 100%;
  padding: 28px 0 20px 0;
  background: #fff;
}

/* ==========================================================
   Section Heading
========================================================== */

.shopcore-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.shopcore-section-heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.shopcore-section-heading h2 span {
  color: #111;
}

.shopcore-section-heading h2 strong {
  color: #ff1f1f;
  font-weight: 700;
}

/* ==========================================================
   Category Grid
========================================================== */

.shopcore-category-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

/* ==========================================================
   Category Card
========================================================== */

.shopcore-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 10px;
  background: #e8edf5;
  border-radius: 5px;
  text-align: center;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  overflow: hidden;
}

.shopcore-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   Category Image
========================================================== */

.shopcore-category-image {
  width: 100%;
  height: 145px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shopcore-category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ==========================================================
   Category Name
========================================================== */

.shopcore-category-card h3 {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #111;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* ==========================================================
   Tablet
========================================================== */

@media (max-width: 1199px) {
  .shopcore-featured-category {
    padding: 22px 0 16px 0;
  }

  .shopcore-section-heading {
    margin-bottom: 16px;
  }

  .shopcore-section-heading h2 {
    font-size: 20px;
  }

  .shopcore-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  /* Show maximum 12 items on tablet (3 complete rows of 4) */
  .shopcore-category-card:nth-child(n + 13) {
    display: none;
  }
}

/* ==========================================================
   Mobile
========================================================== */

@media (max-width: 767px) {
  .shopcore-featured-category {
    padding: 16px 0 12px 0;
  }

  .shopcore-section-heading {
    margin-bottom: 12px;
  }

  .shopcore-section-heading h2 {
    font-size: 16px;
  }

  .shopcore-explore-button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .shopcore-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  /* Show maximum 8 items on mobile (2 complete rows of 4) */
  .shopcore-category-card:nth-child(n + 9) {
    display: none;
  }

  .shopcore-category-card {
    padding: 8px 6px;
  }

  .shopcore-category-image {
    height: 105px;
  }

  .shopcore-category-card h3 {
    font-size: 11px;
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  .shopcore-category-grid {
    gap: 6px;
  }

  .shopcore-category-card {
    padding: 6px 4px;
    border-radius: 4px;
  }

  .shopcore-category-image {
    height: 85px;
  }

  .shopcore-category-card h3 {
    font-size: 10.5px;
  }
}

