/* components.css — global shell: header, mega-menu, nav sheet, sheet system,
   cart/chat drawers, toast, floating contact cluster, footer.
   Mobile-first; min-width media queries only. Tokens (tokens.css) only — no
   hard-coded brand colours here. */

/* ------------------------------------------------------------------ *
 * Utilities
 * ------------------------------------------------------------------ */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.btn-block{ width:100%; }

.icon{ width:24px; height:24px; flex:0 0 auto; }
.icon-chev{ width:18px; height:18px; }

/* Icon button — square tap target, used across header + sheets */
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; min-height:44px; padding:0;
  background:transparent; border:0; border-radius:var(--radius-sm);
  color:var(--color-ink); cursor:pointer;
  transition:background-color .15s ease, color .15s ease;
}
.icon-btn:hover{ background:color-mix(in srgb, var(--color-primary) 7%, transparent); }

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */
.site-header{
  position:sticky; top:0; z-index:60;
  background:var(--color-surface);
  border-bottom:1px solid var(--color-line);
}

/* Tier 1 — ribbon */
.ribbon{
  background:var(--color-primary); color:var(--color-primary-ink);
  font-size:var(--text-xs);
}
.ribbon-inner{
  display:flex; align-items:center; justify-content:center; gap:var(--space-2);
  min-height:32px; text-align:center;
}
.ribbon-msg{ margin:0; font-weight:500; letter-spacing:.01em; }
.ribbon-phone{
  display:none; align-items:center; gap:6px;
  color:var(--color-primary-ink); text-decoration:none; font-weight:600;
}
.ribbon-phone .icon{ width:16px; height:16px; }

/* Tier 2 — main bar */
.bar-inner{
  display:flex; align-items:center; gap:var(--space-1); flex-wrap:wrap;
  min-height:60px; padding-block:var(--space-1);
}
.nav-burger{ order:1; }
.brand{ order:2; display:inline-flex; align-items:center; margin-right:auto; text-decoration:none; }
.brand-logo{ height:30px; width:auto; }
.bar-actions{ order:3; display:flex; align-items:center; gap:2px; }

.cart-btn{ position:relative; }
.cart-badge{
  position:absolute; top:4px; right:4px;
  min-width:18px; height:18px; padding:0 5px;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--color-accent); color:var(--color-ink);
  font-size:11px; font-weight:700; line-height:1;
  border-radius:999px; box-shadow:0 0 0 2px var(--color-surface);
}
.cart-badge[hidden]{ display:none; }

/* Search — collapsed to a toggle on mobile, inline on tablet+ */
.search{ order:5; flex-basis:100%; display:none; margin-top:var(--space-1); }
.site-header.search-open .search{ display:block; }
.search-form{ display:flex; align-items:center; gap:var(--space-1);
  border:1px solid var(--color-line); border-radius:var(--radius-sm);
  background:var(--color-bg); padding-left:var(--space-2); }
.search-input{
  flex:1; min-width:0; border:0; background:transparent;
  min-height:44px; font-size:16px; color:var(--color-ink);
}
.search-input:focus{ outline:none; }
.search-form:focus-within{ border-color:var(--color-primary); }
.search-submit{ color:var(--color-primary); }

/* Tier 3 — category row */
.cat-row{
  position:relative;
  border-top:1px solid var(--color-line);
  background:var(--color-surface);
}
.cat-list{
  display:flex; align-items:center; gap:var(--space-1);
  list-style:none; margin:0; padding:var(--space-1) 0;
  overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.cat-list::-webkit-scrollbar{ display:none; }
.cat-item{ flex:0 0 auto; }
.cat-link{
  display:inline-flex; align-items:center; gap:4px;
  padding:6px var(--space-2); border-radius:999px;
  font-size:var(--text-sm); font-weight:500; white-space:nowrap;
  color:var(--color-muted); text-decoration:none;
  transition:background-color .15s ease, color .15s ease;
}
.cat-link:hover{ color:var(--color-ink); background:var(--color-bg); }
.cat-link.is-active{ color:var(--color-primary); font-weight:600; }

/* Mega-menu (tablet+) */
.mega-menu{ display:none; }

/* ------------------------------------------------------------------ *
 * Sheet system (modals + drawers) — plan §C7
 * Z-index ladder: header 60 < float cluster 70 < sheet backdrop 80 <
 * sheets 90 < toast 100 < owner's tour 120. The tour overlay sits above
 * EVERYTHING it may spotlight — open sheets and the float cluster
 * included — see the tour block at the end of this file.
 * ------------------------------------------------------------------ */
.sheet-backdrop{
  position:fixed; inset:0; z-index:80;
  background:rgba(16,24,40,.5);
  opacity:0; visibility:hidden;
  transition:opacity .25s ease, visibility .25s ease;
}
.sheet-backdrop.is-visible{ opacity:1; visibility:visible; }
body.sheet-open{ overflow:hidden; }

/* Bottom-sheet default (cart + chat on mobile) */
.sheet{
  position:fixed; inset:auto 0 0 0; z-index:90;
  display:flex; flex-direction:column; max-height:85vh;
  background:var(--color-surface); color:var(--color-ink);
  border-radius:var(--radius-md) var(--radius-md) 0 0;
  box-shadow:0 -8px 30px rgba(16,24,40,.18);
  transform:translateY(100%); visibility:hidden;
  transition:transform .25s ease, visibility .25s ease;
}
.sheet.is-open{ transform:none; visibility:visible; }

.sheet-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:var(--space-2); padding:var(--space-2) var(--space-2) var(--space-1);
  border-bottom:1px solid var(--color-line);
}
.sheet-title{ font-family:var(--font-display); font-weight:700; font-size:var(--text-lg); }
.sheet-body{ flex:1; overflow-y:auto; padding:var(--space-2); }
.sheet-foot{ padding:var(--space-2); border-top:1px solid var(--color-line); }

