/* Epic 0048 — the buyer storefront on Go (§17). Every color is a Go design
   token (auto-swapping under html.theme-dark); the one org-supplied color is
   the accent, injected as --sgo-accent/--sgo-accent-fg on the chrome
   wrapper (D-G4). Breakpoints: mobile < 700, tablet 700–1099, desktop ≥
   1100; content max-width 1100px centered. All selectors sgo-prefixed
   (module isolation, §2). */

/* Full-width like a real shop (Kyle, 2026-09-02): no centred 1100px
   column any more — the content runs the viewport's width behind one
   gutter that grows with the screen (1rem on a phone, 60px on a wide
   desktop). Every band that bleeds still lands on the viewport edge,
   because the bleed maths only assumes a centred content box. */
.sgo {
  --sgo-gutter: clamp(1rem, 3.5vw, 60px);
  max-width: none;
  margin: 0 auto;
  padding: 0 var(--sgo-gutter) 2rem;
  background: var(--surface);
}
.go-body--store .go-main { max-width: none; padding-inline: 0; }
/* The store is its own white page: bleed the surface past the centred
   column so the whole viewport reads as the storefront, not a card on the
   Go app's grey. --surface swaps with the theme, so dark mode is unaffected. */
body:has(> .go-main > .sgo), body:has(.sgo) { background: var(--surface); }
/* Banner imagery runs to the viewport edge (.sgo-bleed below), which is
   wider than the layout by the scrollbar's width. `clip` trims that without
   becoming a scroll container — `hidden` would, and would strand the
   product page's sticky buy box.
   On <html>, NOT <body>: `overflow: clip` paint-clips its whole subtree
   including position:fixed descendants, so on the body it made the Go
   bottom tab bar vanish as you scrolled past the body's box (Kyle,
   2026-09-02). The root element defines the viewport's scrolling instead
   and leaves fixed elements alone. */
html:has(.sgo) { overflow-x: clip; }
/* The storefront is its own page (Kyle, 2026-09-02): no Go top bar or
   bottom tab bar, so the store header is the top of the page and nothing
   needs clearing at the bottom. */
.go-body--store { padding-bottom: 0; }
/* The Go body clips x-overflow, which makes the BODY a scroll container —
   and a sticky header sticks to the nearest scroller, which is then not
   the viewport, so it scrolled away with the page (Kyle, 2026-09-03).
   The store clips on <html> instead (above), so the body can let go. */
.go-body--store { overflow-x: visible; }
.go-body--store .go-main { padding-top: 0; }

/* Escapes BOTH centred containers — .go-main's --go-col and .sgo's 1100px —
   to sit flush against the viewport, because a storefront banner that stops
   at the text column reads as a card, not a banner (Kyle, 2026-09-02).
   The 50% resolves against the content box, the 50vw against the viewport,
   so the element's edges land exactly on the viewport's.
   margin-INLINE, deliberately: the components below set their vertical
   spacing with the `margin` shorthand, which at equal specificity and later
   source order silently reset these to 0 — the band kept its 100vw width
   but lost its offset, so it started at the text column and overhung the
   right. Longhands on different axes can't collide that way. */
.sgo-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  border-radius: 0;
}

/* D-G4, extended 2026-09-02: the accent itself swaps per theme, so an org
   can pick one colour for light and another for dark. --sgo-accent-text
   stays as the name every rule already uses. */
.sgo {
  --sgo-accent: var(--sgo-accent-light);
  --sgo-accent-fg: var(--sgo-accent-fg-light);
  --sgo-accent-soft: var(--sgo-accent-soft-light);
  --sgo-accent-text: var(--sgo-accent-light);
}
html.theme-dark .sgo {
  --sgo-accent: var(--sgo-accent-dark);
  --sgo-accent-fg: var(--sgo-accent-fg-dark);
  --sgo-accent-soft: var(--sgo-accent-soft-dark);
  --sgo-accent-text: var(--sgo-accent-dark);
}

/* ── Store header (the top of the page since 2026-09-02) ───────────────
   The Go top bar and bottom tab bar don't render around the storefront,
   so this band is the first thing on the page. It runs edge to edge
   (same bleed trick as .sgo-bleed) in the staff-picked background, and
   __inner puts the controls back on the 1100px content column. No rule
   under it (Kyle): the background is the demarcation. */
