* {
      box-sizing: border-box;
    }
    body {
      margin: 0;
      font-family: Arial, sans-serif;
      height: 2000px; /* for scroll demo */
       /* Enough space for fixed navbar + category bar */
    }

    /* Sticky Category Wrapper */
    #categorySticky {
      position: sticky;
      top: 50px; /* adjust if you have a fixed navbar */
      background-color: white;
      z-index: 1040;
      margin: 0px 0px;
    }

    /* Scrollable container */
    .category-scroll-wrapper {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      padding: 10px 0;
      scrollbar-width: none;
    }
    .category-scroll-wrapper::-webkit-scrollbar {
      display: none;
    }

    /* Category box styles */
    .category-box {
      display: flex;
      gap: 20px;
      padding: 15px 20px;
      background-color: white;
      border: 1px solid #ccc;
      border-radius: 15px;
      /* scroll-snap-type: x mandatory; */
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin: 0px 50px;
    }
    .category-box::-webkit-scrollbar {
      display: none;
    }

    /* Category item styles */
    .category-item {
      flex: 0 0 auto;
      min-width: 80px;
      text-align: center;
      font-weight: 500;
      color: #800080;
      scroll-snap-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-decoration: none;
      transition: transform 0.2s ease;
    }
    .category-item:hover {
      transform: scale(1.05);
      color: #4b0082;
    }

    .category-item:active .category-circle {
      background-color: #e0b3ff;
    }

    /* Active category style */
    .category-item.active {
      background-color: #f3d9ff;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(128, 0, 128, 0.2);
      padding: 5px;
    }
    .category-item.active .category-circle {
      background-color: #d1a8ff;
    }

    /* Icon circle */
    .category-circle {
      width: 60px;
      height: 60px;
      background-color: #f3d9ff;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 8px;
    }
    .category-icon {
      width: 45px;
      height: auto;
      margin: 5px;
    }

    /* Phones: show 4 items with horizontal scroll */
    @media (max-width: 575.98px) {
      .category-item {
        min-width: 25%;
      }
      #categorySticky {
      position: sticky;
      top: 80px; /* adjust if you have a fixed navbar */
      background-color: white;
      z-index: 1040;
      margin: 0px 10px;
    }
    .category-box {
      margin: 0px 10px;
    }
    }
    

    /* Tablets: vertical stacking */
    @media (min-width: 576px) and (max-width: 991.98px) {
      .category-box {
        flex-direction: column;
        overflow-x: visible;
        scroll-snap-type: none;
      }
      .category-item {
        width: 100%;
        min-width: unset;
        scroll-snap-align: none;
      }
      #categorySticky {
      position: sticky;
      top: 80px; /* adjust if you have a fixed navbar */
      background-color: white;
      z-index: 1040;
      margin: 0px 10px;
    }
    }

    /* Desktops: grid layout */
    @media (min-width: 992px) {
      .category-box {
        flex-wrap: wrap;
        justify-content: space-between;
        overflow-x: visible;
        gap: 10px;
        scroll-snap-type: none;
      }
      .category-item {
        flex: 1 0 11%;
        min-width: 100px;
        scroll-snap-align: none;
      }
    }