/* Nav sheet — full-screen, slides from the left */
.nav-sheet{
  inset:0; max-height:none; border-radius:0;
  box-shadow:none; transform:translateX(-100%);
  width:min(420px,100%);
}
.nav-sheet.is-open{ transform:none; }
.nav-groups{ padding:var(--space-1) 0; }
.nav-group{ border-bottom:1px solid var(--color-line); }
.nav-group > summary{
  display:flex; align-items:center; justify-content:space-between;
  gap:var(--space-2); list-style:none; cursor:pointer;
  padding:var(--space-2); min-height:52px;
  font-family:var(--font-display); font-weight:600; font-size:var(--text-md);
}
.nav-group > summary::-webkit-details-marker{ display:none; }
.nav-group > summary .icon-chev{ color:var(--color-muted); transition:transform .2s ease; }
.nav-group[open] > summary .icon-chev{ transform:rotate(180deg); }
.nav-group ul{ list-style:none; margin:0; padding:0 0 var(--space-1); }
.nav-group li a{
  display:flex; align-items:center; min-height:48px;
  padding:0 var(--space-3); text-decoration:none;
  color:var(--color-muted); font-size:var(--text-md);
}
.nav-group li a:hover{ color:var(--color-ink); background:var(--color-bg); }
.nav-foot{ display:flex; flex-direction:column; gap:var(--space-2); }
.nav-foot-phone{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  color:var(--color-primary); font-weight:700; text-decoration:none; min-height:44px;
}

/* Chat sheet gives its body a working default height */
.chat-body{ min-height:40vh; }

/* ------------------------------------------------------------------ *
 * Toast
 * ------------------------------------------------------------------ */
.toast{
  position:fixed; left:50%; bottom:calc(var(--space-4) + env(safe-area-inset-bottom,0));
  transform:translate(-50%, 20px); z-index:100;
  max-width:min(90vw,360px);
  background:var(--color-ink); color:#fff;
  padding:var(--space-1) var(--space-2); border-radius:var(--radius-sm);
  font-size:var(--text-sm); text-align:center;
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.toast.is-visible{ opacity:1; visibility:visible; transform:translate(-50%,0); }

/* ------------------------------------------------------------------ *
 * Floating contact cluster + chat launcher
 * ------------------------------------------------------------------ */
.float-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:52px; height:52px; border:0; border-radius:999px;
  color:#fff; cursor:pointer; text-decoration:none;
  box-shadow:0 6px 18px rgba(16,24,40,.25);
  transition:transform .15s ease, box-shadow .15s ease;
}
.float-btn:hover{ transform:translateY(-2px); box-shadow:0 10px 22px rgba(16,24,40,.3); }
.float-btn .icon{ width:26px; height:26px; }