.sgo-header {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  background: var(--sgo-header-bg, var(--surface));
  color: var(--sgo-header-fg, var(--ink));
  /* Pinned while the page scrolls (Kyle, 2026-09-03). The background is
     the surface when no colour is picked, so content never shows through. */
  position: sticky;
  top: 0;
  z-index: 40;
}
.sgo-header__inner {
  margin: 0 auto;
  padding: 0.7rem var(--sgo-gutter, 1rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* One row, always: below 900px the links live in the hamburger, so
     there is nothing left to wrap (Kyle, 2026-09-02). */
  flex-wrap: nowrap;
}
/* With a custom background every control derives its colour from the
   computed foreground rather than the theme's ink, so a dark band gets
   light text in light mode too. The popover menus reset these below —
   they float on the page surface, not the band. */
.sgo-header--custom {
  --sgo-header-fg2: color-mix(in srgb, var(--sgo-header-fg) 82%, transparent);
  --sgo-header-hover: color-mix(in srgb, var(--sgo-header-fg) 14%, transparent);
}
.sgo-header__brand {
  display: flex;
  /* The title sits on the logo's baseline, not its centre (Kyle, 2026-09-02). */
  align-items: flex-end;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--sgo-header-fg, var(--ink));
  text-decoration: none;
  line-height: 1.1;
}
/* A landscape slot, sized by WIDTH (Kyle, 2026-09-02): a wordmark is the
   common case, and object-fit: contain never crops it. A square or tall
   logo is held by max-height instead, so both shapes sit right. */
.sgo-header__logo {
  width: auto;
  height: auto;
  max-width: 150px;
  max-height: 34px;
  object-fit: contain;
  border-radius: 4px;
}

/* The hamburger: hidden until the links stop fitting, then it takes their
   place to the LEFT of the logo (Kyle, 2026-09-02). Same <details> pattern
   as the nav dropdowns, so it needs no JS beyond outside-close. */
.sgo-menu { display: none; position: relative; }
.sgo-menu summary { list-style: none; cursor: pointer; }
.sgo-menu summary::-webkit-details-marker { display: none; }
.sgo-menu__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--sgo-header-fg2, var(--ink-2));
}
.sgo-menu__button:hover { background: var(--sgo-header-hover, var(--bg-2)); color: var(--sgo-header-fg, var(--ink)); }
.sgo-menu__button svg { width: 20px; height: 20px; display: block; }
/* Every popover the header opens floats on the page surface, so it goes
   back to the theme's ink whatever the band's colour is. */
.sgo-menu__panel,
.sgo-nav__menu,
.sgo-account__menu {
  --sgo-header-fg: var(--ink);
  --sgo-header-fg2: var(--ink-2);
  --sgo-header-hover: var(--bg-2);
  color: var(--ink);
}
.sgo-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.12));
  padding: 0.35rem;
}
/* Inside the hamburger the links stack, and a dropdown opens in place
   rather than floating a second layer over the first. */
.sgo-menu__panel .sgo-nav__link { display: block; }
.sgo-menu__panel details { position: static; }
.sgo-menu__panel .sgo-nav__menu {
  position: static;
  border: 0;
  box-shadow: none;
  padding: 0 0 0 0.6rem;
  min-width: 0;
}

.sgo-nav { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.sgo-nav__link {
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  color: var(--sgo-header-fg2, var(--ink-2));
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.sgo-nav__link:hover { background: var(--sgo-header-hover, var(--bg-2)); color: var(--sgo-header-fg, var(--ink)); }
.sgo-nav details { position: relative; }
.sgo-nav summary { list-style: none; cursor: pointer; }
.sgo-nav summary::-webkit-details-marker { display: none; }
.sgo-nav__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.12));
  padding: 0.3rem;
}
.sgo-nav__menu a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 7px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}
.sgo-nav__menu a:hover { background: var(--bg-2); color: var(--ink); }
.sgo-header__spacer { flex: 1; }
.sgo-header__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--sgo-header-fg2, var(--ink-2));
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.sgo-header__action::-webkit-details-marker { display: none; }
.sgo-header__action:hover { background: var(--sgo-header-hover, var(--bg-2)); color: var(--sgo-header-fg, var(--ink)); }
/* Icon-only actions are square buttons, and the icon is a flat stroke in
   the current text colour — no emoji, which renders as someone else's
   artwork and ignores the theme (Kyle, 2026-09-02). */
