/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/*
 * Legacy CSS variables from the pre-smoky era are now thin aliases over the
 * smoky design tokens (see src/styles/smoky-tokens.css and design.md §10).
 * Page-level surfaces still reference --bg / --text / --accent / etc. — each
 * page-level pass in §5 will be rewritten to use smoky tokens directly, after
 * which this :root alias block can be deleted entirely. Until then, every
 * legacy class inherits smoky colors via this bridge so the body baseline,
 * chrome surfaces, and page surfaces all stay on the smoky palette.
 */
:root {
  --bg:           var(--surface-void);
  --bg-card:      var(--surface-ash);
  --bg-hover:     var(--surface-char);
  --text:         var(--text-primary);
  --text-muted:   var(--text-secondary);
  --accent:       var(--ember);
  --accent-hover: var(--ember-hover);
  --stellar:      var(--info);
  --border:       var(--border-card);
  --radius:       var(--r-card);
}

body {
  font-family: var(--font-sans);
  background: var(--surface-void);
  color: var(--text-primary);
  font-feature-settings: "ss01";
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--text-primary); text-decoration: none; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--r-card); }

/* ── Nav ── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 40px; width: auto; border-radius: 0; }
.logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: 2px; color: var(--text); }
.footer-text { font-size: 1rem; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); }
.hero-logo-text { font-size: 4rem; font-weight: 900; letter-spacing: 8px; color: var(--accent); margin-bottom: 1rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }

/* ── Footer ── */
.site-footer { padding: 2rem; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 4rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.footer-logo { height: 32px; width: auto; opacity: 0.5; border-radius: 0; }

/* ── Hero ── */
.hero { position: relative; text-align: center; padding: 6rem 2rem 4rem; overflow: hidden; }
.hero-smoke { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 80%, rgba(255,107,43,0.08) 0%, transparent 70%); pointer-events: none; }
.hero-content { position: relative; z-index: 1; }
.hero-logo { height: 100px; width: auto; margin: 0 auto 1.5rem; border-radius: 0; filter: drop-shadow(0 0 30px rgba(255,107,43,0.3)); }
.hero-title { font-size: 3rem; font-weight: 900; letter-spacing: 6px; margin-bottom: 0.5rem; background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { color: var(--text-muted); font-size: 1.125rem; max-width: 500px; margin: 0 auto 2rem; }
.hero-cta { margin-bottom: 1.5rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 0.6rem 1.5rem; border-radius: var(--radius); font-weight: 500; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.hero-zmoke { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.zmoke-badge { background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--text-muted); }

/* ── Sections ── */
.section { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; text-align: center; letter-spacing: 2px; }
.section-cta { text-align: center; margin-top: 2rem; }
.zmoke-section { background: var(--bg-card); border-radius: var(--radius); margin-top: 2rem; }
.zmoke-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.zmoke-card { text-align: center; padding: 1.5rem; }
.zmoke-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.zmoke-card h3 { margin-bottom: 0.5rem; }
.zmoke-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Buttons (smoky form primitives) ──
   .btn / .btn-primary are used by modal submit buttons (AuthModal,
   MarketingPopup) and elsewhere across pages. Restyling them here
   propagates the smoky CTA system everywhere consistently. */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--r-pill);          /* 9999px — primary pill */
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 560;
  line-height: 1;
  letter-spacing: 0.16px;
  text-align: center;
  text-decoration: none;
  font-feature-settings: "ss01";
  transition: background 150ms ease, box-shadow 200ms ease, transform 100ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.btn-primary {
  background: var(--ember);
  color: var(--paper);
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover  { background: var(--ember-hover); }
.btn-primary:active { background: var(--ember-press); transform: translateY(1px); }
.btn-primary:disabled {
  background: var(--surface-char);
  color: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-primary.btn-success { background: var(--success); color: var(--paper); }

/* .btn-stellar = 'pay with crypto' style hint; uses --info (cool blue). */
.btn-stellar {
  background: var(--info);
  color: var(--paper);
  box-shadow:
    0 0 0 1px rgba(56, 96, 190, 0.4),
    0 8px 24px -8px rgba(56, 96, 190, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-stellar:hover { opacity: 0.9; }

.btn-disabled {
  background: var(--surface-char);
  color: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}

/* .btn-link — inline tertiary link (modal cancel etc.). Hairline ember
   underline on hover; no fill, no padding hijack. */
.btn-link {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 480;
  padding: 6px 0;
  transition: color 150ms ease, border-color 150ms ease;
}
.btn-link:hover { color: var(--text-primary); border-bottom-color: var(--ember); }
.btn-link:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

/* ── Product Grid (shop) — 4-up desktop, 24px gutters, no hairlines
   on commerce grids per §5. ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 0;
  margin: 0 0 64px;
}
@media (max-width: 1319px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1023px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px)  { .product-grid { grid-template-columns: 1fr; } }

/* ── Inline breadcrumbs (flat fallback for pages still using <nav.breadcrumbs>;
   the dedicated Breadcrumb.astro component is the smoky kicker register
   added in the chrome pass). ── */
.breadcrumbs {
  padding: 24px 64px 0;
  max-width: 1320px;
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.breadcrumbs a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 150ms ease;
  padding: 4px 0;
}
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs span { color: var(--ember); }
@media (max-width: 1023px) { .breadcrumbs { padding: 24px 32px 0; } }
@media (max-width: 639px)  { .breadcrumbs { padding: 16px 16px 0; } }

/* ── Category nav (sharp 2px chips, mono UPPERCASE) ── */
.category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 32px;
}
.category-pill {
  padding: 8px 14px;
  border-radius: var(--r-sharp);
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  line-height: 1;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.category-pill:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}
.category-pill.active {
  border-color: var(--ember);
  color: var(--ember);
  background: rgba(255, 94, 26, 0.08);
}
.category-pill:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.category-desc {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 640px;
  font-feature-settings: "ss01";
}
/* — Admin Link — */
.admin-link {
  font-size: 1.2rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.admin-link:hover { opacity: 1; }

/* ── Category hero (square corners per §4 image treatment) ── */
.category-hero {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 0;        /* product/category photography is square */
  margin-bottom: 24px;
  display: block;
}

/* ── Standard Product Card (§4 anatomy) ──
   ash 8px container with multi-layer shadow. Hover lifts to ember halo.
   Image inside is square (radius 0) even though the card is rounded —
   the WIRED contrast that's the visual signature of a smoky product
   card. */
.product-card {
  background: var(--surface-ash);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card-rest);
  transition: box-shadow 300ms ease, border-color 200ms ease, transform 150ms ease;
}
.product-card:hover {
  border-color: rgba(255, 94, 26, 0.32);
  box-shadow: var(--shadow-card-hover);
}
.product-card:focus-within { box-shadow: var(--shadow-card-hover); }

.product-card__media {
  position: relative;
  display: block;
  background: var(--surface-smoke);
  text-decoration: none;
  border-radius: 0;
  outline: none;
}
.product-card__media:focus-visible { box-shadow: var(--focus-ring); }
.product-card__image,
.product-card .product-card-placeholder {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 0;          /* product photo is square — §4 enforcement */
  background: var(--surface-smoke);
}
.product-card .product-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: var(--r-sharp);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1;
  pointer-events: none;
}
.product-card__badge--new {
  background: rgba(255, 94, 26, 0.16);
  color: var(--ember);
  border: 1px solid rgba(255, 94, 26, 0.4);
}
.product-card__badge--sold {
  top: auto;
  bottom: 12px;
  left: 12px;
  background: rgba(245, 242, 236, 0.06);
  color: var(--text-tertiary);
  border: 1px solid var(--border-card);
}

.product-card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card__sku {
  display: block;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--text-tertiary);
}

.product-card-name {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 420;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  text-decoration: none;
  font-feature-settings: "ss01";
  margin: 0;
}
.product-card-name:hover { color: var(--text-primary); }
.product-card-name:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.product-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.product-card-price {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.18px;
  color: var(--ember);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.price-original {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 420;
  color: var(--text-tertiary);
  text-decoration: line-through;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.price-sale {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.18px;
  color: var(--ember);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}

.product-card-zmoke {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.product-card__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 94, 26, 0.16);
  flex-shrink: 0;
}
.product-card__zmoke-num { color: var(--text-primary); }
.product-card__zmoke-unit { color: var(--text-tertiary); }

/* Card-level Add to cart — sharp 2px ghost (NOT ember pill).
   Brief: max one ember pill per visible viewport. With a 4-up grid the
   pill goes to the page-level CTA; cards get a quieter ghost. Hover
   lifts to ember border + color. */
.product-card__add {
  margin-top: 4px;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-input);
  border-radius: var(--r-sharp);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.13px;
  line-height: 1;
  cursor: pointer;
  font-feature-settings: "ss01";
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.product-card__add:hover:not(:disabled) {
  border-color: var(--ember);
  color: var(--ember);
}
.product-card__add:active:not(:disabled) {
  background: rgba(255, 94, 26, 0.08);
}
.product-card__add:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.product-card__add:disabled {
  border-color: var(--border-hairline);
  color: var(--text-tertiary);
  cursor: not-allowed;
}
.product-card__add.is-added {
  border-color: var(--success);
  color: var(--success-fg);
}

/* ── PDP — §4 anatomy diagram verbatim ──
   Image rail (left) + 1:1 hero on --surface-void; buy panel lives on
   --surface-void directly (no card wrap — editorial discipline). */
.pdp {
  display: grid;
  /* default: single-image layout — no thumb rail column reserved.
     Hero image hugs the left edge, buy panel on the right. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 32px;
  padding: 32px 64px 96px;
  max-width: 1320px;
  margin: 0 auto;
  background: var(--surface-void);
}
/* multi-image layout — reserve 80px for the thumbnail rail.
   :has() ships in all evergreen browsers (Safari 15.4+, Chrome 105+, FF 121+). */
.pdp:has(.pdp__rail) {
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 460px);
}
.pdp__media {
  /* single-image: media spans the full first column (just the hero). */
  grid-column: 1 / 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pdp:has(.pdp__rail) .pdp__media {
  /* multi-image: media spans rail + hero columns (cols 1–2 of the parent). */
  grid-column: 1 / span 2;
  grid-template-columns: 80px minmax(0, 1fr);
}
.pdp__rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pdp__thumb {
  width: 80px;
  height: 80px;
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: 0;
  background: var(--surface-smoke);
  cursor: pointer;
  display: block;
  overflow: hidden;
  transition: border-color 150ms ease;
}
.pdp__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.pdp__thumb:hover { border-color: var(--text-tertiary); }
.pdp__thumb.is-active { border-color: var(--ember); }
.pdp__thumb:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.pdp__hero {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-smoke);
  overflow: hidden;
  border-radius: 0;        /* product photography is square */
}
.pdp__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.pdp__hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}
.pdp__sold-ribbon {
  position: absolute;
  inset: auto 0 0 0;
  background: #000;        /* WIRED ribbon — sanctioned pure-black surface */
  color: var(--paper);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  border-radius: 0;
}

/* Buy panel (no card; lives on --surface-void) */
.pdp__buy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}
.pdp__kicker { color: var(--text-tertiary); }
.pdp__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 350;
  line-height: 1.08;
  letter-spacing: -1.12px;
  color: var(--text-primary);
  font-feature-settings: "ss01";
}
.pdp__price-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pdp__price {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: 350;
  line-height: 1.0;
  letter-spacing: -0.48px;
  color: var(--text-primary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}

.pdp__zmoke {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.pdp__zmoke-dot,
.pdp__stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 94, 26, 0.16);
  flex-shrink: 0;
  animation: stagingPulse 2s ease-in-out infinite;
}
.pdp__zmoke-num { color: var(--text-primary); }
.pdp__zmoke-unit { color: var(--text-tertiary); }