.float-cluster{
  position:fixed; left:var(--space-2); z-index:70;
  bottom:calc(var(--space-2) + env(safe-area-inset-bottom,0));
  display:flex; flex-direction:column; gap:var(--space-1);
}
.float-call{ background:var(--color-primary); }
.float-wa{ background:#25D366; }

.chat-launcher{
  position:fixed; right:var(--space-2); z-index:70;
  bottom:calc(var(--space-2) + env(safe-area-inset-bottom,0));
  background:var(--color-accent); color:var(--color-ink);
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */
.site-footer{
  margin-top:var(--space-8);
  background:var(--color-surface);
  border-top:1px solid var(--color-line);
}
.footer-grid{
  display:grid; grid-template-columns:1fr; gap:var(--space-4);
  padding:var(--space-6) 0 var(--space-4);
}
.footer-logo{ height:34px; width:auto; }
.footer-nap{ font-style:normal; margin:var(--space-2) 0; color:var(--color-muted); }
.footer-nap p{ margin:0 0 4px; }
.footer-addr{ color:var(--color-ink); }
.footer-nap a{ color:var(--color-ink); text-decoration:none; font-weight:600; }
.footer-hours{ font-size:var(--text-sm); }
.footer-reviews{
  display:inline-flex; align-items:center; gap:8px;
  color:var(--color-ink); text-decoration:none; font-weight:600; font-size:var(--text-sm);
  margin-bottom:var(--space-2);
}
.footer-stars{ color:var(--color-accent); letter-spacing:1px; }
.footer-social{
  display:flex; align-items:center; gap:8px;
  color:var(--color-muted); text-decoration:none; font-size:var(--text-sm);
}
.footer-social:hover{ color:var(--color-primary); }
.footer-social .icon{ width:20px; height:20px; }

.footer-title{
  font-family:var(--font-display); font-weight:700; font-size:var(--text-md);
  margin:0 0 var(--space-2); color:var(--color-ink);
}
.footer-links{ list-style:none; margin:0; padding:0; }
.footer-links li{ margin-bottom:var(--space-1); }
.footer-links a{
  color:var(--color-muted); text-decoration:none; font-size:var(--text-sm);
  display:inline-flex; min-height:28px; align-items:center;
}
.footer-links a:hover{ color:var(--color-primary); }

.footer-newsletter-copy{ color:var(--color-muted); font-size:var(--text-sm); }
.newsletter-form{ display:flex; gap:var(--space-1); flex-wrap:wrap; }
.newsletter-input{
  flex:1; min-width:0;
  border:1px solid var(--color-line); border-radius:var(--radius-sm);
  padding:0 var(--space-2); background:var(--color-bg);
  min-height:44px; font-size:16px; color:var(--color-ink);
}
.newsletter-input:focus{ outline:none; border-color:var(--color-primary); }
.footer-trust{ margin-top:var(--space-2); }
.trust-astm{ height:34px; width:auto; }

/* Utility strip */
.footer-utility{ border-top:1px solid var(--color-line); background:var(--color-bg); }
.footer-utility-inner{
  display:flex; flex-direction:column; gap:var(--space-2);
  padding:var(--space-2) 0; align-items:flex-start;
}
.footer-legal{ margin:0; font-size:var(--text-xs); color:var(--color-muted); }
.footer-demo{ color:var(--color-muted); }
.footer-demo-actions{ display:flex; flex-wrap:wrap; gap:var(--space-2); }
.footer-demo-btn{
  background:transparent; border:0; padding:0; min-height:auto;
  color:var(--color-primary); font-size:var(--text-xs); font-weight:600;
  text-decoration:underline; cursor:pointer;
}
.footer-demo-btn:hover{ color:var(--color-ink); }
.footer-pay{ height:20px; width:auto; }

/* ================================================================== *
 * Tablet (>=720px)
 * ================================================================== */
@media (min-width:720px){
  .ribbon-inner{ justify-content:space-between; }
  .ribbon-phone{ display:inline-flex; }

  .bar-inner{ flex-wrap:nowrap; }
  .brand-logo{ height:34px; }
  .search{
    order:2; flex:1; flex-basis:auto; display:block;
    margin:0 var(--space-3); max-width:520px;
  }
  .search-toggle{ display:none; }
  .nav-burger{ display:none; }
  .bar-actions{ gap:var(--space-1); }

  /* Mega-menu reveals on hover/focus */
  .cat-list{ overflow:visible; gap:var(--space-1); }
  .mega-menu{
    display:block; position:absolute; left:0; right:0; top:100%;
    background:var(--color-surface); border-top:1px solid var(--color-line);
    box-shadow:var(--shadow-card); z-index:55;
    opacity:0; visibility:hidden; transform:translateY(6px); pointer-events:none;
    transition:opacity .15s ease, visibility .15s ease, transform .15s ease;
  }
  .has-mega:hover > .mega-menu,
  .has-mega:focus-within > .mega-menu{
    opacity:1; visibility:visible; transform:none; pointer-events:auto;
  }
  .mega-grid{
    display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-4);
    padding:var(--space-4) 0;
  }
  .mega-title{
    font-family:var(--font-display); font-weight:700; font-size:var(--text-sm);
    text-transform:uppercase; letter-spacing:.04em;
    color:var(--color-muted); margin:0 0 var(--space-2);
  }
  .mega-col ul{ list-style:none; margin:0; padding:0; }
  .mega-col li{ margin-bottom:var(--space-1); }
  .mega-col a{
    color:var(--color-ink); text-decoration:none; font-size:var(--text-md);
    display:inline-flex; min-height:32px; align-items:center;
  }
  .mega-col a:hover{ color:var(--color-primary); }

  /* Cart drawer becomes a right-side panel */
  .cart-drawer{
    inset:0 0 0 auto; width:min(420px,100%); max-height:none;
    border-radius:0; transform:translateX(100%);
    box-shadow:-8px 0 30px rgba(16,24,40,.18);
  }
  .cart-drawer.is-open{ transform:none; }

  .footer-grid{ grid-template-columns:1fr 1fr; gap:var(--space-5); }
  .footer-utility-inner{
    flex-direction:row; align-items:center; justify-content:space-between;
    flex-wrap:wrap;
  }
}

/* ================================================================== *
 * Desktop (>=1024px)
 * ================================================================== */
@media (min-width:1024px){
  .cat-list{ justify-content:flex-start; gap:var(--space-2); padding:var(--space-1) 0; }
  .cat-link{ font-size:var(--text-md); }
  .footer-grid{ grid-template-columns:1.4fr 1fr 1fr 1.3fr; gap:var(--space-6); }
}

/* ================================================================== *
 * Product card + grid — plan §C8
 * 2-col mobile / 3-col ≥720 / 4-col ≥1024. Mastermind-premium: white
 * surface, 1px line borders, radius-md, shadow-card, amber CTA/badge.
 * ================================================================== */
.grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:var(--space-2);
}

