/* =====================================================
   CATEGORY TITLE
   ===================================================== */
.categories-title {
  text-align: left;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding: 20px 0;
  margin-bottom: 40px;
}

.categories-title::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(135deg, #764ba2, #667eea);
  border-radius: 2px;
  box-shadow: 0 1px 6px rgba(102,126,234,0.3);
}

.categories-title::after {
  content: '✦';
  position: absolute;
  bottom: -15px;
  right: 0;
  font-size: 1rem;
  color: #764ba2;
  animation: sparkle 2s infinite ease-in-out;
}

/* =====================================================
   CATEGORY ROW BASE
   ===================================================== */
.category-row-wrapper {
  position: relative;
}

.category-row {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 0 25px; /* Added padding so image doesn't get cut at the bottom */
  scrollbar-width: none;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category-item {
  text-align: center;
  text-decoration: none;
  color: #222;
  flex-shrink: 0;
  outline: none; /* Removes focus lines */
  border: none;  /* Removes accidental borders */
}

/* =====================================================
   CATEGORY HEART + IMAGE POP-OUT
   ===================================================== */
.category-circle {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  position: relative;
  overflow: visible; /* Allows image to hang outside */
  background: transparent !important; /* Forces no background/line on container */
  border: none !important;
  outline: none !important;
}

/* The Heart Shape Background */
.category-circle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #e6edf5;
  /* Standard Heart Path */
  clip-path: path('M50,15 C35,0 0,15 0,50 C0,85 50,100 50,100 C50,100 100,85 100,50 C100,15 65,0 50,15 Z');
  z-index: 1;
  border: none;
}

.category-circle img {
  position: absolute;
  width: 84px;
  bottom: -12px; /* Pulls image outside the heart */
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.25s ease;
  z-index: 2;
  border: none;
  outline: none;
}

/* Ensure NO lines appear on hover */
.category-item:hover .category-circle,
.category-item:hover .category-circle::before {
  border: none !important;
  outline: none !important;
  box-shadow: none; 
}

.category-item:hover img {
  transform: translateX(-50%) scale(1.1);
}

.category-label {
  margin-top: 18px; /* Room for the outer image */
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}
/* Optional: Add a cute heart icon next to label on hover */
.category-item:hover .category-label::after {
  content: ' ❤️';
  font-size: 12px;
  opacity: 0.8;
}

/* =====================================================
   DESKTOP (≥1200px)
   ===================================================== */
@media (min-width: 1200px) {
  .category-row {
    gap: 10px !important;
  }

  .category-item {
    flex: 0 0 calc((100% - (8 * 10px)) / 9);
    max-width: calc((100% - (8 * 10px)) / 9);
  }

  .category-circle {
    width: 90px;
    height: 90px;
  }

  .category-circle::before {
    clip-path: path('M45,13.5 C31.5,0 0,13.5 0,45 C0,76.5 45,90 45,90 C45,90 90,76.5 90,45 C90,13.5 58.5,0 45,13.5 Z');
  }
}

/* =====================================================
   MOBILE (≤576px)
   ===================================================== */
@media (max-width: 576px) {
  .category-item {
    flex: 0 0 calc(100% / 4);
    max-width: calc(100% / 4);
  }

  .category-circle {
    width: 70px;
    height: 70px;
  }

  .category-circle::before {
    clip-path: path('M35,10.5 C24.5,0 0,10.5 0,35 C0,59.5 35,70 35,70 C35,70 70,59.5 70,35 C70,10.5 45.5,0 35,10.5 Z');
  }

  .category-circle img {
    width: 65px;
    bottom: -8px;
  }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes sparkle {
  0%,100% { transform: scale(1) rotate(0); opacity: 0.7; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
}