/* Selectgo Shop — monochrome design system.
   Black and white carry the interface; blue is only for links, focus and quiet information; the single
   functional red marks errors (icon, field border, message). Controls 4px, cards/modals 6px, no pills. */
:root {
  /* Colour */
  --sg-fg: #111111;            /* primary text, primary buttons */
  --sg-fg-2: #3a3a3c;          /* body secondary */
  --sg-muted: #6e6e73;         /* metadata (4.7:1 on --sg-surface) */
  --sg-bg: #ffffff;
  --sg-surface: #f5f5f7;       /* secondary backgrounds */
  --sg-line: #e5e5ea;          /* dividers, card borders */
  --sg-line-strong: #d2d2d7;   /* inputs, secondary buttons */
  --sg-hover: #2c2c2e;         /* primary hover */
  --sg-disabled-bg: #e8e8ed;
  --sg-disabled-fg: #6e6e73;
  --sg-accent: #0a66ff;        /* links, focus, info icon only */
  --sg-accent-soft: #eaf2ff;   /* focus ring */
  --sg-err: #b3261e;           /* error icon, field border, field message (6.3:1 on white) */
  /* Shape */
  --sg-radius-control: 4px;    /* buttons, inputs, selects, notices, dropdowns, filters */
  --sg-radius-card: 6px;       /* cards, images, summary, modals */
  --sg-radius-tag: 3px;        /* badges, labels */
  /* Type & size */
  --sg-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sg-control-h: 48px;
  --sg-control-h-sm: 36px;
  --sg-icon: 18px;
  --sg-focus: 0 0 0 3px var(--sg-accent-soft);
  /* Shop additions (Ecom.Design/Shop Design.pdf) */
  --sg-skeleton: #ececf0;                 /* loading placeholders */
  --sg-scrim: rgba(17, 17, 17, .45);      /* quick view, drawers, sheets */
  --sg-shadow-cover: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.08); /* book covers only */
  --sg-content: 1280px;
  --sg-gutter: 32px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sg-bg); color: var(--sg-fg); font: 16px/1.5 var(--sg-font); -webkit-font-smoothing: antialiased; }
a { color: var(--sg-fg); text-decoration: underline; text-decoration-color: var(--sg-line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 32px; line-height: 1.15; font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--sg-accent); outline-offset: 2px; }