.card{
  position:relative;
  display:flex; flex-direction:column;
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-md);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:transform .18s ease, box-shadow .18s ease;
}
@media (hover:hover){
  .card:hover{ transform:translateY(-3px); box-shadow:0 16px 34px rgba(16,33,63,.15); }
}

.card-media{
  position:relative; display:block;
  aspect-ratio:1 / 1;
  background:var(--color-bg);
}
.card-img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
}
.card-img-alt{ opacity:0; transition:opacity .3s ease; }
@media (hover:hover){
  .card:hover .card-img-alt{ opacity:1; }
}

.card-badge{
  position:absolute; top:var(--space-1); left:var(--space-1); z-index:1;
  padding:3px 9px; border-radius:999px;
  background:var(--color-accent); color:var(--color-ink);
  font-size:10px; font-weight:700; line-height:1.4;
  letter-spacing:.02em; text-transform:uppercase;
  box-shadow:0 1px 3px rgba(16,33,63,.2);
}

.card-body{
  display:flex; flex-direction:column; gap:6px;
  padding:var(--space-2);
  flex:1;
}

.card-chips{
  display:flex; gap:4px; flex-wrap:nowrap; overflow:hidden;
  min-height:18px;
  /* Fade the right edge so a chip clipped by a narrow card reads as
     intentional rather than cut mid-word. No effect when chips fully fit. */
  -webkit-mask-image:linear-gradient(90deg, #000 88%, transparent);
  mask-image:linear-gradient(90deg, #000 88%, transparent);
}
.card-chip{
  flex:0 0 auto;
  padding:2px 8px; border-radius:999px;
  background:color-mix(in srgb, var(--color-primary) 8%, transparent);
  color:var(--color-primary);
  font-size:10px; font-weight:600; line-height:1.5; white-space:nowrap;
}

.card-title{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:2.6em;
  color:var(--color-ink); text-decoration:none;
  font-family:var(--font-display); font-weight:600;
  font-size:var(--text-sm); line-height:1.3;
}
.card-title:hover{ color:var(--color-primary); }

.card-rating{
  display:flex; align-items:center; gap:4px;
  font-size:var(--text-xs); color:var(--color-muted);
}
.card-star{ color:var(--color-accent); font-size:var(--text-sm); line-height:1; }
.card-rating-val{ color:var(--color-ink); font-weight:600; }

.card-price{
  display:flex; align-items:baseline; gap:var(--space-1);
  margin-top:2px;
}
.card-now{ font-size:var(--text-lg); font-weight:700; color:var(--color-ink); }
.card-reg{ font-size:var(--text-sm); color:var(--color-muted); text-decoration:line-through; }

.card-fulfil{ margin:0; font-size:11px; color:var(--color-muted); }

.card-cta{ margin-top:auto; }

/* ================================================================== *
 * Cart drawer internals — plan §C8
 * Line rows, qty stepper (≥44px targets), coupon, "Complete the ride"
 * recs rail, unified totals. Bottom-sheet on mobile (sheet system above).
 * ================================================================== */
.cart-drawer.is-empty .cart-foot{ display:none; }

.cart-empty{
  display:flex; flex-direction:column; align-items:center; gap:var(--space-2);
  text-align:center; padding:var(--space-6) var(--space-2);
}
.cart-empty-title{ margin:0; font-family:var(--font-display); font-weight:700; font-size:var(--text-lg); }
.cart-empty-copy{ margin:0; color:var(--color-muted); font-size:var(--text-sm); max-width:34ch; }

.cart-lines{ display:flex; flex-direction:column; }
.cart-line{
  display:grid; grid-template-columns:auto 1fr auto;
  gap:var(--space-2); align-items:start;
  padding:var(--space-2) 0;
  border-bottom:1px solid var(--color-line);
}
.cart-line-thumb{
  width:72px; height:72px; border-radius:var(--radius-sm);
  object-fit:cover; background:var(--color-bg); border:1px solid var(--color-line);
}
.cart-line-main{ min-width:0; }
.cart-line-name{
  margin:0 0 2px; font-weight:600; font-size:var(--text-sm); line-height:1.3;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.cart-line-meta{ margin:0 0 var(--space-1); font-size:var(--text-xs); color:var(--color-muted); }
.cart-line-controls{ display:flex; align-items:center; gap:var(--space-2); flex-wrap:wrap; }

.qty-stepper{
  display:inline-flex; align-items:center;
  border:1px solid var(--color-line); border-radius:999px; overflow:hidden;
}
.qty-btn{
  width:44px; height:44px; min-height:44px; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent; border:0; cursor:pointer;
  font-size:var(--text-lg); line-height:1; color:var(--color-ink);
}
.qty-btn:hover{ background:var(--color-bg); }
.qty-val{ min-width:30px; text-align:center; font-weight:600; font-size:var(--text-sm); }

.cart-line-remove{
  background:transparent; border:0; padding:0; min-height:auto;
  color:var(--color-muted); font-size:var(--text-xs);
  text-decoration:underline; cursor:pointer;
}
.cart-line-remove:hover{ color:var(--color-sale); }
.cart-line-price{ margin:0; font-weight:700; font-size:var(--text-sm); white-space:nowrap; }

.cart-coupon{ padding:var(--space-2) 0; border-bottom:1px solid var(--color-line); }
.cart-coupon-row{ display:flex; gap:var(--space-1); }
.cart-coupon-input{
  flex:1; min-width:0;
  border:1px solid var(--color-line); border-radius:var(--radius-sm);
  padding:0 var(--space-2); background:var(--color-bg);
  font-size:16px; color:var(--color-ink);
}
.cart-coupon-input:focus{ outline:none; border-color:var(--color-primary); }
.cart-coupon-apply{ flex:0 0 auto; }
.cart-coupon-note{
  margin:var(--space-1) 0 0; font-size:var(--text-xs); line-height:1.5; color:var(--color-ink);
  background:color-mix(in srgb, var(--color-accent) 14%, transparent);
  border-radius:var(--radius-sm); padding:var(--space-1) var(--space-2);
}
.cart-coupon-ok{ margin:var(--space-1) 0 0; font-size:var(--text-xs); color:var(--color-success); font-weight:600; }

.cart-recs{ padding:var(--space-2) 0; border-bottom:1px solid var(--color-line); }
.cart-recs-title{
  margin:0 0 var(--space-1); font-family:var(--font-display);
  font-size:var(--text-sm); font-weight:700;
}
.cart-recs-rail{
  display:flex; gap:var(--space-1); overflow-x:auto;
  scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
  scrollbar-width:none; padding-bottom:2px;
}
.cart-recs-rail::-webkit-scrollbar{ display:none; }
.rec-card{
  flex:0 0 132px; scroll-snap-align:start;
  display:flex; flex-direction:column; gap:4px;
  border:1px solid var(--color-line); border-radius:var(--radius-sm);
  padding:var(--space-1); background:var(--color-surface);
}
.rec-thumb{ width:100%; height:64px; object-fit:cover; border-radius:6px; background:var(--color-bg); }
.rec-name{
  margin:0; font-size:11px; line-height:1.3; font-weight:600;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height:2.6em;
}
.rec-foot{ display:flex; align-items:center; justify-content:space-between; gap:4px; margin-top:auto; }
.rec-price{ font-size:var(--text-xs); font-weight:700; }
.rec-add{
  flex:0 0 auto; min-height:34px; padding:0 var(--space-2);
  border:0; border-radius:999px; cursor:pointer;
  background:var(--color-primary); color:var(--color-primary-ink);
  font-size:var(--text-xs); font-weight:700;
}
.rec-add:hover{ background:color-mix(in srgb, var(--color-primary) 88%, #000); }

.cart-totals{ padding:var(--space-2) 0 var(--space-1); }
.cart-total-row{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:var(--space-2); padding:3px 0;
  font-size:var(--text-sm); color:var(--color-ink);
}
.cart-total-label{ color:var(--color-muted); }
.cart-total-val{ font-variant-numeric:tabular-nums; }
.cart-total-row--strong{
  margin-top:var(--space-1); padding-top:var(--space-1);
  border-top:1px solid var(--color-line);
  font-size:var(--text-lg); font-weight:700;
}
.cart-total-row--strong .cart-total-label{ color:var(--color-ink); }
.cart-delivery-note{ margin:0 0 var(--space-1); font-size:var(--text-xs); color:var(--color-muted); }

/* ================================================================== *
 * Card grid — Tablet (>=720px) 3-col · Desktop (>=1024px) 4-col
 * ================================================================== */
@media (min-width:720px){
  .grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--space-3); }
}
@media (min-width:1024px){
  .grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
}

/* ================================================================== *
 * Shared flow modals (quote / login / review / newsletter / finder) —
 * plan §C8, Task 12. Sheets themselves reuse the sheet system above
 * (.sheet / .sheet-head / .sheet-body); this covers the pieces specific
 * to each flow's body markup, plus the header account-icon logged-in dot.
 * ================================================================== */

/* Success / confirmation panel — quote's post-submit state, newsletter's
   confirmation. */
.flow-success{ display:flex; flex-direction:column; gap:var(--space-1); align-items:flex-start; }
.flow-success-title{ margin:0; font-family:var(--font-display); font-weight:700; font-size:var(--text-lg); }
.flow-success-copy{ margin:0; color:var(--color-muted); }
.flow-success .btn{ margin-top:var(--space-1); }

/* Email preview panel — newsletter confirmation */
.email-preview{
  border:1px solid var(--color-line); border-radius:var(--radius-md);
  padding:var(--space-2); background:var(--color-bg); margin:var(--space-2) 0;
}
.email-preview-label{
  margin:0 0 4px; font-size:var(--text-xs); font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; color:var(--color-muted);
}
.email-preview-subject{ margin:0 0 var(--space-1); font-weight:700; }
.email-preview-body{ margin:0 0 4px; color:var(--color-ink); font-size:var(--text-sm); line-height:1.6; }

/* Login — demo note + the two equal-weight "Log in" / "Create account" CTAs */
.login-note{ margin:0; font-size:var(--text-xs); color:var(--color-muted); font-style:italic; }
.login-actions{ display:flex; gap:var(--space-2); flex-wrap:wrap; margin-top:var(--space-2); }
.login-actions .btn{ flex:1; }

/* Smart Finder — step 1 big choice grid, results grid + actions row */
.finder-choices{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-2); }
.finder-choice{
  display:flex; flex-direction:column; align-items:flex-start; gap:4px;
  min-height:84px; padding:var(--space-2); text-align:left;
  border:1px solid var(--color-line); border-radius:var(--radius-md);
  background:var(--color-surface); cursor:pointer;
  font-family:var(--font-display); font-weight:700; font-size:var(--text-md); color:var(--color-ink);
}
.finder-choice:hover{ border-color:var(--color-primary); color:var(--color-primary); }
.finder-choice-sub{
  font-family:var(--font-text); font-weight:500; font-size:var(--text-xs); color:var(--color-muted);
}
.finder-results-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--space-2); margin:var(--space-2) 0; }
.finder-empty{ color:var(--color-muted); font-size:var(--text-sm); }
.finder-actions{ display:flex; gap:var(--space-2); flex-wrap:wrap; }
.finder-actions .btn{ flex:1; }