.pdp__stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.pdp__stock[data-state="out"] {
  color: var(--text-tertiary);
}
.pdp__stock[data-state="out"] .pdp__stock-dot {
  background: var(--text-tertiary);
  box-shadow: 0 0 0 3px rgba(107, 99, 88, 0.2);
  animation: none;
}
.pdp__stock-qty { color: var(--text-tertiary); }

/* Variant pickers — sharp 2px ghost squares */
.pdp__variants {
  border: none;
  margin: 0;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pdp__variants-legend {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
}
.pdp__variants-current {
  font-family: var(--font-sans);
  font-weight: 480;
  color: var(--text-primary);
}
.pdp__variants-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pdp__variant {
  min-width: 44px;
  height: 44px;
  border: 2px solid var(--border-input);
  border-radius: var(--r-sharp);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.pdp__variant.is-selected {
  border-color: var(--ember);
  color: var(--ember);
}
.pdp__variant.is-out {
  opacity: 0.32;
  cursor: not-allowed;
  text-decoration: line-through;
}
.pdp__variant:hover:not(.is-out):not(.is-selected) {
  border-color: var(--text-secondary);
}
.pdp__variant:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

/* Add to cart row */
.pdp__atc {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.pdp__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sharp);
  background: var(--surface-ash);
  overflow: hidden;
}
.pdp__qty button {
  width: 44px;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  transition: background 120ms ease;
}
.pdp__qty button:hover { background: rgba(245, 242, 236, 0.06); }
.pdp__qty button:focus-visible { outline: 0; box-shadow: var(--focus-ring); position: relative; z-index: 1; }
.pdp__qty .quantity {
  min-width: 40px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--border-input);
  border-right: 1px solid var(--border-input);
  line-height: 48px;
  padding: 0 8px;
}

