.categorical-section {
  background-color: black;
  padding: 40px 0;
  margin: 60px 0;
}

/* --- Scrollable container --- */
.categorical-scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding: 0rem 3rem;
  margin-top: -120px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.categorical-link {
  text-decoration: none;
  color: inherit;
  display: block;      /* Makes whole box clickable */
}
.categorical-card-wrap {
  cursor: pointer;
}


.categorical-scroll-container::-webkit-scrollbar {
  display: none;
}

.categorical-scroll-container:hover {
  cursor: grab;
}

/* --- Cards --- */
.categorical-card-wrap {
  flex: 0 0 calc(25% - 1rem);
  scroll-snap-align: center;
  transform: perspective(800px);
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.categorical-card {
  position: relative;
  width: 400px;
  height: 400px;
  background-color: #333;
  overflow: hidden;
  border-radius: 12px;
  box-shadow:
    rgba(0, 0, 0, 0.66) 0 30px 60px 0,
    inset #333 0 0 0 5px,
    inset rgba(255, 255, 255, 0.5) 0 0 0 6px;
  transition: box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.categorical-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.7;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.categorical-card-info {
  position: absolute;
  bottom: 0;
  color: #fff;
  padding: 20px;
  transform: translateY(40%);
  transition: transform 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.categorical-card-info h1 {
  font-family: "Playfair Display", serif;
  font-size: 19px;
  margin: -11px;
  text-shadow: rgba(0, 0, 0, 0.5) 0 10px 10px;
}

.categorical-card-info p {
  opacity: 0;
  text-shadow: rgba(0, 0, 0, 1) 0 2px 3px;
  transition: opacity 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Hover Effects */
.categorical-card-wrap:hover .categorical-card {
  box-shadow:
    rgba(255, 255, 255, 0.2) 0 0 40px 5px,
    rgba(255, 255, 255, 1) 0 0 0 1px,
    rgba(0, 0, 0, 0.66) 0 30px 60px 0,
    inset #333 0 0 0 5px,
    inset white 0 0 0 6px;
}

.categorical-card-wrap:hover .categorical-card-bg {
  opacity: 0.8;
}

.categorical-card-wrap:hover .categorical-card-info {
  transform: translateY(0);
}

.categorical-card-wrap:hover .categorical-card-info p {
  opacity: 1;
}

/* --- Explore All Card --- */
.explore-card {
  background: linear-gradient(135deg, #3a0a0a, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #888;
}

.explore-card h1 {
  color: #fff;
  margin-bottom: 179px;

  font-size: 22px;

  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .categorical-card-wrap {
    flex: 0 0 calc(33.33% - 1rem);
  }
}

@media (max-width: 768px) {
  .categorical-card-wrap {
    flex: 0 0 42%;
  }

  .categorical-scroll-container {
    gap: 1.2rem;
    padding: 1.2rem 1rem;
  }

  .categorical-card {
    height: 250px;
    width: 250px;
  }
}