/* Header / footer: store header (logo, nav, search, language, cart) and the reduced checkout header. */
.sg-header { border-bottom: 1px solid var(--sg-line); background: rgba(255,255,255,.94); position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(180%) blur(12px); }
.sg-header__inner { max-width: var(--sg-content); margin: 0 auto; padding: 10px var(--sg-gutter); display: flex; align-items: center; gap: 28px; min-height: 64px; }
.sg-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--sg-fg); font-weight: 600; font-size: 17px; text-decoration: none; }
.sg-brand__logo { display: block; height: 32px; width: auto; }
.sg-header__nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.sg-header__nav a { color: var(--sg-muted); text-decoration: none; }
.sg-header__nav a:hover, .sg-header__nav a[aria-current="page"] { color: var(--sg-fg); }
.sg-header__nav a[aria-current="page"] { font-weight: 600; }
.sg-header__nav--end { margin-left: auto; }
.sg-header__tools { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.sg-header__tools .sg-lang { padding: 0 8px; text-decoration: none; }
.sg-header__title { font-size: 17px; padding-left: 16px; border-left: 1px solid var(--sg-line); margin-left: -12px; }
.sg-lang { color: var(--sg-muted) !important; }
.sg-back { display: inline-flex; align-items: center; gap: 4px; color: var(--sg-fg) !important; text-decoration: underline !important; text-decoration-color: var(--sg-line-strong) !important; text-underline-offset: 3px; }
.sg-secure { display: inline-flex; align-items: center; gap: 6px; color: var(--sg-muted); }
.sg-secure__short { display: none; }
.sg-main { max-width: var(--sg-content); margin: 0 auto; padding: 40px var(--sg-gutter) 64px; min-height: 60vh; }
.sg-footer { border-top: 1px solid var(--sg-line); color: var(--sg-muted); font-size: 13px; }
.sg-footer__inner { max-width: var(--sg-content); margin: 0 auto; padding: 20px var(--sg-gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.sg-footer p { margin: 0; }
.sg-trust { display: inline-flex; align-items: center; gap: 8px; }
body.sg-lock { overflow: hidden; }

/* Typography helpers */
.sg-muted { color: var(--sg-muted); }
.sg-small { font-size: 13px; }
.sg-page-head { margin-bottom: 28px; }
.sg-page-head p { margin: 6px 0 0; color: var(--sg-muted); }

/* Buttons: primary (black), secondary (white + border), text. Same size in every state, incl. loading. */
.sg-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--sg-control-h); padding: 0 20px;
  border-radius: var(--sg-radius-control); border: 1px solid transparent; font: 500 16px/1 var(--sg-font); letter-spacing: -0.005em; cursor: pointer;
  text-decoration: none !important; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.sg-btn--primary { background: var(--sg-fg); color: #fff; }
.sg-btn--primary:hover { background: var(--sg-hover); }
.sg-btn--primary:active { background: #000; }
.sg-btn--secondary { background: #fff; color: var(--sg-fg); border-color: var(--sg-line-strong); }
.sg-btn--secondary:hover { border-color: var(--sg-fg); }
.sg-btn--secondary:active { background: var(--sg-surface); }
.sg-btn--text { background: none; color: var(--sg-fg); padding: 0 4px; min-height: 40px; text-decoration: underline !important; text-decoration-color: var(--sg-line-strong) !important; text-underline-offset: 3px; }
.sg-btn--text:hover { text-decoration-color: currentColor !important; }
.sg-btn--block { width: 100%; }
.sg-btn--small { min-height: var(--sg-control-h-sm); padding: 0 14px; font-size: 14px; }
.sg-btn[disabled], .sg-btn[aria-disabled="true"] { background: var(--sg-disabled-bg); color: var(--sg-disabled-fg); border-color: transparent; cursor: not-allowed; }
.sg-btn[aria-busy="true"] { cursor: progress; }
.sg-btn[aria-busy="true"][disabled] { background: var(--sg-hover); color: #fff; }
.sg-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sg-spin .8s linear infinite; flex: none; }
@keyframes sg-spin { to { transform: rotate(360deg); } }
.sg-icon-btn { appearance: none; width: 44px; height: 44px; border: 0; background: none; border-radius: var(--sg-radius-control); display: inline-flex; align-items: center; justify-content: center; color: var(--sg-fg); cursor: pointer; }
.sg-icon-btn:hover { background: var(--sg-surface); }
.sg-link-btn { appearance: none; border: 0; background: none; padding: 6px 0; min-height: 32px; font: 400 14px var(--sg-font); color: var(--sg-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sg-link-btn:hover { color: var(--sg-fg); }
.sg-inline-form { display: inline; margin: 0; }

/* Forms */
.sg-field { display: grid; gap: 6px; margin-bottom: 16px; }
.sg-field label { font-size: 14px; font-weight: 500; }
.sg-field .sg-optional { color: var(--sg-muted); font-weight: 400; }
.sg-input { width: 100%; min-height: var(--sg-control-h); padding: 12px 14px; border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-control);
  font: 16px var(--sg-font); color: var(--sg-fg); background: #fff; transition: border-color .15s, box-shadow .15s; }
.sg-input::placeholder { color: #8e8e93; }
textarea.sg-input { min-height: 88px; resize: vertical; }
.sg-input:hover { border-color: #aeaeb2; }
.sg-input:focus { outline: none; border-color: var(--sg-fg); box-shadow: var(--sg-focus); }
.sg-input[aria-invalid="true"] { border-color: var(--sg-err); }
.sg-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #f8e3e1; }
.sg-field-error { color: var(--sg-err); font-size: 13px; display: flex; gap: 6px; align-items: flex-start; }
.sg-field-error:not(:empty)::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.25' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.25' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.sg-hint { color: var(--sg-muted); font-size: 13px; margin: -6px 0 16px; }
.sg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Notifications (Pages/Shared/_Notice.cshtml). White, thin border, type shown by icon + title. */
.sg-notify { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 20px; background: #fff; color: var(--sg-fg);
  border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-control); font-size: 14px; line-height: 1.5; }
.sg-notify:focus { outline: none; }
.sg-notify:focus-visible { outline: 2px solid var(--sg-accent); outline-offset: 2px; }
.sg-notify__icon { flex: none; display: flex; margin-top: 1px; color: var(--sg-fg); }
.sg-notify--error { border-color: var(--sg-fg); }
.sg-notify--error .sg-notify__icon { color: var(--sg-err); }
.sg-notify--info .sg-notify__icon { color: var(--sg-accent); }
.sg-notify--success { border-color: var(--sg-fg); }
.sg-notify__body { flex: 1; min-width: 0; }
.sg-notify__title { margin: 0; font-weight: 600; }
.sg-notify__text { margin: 2px 0 0; color: var(--sg-fg-2); overflow-wrap: anywhere; }
.sg-notify__text ul { margin: 6px 0 0; padding-left: 18px; }
.sg-notify__text a { color: var(--sg-fg); }
.sg-notify__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sg-notify__close { appearance: none; flex: none; width: 32px; height: 32px; margin: -6px -8px 0 0; border: 0; background: none; border-radius: var(--sg-radius-control);
  display: flex; align-items: center; justify-content: center; color: var(--sg-muted); cursor: pointer; }
.sg-notify__close:hover { background: var(--sg-surface); color: var(--sg-fg); }
/* Compact inline note inside a line item (cart). */
.sg-note { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--sg-fg-2); }
.sg-note svg { flex: none; margin-top: 1px; }
.sg-note--warning { color: var(--sg-fg); }

/* Toasts: one region, bottom-left on desktop (clear of the right-hand summary/CTA), top on mobile. */
.sg-toasts { position: fixed; z-index: 50; left: 24px; bottom: 24px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.sg-toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px; background: var(--sg-fg); color: #fff;
  border-radius: var(--sg-radius-control); font-size: 14px; line-height: 1.45; }
.sg-toast__icon { flex: none; display: flex; margin-top: 1px; }
.sg-toast__text { flex: 1; min-width: 0; }
.sg-toast__close { appearance: none; flex: none; width: 28px; height: 28px; margin: -4px -4px 0 0; border: 0; background: none; color: #c7c7cc; border-radius: var(--sg-radius-control); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sg-toast__close:hover { color: #fff; background: rgba(255,255,255,.12); }

/* Badges: neutral; the words carry the state. */
.sg-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--sg-radius-tag); font-size: 12px; font-weight: 600; background: var(--sg-surface); color: var(--sg-fg-2); }
.sg-badge--ok, .sg-badge--accent { background: var(--sg-fg); color: #fff; }
.sg-badge--warn { background: #fff; color: var(--sg-fg); box-shadow: inset 0 0 0 1px var(--sg-line-strong); }
.sg-badge--err { background: #fff; color: var(--sg-fg); box-shadow: inset 0 0 0 1px var(--sg-fg); }

/* Shop (Pages/Index): title, category nav, filters sidebar / drawer, result bar, product cards, states. */
.sg-display { font-size: 48px; line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.sg-shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.sg-shop-head p { margin: 12px 0 0; color: var(--sg-muted); font-size: 17px; max-width: 560px; }
.sg-catnav { display: flex; gap: 28px; border-bottom: 1px solid var(--sg-line); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.sg-catnav a { flex: none; padding: 12px 0; color: var(--sg-muted); text-decoration: none; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sg-catnav a:hover { color: var(--sg-fg); }
.sg-catnav a[aria-current="page"] { color: var(--sg-fg); font-weight: 600; border-bottom-color: var(--sg-fg); }
.sg-shop { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.sg-filters { position: sticky; top: 88px; }
.sg-filters__head { display: none; }
.sg-filters__body { display: grid; gap: 0; }
.sg-search { position: relative; margin-bottom: 20px; }
.sg-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--sg-muted); display: flex; pointer-events: none; }
.sg-search .sg-input { padding-left: 38px; min-height: 44px; }
.sg-filter-group { border: 0; border-top: 1px solid var(--sg-line); margin: 0; padding: 18px 0; display: grid; gap: 10px; min-width: 0; }
.sg-filter-group legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.sg-price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; color: var(--sg-muted); }
.sg-price-range .sg-input { min-height: 40px; padding: 8px 10px; font-size: 15px; -moz-appearance: textfield; }
.sg-price-range .sg-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-chip-btn { appearance: none; min-height: 32px; padding: 0 10px; border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-control); background: #fff; font: 13px var(--sg-font); color: var(--sg-fg); cursor: pointer; }
.sg-chip-btn:hover { border-color: var(--sg-fg); }
.sg-chip-btn[aria-pressed="true"] { border-color: var(--sg-fg); box-shadow: inset 0 0 0 .5px var(--sg-fg); font-weight: 600; }
.sg-check { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 32px; cursor: pointer; }
.sg-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--sg-fg); }
.sg-filters__apply { display: none; }
.sg-clear-all { font-size: 14px; color: var(--sg-muted); align-self: center; }
.sg-filters__body > .sg-clear-all { border-top: 1px solid var(--sg-line); padding-top: 18px; }
.sg-scrim { display: none; }

.sg-view-head { margin-bottom: 20px; }
.sg-view-head h2 { font-size: 24px; }
.sg-view-head p { margin: 4px 0 0; font-size: 14px; }
.sg-view-head strong { color: var(--sg-fg); font-weight: 600; }
.sg-resultbar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; min-height: 40px; }
.sg-resultbar__count { margin: 0; font-size: 14px; color: var(--sg-muted); flex: 1; min-width: 0; }
.sg-resultbar__count strong { color: var(--sg-fg); }
.sg-filters-toggle { display: none; min-height: 40px; padding: 0 14px; font-size: 15px; }
.sg-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--sg-muted); }
.sg-select { appearance: none; min-height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-control); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; font: 14px var(--sg-font); color: var(--sg-fg); cursor: pointer; }
.sg-select:hover { border-color: #aeaeb2; }
.sg-select:focus { outline: none; border-color: var(--sg-fg); box-shadow: var(--sg-focus); }
.sg-active-filters { list-style: none; margin: -4px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sg-filter-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-control); font-size: 13px; color: var(--sg-fg); text-decoration: none; }
.sg-filter-chip:hover { border-color: var(--sg-fg); }

.sg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.sg-pcard { position: relative; display: grid; gap: 12px; align-content: start; min-width: 0; }
.sg-pcard__media { position: relative; }
.sg-cover { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--sg-surface); border-radius: var(--sg-radius-card); overflow: hidden; color: #c7c7cc; }
.sg-cover img { width: 58%; height: auto; max-height: 82%; object-fit: contain; box-shadow: var(--sg-shadow-cover); }
.sg-cover__empty { width: 58%; aspect-ratio: 2 / 3; display: grid; place-items: center; border: 1px dashed var(--sg-line-strong); }
.sg-cover--large img { width: 62%; }
.sg-label { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 3px 7px; border-radius: var(--sg-radius-tag); background: #fff; color: var(--sg-fg); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sg-pcard__actions { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 8px; justify-content: center; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.sg-pcard__actions form { margin: 0; }
.sg-pcard__media:hover .sg-pcard__actions, .sg-pcard__actions:focus-within { opacity: 1; transform: none; }
.sg-pcard__plus { display: none; }
.sg-pcard__body { display: grid; gap: 2px; color: var(--sg-fg); text-decoration: none; }
.sg-pcard__body:hover .sg-pcard__name { text-decoration: underline; text-underline-offset: 3px; }
.sg-pcard__name { font-size: 15px; font-weight: 500; line-height: 1.35; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-pcard__name mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
.sg-pcard__desc { font-size: 13px; color: var(--sg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-pcard .sg-price { margin-top: 4px; font-size: 15px; }
.sg-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-price del { color: var(--sg-muted); font-weight: 400; margin-left: 6px; font-size: 13px; }
.sg-price--muted { color: var(--sg-muted); }
/* Touch: no hover, so a 40px add button sits on every cover. */
@media (hover: none), (pointer: coarse) {
  .sg-pcard__actions { opacity: 1; transform: none; left: auto; }
  .sg-pcard__quick { display: none; }
  .sg-pcard__add { width: 40px; min-height: 40px; padding: 0; background: #fff; color: var(--sg-fg); border-color: var(--sg-line); }
  .sg-pcard__addtext { display: none; }
  .sg-pcard__plus { display: block; }
}
.sg-more { display: grid; justify-items: center; gap: 12px; margin-top: 48px; }
.sg-more p { margin: 0; }
.sg-more .sg-btn--secondary { min-width: 180px; }
.sg-empty--panel { background: var(--sg-surface); border-radius: var(--sg-radius-card); padding: 56px 24px; gap: 8px; }
.sg-empty--panel p { margin: 0; }
.sg-empty__icon { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--sg-fg); margin-bottom: 8px; }
.sg-empty__title { color: var(--sg-fg); font-weight: 600; font-size: 17px; }
.sg-empty__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
/* Loading: skeletons the size of real cards; a quiet pulse (none under reduced motion). */
.sg-skel { display: grid; gap: 10px; }
.sg-skel__img { aspect-ratio: 4 / 5; border-radius: var(--sg-radius-card); background: var(--sg-skeleton); animation: sg-pulse 1.4s ease-in-out infinite; }
.sg-skel__line { height: 10px; width: 80%; border-radius: 2px; background: var(--sg-skeleton); animation: sg-pulse 1.4s ease-in-out infinite; }
.sg-skel__line--short { width: 40%; }
@keyframes sg-pulse { 50% { opacity: .55; } }
.sg-results[aria-busy="true"] .sg-resultbar__count { opacity: .5; }

/* Quick view (modal; full sheet on mobile) */
.sg-modal { padding: 0; border: 0; border-radius: var(--sg-radius-card); width: min(880px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); background: #fff; color: var(--sg-fg); overflow: auto; }
.sg-modal::backdrop { background: var(--sg-scrim); }
.sg-qv { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 420px; }
.sg-qv--loading { display: grid; place-items: center; grid-template-columns: 1fr; }
.sg-qv__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.sg-qv__media { position: relative; background: var(--sg-surface); display: grid; place-items: center; padding: 40px; }
.sg-qv__media .sg-cover { width: 100%; background: none; }
.sg-qv__body { padding: 48px 40px 32px; display: grid; gap: 16px; align-content: center; }
.sg-qv__title { font-size: 28px; line-height: 1.2; padding-right: 32px; }
.sg-qv__price { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sg-qv__price .sg-price { font-size: 24px; }
.sg-qv__price del { color: var(--sg-muted); font-size: 15px; }
.sg-save { font-size: 13px; font-weight: 600; }
.sg-qv__desc { margin: 0; color: var(--sg-fg-2); }
.sg-qv__buy { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 0; }
.sg-qv__buy .sg-btn { min-height: 52px; }
.sg-qv__buy .sg-qty { min-height: 52px; }
.sg-qv__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.sg-qv__foot a { font-weight: 600; text-decoration: none; }
.sg-stock { display: inline-flex; align-items: center; gap: 6px; }
.sg-qv__error { grid-column: 1 / -1; padding: 56px 32px 32px; }

/* Product detail */
.sg-thumb { aspect-ratio: 3 / 4; background: var(--sg-surface); border-radius: var(--sg-radius-card); overflow: hidden; display: grid; place-items: center; color: #c7c7cc; }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Product details page (canvas page A): breadcrumb, 1:1 image well + enlarge, purchase column, overview/details, mobile bar. */
.sg-crumbs { list-style: none; margin: -12px 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--sg-muted); }
.sg-crumbs a { color: var(--sg-muted); text-decoration: none; }
.sg-crumbs a:hover { color: var(--sg-fg); text-decoration: underline; }
.sg-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--sg-line-strong); }
.sg-crumbs [aria-current] { color: var(--sg-fg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.sg-pdp { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.sg-pdp__media { position: relative; }
.sg-pdp__media > .sg-label { position: absolute; z-index: 1; top: 12px; left: 12px; }
.sg-pdp__image { appearance: none; display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: var(--sg-radius-card); cursor: zoom-in; }
.sg-cover--pdp { aspect-ratio: 1 / 1; }
.sg-cover--pdp img { width: 46%; }
.sg-cover--pdp .sg-cover__empty { width: 34%; }
.sg-pdp__zoom { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; background: #fff; box-shadow: inset 0 0 0 1px var(--sg-line); pointer-events: none; }
.sg-pdp__buy { display: grid; gap: 16px; max-width: 440px; }
.sg-pdp__kicker { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--sg-muted); }
.sg-pdp__title { font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; }
.sg-pdp__lead { margin: 0; color: var(--sg-fg-2); }
.sg-pdp__price { margin: 4px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.sg-pdp__price .sg-price { font-size: 26px; }
.sg-pdp__price del { color: var(--sg-muted); font-size: 16px; }
.sg-stock { margin: 0; font-size: 14px; }
.sg-stock--out { color: var(--sg-fg-2); }
.sg-pdp__ctas { display: grid; gap: 10px; margin: 8px 0 0; }
.sg-pdp__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.sg-pdp__row .sg-qty { min-height: 52px; }
.sg-pdp__ask { margin: 0; text-align: center; font-size: 13px; color: var(--sg-muted); }
.sg-pdp__thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.sg-pdp__thumbs button { display: block; width: 64px; height: 80px; padding: 0; border: 1px solid var(--sg-line); border-radius: 4px; background: none; cursor: pointer; overflow: hidden; }
.sg-pdp__thumbs button[aria-pressed="true"] { border-color: currentColor; }
.sg-pdp__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-related { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--sg-line); }
.sg-related h2 { font-size: 17px; margin-bottom: 16px; }
.sg-related__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.sg-related__item { display: grid; gap: 8px; color: inherit; text-decoration: none; font-size: 14px; }
.sg-related__item del { margin-left: 8px; color: var(--sg-muted); font-size: 13px; }
@media (max-width: 900px) { .sg-related__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.sg-pdp-info { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; margin-top: 80px; padding-top: 32px; border-top: 1px solid var(--sg-line); }
.sg-pdp-info h2 { font-size: 17px; margin-bottom: 12px; }
.sg-pdp-info .sg-prose { max-width: 680px; }
.sg-pdp-info > :only-child { grid-column: 1 / -1; max-width: 560px; }
.sg-spec { margin: 0; display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr); font-size: 14px; }
.sg-spec dt, .sg-spec dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--sg-line); }
.sg-spec dt { color: var(--sg-muted); }
.sg-num { font-variant-numeric: tabular-nums; }
.sg-pdp-bar { display: none; }
.sg-zoom { width: min(960px, calc(100vw - 48px)); padding: 32px; background: #fff; }
.sg-zoom img { margin: 0 auto; max-width: 100%; max-height: calc(100dvh - 112px); object-fit: contain; }
.sg-zoom__close { position: absolute; top: 8px; right: 8px; }
.sg-prose { color: var(--sg-fg-2); white-space: pre-line; }

/* Checkout: stepper, form (contact, delivery, method), summary with CTA, mobile summary bar + sticky pay bar. */
.sg-stepper { list-style: none; margin: 0 0 32px; padding: 0; display: flex; align-items: center; gap: 12px; max-width: 760px; font-size: 14px; }
.sg-stepper__item { display: flex; align-items: center; gap: 8px; color: var(--sg-muted); flex: none; }
.sg-stepper__item + .sg-stepper__item::before { content: ""; width: clamp(24px, 6vw, 96px); height: 1px; background: var(--sg-line-strong); margin-right: 4px; }
.sg-stepper__item.is-done + .sg-stepper__item::before { background: var(--sg-fg); }
.sg-stepper__dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1px solid var(--sg-line-strong); background: #fff; }
.sg-stepper__item.is-done { color: var(--sg-fg); }
.sg-stepper__item.is-done .sg-stepper__dot { background: var(--sg-fg); border-color: var(--sg-fg); color: #fff; }
.sg-stepper__item.is-current { color: var(--sg-fg); font-weight: 600; }
.sg-stepper__item.is-current .sg-stepper__dot { border: 1.5px solid var(--sg-fg); }
.sg-stepper__label { color: inherit; text-decoration: none; }
a.sg-stepper__label:hover { text-decoration: underline; }
.sg-stepper-m { display: none; }
.sg-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.sg-checkout__form { min-width: 0; }
.sg-checkout__side { position: sticky; top: 88px; display: grid; gap: 14px; }
.sg-section { margin-bottom: 36px; }
.sg-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sg-field-hint { color: var(--sg-muted); font-size: 12px; margin-top: -2px; }
.sg-input-group { display: flex; }
.sg-input-group__prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--sg-line-strong); border-right: 0; border-radius: var(--sg-radius-control) 0 0 var(--sg-radius-control); background: var(--sg-surface); color: var(--sg-fg-2); font-size: 15px; }
.sg-input-group .sg-input { border-radius: 0 var(--sg-radius-control) var(--sg-radius-control) 0; min-width: 0; }
.sg-input[readonly] { background: #fff; cursor: default; }
.sg-disclosure { margin: -20px 0 36px; }
.sg-disclosure summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; list-style: none; text-decoration: underline; text-decoration-color: var(--sg-line-strong); text-underline-offset: 3px; }
.sg-disclosure summary::-webkit-details-marker { display: none; }
.sg-disclosure[open] summary { margin-bottom: 10px; }
.sg-summary { background: var(--sg-surface); border-radius: var(--sg-radius-card); padding: 24px; }
.sg-summary h2 { margin: 0; }
.sg-summary .sg-summary__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sg-summary .sg-notify { margin-bottom: 12px; }
.sg-summary__note { margin: 12px 0 0; }
.sg-lines { list-style: none; margin: 0; padding: 0; }
.sg-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 8px 0; }
.sg-line__thumb { position: relative; }
.sg-line .sg-thumb { width: 48px; border-radius: var(--sg-radius-tag); }
.sg-line__qty { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--sg-radius-control); background: #636366; color: #fff; font: 600 11px/20px var(--sg-font); text-align: center; }
.sg-line__info { display: grid; gap: 2px; min-width: 0; }
.sg-line__name { font-weight: 500; font-size: 15px; line-height: 1.3; }
.sg-line .sg-price { font-size: 15px; }
.sg-totals { border-top: 1px solid var(--sg-line-strong); margin-top: 12px; padding-top: 12px; display: grid; gap: 8px; font-size: 14px; color: var(--sg-fg-2); }
.sg-totals div { display: flex; justify-content: space-between; gap: 12px; }
.sg-totals span:last-child { font-variant-numeric: tabular-nums; color: var(--sg-fg); }
.sg-totals .sg-total { align-items: baseline; font-size: 17px; font-weight: 600; color: var(--sg-fg); border-top: 1px solid var(--sg-line-strong); padding-top: 16px; margin-top: 8px; }
.sg-totals .sg-total span:last-child { font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
.sg-total small { font-size: 12px; font-weight: 400; color: var(--sg-muted); letter-spacing: 0; margin-right: 4px; }
.sg-summary-cta { display: grid; gap: 10px; }
.sg-btn--cta { min-height: 52px; font-size: 17px; }
.sg-legal { margin: 0; font-size: 12px; color: var(--sg-muted); text-align: center; }
.sg-trust-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--sg-muted); }
.sg-trust-list li { display: flex; align-items: center; gap: 8px; }
.sg-summary-toggle, .sg-paybar { display: none; }
.sg-options { display: grid; gap: 10px; }
.sg-option { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 16px; border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-card); cursor: pointer; transition: border-color .15s; }
.sg-option:hover { border-color: #aeaeb2; }
.sg-option:has(input:checked) { border-color: var(--sg-fg); box-shadow: inset 0 0 0 1px var(--sg-fg); }
.sg-option input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--sg-fg); }
.sg-option strong { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sg-option span { color: var(--sg-muted); font-size: 14px; }
.sg-option[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.sg-option--method { grid-template-columns: 22px 36px minmax(0, 1fr); align-items: start; }
.sg-option__icon { width: 36px; height: 36px; border-radius: var(--sg-radius-control); background: var(--sg-surface); display: grid; place-items: center; color: var(--sg-fg) !important; }
.sg-option__text { display: grid; gap: 2px; }
.sg-option__text strong { color: var(--sg-fg); font-size: 15px; }
.sg-option__more { grid-column: 2 / -1; display: none !important; gap: 8px; align-items: flex-start; background: var(--sg-surface); border-radius: var(--sg-radius-control); padding: 10px 12px; font-size: 13px !important; color: var(--sg-fg-2) !important; }
.sg-option__more svg { flex: none; margin-top: 2px; color: var(--sg-accent); }
.sg-option:has(input:checked) .sg-option__more { display: flex !important; }
.sg-option .sg-badge { font-size: 11px; padding: 2px 6px; }
.sg-qty { display: inline-flex; align-items: center; justify-self: start; border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-control); min-height: var(--sg-control-h); padding: 0 2px; }
.sg-qty button { appearance: none; border: 0; background: none; width: 36px; height: 36px; font-size: 18px; cursor: pointer; color: var(--sg-fg); border-radius: var(--sg-radius-tag); display: inline-flex; align-items: center; justify-content: center; }
.sg-qty button:hover:not([disabled]) { background: var(--sg-surface); }
.sg-qty button[disabled] { opacity: .35; cursor: not-allowed; }
.sg-qty input { width: 40px; border: 0; text-align: center; font: 600 15px var(--sg-font); background: none; -moz-appearance: textfield; }
.sg-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.sg-qty__value { width: 32px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Payment */
.sg-pay-head { max-width: 920px; margin: 0 auto 28px; }
.sg-pay-head h1 { font-size: 28px; }
.sg-pay-head p { margin: 6px 0 0; }
.sg-main:has(.sg-pay) > .sg-steps-nav { max-width: 920px; margin: 0 auto; }
.sg-pay { max-width: 920px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.sg-demo-banner { grid-column: 1 / -1; background: var(--sg-surface); color: var(--sg-fg); border: 1px dashed var(--sg-muted); border-radius: var(--sg-radius-control); padding: 10px 16px; font-weight: 600; font-size: 13px; text-align: center; letter-spacing: .04em; text-transform: uppercase; }
.sg-qr { background: #fff; border: 1px solid var(--sg-line); border-radius: var(--sg-radius-card); padding: 24px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.sg-qr__img { width: 100%; max-width: 280px; aspect-ratio: 1; position: relative; }
.sg-qr__img svg, .sg-qr__img img { width: 100%; height: 100%; }
.sg-qr__img.is-dimmed { opacity: .15; }
.sg-qr__amount { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-countdown { font-variant-numeric: tabular-nums; font-weight: 600; }
.sg-kv { display: grid; gap: 0; border: 1px solid var(--sg-line); border-radius: var(--sg-radius-card); margin: 0; }
.sg-kv > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--sg-line); }
.sg-kv > div:last-child { border-bottom: 0; }
.sg-kv dt { color: var(--sg-muted); font-size: 14px; margin: 0; }
.sg-kv dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; word-break: break-all; text-align: right; }
.sg-kv dd.sg-kv__list { display: grid; gap: 2px; justify-items: end; }
.sg-copy { appearance: none; border: 1px solid var(--sg-line-strong); background: #fff; border-radius: var(--sg-radius-control); padding: 4px 10px; font: 500 12px var(--sg-font); cursor: pointer; color: var(--sg-fg); white-space: nowrap; }
.sg-copy:hover { border-color: var(--sg-fg); }
.sg-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--sg-fg-2); font-size: 15px; }
.sg-stack { display: grid; gap: 20px; }
.sg-stack > .sg-notify { margin: 0; }

/* Tracking */
.sg-track { max-width: 760px; margin: 0 auto; display: grid; gap: 28px; }
.sg-track__head { display: grid; gap: 10px; }
.sg-track__statuses { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sg-timeline li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; font-size: 14px; }
.sg-timeline li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sg-fg); margin-top: 7px; }
.sg-card-box { border: 1px solid var(--sg-line); border-radius: var(--sg-radius-card); padding: 20px; }
.sg-card-box > h2 { margin-bottom: 12px; font-size: 17px; }
.sg-empty { text-align: center; padding: 64px 16px; color: var(--sg-muted); display: grid; gap: 16px; justify-items: center; }

.sg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cart (docs/ecom/CART_PLAN.md) */
.sg-cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--sg-fg) !important; border-radius: var(--sg-radius-control); text-decoration: none !important; }
.sg-cart-link:hover { background: var(--sg-surface); }
.sg-count { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sg-fg); color: #fff; font: 600 11px/18px var(--sg-font); text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #fff; }
.sg-cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.sg-cart-sub { margin: 0 0 24px; }
.sg-cart { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: start; }
.sg-cart__lines { border-top: 1px solid var(--sg-line); }
.sg-cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--sg-line); }
.sg-cart-line--compact { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 14px 0; }
.sg-cart-line__thumb .sg-thumb { border-radius: var(--sg-radius-control); }
.sg-cart-line.is-excluded .sg-cart-line__thumb { opacity: .5; }
.sg-cart-line__body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.sg-cart-line__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sg-cart-line__name { color: var(--sg-fg); font-weight: 500; line-height: 1.35; text-decoration: none; }
.sg-cart-line__name:hover { text-decoration: underline; }
.sg-cart-line.is-excluded .sg-cart-line__name { color: var(--sg-muted); }
.sg-cart-line__actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.sg-cart-line__actions form { margin: 0; }
.sg-cart-line--compact .sg-qty { min-height: 40px; }