/* The PDP's own ember pill — the page-level CTA. */
.pdp__add {
  flex: 1;
  background: var(--ember);
  color: var(--paper);
  border: none;
  border-radius: var(--r-pill);
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 560;
  letter-spacing: 0.16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  font-feature-settings: "ss01";
  transition: background 150ms ease, transform 100ms ease;
}
.pdp__add:hover:not(:disabled) { background: var(--ember-hover); }
.pdp__add:active:not(:disabled) { background: var(--ember-press); transform: translateY(1px); }
.pdp__add:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.pdp__add:disabled {
  background: var(--surface-char);
  color: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}
.pdp__add.is-added {
  background: var(--success);
  color: var(--paper);
}

.pdp__continue {
  margin-top: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 480;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  width: max-content;
  transition: color 150ms ease, border-color 150ms ease;
}
.pdp__continue:hover { color: var(--text-primary); border-bottom-color: var(--ember); }
.pdp__continue:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

/* Hairline rule + description (§4 PDP anatomy: hairline before desc) */
.pdp__description {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pdp__rule {
  border: none;
  border-top: 1px solid var(--border-hairline);
  margin: 8px 0 4px;
}
.pdp__desc-body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
  font-feature-settings: "ss01";
}

@media (max-width: 1023px) {
  .pdp {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 32px 64px;
    gap: 32px;
  }
  .pdp__media { grid-column: 1; grid-template-columns: 64px minmax(0, 1fr); }
  .pdp__title { font-size: 44px; letter-spacing: -0.88px; }
  .pdp__price { font-size: 36px; letter-spacing: -0.36px; }
  .pdp__thumb { width: 64px; height: 64px; }
  .pdp__media { grid-template-columns: 64px minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .pdp { padding: 16px 16px 48px; gap: 24px; }
  .pdp__media { grid-template-columns: minmax(0, 1fr); }
  .pdp__rail {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .pdp__title { font-size: 36px; letter-spacing: -0.72px; }
  .pdp__price { font-size: 32px; letter-spacing: -0.32px; }
  .pdp__atc { flex-direction: column; }
  .pdp__qty { align-self: flex-start; }
}

/* ── Variant Pills (shop card — sharp 2px ghost squares,
   color swatches use 50% inner circle since color is the message) ── */
.variant-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0;
}
.variant-pill {
  min-width: 32px;
  height: 32px;
  border: 2px solid var(--border-input);
  border-radius: var(--r-sharp);   /* sharp — NVIDIA voice */
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.variant-pill .variant-pill__label {
  display: inline-block;
  padding: 0 2px;
}
.variant-pill.selected {
  border-color: var(--ember);
  color: var(--ember);
}
.variant-pill.out-of-stock {
  opacity: 0.32;
  cursor: not-allowed;
  text-decoration: line-through;
}
.variant-pill:hover:not(.out-of-stock):not(.selected) {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}
.variant-pill:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

/* Color swatches stay round inside the sharp pill — the ladder allows
   50% specifically for swatches/avatars. */
.color-swatch {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 236, 0.18);
}

/* Legacy .variant-picker / .variant-option / .pdp-continue / .add-to-cart
   selectors removed — the PDP now ships with .pdp__variants / .pdp__variant
   / .pdp__continue / .pdp__atc primitives above. .product-card-placeholder
   styles for the card grid live with .product-card above. */
.btn-sm { padding: 10px 14px; font-size: 13px; width: 100%; }

/* ── Cart Drawer ── */
.cart-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; }
.cart-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 380px; max-width: 90vw; background: var(--bg); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 201; }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.cart-header h2 { font-size: 1.25rem; }
.cart-header button { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.5rem; }
.cart-empty { padding: 2rem; text-align: center; color: var(--text-muted); }
.cart-items { list-style: none; flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-item { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.cart-item img { border-radius: 4px; object-fit: cover; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-price { color: var(--accent); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.cart-item-qty button { background: none; border: 1px solid var(--border); color: var(--text); cursor: pointer; border-radius: 4px; padding: 0.125rem 0.5rem; }
.cart-remove { color: var(--danger) !important; border-color: transparent !important; }
.cart-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.75rem; }
.cart-zmoke { color: var(--text-muted); font-size: 0.875rem; }
.cart-total { font-size: 1.25rem; font-weight: 700; }
.cart-checkout-btn { display: block; text-align: center; background: var(--accent); color: #fff; padding: 0.75rem; border-radius: var(--radius); font-weight: 600; }
.cart-checkout-btn:hover { background: var(--accent-hover); color: #fff; }
.cart-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.875rem; text-align: center; }

/* ── Cart Button (header) ── */
.cart-button { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.25rem; position: relative; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }

/* ── Auth modal + dropdown (smoky modal primitive — §4 + §6 Level 4) ──
   .auth-login-btn is restyled in Base.astro's nav scope as the one ember
   pill CTA per viewport; the rule below is a defensive fallback for any
   off-nav usage. */
.auth-login-btn {
  background: var(--ember);
  border: none;
  color: var(--paper);
  padding: 10px 20px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: 0.14px;
  box-shadow: var(--shadow-cta);
  font-feature-settings: "ss01";
  transition: background 150ms ease, transform 100ms ease;
}
.auth-login-btn:hover  { background: var(--ember-hover); }
.auth-login-btn:active { background: var(--ember-press); transform: translateY(1px); }
.auth-login-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.auth-user-btn { background: none; border: none; color: var(--text-primary); cursor: pointer; font-size: 14px; }

.auth-modal-overlay,
.auth-dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: smokyModalFade 200ms ease-out;
}
@keyframes smokyModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.auth-modal {
  background: var(--surface-ash);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card-lg);  /* 12px — large modal container */
  padding: 32px;
  width: 420px;
  max-width: 92vw;
  position: relative;
  color: var(--text-primary);
  box-shadow: var(--shadow-modal);
  animation: smokyModalLift 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes smokyModalLift {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: color 150ms ease, background 150ms ease;
}
.auth-close:hover { color: var(--text-primary); background: rgba(245, 242, 236, 0.06); }
.auth-close:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.auth-modal h2 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 420;
  line-height: 1.2;
  letter-spacing: -0.36px;
  color: var(--text-primary);
  font-feature-settings: "ss01";
}

.auth-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface-smoke);
  border: 1px solid var(--border-input);
  border-radius: var(--r-sharp);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 420;
  line-height: 1.4;
  font-feature-settings: "ss01";
  transition: border-color 120ms ease, box-shadow 150ms ease;
}
.auth-input::placeholder { color: var(--text-tertiary); }
.auth-input:hover { border-color: rgba(245, 242, 236, 0.32); }
.auth-input:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 94, 26, 0.16);
}
.auth-input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.16);
}

