/* Side-scrolling "New for 26 / 27" and "Popular" shelves above the rest of the range. */
.shelf { margin: 0 0 56px; }
.shelf[hidden], .rest-heading[hidden] { display: none; }
.shelf-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
.shelf-head .eyebrow, .rest-heading .eyebrow { margin: 0 0 8px; }
.shelf-head h3, .rest-heading h3 {
  margin: 0; font-size: 1.5rem; font-weight: 450; line-height: 1.25; letter-spacing: -.01em;
}
.shelf-count, #rest-count { margin-left: 6px; font-size: .8125rem; font-weight: 400; color: #848a7d; letter-spacing: 0; }

.shelf-arrows { display: flex; gap: 8px; flex-shrink: 0; }
.shelf-arrow {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid #c9cfbf; background: transparent; color: #283729; font-size: 18px;
  display: grid; place-items: center;
  transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease;
}
.shelf-arrow:hover:not(:disabled) { background: #283729; color: #fff; border-color: #283729; }
.shelf-arrow:disabled { opacity: .35; cursor: default; }
.shelf.no-scroll .shelf-arrows { visibility: hidden; }

.shelf-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 22px) / 4.25);
  gap: 22px; align-items: stretch;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: 0;
  padding-bottom: 14px;
  scrollbar-width: thin; scrollbar-color: #c9cfbf transparent;
}
.shelf-track::-webkit-scrollbar { height: 6px; }
.shelf-track::-webkit-scrollbar-thumb { background: #c9cfbf; border-radius: 3px; }
.shelf-track:focus-visible { outline: 2px solid #283729; outline-offset: 4px; }
.shelf-track .card { scroll-snap-align: start; }

.rest-heading { margin: 0 0 24px; border-top: 1px solid #e3e5dc; padding-top: 32px; }

@media (max-width: 1100px) {
  .shelf-track { grid-auto-columns: calc((100% - 2 * 22px) / 3.25); }
}
@media (max-width: 900px) {
  .shelf-arrows { display: none; }
}
@media (max-width: 600px) {
  .shelf { margin-bottom: 40px; }
  .shelf-head { margin-bottom: 14px; }
  .shelf-head h3, .rest-heading h3 { font-size: 1.3125rem; }
  /* Run edge to edge so the next card peeks in, inviting a swipe. */
  .shelf-track {
    margin: 0 -22px; padding: 0 22px 6px; scroll-padding-left: 22px;
    grid-auto-columns: 44%; gap: 12px; scrollbar-width: none;
  }
  .shelf-track::-webkit-scrollbar { display: none; }
  .rest-heading { padding-top: 26px; }
}
@media (prefers-reduced-motion: reduce) { .shelf-track { scroll-behavior: auto; } }

/* Table view: New and Popular become tables like the rest of the range. */
.shelf.is-table .shelf-arrows { display: none; }
.shelf.is-table .shelf-track {
  display: block; overflow: visible; margin: 0; padding: 0;
  scroll-snap-type: none;
}