.sgo-header__action--icon {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}
.sgo-icon { width: 20px; height: 20px; display: block; }

/* Search (Kyle, 2026-09-02): a magnifier in the header; the field pops out
   centred over the page. Native <dialog>, so it needs no positioning of
   its own — only the panel's look. */
.sgo-search { display: contents; }
.sgo-search__dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(560px, calc(100vw - 2rem));
  /* Sit in the upper third rather than dead centre: the eye starts there
     and the keyboard covers the middle on a phone. */
  margin: 14vh auto auto;
}
.sgo-search__dialog::backdrop { background: rgba(17, 24, 39, 0.45); }
.sgo-search__form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem 0.55rem 0.9rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,0.2));
}
.sgo-search__form .sgo-icon { color: var(--ink-3); flex-shrink: 0; }
.sgo-search__form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
}
.sgo-search__close {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 0.95rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.sgo-search__close:hover { background: var(--bg-2); color: var(--ink); }

/* Account (Kyle, 2026-09-02): Go's profile mark, opening the personal
   pages — each of which lands back in the regular Go chrome. */
.sgo-account { position: relative; }
.sgo-account summary { list-style: none; cursor: pointer; }
.sgo-account summary::-webkit-details-marker { display: none; }
.sgo-account__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.12));
  padding: 0.3rem;
}
.sgo-account__menu a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 7px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}
.sgo-account__menu a:hover { background: var(--bg-2); color: var(--ink); }
/* Pinned to the bag's corner: the button is a fixed square, so the count
   can't sit beside the icon any more. */
.sgo-cart-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--sgo-accent);
  color: var(--sgo-accent-fg);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}
/* Below this the nav links no longer fit beside the brand, so they move
   into the hamburger rather than wrapping onto a second row. */
@media (max-width: 899px) {
  .sgo-nav { display: none; }
  .sgo-menu { display: block; }
}
@media (max-width: 699px) {
  .sgo-header__inner { gap: 0.4rem; }
}

/* ── Footer ────────────────────────────────────────────────────────── */
/* Footer (Kyle, 2026-09-03): edge to edge like the header, in the
   staff-picked colour when there is one — text then goes black or white by
   contrast (--sgo-footer-fg, computed server-side the way a filled
   button's is). "Powered by RecHero" is its last line. Blank colour = the
   theme surface with a rule on top, as before. */
.sgo-footer {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-top: 2rem;
  padding: 1rem var(--sgo-gutter, 1rem) 0.75rem;
  border-top: 1px solid var(--line);
  background: var(--sgo-footer-bg, transparent);
  color: var(--sgo-footer-fg, var(--ink-3));
  font-size: 0.85rem;
}
.sgo-footer__inner { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.sgo-footer a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.sgo-footer a:hover { color: var(--ink); }
.sgo-footer__col { min-width: 160px; }
.sgo-footer__col b { display: block; color: var(--ink-2); margin-bottom: 0.2rem; }
.sgo-footer__powered {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-2, var(--line));
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-4);
}
.sgo-footer__powered strong { color: var(--ink-3); }
/* On a custom colour every bit of text derives from the computed
   foreground: full for headings and links, softened for the rest. */
.sgo-footer--custom {
  border-top: 0;
  --sgo-footer-fg2: color-mix(in srgb, var(--sgo-footer-fg) 78%, transparent);
  --sgo-footer-fg3: color-mix(in srgb, var(--sgo-footer-fg) 60%, transparent);
  color: var(--sgo-footer-fg2);
}
.sgo-footer--custom a, .sgo-footer--custom .sgo-footer__col b { color: var(--sgo-footer-fg); }
.sgo-footer--custom a:hover { color: var(--sgo-footer-fg); text-decoration: underline; }
.sgo-footer--custom .sgo-footer__powered { border-top-color: var(--sgo-footer-fg3); color: var(--sgo-footer-fg3); }
.sgo-footer--custom .sgo-footer__powered strong { color: var(--sgo-footer-fg2); }

/* ── Buttons / chips ───────────────────────────────────────────────── */
.sgo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 0;
  background: var(--sgo-accent);
  color: var(--sgo-accent-fg);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}