.auth-error {
  color: var(--danger);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 480;
  margin-bottom: 12px;
}

.auth-switch {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-switch button {
  background: none;
  border: none;
  border-bottom: 1px solid currentColor;
  color: var(--text-primary);
  cursor: pointer;
  padding: 2px 0;
  font: inherit;
  transition: color 150ms ease, border-color 150ms ease;
}
.auth-switch button:hover { color: var(--link-hover); border-bottom-color: var(--ember); }
.auth-switch button:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.auth-dropdown {
  background: var(--surface-ash);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  padding: 16px;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-modal);
  color: var(--text-primary);
}
.auth-email {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-hairline);
}
.auth-link {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 420;
  padding: 8px 4px;
  border-radius: var(--r-sharp);
  text-decoration: none;
  transition: background 120ms ease;
}
.auth-link:hover { background: rgba(245, 242, 236, 0.06); color: var(--text-primary); }
.auth-link:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.auth-logout {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  text-align: left;
  padding: 8px 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  margin-top: 4px;
  border-top: 1px solid var(--border-hairline);
}
.auth-logout:hover { color: #FF6B70; }
.auth-logout:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

/* ── Checkout / Cart page (smoky tnum-discipline ledger) ── */
.checkout-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  background: var(--surface-void);
}
.checkout-empty {
  text-align: center;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}