/* Drawer (mini cart) and modal surfaces */
.sg-drawer { margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--sg-line); width: min(440px, 100vw); max-width: none; height: 100%; max-height: none; background: #fff; color: var(--sg-fg); }
.sg-drawer::backdrop { background: rgba(17, 17, 17, .4); }
.sg-drawer__inner { display: flex; flex-direction: column; min-height: 100%; }
.sg-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 24px; border-bottom: 1px solid var(--sg-line); }
.sg-drawer__head h2 { font-size: 18px; margin: 0; }
.sg-drawer .sg-notify { margin: 16px 24px 0; }
.sg-drawer__lines { flex: 1; overflow-y: auto; padding: 0 24px; }
.sg-drawer__lines .sg-cart-line:last-child { border-bottom: 0; }
.sg-drawer__foot { display: grid; gap: 10px; padding: 16px 24px 24px; border-top: 1px solid var(--sg-line); }
.sg-drawer__subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }

/* Tablet: ≤ 1199px. Category chips, filters in a right-side drawer, 3-column grid. */
@media (max-width: 1199px) {
  :root { --sg-gutter: 24px; }
  .sg-display { font-size: 40px; }
  .sg-shop { grid-template-columns: minmax(0, 1fr); }
  .sg-catnav { border-bottom: 0; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; overflow: visible; }
  .sg-catnav a { padding: 0 14px; min-height: 40px; display: inline-flex; align-items: center; border: 1px solid var(--sg-line-strong); border-radius: var(--sg-radius-control); color: var(--sg-fg); margin: 0; }
  .sg-catnav a[aria-current="page"] { background: var(--sg-fg); border-color: var(--sg-fg); color: #fff; }
  .sg-resultbar { border-top: 1px solid var(--sg-line); border-bottom: 1px solid var(--sg-line); padding: 12px 0; }
  .sg-filters-toggle { display: inline-flex; }
  .sg-filters { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); background: #fff; border-left: 1px solid var(--sg-line); display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .sg-filters.is-open { transform: none; visibility: visible; }
  .sg-filters__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 24px; border-bottom: 1px solid var(--sg-line); }
  .sg-filters__head h2 { font-size: 18px; }
  .sg-filters__body { flex: 1; overflow-y: auto; padding: 20px 24px 0; align-content: start; }
  .sg-filters__body > .sg-clear-all { display: none; }
  .sg-filters__apply { display: grid; grid-template-columns: auto 1fr; gap: 10px; position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--sg-line); margin: 0 -24px; padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); }
  .sg-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: var(--sg-scrim); }
  .sg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
  .sg-checkout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
}
/* Below 900px: checkout switches to the mobile pattern (collapsible summary, sticky pay bar) in a 640px column. */
@media (max-width: 899px) {
  .sg-main:has(.sg-checkout) { max-width: 688px; padding-bottom: 120px; }
  .sg-checkout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sg-checkout__side { position: static; display: contents; }
  .sg-summary-toggle { display: flex; order: -2; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: var(--sg-radius-card); background: var(--sg-surface); font: 15px var(--sg-font); color: var(--sg-fg); cursor: pointer; }
  .sg-summary-toggle > span { display: inline-flex; align-items: center; gap: 6px; }
  .sg-summary-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .sg-checkout .sg-summary { order: -1; display: none; padding: 16px; }
  .sg-checkout.is-summary-open .sg-summary { display: block; }
  .sg-summary-cta { order: 1; }
  .sg-summary-cta .sg-btn { display: none; }
  .sg-trust-list { order: 2; }
  .sg-paybar { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--sg-line); }
  .sg-paybar > div { display: grid; line-height: 1.2; }
  .sg-paybar .sg-price { font-size: 19px; }
  .sg-paybar .sg-btn { flex: 1; max-width: 360px; }
  .sg-stepper { display: none; }
  .sg-stepper-m { display: block; margin-bottom: 20px; }
  .sg-stepper-m p { margin: 0 0 8px; font-size: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
  .sg-stepper-m p .sg-muted { margin-left: auto; }
  .sg-stepper-m__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .sg-stepper-m__bar span { height: 3px; border-radius: 2px; background: var(--sg-line); }
  .sg-stepper-m__bar span.is-on { background: var(--sg-fg); }
  .sg-pay { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sg-pdp, .sg-pdp-info { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sg-pdp-info { margin-top: 40px; }
  .sg-pdp__buy { max-width: none; }
  .sg-main:has(.sg-pdp-bar) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sg-pdp-bar:not([hidden]) { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; align-items: center; gap: 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--sg-line); }
  .sg-pdp-bar > div { display: grid; line-height: 1.2; flex: none; }
  .sg-pdp-bar .sg-price { font-size: 18px; }
  .sg-pdp-bar del { color: var(--sg-muted); font-size: 13px; }
  .sg-pdp-bar .sg-btn { flex: 1; }
  .sg-cart { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sg-cart .sg-summary { order: 0; position: static; }
  .sg-qv { grid-template-columns: minmax(0, 1fr); }
  .sg-qv__media { padding: 32px; }
  .sg-qv__media .sg-cover { max-width: 260px; }
  .sg-qv__body { padding: 24px; }
}
/* Mobile: < 768px. Compact header, 2-column grid, filters as a bottom sheet, full-screen quick view. */
@media (max-width: 767px) {
  :root { --sg-gutter: 16px; }
  h1 { font-size: 26px; }
  .sg-display { font-size: 32px; }
  .sg-main { padding-top: 20px; }
  .sg-header__inner { min-height: 56px; gap: 12px; }
  .sg-header__nav--main { display: none; }
  .sg-header__title { padding-left: 12px; margin-left: -4px; }
  .sg-back { display: none; }
  .sg-secure__text { display: none; }
  .sg-secure__short { display: inline; }
  .sg-shop-head { margin-bottom: 16px; }
  .sg-shop-head p { font-size: 15px; margin-top: 6px; }
  .sg-catnav { gap: 6px; }
  .sg-catnav a { min-height: 36px; padding: 0 12px; font-size: 14px; }
  .sg-resultbar { position: sticky; top: 56px; z-index: 5; background: #fff; gap: 8px; margin-left: calc(-1 * var(--sg-gutter)); margin-right: calc(-1 * var(--sg-gutter)); padding: 8px var(--sg-gutter); }
  .sg-resultbar__count { display: none; }
  .sg-filters-toggle { flex: 1; }
  .sg-sort { flex: 1; }
  .sg-sort label { display: none; }
  .sg-sort .sg-select { width: 100%; }
  .sg-filters { top: auto; left: 0; width: 100%; max-height: 88dvh; border-left: 0; border-radius: var(--sg-radius-card) var(--sg-radius-card) 0 0; transform: translateY(100%); }
  .sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .sg-pcard__desc { display: none; }
  .sg-label { top: 8px; left: 8px; }
  .sg-pcard__actions { right: 8px; bottom: 8px; }
  .sg-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .sg-qv { min-height: 100%; align-content: start; }
  .sg-qv__buy { grid-template-columns: 1fr; }
  .sg-qv__title { font-size: 22px; }
  .sg-toasts { left: 16px; right: 16px; bottom: auto; top: 72px; width: auto; }
  .sg-drawer { margin: auto 0 0; width: 100%; height: auto; max-height: 88dvh; border-left: 0; border-radius: var(--sg-radius-card) var(--sg-radius-card) 0 0; }
  .sg-drawer__inner { min-height: 0; max-height: 88dvh; }
  .sg-drawer__foot { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .sg-cart-line { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .sg-notify__actions .sg-btn { flex: 1 1 auto; }
  .sg-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sg-qr__amount { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.sg-pay--single { max-width: 640px; display: block; }

/* Customer account (Ecom.Design/Selectgo Customer Account.pdf). Same tokens; sidebar nav, hairline lists, no tiles. */
:root { --sg-account-nav: 232px; }
.sg-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sg-fg); color: #fff; font: 600 12px/1 var(--sg-font); }
.sg-avatar--lg { width: 48px; height: 48px; font-size: 17px; flex: none; }
.sg-account-link[aria-current="page"] .sg-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--sg-fg); }
.sg-acct { display: grid; grid-template-columns: var(--sg-account-nav) minmax(0, 1fr); gap: 56px; align-items: start; }
.sg-acct__main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; }
.sg-acct__main--narrow { max-width: 760px; }
.sg-acct__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.sg-anav { display: grid; gap: 2px; position: sticky; top: 88px; }
.sg-anav__who { display: flex; gap: 12px; align-items: center; padding-bottom: 20px; margin-bottom: 12px; border-bottom: 1px solid var(--sg-line); min-width: 0; }
.sg-anav__who p { margin: 0; overflow-wrap: anywhere; }
.sg-anav__name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.sg-anav__links { display: grid; gap: 2px; }
.sg-anav__links a, .sg-anav__signout { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; margin: 0 -12px; border-radius: var(--sg-radius-control); color: var(--sg-fg-2); text-decoration: none; font-size: 15px; }
.sg-anav__links a:hover, .sg-anav__signout:hover { background: var(--sg-surface); color: var(--sg-fg); }
.sg-anav__links a[aria-current="page"] { background: var(--sg-surface); color: var(--sg-fg); font-weight: 600; }
.sg-anav__signout { appearance: none; border: 0; background: none; font-family: var(--sg-font); cursor: pointer; width: calc(100% + 24px); }
.sg-anav hr { border: 0; border-top: 1px solid var(--sg-line); margin: 12px 0; width: 100%; }
.sg-pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.sg-pagehead h1 { font-size: 28px; }
.sg-pagehead p { margin: 6px 0 0; color: var(--sg-muted); font-size: 15px; }
.sg-panel { border: 1px solid var(--sg-line); border-radius: var(--sg-radius-card); min-width: 0; }
.sg-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--sg-line); }
.sg-panel__head h2 { font-size: 17px; }
.sg-panel__body { padding: 20px; }
.sg-panel__body--list { padding-top: 4px; padding-bottom: 4px; }
.sg-panel__body p { margin: 0; }
.sg-dl { margin: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); font-size: 15px; }
.sg-dl dt, .sg-dl dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--sg-line); overflow-wrap: anywhere; }
.sg-dl dt { color: var(--sg-muted); font-size: 14px; }
.sg-dl > :nth-last-child(-n+2) { border-bottom: 0; }
.sg-strong { font-weight: 600; }
.sg-fg2 { color: var(--sg-fg-2); }
.sg-mt { margin-top: 12px; }
.sg-stack-sm { display: grid; gap: 8px; }
.sg-stack-sm > p { margin: 0; }
.sg-stack-lg { display: grid; gap: 28px; min-width: 0; }
.sg-spread { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sg-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sg-h-sm { font-size: 17px; margin-bottom: 8px; }
.sg-h-xs { font-size: 15px; }
.sg-form { display: grid; }
.sg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.sg-error-links { margin: -12px 0 0; padding: 0 0 0 20px; font-size: 14px; }
.sg-section-rule { border-top: 1px solid var(--sg-line); padding-top: 24px; display: grid; gap: 8px; justify-items: start; }
.sg-section-rule h2 { font-size: 17px; }
.sg-section-rule p { margin: 0; }
.sg-narrow { max-width: 560px; margin: 24px auto; }
.sg-ofilters { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.sg-ofilters__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-ofilters__chips .sg-chip-btn { min-height: 36px; padding: 0 12px; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.sg-ofilters__chips .sg-chip-btn[aria-current="true"] { background: var(--sg-fg); border-color: var(--sg-fg); color: #fff; }
.sg-osearch { position: relative; margin-left: auto; width: 260px; }
.sg-osearch__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--sg-muted); display: flex; }
.sg-osearch .sg-input { min-height: var(--sg-control-h-sm); padding: 6px 12px 6px 36px; font-size: 14px; }
.sg-otable { width: 100%; border-collapse: collapse; font-size: 14px; }
.sg-otable th { text-align: left; font-weight: 500; color: var(--sg-muted); font-size: 13px; padding: 0 12px 12px; border-bottom: 1px solid var(--sg-line); white-space: nowrap; }
.sg-otable td { padding: 14px 12px; border-bottom: 1px solid var(--sg-line); vertical-align: middle; }
.sg-otable th:first-child, .sg-otable td:first-child { padding-left: 0; }
.sg-otable th:last-child, .sg-otable td:last-child { padding-right: 0; text-align: right; }
.sg-otable__code a { font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.sg-otable__items > span:last-child { overflow-wrap: anywhere; }
.sg-otable__items .sg-othumb { margin-right: 10px; vertical-align: middle; }
.sg-othumb { display: inline-block; width: 30px; height: 40px; border-radius: 2px; background: var(--sg-surface); overflow: hidden; flex: none; }
.sg-othumb img { width: 100%; height: 100%; object-fit: cover; }
.sg-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sg-pager p { margin: 0; }
.sg-pager__nav { display: flex; align-items: center; gap: 12px; }
.sg-ohead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.sg-ohead__title { font-size: 28px; }
.sg-oprog { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
.sg-oprog li { position: relative; display: grid; gap: 6px; justify-items: start; font-size: 13px; color: var(--sg-muted); padding-right: 12px; }
.sg-oprog li::before { content: ""; position: absolute; top: 10px; left: 22px; right: 0; height: 1px; background: var(--sg-line-strong); }
.sg-oprog li:last-child::before { display: none; }
.sg-oprog li.done::before { background: var(--sg-fg); }
.sg-oprog__dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--sg-line-strong); background: #fff; display: grid; place-items: center; }
.sg-oprog li.done { color: var(--sg-fg); }
.sg-oprog li.done .sg-oprog__dot { background: var(--sg-fg); border-color: var(--sg-fg); color: #fff; }
.sg-oprog li.cur { color: var(--sg-fg); font-weight: 600; }
.sg-oprog li.cur .sg-oprog__dot { border: 1.5px solid var(--sg-fg); }
.sg-oprog li.cur .sg-oprog__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sg-fg); }
.sg-oprog strong { font-weight: inherit; }
.sg-oprog__when { font-weight: 400; color: var(--sg-muted); font-size: 12px; }
.sg-odetail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.sg-odetail .sg-line { padding: 14px 0; border-bottom: 1px solid var(--sg-line); grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; }
.sg-odetail .sg-line:last-child { border-bottom: 0; }
.sg-odetail .sg-line .sg-thumb { width: 56px; }
.sg-okv { margin: 0; display: grid; border: 1px solid var(--sg-line); border-radius: var(--sg-radius-card); }
.sg-okv > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--sg-line); font-size: 14px; }
.sg-okv > div:last-child { border-bottom: 0; }
.sg-okv dt { color: var(--sg-muted); margin: 0; }
.sg-okv dd { margin: 0; font-weight: 600; text-align: right; }
.sg-addr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--sg-line); }
.sg-addr:first-child { padding-top: 0; }
.sg-addr p { margin: 0; }
.sg-addr__name { display: flex; gap: 10px; align-items: center; font-weight: 600; flex-wrap: wrap; }
.sg-addr__lines { color: var(--sg-fg-2); font-size: 14px; margin-top: 4px !important; line-height: 1.55; overflow-wrap: anywhere; }
.sg-addr__acts { display: flex; gap: 16px; align-items: center; font-size: 14px; flex-wrap: wrap; justify-content: flex-end; }
.sg-link-btn--strong { color: var(--sg-fg); }
.sg-confirm { border: 1px solid var(--sg-fg); border-radius: var(--sg-radius-card); padding: 20px 24px; display: grid; gap: 12px; }
.sg-confirm h2 { font-size: 18px; }
.sg-confirm p { margin: 0; }
.sg-confirm__acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1199px) {
  .sg-acct { gap: 32px; --sg-account-nav: 200px; }
  .sg-odetail { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
}
@media (max-width: 899px) {
  .sg-acct { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sg-anav { position: static; display: flex; align-items: center; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--sg-line); padding-bottom: 8px; scrollbar-width: none; }
  .sg-anav__who, .sg-anav hr { display: none; }
  .sg-anav__links { display: flex; gap: 4px; }
  .sg-anav__links a, .sg-anav__signout { margin: 0; white-space: nowrap; font-size: 14px; }
  .sg-anav__links svg, .sg-anav__signout svg { display: none; }
  .sg-anav form { margin-left: auto; }
  .sg-anav__signout { width: auto; }
  .sg-odetail, .sg-acct__pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .sg-pagehead { flex-wrap: wrap; align-items: flex-start; }
  .sg-pagehead h1, .sg-ohead__title { font-size: 24px; }
  .sg-dl { grid-template-columns: minmax(0, 1fr); }
  .sg-dl dt { padding-bottom: 0; border-bottom: 0; }
  .sg-dl dd { padding-top: 2px; }
  .sg-osearch { width: 100%; margin-left: 0; }
  .sg-osearch .sg-input { font-size: 16px; }
  .sg-ofilters__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .sg-ofilters__chips .sg-chip-btn { white-space: nowrap; }
  .sg-otable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sg-otable, .sg-otable tbody { display: block; }
  .sg-otable tr { border: 1px solid var(--sg-line); border-radius: var(--sg-radius-card); padding: 14px 16px; margin-bottom: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .sg-otable td { display: block; padding: 0 !important; border: 0; text-align: left !important; }
  .sg-otable td.sg-price { grid-column: 2; grid-row: 1; text-align: right !important; }
  .sg-otable td:nth-child(2), .sg-otable__items, .sg-otable__act { grid-column: 1 / -1; }
  .sg-otable__items { display: flex !important; align-items: center; }
  .sg-otable__act .sg-btn { width: 100%; }
  .sg-oprog { grid-auto-flow: row; gap: 14px; }
  .sg-oprog li { grid-template-columns: 22px minmax(0, 1fr); align-items: center; column-gap: 12px; }
  .sg-oprog li::before { top: 22px; left: 10.5px; right: auto; bottom: -14px; width: 1px; height: auto; }
  .sg-oprog__when { grid-column: 2; }
  .sg-ohead .sg-btn { width: 100%; }
  .sg-addr { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sg-addr__acts { justify-content: flex-start; }
  .sg-actions .sg-btn { flex: 1 1 auto; }
}
