/* Storefront merchandising: the promo mosaic on the signed-out home page.
   Tints follow tokens.css rules: terracotta only for closing urgency, royal
   for group-money signals, sky for in-transit, green only on price copy.
   The mosaic lives on the indigo hero band, where the light tiles pop the
   way promo cards do on Walmart's blue; the trust strip stays glued to the
   hero below it. Tiles grid on desktop and become a swipeable snap row on
   mobile, matching the shelf pattern in app.css. */

.promo-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.promo-mosaic-hero {
  padding-bottom: 30px;
}
@media (min-width: 980px) {
  .promo-mosaic-hero {
    margin-top: -18px;
  }
}

/* The Walmart-shaped hero: a slim brand line, then a merchandising grid
   with one big photographic feature cell (the run closing next) and the
   promo tiles packed beside it. The band stays indigo; the cells carry
   the excitement. */
.hero-brandline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 16px;
}
.hero-brandcopy h1 {
  color: #fff;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.hero-brandcopy p {
  color: var(--indigo-950-muted);
  font-size: 13.5px;
  margin-top: 4px;
  max-width: 52ch;
}
.hero-merch {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}
.hero-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 250px;
  border-radius: var(--r-card);
  overflow: hidden;
  background-color: var(--royal-900);
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Deep enough that the kicker and title hold their contrast over a bright
     photo (a market stall in daylight), on the tall mobile cell too. */
  background: linear-gradient(
    180deg,
    rgba(23, 16, 64, 0.05) 0%,
    rgba(23, 16, 64, 0.55) 45%,
    rgba(23, 16, 64, 0.92) 100%
  );
}
.hero-feature:hover {
  text-decoration: none;
}
.hero-feature-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  width: 100%;
}
.hero-feature-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo-950-soft);
}
.hero-feature-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero-feature-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.hero-feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.hero-statsline {
  padding: 16px 0 24px;
  margin: 0;
  font-size: 12.5px;
  color: var(--indigo-950-muted);
}
@media (min-width: 980px) {
  .hero-brandline {
    padding: 26px 0 18px;
  }
  .hero-merch {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: minmax(150px, auto);
  }
  .hero-feature {
    grid-row: span 2;
    min-height: 330px;
  }
  .hero-merch .promo-tile {
    min-height: 0;
  }
}
@media (max-width: 979.98px) {
  .hero-merch {
    grid-template-columns: 1fr 1fr;
  }
  .hero-feature {
    grid-column: span 2;
  }
  .hero-merch .promo-tile {
    min-height: 120px;
    padding: 13px 14px;
  }
  .hero-merch .promo-big {
    font-size: 17px;
  }
}
@media (max-width: 699.98px) {
  .hero-merch .promo-media {
    display: none;
  }
  .hero-merch .promo-tile.has-media {
    flex-direction: column;
  }
}
.promo-tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--r-card);
  padding: 16px 18px;
  min-height: 138px;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 16, 64, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.promo-tile:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
@media (prefers-reduced-motion: reduce) {
  .promo-tile {
    transition: none;
  }
  .promo-tile:hover {
    transform: none;
  }
}
.tile-accent {
  background: var(--accent-100);
  border: 1px solid var(--accent-line);
}
.tile-royal {
  background: var(--royal-100);
  border: 1px solid var(--royal-200);
}
.tile-sky {
  background: var(--sky-100);
  border: 1px solid var(--sky-100);
}
.tile-plain {
  background: var(--surface);
  border: 1px solid var(--line);
}
/* Image-led tiles: text column plus a rounded media block on the right,
   the way big-shop promo cards pair copy with product photography. */
