/* Homepage portfolio category layout · v3.9.18
   Intentional: exactly one row of five tiles on desktop, with horizontal swipe
   on narrower screens. Work page category grids are unaffected. */
.category-grid.home-category-grid[data-layout="single-row"] {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  grid-template-rows: auto !important;
  grid-auto-flow: column !important;
  gap: clamp(10px, 1.25vw, 18px) !important;
  align-items: stretch;
  width: 100%;
}
.category-grid.home-category-grid[data-layout="single-row"] > .tile-shell,
.category-grid.home-category-grid[data-layout="single-row"] > .tile-shell:nth-child(4),
.category-grid.home-category-grid[data-layout="single-row"] > .tile-shell:nth-child(5) {
  grid-column: auto !important;
  grid-row: 1 !important;
  min-width: 0;
  width: 100%;
}
.category-grid.home-category-grid[data-layout="single-row"] .category-tile {
  display: block;
  aspect-ratio: 3 / 4;
  min-height: 0;
  width: 100%;
}
.category-grid.home-category-grid[data-layout="single-row"] .tile-label {
  left: clamp(12px, 1.3vw, 22px);
  right: clamp(37px, 2.8vw, 48px);
  bottom: clamp(15px, 1.6vw, 26px);
}
.category-grid.home-category-grid[data-layout="single-row"] .tile-label strong {
  display: block;
  max-width: 100%;
  font-size: clamp(20px, 1.82vw, 28px) !important;
  line-height: 1.08;
  overflow-wrap: normal;
  hyphens: none;
}
.category-grid.home-category-grid[data-layout="single-row"] .tile-label small {
  font-size: 11px;
  line-height: 1.1;
}
.category-grid.home-category-grid[data-layout="single-row"] .tile-arrow {
  right: 14px;
  bottom: 19px;
  font-size: 18px;
}
@media (max-width: 1199px) {
  .category-grid.home-category-grid[data-layout="single-row"] {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    gap: 14px !important;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.3) transparent;
    padding: 3px 2px 14px;
  }
  .category-grid.home-category-grid[data-layout="single-row"] > .tile-shell {
    flex: 0 0 clamp(195px, 27vw, 280px) !important;
    width: auto;
    scroll-snap-align: start;
  }
  .category-grid.home-category-grid[data-layout="single-row"] .tile-label strong {
    font-size: clamp(21px, 2.8vw, 29px) !important;
  }
  .home-category-swipe-hint {
    display: block;
    color: #a5a5ab;
    font-size: 12px;
    letter-spacing: .045em;
    margin-top: 12px;
  }
}
@media (max-width: 599px) {
  .category-grid.home-category-grid[data-layout="single-row"] > .tile-shell {
    flex-basis: min(71vw, 255px) !important;
  }
  .category-grid.home-category-grid[data-layout="single-row"] .tile-label strong {
    font-size: 25px !important;
  }
}