.checkout-empty p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 420;
}
.checkout-empty .btn { margin-top: 8px; }

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}
.cart-table th {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-card);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
}
.cart-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.cart-table tbody tr:last-child td { border-bottom: none; }
.cart-table td.price {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.16px;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
}

.cart-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-product-cell__image {
  width: 56px;
  height: 56px;
  border-radius: 0;          /* product photography is square */
  object-fit: cover;
  background: var(--surface-ash);
  border: 1px solid var(--border-hairline);
  display: block;
  flex-shrink: 0;
}
.cart-product-cell__image--placeholder { display: block; }
.cart-product-cell__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cart-product-cell__name {
  font-family: var(--font-sans);
  font-weight: 480;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-product-cell__sku {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* Cart-page qty selector — reuse the .quantity span styling so it
   matches the cart drawer + PDP. */
.checkout-page .qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sharp);
  background: var(--surface-ash);
  overflow: hidden;
  padding: 0;
  gap: 0;
}
.checkout-page .qty-selector button {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  transition: background 120ms ease;
}
.checkout-page .qty-selector button:hover:not(:disabled) { background: rgba(245, 242, 236, 0.06); }
.checkout-page .qty-selector button:focus-visible { outline: 0; box-shadow: var(--focus-ring); position: relative; z-index: 1; }
.checkout-page .qty-selector button:disabled { opacity: 0.4; cursor: not-allowed; }
.checkout-page .qty-selector .quantity {
  min-width: 32px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--border-input);
  border-right: 1px solid var(--border-input);
  line-height: 32px;
  padding: 0 6px;
}