/* Chat conversation */
.chat-msgs{ display:flex; flex-direction:column; gap:var(--space-1); padding-bottom:var(--space-1); }
.chat-msg{
  max-width:86%; padding:10px 12px; border-radius:var(--radius-md);
  font-size:var(--text-sm); line-height:1.45;
}
.chat-msg--bot{ align-self:flex-start; background:var(--color-bg); border:1px solid var(--color-line); }
.chat-msg--user{
  align-self:flex-end;
  background:color-mix(in srgb, var(--color-primary) 14%, var(--color-surface));
  color:var(--color-ink);
}
.chat-msg-cta{ display:flex; margin-top:8px; }
.chat-choices{
  display:flex; flex-wrap:wrap; gap:8px;
  padding:var(--space-2); border-top:1px solid var(--color-line);
}
.chat-chip{
  padding:8px 14px; border-radius:999px; min-height:44px;
  border:1px solid var(--color-line); background:var(--color-surface);
  color:var(--color-ink); font-size:var(--text-sm); font-weight:600; cursor:pointer;
}
.chat-chip:hover{ border-color:var(--color-primary); color:var(--color-primary); }
.chat-chip--link{
  background:var(--color-primary); border-color:var(--color-primary); color:var(--color-primary-ink);
  text-decoration:none; display:inline-flex; align-items:center;
}

