/* ============================================================
   rentie-shopcard.css — the shop card, shared by every surface that
   lists shops rather than vehicles.

   ONE card, TWO containers:
     .shop-rail — horizontal, edge-to-edge scroller (homepage)
     .shop-list — vertical stack of full-width cards (search results)

   Both render the same .shop-card, so a change to shop presentation
   lands everywhere at once instead of drifting between pages.
   ============================================================ */

/* ── CONTAINERS ─────────────────────────────────────────── */

/* Horizontal rail. Breaks the page's gutter on purpose so the last card
   is visibly cut off — that overflow is what tells people it scrolls. */
.shop-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin: 0 -20px;
  padding: 2px 20px 6px;
  /* Without this the snap port starts at the padding BOX, so the browser
     snaps the first card flush to the screen edge and eats the 20px page
     gutter — the rail ends up misaligned with every other section. */
  scroll-padding-left: 20px;
}
.shop-rail::-webkit-scrollbar { display: none; }
.shop-rail > .shop-card { flex: 0 0 auto; width: 218px; scroll-snap-align: start; }

/* Vertical list. */
.shop-list { display: flex; flex-direction: column; gap: 20px; }
.shop-list > .shop-card { width: 100%; }

/* ── CARD ───────────────────────────────────────────────── */
.shop-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--elev-1);
  color: inherit;
  text-decoration: none;
}

/* ── SHOP PHOTO ─────────────────────────────────────────────
   The shop's own uploaded picture, across the top of the card.

   Rendered ONLY when the shop actually has one. No shop has uploaded a
   photo yet, and a permanently empty grey rectangle on every card is
   worse than no photo area at all — so the markup omits it entirely
   rather than shipping a placeholder (rule 12: never invent UI images).
   The moment a shop uploads a banner, its card grows the photo. */
.shop-photo {
  position: relative;
  margin: -14px -14px 0;            /* bleed to the card's edges */
  height: 116px;
  overflow: hidden;
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--surface-3);
}
.shop-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Keeps white text/pills legible over a bright photo. */
.shop-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,28,21,0) 45%, rgba(27,28,21,.34) 100%);
  pointer-events: none;
}
.shop-list .shop-photo { margin: -24px -24px 0; height: 150px; }

.shop-card-top { display: flex; align-items: center; gap: 10px; }
.shop-avatar {
  width: 40px; height: 40px; flex-shrink: 0; overflow: hidden;
  border-radius: var(--r-nested); background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
}
.shop-avatar img { width: 100%; height: 100%; object-fit: cover; }
.shop-avatar .msym { font-size: 21px; color: var(--muted); }

.shop-card-id { min-width: 0; flex: 1; }
.shop-name {
  font-size: 14px; font-weight: 800; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-name .msym { font-size: 14px; color: var(--success, #1b5e34); vertical-align: -2px; margin-left: 3px; }
.shop-where {
  font-size: 11px; font-weight: 600; color: var(--tertiary); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.shop-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-pill {
  font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--tertiary);
}
.shop-pill.open { background: #dff3e4; color: #1b5e34; }
.shop-pill.shut { background: var(--surface-4); color: var(--tertiary); }
.shop-pill.paid { background: #fbe9d8; color: #7a4a18; }
.shop-pill .msym { font-size: 11px; vertical-align: -1px; margin-right: 2px; }

/* Model thumbnails — what this shop actually has free for the searched
   window. Only shown on the list variant, where there is room. */
.shop-models { display: flex; align-items: center; gap: 6px; }
.shop-thumb {
  width: 46px; height: 34px; flex-shrink: 0;
  /* White stage, not a tinted surface: half the fleet PNGs are transparent
     and half have a baked white background. On a tinted tile the two kinds
     render differently card-to-card; on white they are indistinguishable.
     Hairline at 10% pure black so the tile edge still reads on the card. */
  border-radius: var(--r-input); background: #fff;
  outline: 1px solid rgba(0, 0, 0, 0.08); outline-offset: -1px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.shop-thumb img { width: 100%; height: 100%; object-fit: contain; }
.shop-more-models { font-size: 11px; font-weight: 800; color: var(--tertiary); }

.shop-card-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--divider-soft);
}
.shop-from { font-size: 13px; font-weight: 800; }
.shop-from span { font-size: 10px; font-weight: 700; color: var(--tertiary); }
.shop-go {
  font-size: 11px; font-weight: 800; color: var(--crimson);
  text-transform: uppercase; white-space: nowrap;
}
.shop-go .msym { font-size: 13px; vertical-align: -2px; }

/* ── LIST VARIANT ───────────────────────────────────────────
   The rail is width-constrained at 218px and has to stay compact. A
   full-width card has room to breathe, and at the rail's tight spacing it
   read as cramped — everything packed into ~180px with the thumbnails
   squeezed. These overrides give the list version its own rhythm; none of
   them touch the rail. */
.shop-list .shop-card { padding: 24px; gap: 20px; }

.shop-list .shop-card-top { gap: 14px; }
.shop-list .shop-avatar { width: 56px; height: 56px; }
.shop-list .shop-avatar .msym { font-size: 28px; }
.shop-list .shop-name { font-size: 17px; }
.shop-list .shop-name .msym { font-size: 16px; }
.shop-list .shop-where { font-size: 12px; margin-top: 5px; }

.shop-list .shop-pills { gap: 8px; }
.shop-list .shop-pill { font-size: 11px; padding: 6px 12px; }

/* Thumbnails: TALL and FLEXIBLE.
   Height is what carries the card — a 480x480 vehicle shot in a squat box
   renders at the box's height, so a short box means a small bike no matter
   how wide it is.
   Width is flex rather than fixed because four fixed 68px boxes plus the
   "+N" label add up to more than the card's inner width at 375px and would
   push out of the card. Sharing the row means any number of thumbs fits. */
.shop-list .shop-models { gap: 10px; }
.shop-list .shop-thumb { flex: 1 1 0; min-width: 0; max-width: 96px; height: 76px; }
.shop-list .shop-more-models { font-size: 12px; margin-left: 2px; flex-shrink: 0; }

.shop-list .shop-card-foot { padding-top: 20px; }
.shop-list .shop-from { font-size: 18px; }
.shop-list .shop-from span { font-size: 11px; margin-left: 2px; }
.shop-list .shop-go { font-size: 12px; }
