.pc-cat-section {
  direction: rtl;
  padding: 0 10px;
  width: 100%;
  box-sizing: border-box;
}

.pc-cat-title {
  position: relative;
  z-index: 0;
  width: fit-content;
  margin: 0 auto;
  padding: 0 6px;
  font-family: "Pofak", sans-serif;
  font-size: var(--pc-title-size);
  font-weight: 500;
  line-height: 1.6;
  color: var(--pc-primary);
  text-align: center;
}

.pc-cat-title::before {
  content: "";
  position: absolute;
  inset: 40% -5px 2px -5px;
  z-index: -1;
  background-color: var(--pc-primary-soft);
  border-radius: 10px;
  pointer-events: none;
}

.pc-cat-scroll {
  width: 100%;
  scroll-padding-inline-start: 10px;
}

.pc-cat-list {
  list-style: none;
  margin: 0 auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  width: 100%;
}

.pc-cat-item {
  width: calc(25% - 15px);
  min-width: 300px;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-margin-inline-start: 10px;
  margin: 0;
}

.pc-cat-item:first-child {
  margin-right: 10px;
}

.pc-cat-item:last-child {
  margin-left: 10px;
}

.pc-cat-link {
  display: block;
  text-decoration: none;
  filter: drop-shadow(0 0px 0px #ffb8df);
  transition:
    filter 0.25s ease,
    transform 0.25s ease;
}

.pc-cat-link:hover,
.pc-cat-link:focus-visible {
  filter: drop-shadow(0 4px 5px #ffb8df);
  transform: translateY(-2px);
  outline: none;
}

.pc-cat-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 16px;
}

@media (max-width: 1024px) {
  .pc-cat-section {
    padding: 40px 0;
  }

  .pc-cat-scroll {
    overflow-x: scroll;
    overflow-y: visible;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-padding-inline-start: 10px;
    -ms-overflow-style: none;
    box-sizing: border-box;
  }

  .pc-cat-scroll::-webkit-scrollbar {
    display: none;
  }

  .pc-cat-list {
    margin: 0;
    padding: 0;
    max-width: none;
    justify-content: flex-start;
    gap: 10px;
  }

  .pc-cat-item {
    width: calc(35% - 8px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-cat-link {
    transition: none;
  }
}