/* Header account icon — logged-in dot (Task 12) */
.header-icon.is-logged-in{ position:relative; }
.header-icon.is-logged-in::after{
  content:''; position:absolute; top:6px; right:6px;
  width:9px; height:9px; border-radius:999px;
  background:var(--color-success); box-shadow:0 0 0 2px var(--color-surface);
}

/* Modal sheets (>=720px): centered dialog instead of a bottom sheet — same
   treatment for the chat sheet, which is also opened via the sheet system. */
@media (min-width:720px){
  .modal-sheet, .chat-sheet{
    inset:auto; top:50%; left:50%; right:auto; bottom:auto;
    width:min(520px, 90vw); max-height:80vh;
    border-radius:var(--radius-md);
    opacity:0; transform:translate(-50%,-50%) scale(.96);
    transition:transform .2s ease, opacity .2s ease, visibility .2s ease;
  }
  .modal-sheet.is-open, .chat-sheet.is-open{
    opacity:1; transform:translate(-50%,-50%) scale(1);
  }
  .finder-choices{ grid-template-columns:repeat(4,1fr); }
  .finder-results-grid{ grid-template-columns:repeat(3,1fr); }
}

/* ================================================================== *
 * "What Google sees" panel (components/google-panel.js, spec §5) — a
 * modal-sheet like quote/login/review/finder above; this covers only the
 * pieces specific to its own body markup (.sheet/.sheet-head/.sheet-body
 * are shared).
 * ================================================================== */