.sgo-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sgo-btn--secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.sgo-btn--block { display: flex; width: 100%; }
.sgo-badge {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-2);
  color: var(--ink-3);
}
.sgo-badge--accent { background: var(--sgo-accent-soft); color: var(--sgo-accent-text); }
.sgo-badge--warn { background: var(--warning-soft); color: var(--warning-dark); }
.sgo-badge--success { background: var(--success-soft); color: var(--success-dark); }

/* ── Banner (graceful fallback / notices) ──────────────────────────── */
.sgo-banner {
  margin: 0.8rem 0;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Hero & home sections ──────────────────────────────────────────── */
/* Square and full-bleed (Kyle, 2026-09-02): the band runs to the viewport
   edge while __pad re-establishes the content column inside it, so the
   heading still lines up with the sections below. */
.sgo-hero {
  /* margin-block, not the shorthand — see .sgo-bleed. */
  margin-block: 1rem;
  padding: 0;
  background: linear-gradient(120deg, var(--sgo-accent), color-mix(in srgb, var(--sgo-accent) 70%, #000));
  color: #fff;
  overflow: hidden;
  position: relative;
}
/* A hero opening the page sits flush under the nav — a margin there reads
   as a gap in the chrome, not as spacing between sections (Kyle,
   2026-09-02). */
.sgo-hero--first { margin-block-start: 0; }

/* Pictures, scrim, overlay and dots all occupy ONE grid cell, so the band
   is as tall as whichever needs the room: normally the slides box, whose
   height comes from the locked ratio (Kyle, 2026-09-03 — the first
   picture's shape, so the slides can turn without the page jumping), but a
   long overlay over a short banner still fits instead of being clipped.
   Every picture covers the box; cropping in the editor picks which part. */
.sgo-hero--image { display: grid; }
.sgo-hero--image > * { grid-area: 1 / 1; min-width: 0; }
.sgo-hero__slides {
  position: relative;
  width: 100%;
  aspect-ratio: var(--sgo-hero-ratio, 2.5);
  overflow: hidden;
}
.sgo-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* How dark the pictures go under the text — staff-set, 0–80% (Kyle,
   2026-09-03: "let users control how dark their images are").
   position: relative is load-bearing: the slides are absolutely
   positioned, and a positioned box paints above every non-positioned one
   regardless of DOM order — so an unpositioned scrim sat UNDER the pictures
   and Darken did nothing. Positioned, it paints in DOM order, above them. */
.sgo-hero__scrim { position: relative; background: rgba(17, 24, 39, var(--sgo-hero-dim, 0.35)); }

/* Slideshow: only the active slide shows. Fade crosses opacity; slide sends
   the outgoing picture left (.is-prev) as the next arrives from the right.
   Off-stage slides carry no transition, so a slide returning from -100% to
   its resting +100% snaps there unseen instead of sweeping across. */
.sgo-hero--fade .sgo-hero__img { opacity: 0; transition: opacity 0.7s ease; }
.sgo-hero--fade .sgo-hero__img.is-active { opacity: 1; }
.sgo-hero--slide .sgo-hero__img { transform: translateX(100%); }
.sgo-hero--slide .sgo-hero__img.is-active { transform: translateX(0); transition: transform 0.6s ease; }
.sgo-hero--slide .sgo-hero__img.is-prev { transform: translateX(-100%); transition: transform 0.6s ease; }

/* Overlay placement: the pad's own padding is the margin from the edge,
   so "top left" still sits clear of the corner. */
.sgo-hero__pad {
  position: relative;
  align-self: center;
  justify-self: center;
  max-width: 100%;
  padding: 2.6rem var(--sgo-gutter, 1rem);
}
.sgo-hero__pad--left { justify-self: start; text-align: left; }
.sgo-hero__pad--center { justify-self: center; text-align: center; }
.sgo-hero__pad--right { justify-self: end; text-align: right; }
.sgo-hero__pad--top { align-self: start; }
.sgo-hero__pad--middle { align-self: center; }
.sgo-hero__pad--bottom { align-self: end; }
.sgo-hero__inner { max-width: 560px; }
/* Without pictures the band is a plain block (no grid), so the inner box
   places itself. */
.sgo-hero__pad--center .sgo-hero__inner { margin-inline: auto; }
.sgo-hero__pad--right .sgo-hero__inner { margin-inline-start: auto; }

/* Which picture is showing (Kyle, 2026-09-03): one hollow ring per slide,
   the current one filled, bottom centre like every shop carousel. */
.sgo-hero__dots {
  position: relative;
  align-self: end;
  justify-self: center;
  display: flex;
  gap: 8px;
  padding: 0 0 0.85rem;
  z-index: 1;
}
.sgo-hero__dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  opacity: 0.85;
}
.sgo-hero__dot.is-active { background: #fff; opacity: 1; }
/* Overlay text size (Kyle, 2026-09-04): staff pick small / medium / large,
   and every size drops a step on phones, where medium-at-desktop-size ran
   too big. The CTA button keeps its own size throughout. */
.sgo-hero__inner--small { --sgo-hero-heading: 1.3rem; --sgo-hero-subtext: 0.9rem; }
.sgo-hero__inner--medium { --sgo-hero-heading: 1.6rem; --sgo-hero-subtext: 0.98rem; }
.sgo-hero__inner--large { --sgo-hero-heading: 2rem; --sgo-hero-subtext: 1.1rem; }
@media (max-width: 699px) {
  .sgo-hero__inner--small { --sgo-hero-heading: 1.1rem; --sgo-hero-subtext: 0.82rem; }
  .sgo-hero__inner--medium { --sgo-hero-heading: 1.3rem; --sgo-hero-subtext: 0.9rem; }
  .sgo-hero__inner--large { --sgo-hero-heading: 1.6rem; --sgo-hero-subtext: 0.98rem; }
}
.sgo-hero__heading { font-size: var(--sgo-hero-heading, 1.6rem); font-weight: 800; line-height: 1.2; }
.sgo-hero__subtext { margin-top: 0.4rem; font-size: var(--sgo-hero-subtext, 0.98rem); opacity: 0.92; }
.sgo-hero .sgo-btn { margin-top: 0.9rem; background: #fff; color: #111827; }
.sgo-section { margin-block: 1.6rem; }
/* "View all →" sits right after the title, not on the far edge (Kyle,
   2026-09-03). */
.sgo-section__head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.sgo-section__title { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.sgo-section__link { color: var(--sgo-accent-text); font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.sgo-richtext { color: var(--ink-2); line-height: 1.6; }
.sgo-richtext h1, .sgo-richtext h2, .sgo-richtext h3 { color: var(--ink); margin: 0.8rem 0 0.3rem; }

/* ── Product / collection grids (2 / 3 / 4 up) ─────────────────────── */
.sgo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
@media (min-width: 700px) { .sgo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .sgo-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Home section row: one row, scrolls sideways (Kyle, 2026-09-16) ── */
/* Same 2 / 3 / 4 columns as .sgo-grid, but extra tiles continue off the
   right edge instead of wrapping. The container query unit lets the
   arrows sit on the middle of the square tile image (column width / 2),
   whatever the title below it wraps to. */
.sgo-row {
  --sgo-row-cols: 2;
  --sgo-row-gap: 0.8rem;
  --sgo-row-col: calc((100cqi - (var(--sgo-row-cols) - 1) * var(--sgo-row-gap)) / var(--sgo-row-cols));
  position: relative;
  container-type: inline-size;
}
@media (min-width: 700px) { .sgo-row { --sgo-row-cols: 3; } }
@media (min-width: 1100px) { .sgo-row { --sgo-row-cols: 4; } }
.sgo-row__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--sgo-row-col);
  gap: var(--sgo-row-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.sgo-row__track::-webkit-scrollbar { display: none; }
.sgo-row__track > * { scroll-snap-align: start; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .sgo-row__track { scroll-behavior: auto; } }
.sgo-row__arrow {
  position: absolute;
  top: calc(var(--sgo-row-col) / 2);
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s;
}
.sgo-row__arrow:hover, .sgo-row__arrow:focus-visible { opacity: 0.95; }
.sgo-row__arrow[hidden] { display: none; }
.sgo-row__arrow--prev { left: 0.5rem; }
.sgo-row__arrow--next { right: 0.5rem; }

.sgo-tile { display: block; text-decoration: none; color: var(--ink); }
/* Square corners on every piece of merch photography (Kyle, 2026-09-02) —
   collection tiles, product tiles, and the product page's gallery. */
.sgo-tile__image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line-2, var(--line));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 1.6rem;
}
.sgo-tile__image img { width: 100%; height: 100%; object-fit: cover; }
.sgo-tile__badge { position: absolute; top: 8px; left: 8px; }
.sgo-tile__title { margin-top: 0.4rem; font-weight: 700; font-size: 0.92rem; }
.sgo-tile__price { color: var(--ink-2); font-size: 0.88rem; }
.sgo-tile__price s { color: var(--ink-3); margin-right: 4px; }
.sgo-load-more { display: flex; justify-content: center; margin: 1.2rem 0; }

/* ── Product page ──────────────────────────────────────────────────── */
.sgo-product { display: grid; grid-template-columns: 1fr; gap: 1.2rem; margin-top: 1rem; }
@media (min-width: 700px) { .sgo-product { grid-template-columns: 55fr 45fr; align-items: start; } }
.sgo-gallery__main {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line-2, var(--line));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 2.5rem;
}
.sgo-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.sgo-gallery__thumbs { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.sgo-gallery__thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1.5px solid var(--line);
  cursor: pointer;
}
.sgo-gallery__thumbs img.is-on { border-color: var(--sgo-accent); }
/* No Go top bar above the store any more, so the box parks near the edge. */
.sgo-buybox { position: sticky; top: 1rem; }
@media (max-width: 699px) { .sgo-buybox { position: static; } }
.sgo-buybox__title { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.sgo-buybox__price { font-size: 1.15rem; font-weight: 800; margin: 0.3rem 0 0.6rem; color: var(--ink); }
.sgo-buybox__price s { color: var(--ink-3); font-weight: 600; margin-right: 6px; }
.sgo-option { margin-bottom: 0.6rem; }
.sgo-option__label { font-size: 0.78rem; font-weight: 800; color: var(--ink-2); margin-bottom: 4px; }
.sgo-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  margin: 0 4px 4px 0;
}
.sgo-chip.is-on { border-color: var(--sgo-accent-text); color: var(--sgo-accent-text); background: var(--sgo-accent-soft); }
.sgo-chip.is-off { opacity: 0.45; text-decoration: line-through; cursor: not-allowed; }
.sgo-qty { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.sgo-qty button { border: 0; background: var(--surface); color: var(--ink); font-size: 1rem; font-weight: 800; width: 34px; height: 34px; cursor: pointer; }
.sgo-qty input { width: 40px; border: 0; text-align: center; font-weight: 700; background: var(--surface); color: var(--ink); }
.sgo-buybox__note { font-size: 0.82rem; color: var(--ink-3); margin-top: 0.4rem; }
.sgo-personalization input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.sgo-desc { grid-column: 1 / -1; color: var(--ink-2); line-height: 1.65; }
.sgo-crumb { font-size: 0.85rem; color: var(--ink-3); margin-top: 0.8rem; }
.sgo-crumb a { color: var(--ink-2); text-decoration: none; font-weight: 600; }

/* ── Cart & checkout ───────────────────────────────────────────────── */
/* Forms and line lists stay readable: the cart/checkout pair keeps a
   centred cap even though the shop itself runs full width. */
/* Cart + checkout use the page's width like every other store page (Kyle,
   2026-09-03) — no 1100px cap inside the full-width layout. */
.sgo-two-col { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1rem auto 0; }
/* Checkout's pick-one payment methods (Kyle, 2026-09-03). */
.sgo-pay-options { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.3rem; }
.sgo-pay-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink);
}
.sgo-pay-option:has(input:checked) { border-color: var(--sgo-accent); background: var(--sgo-accent-soft); }
.sgo-pay-option input { margin-top: 3px; accent-color: var(--sgo-accent); }
.sgo-pay-option__body { display: flex; flex-direction: column; gap: 1px; }
.sgo-pay-option__hint { font-size: 0.8rem; color: var(--ink-3); }
@media (min-width: 700px) { .sgo-two-col { grid-template-columns: 60fr 40fr; align-items: start; } }
.sgo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.8rem;
}
.sgo-card__title { font-weight: 800; font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--ink); }
.sgo-line { display: flex; gap: 0.7rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--line-2, var(--line)); }
.sgo-line:last-child { border-bottom: 0; }
.sgo-line__thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-2);
  border: 1px solid var(--line-2, var(--line));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  flex-shrink: 0;
}
.sgo-line__main { flex: 1; min-width: 0; }
.sgo-line__title { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.sgo-line__meta { font-size: 0.8rem; color: var(--ink-3); }
.sgo-line__meta em { color: var(--sgo-accent-text); font-style: normal; }
.sgo-line__total { font-weight: 800; white-space: nowrap; color: var(--ink); }
.sgo-line--stale { opacity: 0.6; }
.sgo-line__remove { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 1rem; }
.sgo-sum { display: flex; justify-content: space-between; padding: 0.15rem 0; font-size: 0.9rem; color: var(--ink-2); }
.sgo-sum--total { font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); margin-top: 0.3rem; padding-top: 0.4rem; }
.sgo-sum--due { font-weight: 800; color: var(--warning-dark); }
.sgo-sticky-bar {
  position: sticky;
  /* No bottom tab bar under the store any more (Kyle, 2026-09-02). */
  bottom: calc(env(safe-area-inset-bottom) + 8px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg, 0 -4px 16px rgba(0,0,0,0.08));
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.8rem;
}
@media (min-width: 700px) { .sgo-sticky-bar { display: none; } }
.sgo-field { margin-bottom: 0.7rem; }
.sgo-field label { display: block; font-size: 0.78rem; font-weight: 800; color: var(--ink-2); margin-bottom: 3px; }
.sgo-field input, .sgo-field textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
}
.sgo-hint { font-size: 0.78rem; color: var(--ink-3); margin-top: 3px; }

