/* ====== الفئات (دوائر + أيقونة + بادج) ====== */
.categories {
  display: flex;
  gap: 12px;
  overflow-x: auto;       /* ✅ تمرير أفقي */
  padding-bottom: 8px;
  margin: 20px auto;
  scrollbar-width: thin;  /* ✅ ستايل السكروول (فايرفوكس) */
}

.categories::-webkit-scrollbar {
  height: 6px;
}

.categories::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.categories::-webkit-scrollbar-track {
  background: transparent;
}

.cat-item {
  text-align: center;
  width: 80px;
  flex-shrink: 0;   /* ✅ باش ما يصغروش */
  position: relative;
}

.cat-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: auto;
  cursor: pointer;
  padding: 3px;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.cat-img img {
  width: 40%;
  height: 40%;
  object-fit: contain;
  margin-bottom: 2px;
}

.cat-img:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #f26101;   /* برتقالي */
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 50%;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cat-label {
  font-size: 10px;
  font-weight: 500;
  color: #333;
  text-align: center;
  line-height: 1.2;
  margin-top: 4px;
  max-width: 90%;
  word-wrap: break-word;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .cat-item {
    width: 70px;
  }
  .cat-img {
    width: 60px;
    height: 60px;
  }
  .cat-label {
    font-size: 9px;
  }
  .badge {
    font-size: 9px;
    min-width: 18px;
    min-height: 18px;
  }
}

@media (max-width: 480px) {
  .categories {
    gap: 10px;
  }
  .cat-item {
    width: 65px;
  }
  .cat-img {
    width: 55px;
    height: 55px;
  }
  .cat-label {
    font-size: 8px;
  }
}