.google-intro{ margin:0 0 var(--space-2); color:var(--color-muted); font-size:var(--text-sm); }

.google-rows{ display:flex; flex-direction:column; }
.google-row{
  display:flex; justify-content:space-between; align-items:baseline; gap:var(--space-2);
  padding:var(--space-1) 0; border-bottom:1px solid var(--color-line);
}
.google-row-label{ flex:0 0 auto; font-weight:600; color:var(--color-ink); font-size:var(--text-sm); }
.google-row-value{
  flex:1 1 auto; min-width:0; /* flex items don't shrink below content size by
    default — without this a long value (esp. the Lighthouse row) overflows
    the sheet instead of wrapping */
  text-align:right; color:var(--color-muted); font-size:var(--text-sm);
  overflow-wrap:break-word;
}
.google-row--lighthouse{
  flex-direction:column; align-items:flex-start; gap:4px;
  margin-top:var(--space-1); border-bottom:none; border-top:2px dashed var(--color-line);
  padding-top:var(--space-2);
}
.google-row--lighthouse .google-row-label{ color:var(--color-muted); font-weight:700; }
.google-row--lighthouse .google-row-value{ text-align:left; font-size:var(--text-xs); line-height:1.6; }

.google-compare{
  margin:var(--space-2) 0 0; padding:var(--space-2);
  border-radius:var(--radius-sm); background:var(--color-bg);
  font-family:var(--font-display); font-weight:700; font-size:var(--text-md);
  color:var(--color-sale);
}

.google-raw{ margin-top:var(--space-2); border:1px solid var(--color-line); border-radius:var(--radius-sm); }
.google-raw summary{
  padding:var(--space-1) var(--space-2); min-height:44px; display:flex; align-items:center;
  cursor:pointer; list-style:none; font-weight:600; font-size:var(--text-sm); color:var(--color-muted);
}
.google-raw summary::-webkit-details-marker{ display:none; }
.google-raw summary::before{ content:'▸ '; }
.google-raw[open] summary::before{ content:'▾ '; }
.google-raw pre{
  margin:0; padding:var(--space-2); border-top:1px solid var(--color-line);
  max-height:280px; overflow:auto; white-space:pre;
  font-size:11px; line-height:1.5; color:var(--color-ink); background:var(--color-bg);
}