.promo-tile.has-media {
  flex-direction: row;
  align-items: stretch;
  gap: 14px;
}
.promo-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.promo-media {
  flex: none;
  width: 84px;
  align-self: center;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.promo-media img {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
}
.promo-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.promo-eyebrow svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.tile-accent .promo-eyebrow { color: var(--accent); }
.tile-royal .promo-eyebrow { color: var(--royal-700); }
.tile-sky .promo-eyebrow { color: var(--sky-700); }
.tile-plain .promo-eyebrow { color: var(--ink-60); }
.promo-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.promo-big-price {
  color: var(--price);
}
.promo-sub {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.45;
  flex: 1;
}
.promo-cta {
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 2px;
}
.promo-cta span {
  display: inline-block;
  transition: transform 150ms ease;
}
.promo-tile:hover .promo-cta span {
  transform: translateX(3px);
}
@media (prefers-reduced-motion: reduce) {
  .promo-tile:hover .promo-cta span {
    transform: none;
  }
}
.tile-accent .promo-cta { color: var(--accent); }
.tile-royal .promo-cta { color: var(--royal-700); }
.tile-sky .promo-cta { color: var(--sky-700); }
.tile-plain .promo-cta { color: var(--royal-700); }

@media (max-width: 699.98px) {
  .promo-mosaic-hero {
    padding-bottom: 22px;
  }
  .promo-mosaic {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .promo-mosaic-hero.promo-mosaic {
    padding-bottom: 22px;
  }
  .promo-mosaic::-webkit-scrollbar {
    display: none;
  }
  .promo-mosaic .promo-tile {
    flex: 0 0 auto;
    width: 74vw;
    max-width: 300px;
    scroll-snap-align: start;
  }
}

/* Photo-led category tiles: image on top, name and count under it, like a
   department row. Tiles without imagery keep the glyph layout from app.css. */
.cat-tile.cat-photo {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cat-tile.cat-photo .photo {
  display: block;
  aspect-ratio: 5 / 3;
  background: var(--royal-100);
}
.cat-tile.cat-photo .photo img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  height: auto;
  object-fit: cover;
}
.cat-tile.cat-photo .name {
  padding: 10px 12px 0;
}
.cat-tile.cat-photo .count {
  padding: 2px 12px 12px;
}

/* Seasonal campaign band: one ops-scheduled row, tinted inside the token
   rules (royal for promos, terracotta for a season that is closing). */
.campaign-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-radius: var(--r-card);
  padding: 16px 20px;
  color: var(--ink);
}
.campaign-band:hover {
  text-decoration: none;
  box-shadow: var(--shadow-pop);
}
.campaign-royal {
  background: var(--royal-100);
  border: 1px solid var(--royal-200);
}
.campaign-accent {
  background: var(--accent-100);
  border: 1px solid var(--accent-line);
}
.campaign-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.campaign-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.campaign-blurb {
  font-size: 13px;
  color: var(--ink-60);
}
.campaign-cta {
  font-weight: 700;
  font-size: 13.5px;
  flex: none;
}
.campaign-royal .campaign-cta { color: var(--royal-700); }
.campaign-accent .campaign-cta { color: var(--accent); }

/* ---- Storefront polish (Sep 2026): no seams, and the bells that matter ---- */

/* Feature cell without a cover photo: a solid royal panel with the route
   as its picture, instead of a dark box with a scrim over nothing. */
.hero-feature.no-cover {
  background-color: var(--royal-900);
}
.hero-feature.no-cover::after {
  display: none;
}
.hero-feature-route {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
}
/* The route strip is absolute, so the copy below it reserves its height;
   without this the kicker slides under the strip on a short cell. */
.hero-feature.no-cover .hero-feature-body {
  padding-top: 82px;
}
.hero-feature-route .route {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.hero-feature-route .route .code {
  color: #fff;
}
.hero-feature-route .route .city {
  color: var(--indigo-950-muted);
}
.hero-feature-route .route .path .line {
  border-color: rgba(255, 255, 255, 0.45);
}
/* Who is running it and how full it is, inside the feature cell. */
.hero-feature-runner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
}
.hero-feature-runner .avatar {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.hero-feature-runner b {
  font-weight: 600;
}
.hero-feature-fill {
  flex: 1;
  min-width: 60px;
  max-width: 160px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.hero-feature-fill > span {
  display: block;
  height: 100%;
  background: #fff;
  border-radius: 999px;
}

/* Two campaign bands sit side by side on desktop instead of stacking. */
.campaign-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 980px) {
  .campaign-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.campaign-grid .campaign-band {
  align-items: flex-start;
  flex-direction: column;
  height: 100%;
}

/* Shelves scroll sideways at every width: one tidy row with snap points,
   never a ragged second row. Arrows are a mouse convenience (home.js). */
.grid-listings.shelf-x,
.grid-cards.shelf-x {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 14px;
  padding-bottom: 6px;
  scrollbar-width: none;
  scroll-padding-left: 0;
}
.grid-listings.shelf-x::-webkit-scrollbar,
.grid-cards.shelf-x::-webkit-scrollbar {
  display: none;
}
.grid-listings.shelf-x > * {
  flex: 0 0 auto;
  width: 42vw;
  max-width: 185px;
  scroll-snap-align: start;
}
.grid-cards.shelf-x > * {
  flex: 0 0 auto;
  width: 82vw;
  max-width: 320px;
  scroll-snap-align: start;
}
@media (min-width: 700px) {
  .grid-listings.shelf-x > * {
    width: 208px;
    max-width: none;
  }
  .grid-cards.shelf-x > * {
    width: 300px;
    max-width: none;
  }
}
.shelf-nav {
  display: none;
  gap: 6px;
  flex: none;
}
@media (hover: hover) and (min-width: 980px) {
  .shelf-nav {
    display: inline-flex;
  }
}
.shelf-nav button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.shelf-nav button svg {
  width: 16px;
  height: 16px;
}
.shelf-nav button:hover:not([disabled]) {
  border-color: var(--royal-500);
  color: var(--royal-700);
}
.shelf-nav button[disabled] {
  opacity: 0.35;
  cursor: default;
}
.section-head .section-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

/* Listing without a photo: the department glyph on paper, so a card never
   shows an empty white square. */
.listing-card .photo-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--royal-500);
}
.listing-card .photo-ph svg {
  width: 36%;
  height: 36%;
  opacity: 0.9;
}

/* Meet the runners: the people behind the runs, badges attached. */
.spotlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 980px) {
  .spotlight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.spot-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.spot-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.spot-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spot-sub {
  font-size: 12px;
  color: var(--ink-60);
}
.spot-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
}
.spot-stars svg {
  width: 14px;
  height: 14px;
  fill: var(--gold);
}
.spot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.spot-foot {
  margin-top: auto;
  padding-top: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--royal-700);
}

/* What buyers say: verified ratings with words, on paper. */
.reviews {
  display: grid;
  gap: 12px;
}
@media (min-width: 720px) {
  .reviews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.review-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-stars {
  display: inline-flex;
  gap: 2px;
}
.review-stars svg {
  width: 15px;
  height: 15px;
  fill: var(--gold);
}
.review-stars svg.off {
  fill: var(--line);
}
.review-quote {
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.review-who {
  margin-top: auto;
  font-size: 12px;
  color: var(--ink-60);
}
.review-who b {
  color: var(--ink);
  font-weight: 600;
}

/* Live feed rows carry the run's cover as a thumb when there is one. */
.activity-thumb {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--paper);
}

/* Closing band: the one thing to do next, on the trust surface. */
.cta-band {
  padding: 36px 0;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cta-band h2 {
  color: #fff;
  font-size: 22px;
}
.cta-band p {
  color: var(--indigo-950-muted);
  margin-top: 6px;
  max-width: 56ch;
}
.cta-band-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (min-width: 980px) {
  .cta-band {
    padding: 44px 0;
  }
  .cta-band h2 {
    font-size: 26px;
  }
}