.remove-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease, background 150ms ease;
}
.remove-btn:hover:not(:disabled) {
  color: var(--danger);
  background: rgba(229, 72, 77, 0.08);
}
.remove-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.remove-btn:disabled { opacity: 0.32; cursor: not-allowed; }

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  border-top: 1px solid var(--border-hairline);
  padding-top: 24px;
}
.cart-summary > * { width: 100%; }

.cart-zmoke {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.cart-zmoke__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 94, 26, 0.16);
  animation: stagingPulse 2s ease-in-out infinite;
  flex-shrink: 0;
  align-self: center;
}
.cart-zmoke__amount { color: var(--text-primary); }
.cart-zmoke__label { color: var(--text-tertiary); }
.cart-zmoke__save { color: var(--ember); }
.cart-zmoke .zmoke-learn-link {
  color: var(--text-tertiary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 1px;
  transition: color 150ms ease, border-color 150ms ease;
}
.cart-zmoke .zmoke-learn-link:hover { color: var(--text-primary); border-bottom-color: var(--ember); }

.cart-discount {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.cart-discount__neg { color: var(--ember); }
.cart-discount__sep { color: var(--text-tertiary); opacity: 0.5; }

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border-hairline);
}
.cart-total__value {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}

.checkout-buttons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.checkout-buttons .btn { flex: 1 1 220px; }

.checkout-error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--danger);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 480;
  margin: 0;
}

@media (max-width: 768px) {
  .cart-table thead { display: none; }
  .cart-table,
  .cart-table tbody,
  .cart-table tr { display: block; }
  .cart-table tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-hairline);
  }
  .cart-table td {
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
  }
  .cart-table td.cart-product-cell { grid-column: 1 / span 3; }
  .cart-table td.price { justify-content: flex-end; }
  .checkout-buttons .btn { flex: 1 1 100%; }
  .cart-summary { padding-top: 20px; }
}

/* ── Server Islands (nav) ── */
.user-nav-link { color: var(--text); font-size: 0.9rem; }
.user-nav-link:hover { color: var(--accent); }
.zmoke-nav-badge { color: var(--accent); font-size: 0.875rem; font-weight: 600; }

/* ── Account ── */
.account-loading, .account-login-prompt { text-align: center; padding: 4rem 2rem; }
.account-dashboard { display: flex; flex-direction: column; gap: 2rem; margin-top: 1.5rem; }
.account-header { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.account-email { color: var(--text-muted); }
.account-wallet { color: var(--stellar); font-size: 0.875rem; font-family: monospace; }
.account-zmoke-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.zmoke-amount { font-size: 2rem; font-weight: 700; color: var(--accent); }
.zmoke-pending { font-size: 0.875rem; color: var(--text-muted); }
.zmoke-value { font-size: 0.875rem; color: var(--success); }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th { text-align: left; padding: 0.5rem; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 0.875rem; }
.orders-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.status-pending { color: var(--text-muted); }
.status-processing { color: var(--accent); }
.status-completed { color: var(--success); }
.status-abandoned { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* ── Responsive ── */
/* Legacy site-nav mobile collapse moved into the chrome pass scoped
   <style> block in Base.astro; PDP collapse moved into the .pdp
   selector responsive section above. */

/* ── Marketing Popup (smoky modal primitive — §6 Level 4) ── */
.marketing-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 32px;
  background: var(--surface-ash);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card-lg);  /* 12px — large modal container */
  color: var(--text-primary);
  box-shadow: var(--shadow-modal);
  max-width: 420px;
  width: 92vw;
  z-index: 400;
  font-family: var(--font-sans);
  font-feature-settings: "ss01";
  animation: smokyModalLift 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.marketing-popup::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.marketing-popup-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.marketing-popup-inner h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 420;
  line-height: 1.2;
  letter-spacing: -0.36px;
  color: var(--text-primary);
}
.marketing-popup-inner p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.marketing-popup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.marketing-popup-select {
  padding: 12px 14px;
  border-radius: var(--r-sharp);  /* 2px sharp */
  background: var(--surface-smoke);
  border: 1px solid var(--border-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 420;
  width: 100%;
  font-feature-settings: "ss01";
  transition: border-color 120ms ease, box-shadow 150ms ease;
}
.marketing-popup-select:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 94, 26, 0.16);
}
.marketing-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* ── Wallet modal (Tier 1.5 #29 Task D) ──
   Shared between WalletModal (SEP-10 auth) + CryptoCheckoutModal + any
   other .wm-* consumer. Previously these rules lived only in
   pages/account/index.astro, so the modal rendered unstyled on every
   other page — tucking under the cart drawer (z-index 201) and staging
   banner (9999). Lifting them to global CSS fixes both layout and
   stacking. */
/* ── Smoky modal primitive for WalletModal + CryptoCheckoutModal ──
   design.md §6 Level 4 modal. 12px radius (--r-card-lg), --shadow-modal
   multi-layer, --surface-ash fill, sharp 2px form fields, ember pill
   primary CTA, ghost 2px secondary. */
.wm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  animation: smokyModalFade 200ms ease-out;
}
.wm-modal {
  background: var(--surface-ash);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card-lg);  /* 12px */
  width: 100%;
  max-width: 640px;
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
  box-shadow: var(--shadow-modal);
  animation: smokyModalLift 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  transition: color 150ms ease, background 150ms ease;
}
.wm-close:hover { color: var(--text-primary); background: rgba(245, 242, 236, 0.06); }
.wm-close:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.wm-layout { display: flex; min-height: 320px; }
.wm-info {
  flex: 1;
  padding: 32px;
  background: var(--surface-smoke);
  border-right: 1px solid var(--border-hairline);
}
.wm-info h3,
.wm-wallets h3 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 420;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  font-feature-settings: "ss01";
}
.wm-info p {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 420;
  line-height: 1.55;
  margin: 0 0 12px;
}
.wm-hint {
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
}
.wm-hint a {
  color: var(--text-primary);
  border-bottom: 1px solid currentColor;
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease;
}
.wm-hint a:hover { color: var(--link-hover); border-bottom-color: var(--ember); }