/* ================================================================== *
 * Owner's tour — spotlight coach-marks (components/tour.js, spec §3)
 *
 * z-index:120 — above the whole ladder (header 60 / floats 70 / sheet
 * backdrop 80 / sheets 90 / toast 100; see the sheet-system comment):
 * the tour spotlights sheets and floats, so it must out-stack them.
 * #tour-root exists ONLY while the tour is active (idle cost zero).
 * Geometry (top/left/width/height) is set inline by tour.js from live
 * getBoundingClientRect measurements; everything visual lives here.
 * ================================================================== */
#tour-root{ position:fixed; inset:0; z-index:120; }

/* Backdrop doubles as the click-blocker (aria-modal). In spotlight mode it
   stays transparent — the scrim comes from the highlight's 100vmax shadow,
   which leaves the cutout clear; centered steps dim it directly. */
.tour-backdrop{ position:absolute; inset:0; background:transparent; }
#tour-root.is-centered .tour-backdrop{ background:rgba(16,24,40,.55); }
#tour-root.is-centered .tour-highlight{ display:none; }

.tour-highlight{
  position:absolute; pointer-events:none;
  border-radius:var(--radius-md);
  border:2px solid var(--color-accent);
  box-shadow:0 0 0 100vmax rgba(16,24,40,.55); /* the scrim-with-cutout trick */
}

.tour-card{
  position:absolute; left:var(--space-2); right:var(--space-2);
  padding:var(--space-2);
  background:var(--color-surface); color:var(--color-ink);
  border-radius:var(--radius-md);
  box-shadow:0 12px 32px rgba(16,24,40,.28);
}
.tour-card:focus{ outline:none; }
.tour-card.dock-bottom{ bottom:calc(var(--space-2) + env(safe-area-inset-bottom,0)); }
.tour-card.dock-top{ top:var(--space-2); }
#tour-root.is-centered .tour-card{
  top:50%; left:50%; right:auto; bottom:auto;
  transform:translate(-50%,-50%);
  width:min(calc(100vw - var(--space-4)), 420px);
}

.tour-eyebrow{
  margin:0 var(--space-4) 4px 0;
  font-family:var(--font-display); font-weight:600;
  font-size:var(--text-sm); text-transform:uppercase; letter-spacing:.06em;
  color:var(--color-muted);
}
.tour-title{
  margin:0 var(--space-4) var(--space-1) 0;
  font-family:var(--font-display); font-weight:700; font-size:var(--text-xl);
  line-height:1.25;
}
.tour-body{ margin:0; font-size:var(--text-md); line-height:1.5; }
.tour-actions{ display:flex; gap:var(--space-1); margin-top:var(--space-2); }
.tour-actions .tour-btn{ flex:1; min-height:44px; font-size:var(--text-md); }
.tour-close{
  position:absolute; top:2px; right:2px;
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border:0; border-radius:var(--radius-sm);
  background:transparent; color:var(--color-muted);
  font-size:var(--text-lg); cursor:pointer;
}
.tour-close:hover{ color:var(--color-ink); }

/* Wandered-off mode: a single resume pill, page fully usable underneath. */
#tour-root.is-pill{
  inset:auto 0 calc(var(--space-2) + env(safe-area-inset-bottom,0)) 0;
  display:flex; justify-content:center; pointer-events:none;
}
.tour-resume{
  pointer-events:auto;
  min-height:44px; padding:0 var(--space-3);
  border:0; border-radius:999px; cursor:pointer;
  background:var(--color-primary); color:var(--color-primary-ink);
  font-family:var(--font-display); font-weight:600; font-size:var(--text-md);
  box-shadow:0 6px 18px rgba(16,24,40,.25);
}

/* Motion is opt-in (prefers-reduced-motion respected — spec §3). */
@media (prefers-reduced-motion:no-preference){
  .tour-highlight{
    transition:top .18s ease, left .18s ease, width .18s ease, height .18s ease;
  }
  .tour-card{ animation:tour-card-in .18s ease; }
  @keyframes tour-card-in{
    from{ opacity:0; transform:translateY(8px); }
    to{ opacity:1; transform:none; }
  }
  #tour-root.is-centered .tour-card{ animation:tour-card-in-centered .18s ease; }
  @keyframes tour-card-in-centered{
    from{ opacity:0; transform:translate(-50%,calc(-50% + 8px)); }
    to{ opacity:1; transform:translate(-50%,-50%); }
  }
}

/* Desktop: the card floats adjacent to its target (tour.js clamps). */
@media (min-width:720px){
  .tour-card{ left:auto; right:auto; width:380px; }
  .tour-card.dock-bottom, .tour-card.dock-top{ left:var(--space-2); }
}
