/* =========================================================================
   Reborne Categories — 4 hand-picked category tiles.
   4 columns on desktop, 2x2 on mobile. Image + name + right arrow.
   ========================================================================= */

.reborne-cats {
  width: 100%;
  margin: 2rem 0;
  padding-left: clamp(1rem, 4vw, 3rem);
  padding-right: clamp(1rem, 4vw, 3rem);
  box-sizing: border-box;
}

.reborne-cats__heading {
  margin: 0 0 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-align: left;
}

.reborne-cats__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Each tile shares the row equally (flex-grow), so 2, 3 or 4 tiles always
   stretch to fill the full width with no empty columns. */
.reborne-cats__tile {
  flex: 1 1 0;
  min-width: 0;
  display: block;
  color: inherit;
  text-decoration: none;
}

.reborne-cats__tile:hover {
  color: inherit;
  text-decoration: none;
}

/* ---- Image ------------------------------------------------------------ */

.reborne-cats__media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f4f4f4;
}

.reborne-cats__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .4s ease;
}

.reborne-cats__tile:hover .reborne-cats__img {
  transform: scale(1.04);
}

/* ---- Label (name + arrow) -------------------------------------------- */

.reborne-cats__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: .6rem;
}

.reborne-cats__name {
  font-size: .9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.reborne-cats__arrow {
  flex: 0 0 auto;
  transition: transform .3s ease;
}

.reborne-cats__tile:hover .reborne-cats__arrow {
  transform: translateX(4px);
}

/* ---- Mobile: 3 per row ------------------------------------------------ */

@media (max-width: 767px) {
  /* basis ~1/3 wraps into rows of three; flex-grow lets a trailing row with
     fewer tiles stretch to fill the full width. */
  .reborne-cats__tile {
    flex: 1 1 calc(33.333% - 3px);
  }

  .reborne-cats__name {
    font-size: .8125rem;
  }
}