.wm-wallets {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.wm-wallet-list { display: flex; flex-direction: column; gap: 8px; }
.wm-wallet-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-ash);
  border: 1px solid var(--border-card);
  border-radius: var(--r-sharp);  /* 2px sharp — engineering voice */
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 480;
  text-align: left;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
  transition: border-color 150ms ease, background 150ms ease;
}
.wm-wallet-btn strong {
  font-weight: 560;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.wm-wallet-btn:hover:not(:disabled) {
  border-color: rgba(255, 94, 26, 0.32);
  background: var(--surface-char);
}
.wm-wallet-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.wm-wallet-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.wm-wallet-icon { font-size: 18px; }

.wm-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  min-height: 200px;
  color: var(--text-secondary);
  padding: 32px;
}
.wm-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-card);
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: wm-spin 0.8s linear infinite;
}
@keyframes wm-spin { to { transform: rotate(360deg); } }
.wm-success { color: var(--success-fg); }
.wm-check { font-size: 36px; color: var(--success-fg); }
.wm-error-text {
  color: var(--danger);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 480;
}

.wm-retry-btn {
  padding: 10px 20px;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-input);
  border-radius: var(--r-sharp);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: 0.14px;
  cursor: pointer;
  font-feature-settings: "ss01";
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.wm-retry-btn:hover { border-color: var(--ember); color: var(--ember); }
.wm-retry-btn:active { background: rgba(255, 94, 26, 0.08); }
.wm-retry-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