/* ── Order view (buyer mode) & My Orders ───────────────────────────── */
.sgo-order-banner {
  margin: 1rem 0 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: var(--success-soft);
  color: var(--success-dark);
  font-weight: 700;
}
.sgo-activity { font-size: 0.85rem; color: var(--ink-2); }
.sgo-activity div { padding: 0.2rem 0; }
.sgo-activity span { color: var(--ink-3); margin-right: 6px; }
.sgo-order-card { display: block; text-decoration: none; color: var(--ink); }
.sgo-order-card + .sgo-order-card { margin-top: 0.6rem; }

/* ── /my hub ───────────────────────────────────────────────────────── */
.sgo-hub-head { text-align: center; padding: 1.2rem 0 0.8rem; }
.sgo-hub-head__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  overflow: hidden;
}
.sgo-hub-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sgo-hub-head__name { font-weight: 800; font-size: 1.05rem; margin-top: 0.4rem; color: var(--ink); }
.sgo-hub-head__handle { color: var(--ink-3); font-size: 0.85rem; }
.sgo-hub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: var(--ink);
}
.sgo-hub-row:hover { border-color: var(--ink-4, var(--ink-3)); }
.sgo-hub-row b { display: block; }
.sgo-hub-row small { color: var(--ink-3); }
.sgo-hub-row__arrow { color: var(--ink-3); font-weight: 800; }

