/* Supply Co. storefront styling — matches the warm cream/forest-green palette
   from the Build Hours frames. */

:root {
  --bg: #faf6ed;
  --ink: #1c1a14;
  --muted: #847d6e;
  --line: #e3ddcd;
  --green: #29543b;
  --green-2: #1f4731;
  --orange: #c66c3c;
  --pill: #efe7d4;
  --pill-text: #4a4434;
  --asst-bg: #fdfaf2;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body { padding-bottom: 40px; padding-right: 360px; }
.hidden { display: none !important; }

/* Top bar */
.topbar { display: grid; grid-template-columns: 220px 1fr auto; gap: 16px;
  align-items: center; padding: 14px 28px; background: #f3eddd; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.logo { width: 26px; height: 26px; border-radius: 6px; background: var(--green); }
.brand-name { font-size: 16px; }
.search input { width: 60%; max-width: 520px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.userbar { display: flex; gap: 14px; align-items: center; font-size: 13px; }
.hello { color: var(--ink); }
.size-pill { background: var(--green); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.cart-icon { position: relative; font-size: 20px; }
.cart-count { position: absolute; top: -8px; right: -10px; background: #c66c3c; color: #fff;
  font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; }

.navbar { display: flex; gap: 18px; padding: 8px 28px 14px; font-size: 13px;
  color: var(--muted); background: #f3eddd; border-bottom: 1px solid var(--line); }
.navbar a { color: inherit; text-decoration: none; cursor: pointer; }
.nav-cat { color: var(--ink); font-weight: 600; }

main { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.view { padding: 24px 0; }

/* Home hero */
.hero { position: relative; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #2c3e3a 0%, #1c2926 100%); color: #fff; padding: 60px 60px 80px; min-height: 320px; }
.hero::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 240px at 80% 100%, #3b5a4a, transparent 70%); opacity: .8; }
.hero-tag { font-size: 11px; letter-spacing: 0.16em; opacity: .8; margin-bottom: 8px; position: relative; }
.hero h1 { font-size: 44px; margin: 0 0 16px; max-width: 480px; line-height: 1.05; position: relative; }
.hero p { max-width: 460px; font-size: 14px; opacity: .85; position: relative; }
.btn-cta { background: var(--green); color: #fff; border: 0; padding: 10px 18px; border-radius: 6px; cursor: pointer; position: relative; }
.already-covered { position: absolute; right: 30px; bottom: 24px; background: rgba(255,255,255,0.94); color: var(--ink);
  border-radius: 8px; padding: 14px 18px; min-width: 280px; }
.ac-tag, .ac-cart-tag, .addon-tag, .ac-next { font-size: 10px; letter-spacing: 0.12em; color: var(--orange); font-weight: 600; }
.ac-title { font-size: 15px; font-weight: 600; margin: 4px 0 6px; }
.already-covered ul { margin: 0 0 6px; padding: 0 0 0 14px; font-size: 13px; }
.ac-next { color: var(--orange); font-size: 9px; margin-top: 4px; }

.kit { padding: 28px 0; }
.kit-tag { font-size: 11px; letter-spacing: 0.16em; color: var(--orange); font-weight: 600; }
.kit h2 { margin: 4px 0 4px; font-size: 22px; }
.kit .view-all { float: right; font-size: 13px; color: var(--muted); cursor: pointer; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
.tile { aspect-ratio: 1.3 / 1; border-radius: 10px; position: relative; }
.tile .caption { position: absolute; bottom: 12px; left: 14px; color: #fff; font-size: 13px; font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Results page */
.view-results { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.result-pills { grid-column: 1 / -1; display: flex; gap: 14px; padding: 0 4px 8px; flex-wrap: wrap; }
.result-pill { background: transparent; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.result-pill strong { color: var(--ink); margin-left: 6px; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 13px; }

.results-side h2 { font-size: 24px; margin: 0 0 4px; }
.results-side h3.rs-h { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.results-side label { display: block; font-size: 13px; margin: 4px 0; }
.ready-block { padding: 8px 0; border-top: 1px solid var(--line); }
.ready-block:first-of-type { border-top: 0; }
.rb-tag { font-size: 10px; letter-spacing: 0.12em; color: var(--orange); font-weight: 600; }
.rb-title { font-size: 12px; color: var(--muted); }
.related { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.related li { padding: 2px 0; cursor: pointer; }
.related li:hover { text-decoration: underline; }
.price-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.price-row input { padding: 6px 8px; border-radius: 4px; border: 1px solid var(--line); width: 100%; }
.btn-mini { background: var(--green); color: #fff; border: 0; padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.size-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.size-grid .size-cell { padding: 6px 0; text-align: center; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-size: 12px; }
.size-grid .size-cell.active { border-color: var(--ink); background: #fff; font-weight: 600; }

.results-context { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.results-quick { font-size: 24px; font-weight: 600; margin-bottom: 10px; }
.filter-pills { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-pills .fp { background: var(--pill); color: var(--pill-text); padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.filter-pills .fp .x { margin-left: 4px; opacity: .6; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product { background: #fff; border-radius: 10px; padding: 10px; position: relative; cursor: pointer;
  transition: transform 120ms ease; }
.product:hover { transform: translateY(-2px); }
.product .img { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; margin-bottom: 8px; }
.product .badge { position: absolute; top: 12px; left: 12px; background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px; }
.product .badge.new   { background: #c66c3c; }
.product .badge.ready { background: #5a8c5d; }
.product .badge.feat  { background: #9c7c3c; }
.product .pick-badge { position: absolute; top: 12px; left: 12px; background: var(--green-2); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px; }
.product .price { font-size: 16px; font-weight: 700; }
.product .strike { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.product .save { color: var(--orange); font-size: 12px; font-weight: 600; }
.product .name { font-size: 13px; margin-top: 2px; line-height: 1.25; }
.product .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.product .heart { position: absolute; top: 12px; right: 12px; color: var(--muted); }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 12px 0; }
.product-detail .pd-img { aspect-ratio: 1 / 1; border-radius: 10px; }
.product-detail h1 { font-size: 28px; margin: 0 0 6px; }
.product-detail .pd-price { font-size: 28px; font-weight: 700; margin-bottom: 12px; }

/* Cart */
.view-cart h1 { font-size: 26px; }
.cart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.ship-group { background: #f3ecdb; padding: 10px 14px; border-radius: 6px; font-size: 13px; }
.ship-group small { display: block; color: var(--muted); margin-top: 2px; }
.cart-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 4px; border-bottom: 1px solid var(--line); }
.cart-item .ci-img { width: 60px; height: 60px; border-radius: 6px; }
.cart-item .ci-rem { font-size: 12px; color: var(--orange); cursor: pointer; }
.past-grid, .addon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 6px; }
.past-card { background: #f3ecdb; padding: 10px 12px; border-radius: 6px; font-size: 12px; }
.past-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.addon-card { background: #fff; border-radius: 8px; overflow: hidden; }
.addon-card .a-img { aspect-ratio: 1 / 1; }
.addon-card .a-body { padding: 8px 10px; font-size: 12px; }
.addon-card .a-body strong { display: block; }
.order-summary { background: #f3ecdb; padding: 16px 18px; border-radius: 10px; height: max-content; }
.order-summary h3 { margin: 0 0 8px; font-size: 14px; }
.order-summary .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.order-summary .row.total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; font-weight: 700; }
.btn-checkout { width: 100%; padding: 10px; background: var(--green); color: #fff; border: 0; border-radius: 6px;
  font-size: 14px; font-weight: 500; margin-top: 10px; cursor: pointer; }
.order-extras { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.7; }

/* Voice assistant */
.assistant { position: fixed; right: 16px; bottom: 16px; top: 16px; width: 320px;
  background: var(--asst-bg); border-radius: 12px; box-shadow: 0 16px 48px rgba(20,18,12,0.18);
  display: flex; flex-direction: column; overflow: hidden; }
.asst-head { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); }
.asst-title { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; line-height: 1.15; }
.asst-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--green); }
.asst-status { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.asst-x { background: transparent; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; }
.asst-tagline { padding: 12px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.asst-actions { flex: 1; overflow-y: auto; padding: 8px 14px; }
.asst-action { background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px;
  color: var(--ink); margin-bottom: 6px; line-height: 1.35; border: 1px solid var(--line); }
.asst-action .name { color: var(--green-2); font-weight: 600; }
.asst-action .args { color: var(--muted); }
.asst-msg { padding: 10px 14px; font-size: 13px; line-height: 1.45; max-height: 30%; overflow-y: auto; border-top: 1px solid var(--line); }
.asst-footer { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.asst-footer input { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; }
.asst-footer button { background: var(--green); color: #fff; border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.asst-start { background: var(--green-2); }

/* Responsive shrink for small windows so the assistant doesn't cover the page */
@media (max-width: 1180px) {
  body { padding-right: 0; }
  .assistant { position: static; width: auto; margin: 16px; height: 480px; }
}

/* ---------- shop-lab additions ---------- */

.lab-pill { background: var(--green-2); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 999px; margin-left: 8px; letter-spacing: 0.04em; vertical-align: 2px; }

.asst-empty { color: var(--muted); font-size: 12px; font-style: italic; padding: 8px 6px; }

/* Stop button: red, full-width, unmistakably the "end this thing" button. */
.asst-footer { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fbf1ec; }
.asst-stop {
  width: 100%; background: #c44232; color: #fff; border: 0;
  padding: 12px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 2px 0 rgba(140, 40, 30, 0.4);
  transition: background 120ms ease, transform 80ms ease;
}
.asst-stop:hover  { background: #a93728; }
.asst-stop:active { transform: translateY(1px); box-shadow: 0 0 0 rgba(0,0,0,0); }
.asst-stop .stop-icon {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  background: #fff; color: #c44232; border-radius: 4px;
  font-size: 11px; line-height: 1; font-weight: 800;
}
.asst-stop[disabled] { background: #b9b3a4; cursor: not-allowed; box-shadow: none; }
.asst-foot-note { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.35; }

/* Onboarding overlay */
.onboard {
  position: fixed; inset: 0; background: rgba(20, 18, 12, 0.78);
  z-index: 9999; display: grid; place-items: start center;
  overflow-y: auto; padding: 28px 16px;
}
.onboard.hidden { display: none; }
.onboard-card {
  background: var(--bg); color: var(--ink); max-width: 920px; width: 100%;
  margin: 24px 0; border-radius: 14px; padding: 32px 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.onboard-card .ob-tag { font-size: 11px; letter-spacing: 0.12em; color: var(--green-2); text-transform: uppercase; font-weight: 600; }
.onboard-card h1 { font-size: 32px; margin: 8px 0 12px; line-height: 1.15; }
.onboard-card .ob-lede { font-size: 15px; color: #2a2823; line-height: 1.55; max-width: 720px; margin: 0; }
.onboard-card h3 { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin: 24px 0 8px; }
.onboard-card h4 { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin: 0 0 6px; }
.onboard-card ul, .onboard-card ol { font-size: 14px; line-height: 1.55; padding-left: 20px; margin: 4px 0 8px; }
.onboard-card .ob-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.onboard-card .ob-prompts li { margin-bottom: 6px; }
.onboard-card .ob-tip { font-size: 13px; color: var(--muted); margin-top: 10px; }
.onboard-card .ob-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.onboard-card .ob-footer { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.btn-cta-large { background: var(--green); color: #fff; border: 0; padding: 12px 22px; border-radius: 8px; font-size: 15px; font-weight: 500; cursor: pointer; }
.btn-cta-large:hover { background: var(--green-2); }
.ob-mic-note { font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .onboard-card { padding: 22px; }
  .onboard-card .ob-cols, .onboard-card .ob-meta { grid-template-columns: 1fr; gap: 16px; }
}