/* Cost summary — ember-tinted pre-sign transparency block. */
.wm-cost-summary {
  display: block;
  width: 100%;
  background: var(--ember-glow);
  border: 1px solid rgba(255, 94, 26, 0.35);
  border-radius: var(--r-sharp);
  padding: 16px 20px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
  margin: 8px 0 16px;
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.wm-cost-summary:hover { border-color: var(--ember); background: rgba(255, 94, 26, 0.16); }
.wm-cost-summary:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.wm-cost-main {
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-primary);
  font-weight: 420;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.wm-cost-main strong { color: var(--ember); font-weight: 560; }
.wm-cost-rate {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.wm-cost-stale { color: var(--warning); font-style: italic; }
.wm-cost-copy-hint {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 8px;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Primary ember pill — used for sign / submit on wm modals. */
.wm-sign-btn {
  display: block;
  width: 100%;
  padding: 14px 28px;
  background: var(--ember);
  color: var(--paper);
  border: none;
  border-radius: var(--r-pill);  /* 9999px — primary CTA */
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 560;
  letter-spacing: 0.16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  font-feature-settings: "ss01";
  transition: background 150ms ease, transform 100ms ease;
}
.wm-sign-btn:hover:not(:disabled) { background: var(--ember-hover); }
.wm-sign-btn:active:not(:disabled) { background: var(--ember-press); transform: translateY(1px); }
.wm-sign-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.wm-sign-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ── Per-element retrofit helpers added in the WalletModal +
   CryptoCheckoutModal smoky pass (corrective commit). ── */

/* Address / network / total rows in the info column. Mono kicker label
   stacks above a tnum-bound mono value. */
.wm-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-hairline);
}
.wm-info-row:last-child { border-bottom: none; }
.wm-info-row--centered { align-items: center; text-align: center; }
.wm-info-row > .sku {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--text-primary);
  word-break: break-all;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.wm-info-row > .total {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}

/* Network meta inside WalletModal info column. */
.wm-network {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
}
.wm-network > .sku {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}

/* Asset choice button inner stack (USDC / XLM rows). */
.wm-asset-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.wm-asset-stack > .price {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.15px;
  color: var(--text-primary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}
.wm-asset-stack > .balance {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
}

/* Kicker inside the cost-summary button. */
.wm-cost-summary > .kicker { display: block; margin-bottom: 6px; }
.wm-cost-summary > .wm-cost-main { margin-top: 0; }

/* In-status kickers stack tightly above the spinner copy. */
.wm-status > .kicker { margin-top: 4px; }
.wm-status > .wm-info-row { width: 100%; max-width: 240px; }

/* Stack the wm-info + wm-wallets columns on narrow viewports. */
@media (max-width: 639px) {
  .wm-layout { flex-direction: column; min-height: 0; }
  .wm-info { border-right: none; border-bottom: 1px solid var(--border-hairline); padding: 24px; }
  .wm-wallets { padding: 24px; }
}

@media (max-width: 640px) {
  .wm-layout { flex-direction: column; min-height: unset; }
  .wm-info { border-right: none; border-bottom: 1px solid var(--border); padding: 1.25rem; }
  .wm-wallets { padding: 1.25rem; }
}

/* ── Split Checkout: Pay with USDC Button ── */
.btn-usdc {
  background: var(--success);
  color: var(--paper);
  box-shadow:
    0 0 0 1px rgba(21, 190, 83, 0.4),
    0 8px 24px -8px rgba(21, 190, 83, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-usdc:hover { opacity: 0.9; }
.btn-usdc:active { background: var(--success); transform: translateY(1px); }

/* ── Multi-Chain Wallet Categorization ── */
.wm-wallet-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.wm-wallet-group {
  display: flex;
  flex-direction: column;
}
.wm-wallet-list--row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  width: 100%;
}
.wm-wallet-list--row .wm-wallet-btn {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 10px 8px !important;
  gap: 4px !important;
  font-size: 11px !important;
}
.wm-wallet-list--row .wm-wallet-icon {
  font-size: 18px !important;
  margin: 0 !important;
}

/* ── Full-Width Circle CCTP Bridge Simulation Screen ── */
.wm-cctp-bridge-full {
  width: 100%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  background: var(--surface-smoke);
}
.wm-cctp-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 12px;
}
.wm-cctp-header h3 {
  margin: 0 0 4px !important;
}
.wm-cctp-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}
.wm-cctp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.wm-cctp-card {
  background: var(--surface-ash);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  padding: 16px;
}
.wm-cctp-card .kicker {
  font-size: 10px;
  margin-bottom: 6px;
}
.wm-cctp-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}
.wm-cctp-card-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wm-cctp-card-detail span {
  font-size: 12px;
  color: var(--text-secondary);
}
.wm-cctp-card-detail strong {
  font-size: 14px;
  color: var(--text-primary);
}

/* Visual Node Diagram */
.wm-cctp-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-void);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-card);
  padding: 16px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.cctp-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 1;
}
.cctp-node-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-char);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s ease;
}
.cctp-node.active .cctp-node-icon {
  border-color: var(--ember);
  box-shadow: 0 0 12px var(--ember-glow);
  color: var(--ember);
}
.cctp-node.complete .cctp-node-icon {
  border-color: var(--success);
  box-shadow: 0 0 12px rgba(21, 190, 83, 0.15);
  color: var(--success);
}
.cctp-node-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.cctp-flow-line {
  flex: 1;
  height: 2px;
  background: var(--border-hairline);
  margin: 0 12px;
  position: relative;
}
.cctp-flow-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--ember);
  transition: width 1.5s ease-in-out;
}
.cctp-flow-line.active::after {
  width: 100%;
  animation: bridgePulse 1.5s infinite;
}
.cctp-flow-line.complete::after {
  width: 100%;
  background: var(--success);
}

@keyframes bridgePulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* Terminal logs box */
.wm-cctp-logs {
  background: #000 !important;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: #7BE9A6; /* green */
  height: 120px;
  overflow-y: auto;
  margin-bottom: 20px;
}
.wm-cctp-log-line {
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Action area */
.wm-cctp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.wm-cctp-pay-btn {
  background: var(--ember);
  color: var(--paper);
  border: none;
  border-radius: var(--r-pill);
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: all 0.2s ease;
}
.wm-cctp-pay-btn:hover:not(:disabled) {
  background: var(--ember-hover);
}
.wm-cctp-pay-btn:disabled {
  background: var(--surface-char);
  color: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}

