/* Store home. Rows scroll with scroll snap in every browser. Previous and Next
   buttons are CSS carousel buttons (Chrome 135). Without them the row still swipes.
   Smooth scrolling is off in calm mode and under prefers-reduced-motion. */

.store-home { padding-top: 1.5rem; }
.store-home .lede { max-width: 38rem; color: var(--muted); }
.store-band { margin: 2.2rem 0 0; }
.store-band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin: 0 0 0.35rem;
}
.store-band-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.store-blurb { margin: 0 0 0.7rem; max-width: 38rem; color: var(--muted); }

.store-rail-wrap { min-width: 0; }
.store-rail {
  display: flex;
  gap: 0.8rem;
  margin: 0;
  padding: 0.2rem 0 0.7rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.2rem;
  list-style: none;
  scrollbar-width: thin;
}
.store-rail > .store-card {
  flex: 0 0 16.5rem;
  scroll-snap-align: start;
}

@supports (scroll-marker-group: after) {
  .store-rail-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
  }
  .store-rail { grid-column: 1 / -1; grid-row: 1; }
  .store-rail::scroll-button(*) {
    grid-row: 1;
    z-index: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bg);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
  }
  .store-rail::scroll-button(inline-start) {
    grid-column: 1;
    content: "‹" / "Previous";
  }
  .store-rail::scroll-button(inline-end) {
    grid-column: 3;
    content: "›" / "Next";
  }
  .store-rail::scroll-button(*):disabled { opacity: 0.35; cursor: default; }
  .store-rail::scroll-button(*):focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html:not([data-fx="calm"]) .store-rail { scroll-behavior: smooth; }
}
html[data-fx="calm"] .store-rail,
html[data-fx="calm"] .store-rail::scroll-button(*) {
  scroll-behavior: auto;
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .store-rail,
  .store-rail::scroll-button(*) {
    scroll-behavior: auto;
    transition: none;
  }
}

@media (prefers-contrast: more) {
  .store-blurb,
  .store-home .lede { color: var(--text); }
}