/* ── Line amounts (Kyle 2026-09-01) — the storefront twin of the HQ rule:
   pre-discount struck through · the markdown · what's charged. */
.store-amount__was { color: var(--ink-3); font-weight: 500; }
.store-amount__off { color: var(--danger, #dc2626); font-weight: 600; font-size: 0.8em; }
.store-amount__net { font-weight: 700; }

/* ── Staff preview bar (Kyle 2026-09-01) — org staff walking their own
   storefront before the master switch is on. Deliberately loud: it must
   never be mistaken for what a buyer sees. */
.sgo-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  margin-bottom: 0.6rem;
  border-radius: 10px;
  background: var(--warning-soft, #fef3c7);
  color: var(--warning-dark, #92400e);
  font-size: 0.82rem;
  font-weight: 600;
}
.sgo-preview-bar__exit { margin-left: auto; color: inherit; text-decoration: underline; font-weight: 700; }

/* Collection tiles read like a shop row (Kyle 2026-09-02, adidas): image,
   name, description, then the affordance that says the tile is a link. */
.sgo-tile__desc {
  font-size: 0.86rem;
  color: var(--ink-2);
  line-height: 1.45;
  margin-top: 0.15rem;
}
.sgo-tile__cta {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--sgo-accent-text);
  border-bottom: 2px solid currentColor;
  padding-bottom: 1px;
}
