/* RV Parts Giant app — "store app" design: white, image-first, large titles, pill buttons.
   Tokens are Apple-Store-like neutrals with the RVPG orange reserved for actions. */
:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-2: #e8e8ed;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #ff6a00;
  --accent-dark: #e25e00;
  --green: #1f8a4c;
  --amber: #b25e00;
  --blue: #0066cc;
  --sale: #d62f2f;
  --radius: 18px;
  --radius-sm: 12px;
  --pill: 980px;
  --tabbar-h: calc(58px + env(safe-area-inset-bottom));
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: var(--tabbar-h);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3 { letter-spacing: -.02em; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  color: var(--ink);
  padding: calc(8px + env(safe-area-inset-top)) 20px 6px;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.brand-name em { font-style: normal; color: var(--accent); }
.cart-btn { position: relative; padding: 6px; color: var(--ink); }
.cart-btn svg { width: 24px; height: 24px; }
.cart-badge {
  position: absolute; top: -2px; right: -4px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  border-radius: 9px; padding: 3px 6px; min-width: 18px; text-align: center;
}

/* ---------- search ---------- */
.searchbar {
  position: sticky; top: calc(44px + env(safe-area-inset-top)); z-index: 29;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  padding: 2px 20px 10px;
}
.searchbar form {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: var(--radius-sm); padding: 0 12px;
}
.searchbar svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.searchbar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 16px; padding: 10px 0; color: var(--ink);
}
.searchbar input::placeholder { color: #8a8a8f; }
.scan-btn { border: 0; background: transparent; padding: 6px 0 6px 8px; color: var(--ink); flex: none; }
.scan-btn svg { width: 22px; height: 22px; color: var(--ink); }

/* ---------- layout ---------- */
.view { padding: 8px 20px 24px; max-width: 760px; margin: 0 auto; }
.page-title { font-size: 34px; font-weight: 800; margin: 8px 0 14px; line-height: 1.1; }
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 26px 0 12px; font-size: 22px; font-weight: 800; line-height: 1.15;
}
.section-title a { font-size: 15px; font-weight: 500; color: var(--blue); }
.muted { color: var(--muted); }
.count-pill { font-size: 14px; font-weight: 500; }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- tiles (home sections, buy again) ---------- */
.cat-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 20px 8px; margin: 0 -20px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-card {
  flex: none; width: 200px; background: var(--surface);
  border-radius: var(--radius); overflow: hidden; scroll-snap-align: start;
  transition: transform .18s var(--ease);
}
.cat-card:active { transform: scale(.98); }
.cat-card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface); }
.cat-card .ph { display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1; background: var(--surface-2); color: #a1a1a6; font-size: 34px; font-weight: 800; }
.cat-card span { display: block; padding: 12px 14px 14px; font-size: 15px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cat-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px;
}
.cat-row img, .cat-row .ph {
  width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none;
}
.cat-row .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-weight: 800; }
.cat-row .t { flex: 1; min-width: 0; }
.cat-row .t b { display: block; font-size: 15px; line-height: 1.3; }
.cat-row .t small { color: var(--muted); font-size: 12.5px; }
.cat-row svg { width: 18px; height: 18px; color: #a1a1a6; flex: none; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pcard { display: flex; flex-direction: column; position: relative; transition: transform .18s var(--ease); }
.pcard:active { transform: scale(.98); }
.pcard .imgwrap { position: relative; aspect-ratio: 1; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.pcard .imgwrap img { width: 100%; height: 100%; object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.pcard .imgwrap .ph { display: flex; align-items: center; justify-content: center;
  height: 100%; color: #a1a1a6; font-size: 34px; font-weight: 800; }
.badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; color: #fff;
  border-radius: var(--pill); padding: 4px 9px; letter-spacing: .01em;
}
.badge.sale { background: var(--sale); }
.badge.soldout { background: #6e6e73; }
.badge.dealer { background: var(--green); }
.pcard .info { padding: 10px 2px 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .name {
  font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 2.6em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard .price { margin-top: auto; font-size: 15px; font-weight: 500; color: var(--ink); }
.pcard .price s { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }

/* ---------- toolbar (sort) ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 14px; }
.toolbar .count { font-size: 14px; color: var(--muted); }
.toolbar select {
  font-size: 14px; font-weight: 500; color: var(--ink);
  border: 0; border-radius: var(--pill); background: var(--surface); padding: 8px 14px;
  -webkit-appearance: none; appearance: none;
}

.load-more {
  display: block; width: 100%; margin: 18px 0 4px;
  background: var(--surface); border: 0; border-radius: var(--pill);
  padding: 13px; font-weight: 600; color: var(--ink); text-align: center;
}

/* ---------- product detail ---------- */
.gallery {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: var(--radius); background: var(--surface); margin: 4px -4px 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img, .gallery .ph {
  flex: none; width: 100%; aspect-ratio: 1; object-fit: contain; scroll-snap-align: center; padding: 18px; mix-blend-mode: multiply;
}
.gallery .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-size: 44px; font-weight: 800; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0 2px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #d2d2d7; }
.dots i.on { background: var(--ink); }

.ptitle { font-size: 24px; font-weight: 800; line-height: 1.2; margin: 14px 0 6px; }
.pmeta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.pprice { font-size: 26px; font-weight: 700; margin: 8px 0 2px; }
.pprice s { font-size: 16px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.stock { font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.stock.in { color: var(--green); }
.stock.out { color: var(--sale); }

.optgroup { margin-bottom: 12px; }
.optgroup label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.optgroup select {
  width: 100%; font-size: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}

.buyrow {
  position: sticky; bottom: calc(var(--tabbar-h) + 10px); z-index: 20;
  display: flex; gap: 10px; margin: 14px 0;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding: 8px 0; border-radius: var(--pill);
}
.qty {
  display: flex; align-items: center; border: 1px solid var(--line);
  border-radius: var(--pill); background: #fff; overflow: hidden; flex: none;
}
.qty button { width: 42px; height: 48px; border: 0; background: transparent; font-size: 20px; color: var(--ink); }
.qty span { min-width: 30px; text-align: center; font-weight: 600; }
.btn-primary {
  flex: 1; border: 0; border-radius: var(--pill);
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600; padding: 14px 20px;
  transition: background .15s, transform .15s var(--ease);
}
.btn-primary:active { background: var(--accent-dark); transform: scale(.98); }
.btn-primary[disabled] { background: #c7c7cc; }
.btn-primary.wide { width: 100%; display: block; margin-top: 4px; }
.btn-primary.inline { display: inline-block; padding: 13px 28px; text-align: center; }
.btn-primary.sm, .btn-secondary.sm { padding: 9px 16px; font-size: 14px; width: auto; display: inline-block; flex: none; margin: 0; }
.btn-secondary {
  display: block; width: 100%; text-align: center; margin-top: 10px;
  border: 1px solid var(--line); border-radius: var(--pill); background: #fff;
  font-size: 15px; font-weight: 500; padding: 13px; color: var(--ink);
}
.btn-secondary.scanbig { margin: 0 0 16px; }
.btn-plain { font: inherit; cursor: pointer; }

.desc { background: var(--surface); border-radius: var(--radius); padding: 18px; margin: 18px 0;
  font-size: 15px; line-height: 1.55; overflow-wrap: break-word; }
.desc h3 { font-size: 17px; margin: 0 0 10px; }
.desc img { max-width: 100%; height: auto; border-radius: 10px; }
.desc table { width: 100%; font-size: 13px; border-collapse: collapse; }
.desc td, .desc th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }

/* ---------- cart ---------- */
.cart-item {
  display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #ececf0;
}
.cart-item img, .cart-item .ph {
  width: 84px; height: 84px; border-radius: var(--radius-sm); object-fit: contain;
  background: var(--surface); flex: none; padding: 6px; mix-blend-mode: multiply;
}
.cart-item .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-weight: 800; }
.cart-item .ci-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item .ci-title { font-size: 15px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .ci-variant { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cart-item .ci-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.cart-item .qty button { height: 32px; width: 32px; font-size: 16px; }
.cart-item .ci-price { font-weight: 600; font-size: 15px; }
.ci-remove { border: 0; background: none; color: var(--blue); font-size: 13px; padding: 4px 0; align-self: flex-start; }

.summary { padding: 18px 0 6px; margin-top: 6px; }
.summary .row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 8px; color: var(--muted); }
.summary .row.total { font-size: 20px; font-weight: 700; margin: 6px 0 10px; color: var(--ink); }
.summary .note { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.45; }
.summary .note a { color: var(--blue); }

.empty { text-align: center; padding: 64px 20px 40px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: #c7c7cc; margin-bottom: 12px; }
.empty b { display: block; color: var(--ink); font-size: 20px; margin-bottom: 6px; letter-spacing: -.02em; }

/* ---------- tabbar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid #e5e5ea;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 6px; color: #8e8e93; font-size: 10.5px; font-weight: 500;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent); }

/* ---------- misc ---------- */
.spinner { display: flex; justify-content: center; padding: 56px 0; }
.spinner i {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--surface-2); border-top-color: var(--ink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 14px);
  transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500;
  border-radius: var(--pill); padding: 12px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  max-width: 90vw; text-align: center;
}
.error-box { text-align: center; padding: 40px 20px; color: var(--muted); }
.error-box button { margin-top: 12px; }

/* ---------- finder ---------- */
.fit-head { margin: 6px 0 16px; }
.fit-head h2 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.fit-head p { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.45; }
.fit-brands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fit-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fit-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--surface); border: 1.5px solid transparent; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 15px; font-weight: 600; color: var(--ink);
  text-align: left; cursor: pointer; transition: border-color .12s, transform .12s var(--ease);
}
.fit-chips .fit-opt { flex: 0 0 auto; padding: 10px 15px; border-radius: var(--pill); }
.fit-opt small { font-size: 12px; font-weight: 500; color: var(--muted); }
.fit-opt:active { transform: scale(.97); }
.fit-opt.on { border-color: var(--ink); background: #fff; }
.fit-skip {
  display: block; width: 100%; margin-top: 14px; padding: 12px;
  background: none; border: none; color: var(--blue);
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.fit-skip.danger { color: var(--sale); }
.fit-crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); font-weight: 500; margin: 2px 0 14px;
}
.fit-crumb a { color: var(--blue); }
.fit-crumb b { color: var(--ink); }
.fit-crumb span { color: var(--line); }
.fit-note {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--ink); margin-bottom: 12px;
}
.fit-restart {
  display: block; width: 100%; margin: 18px 0 4px; padding: 13px;
  background: none; border: 1px solid var(--line); border-radius: var(--pill);
  color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer;
}
.fitchip {
  display: inline-block; margin-bottom: 2px; padding: 3px 9px; border-radius: var(--pill);
  background: #e3f3e8; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .01em;
}
.fitchip.compat { background: #e5efff; color: var(--blue); }
.fitchip.warn { background: #fff1dc; color: var(--amber); }
.cat-chips { flex-wrap: nowrap; overflow-x: auto; padding: 2px 20px 8px; margin: 0 -20px 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips .fit-opt { white-space: nowrap; }

/* ---------- banners ---------- */
.offer-banner { display: block; margin: 6px 0 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--ink); color: #fff; line-height: 1.35; }
.offer-banner b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.offer-banner span { display: block; font-size: 13px; opacity: .75; margin-top: 3px; }
.offer-banner.dealer { background: #0f3d2e; }
.rig-strip {
  display: flex; align-items: center; gap: 14px; margin: 0 0 6px;
  background: var(--surface); border-radius: var(--radius); padding: 14px 16px;
}
.rig-strip b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.rig-strip small { color: var(--muted); font-size: 13px; }
.rig-strip small a { color: var(--blue); font-weight: 500; }
.rig-ico { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }

/* ---------- cards (Me, orders, rigs) ---------- */
.card {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
  text-align: left; width: 100%; border: 0; color: var(--ink);
}
.card small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.card b { display: block; font-size: 17px; margin: 3px 0; letter-spacing: -.01em; }
.card span { display: block; color: var(--muted); font-size: 14px; }
.card > div:first-child { flex: 1; min-width: 0; }
.card.link i { font-style: normal; color: #a1a1a6; font-size: 22px; flex: none; }
.card.points { background: #e9f6ee; }
.card.points b { font-size: 26px; }
.card.dealer-card { background: #0f3d2e; color: #fff; }
.card.dealer-card small, .card.dealer-card span { color: #bfe3d0; }
.card.order img, .card.order .ph { width: 60px; height: 60px; border-radius: 12px; object-fit: contain; background: #fff; flex: none; padding: 4px; }
.card.order .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-weight: 800; }
.card .grow { flex: 1; min-width: 0; }
.card.order b, .card.rig b { font-size: 15px; }
.card.order small, .card.rig small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.rig-actions { display: flex; flex-direction: column; gap: 8px; }
.rig-actions a { font-size: 14px; font-weight: 500; color: var(--blue); }

.profile { display: flex; align-items: center; gap: 14px; margin: 10px 0 18px; }
.profile .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.profile b { display: block; font-size: 22px; letter-spacing: -.02em; }
.profile small { color: var(--muted); font-size: 14px; }

.pill { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: var(--pill); font-size: 11px; font-weight: 700; letter-spacing: .01em; background: #e3f3e8; color: var(--green); }
.pill.grey { background: var(--surface-2); color: var(--muted); }
.pill.blue { background: #e5efff; color: var(--blue); }
.pill.amber { background: #fff1dc; color: var(--amber); }
.pill.green { background: #e3f3e8; color: var(--green); }

.dealer-price { color: var(--green); }
.dealer-note { font-size: 13px; color: var(--green); font-weight: 600; margin-top: 2px; }
.fitline { font-size: 14px; font-weight: 500; border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 12px; background: var(--surface); color: var(--ink); line-height: 1.4; }
.fitline.ok { background: #e3f3e8; color: var(--green); }
.fitline.warn { background: #fff1dc; color: var(--amber); }

/* ---------- forms ---------- */
.auth { padding: 10px 0 12px; }
.auth h2 { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
.auth p { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 0 0 16px; }
.auth label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--ink); }
.auth label.chk { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.auth input, .auth select { width: 100%; font-size: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 4px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.auth select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236e6e73' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center / 20px; }
.auth input:focus, .auth select:focus { outline: none; border-color: var(--ink); }
.auth input#authCode { font-size: 28px; letter-spacing: .3em; text-align: center; font-weight: 700; }
.auth .btn-primary { margin-top: 16px; }
.auth select + select, .auth select + input { margin-top: 6px; }
.auth-err { margin-top: 12px; background: #fdecec; color: #a11; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; font-weight: 500; }
.auth-info { margin-top: 12px; background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; }
.tiers { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 12px; }
.tiers td { border-top: 1px solid #ececf0; padding: 10px 6px 10px 0; vertical-align: top; line-height: 1.4; }
.tiers td:first-child { white-space: nowrap; width: 1%; padding-right: 16px; }

.ship { background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 8px 0 12px; }
.ship b { display: block; font-size: 16px; }
.ship small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.ship .track { margin: 10px 8px 0 0; }

/* ---------- website-menu navigation ---------- */
.nav-group { background: var(--surface); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.nav-head { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: none; padding: 12px 14px; text-align: left; color: var(--ink); }
.nav-head img, .nav-head .ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex: none; }
.nav-head .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-weight: 800; }
.nav-head .t { flex: 1; min-width: 0; }
.nav-head .t b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.nav-head .t small { color: var(--muted); font-size: 13px; }
.nav-head svg { width: 18px; height: 18px; color: #a1a1a6; flex: none; transition: transform .18s var(--ease); }
.nav-group.open .nav-head svg { transform: rotate(90deg); }
.nav-kids { background: #fff; margin: 0 8px 8px; border-radius: var(--radius-sm); padding: 4px 0; }
.nav-kid { display: block; padding: 12px 16px; font-size: 15px; font-weight: 500; border-top: 1px solid #f0f0f3; }
.nav-kid:first-child { border-top: 0; }
.nav-kid.all { color: var(--blue); }
.nav-kid small { color: var(--muted); font-weight: 400; }

/* ---------- Best-Buy-style home ---------- */
.hero-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 6px -20px 4px; padding: 0 20px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hero-scroll::-webkit-scrollbar { display: none; }
.hero { flex: none; width: calc(100vw - 40px); max-width: 720px; min-height: 150px; border-radius: var(--radius); padding: 20px 22px; color: #fff; scroll-snap-align: start; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hero b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; max-width: 68%; }
.hero span { display: block; font-size: 14px; opacity: .85; margin-top: 6px; max-width: 68%; line-height: 1.35; }
.hero img { position: absolute; right: -6px; bottom: -6px; width: 42%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: rgba(255,255,255,.92); padding: 8px; }
.hero.dark { background: var(--ink); }
.hero.red { background: linear-gradient(135deg, #c8102e, #e94e3c); }
.hero.green { background: linear-gradient(135deg, #0f3d2e, #1f8a4c); }
.hero.blue { background: linear-gradient(135deg, #0a3d91, #0066cc); }
.icon-row { display: flex; gap: 14px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.icon-row::-webkit-scrollbar { display: none; }
.icon-tile { flex: none; width: 84px; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.icon-tile img, .icon-tile .ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface); margin: 0 auto 8px; }
.icon-tile .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-weight: 800; font-size: 22px; }
.icon-tile span { display: block; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-scroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.p-scroll::-webkit-scrollbar { display: none; }
.pcard.mini { flex: none; width: 150px; scroll-snap-align: start; }
.pcard.mini .name { font-size: 13px; min-height: 2.6em; }
.pcard.mini .price { font-size: 14px; font-weight: 600; }
.badge.deal { background: var(--sale); }
.brand-row { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-tile { padding: 10px 16px; border-radius: var(--pill); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); }
/* ---------- Shop tab ---------- */
.quick-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px 4px; padding: 0 20px 8px; scrollbar-width: none; }
.quick-row::-webkit-scrollbar { display: none; }
.quick { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--pill); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); }
.quick i { font-style: normal; font-size: 16px; }
.dept { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #ececf0; color: var(--ink); }
.dept img, .dept .ph { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--surface); flex: none; }
.dept .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-weight: 800; }
.dept .t { flex: 1; min-width: 0; }
.dept .t b { display: block; font-size: 17px; font-weight: 600; }
.dept .t small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept svg { width: 18px; height: 18px; color: #a1a1a6; flex: none; }
.dept.all { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; border: 0; margin-bottom: 14px; }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sub-tile { background: var(--surface); border-radius: var(--radius); overflow: hidden; color: var(--ink); }
.sub-tile img, .sub-tile .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--surface-2); }
.sub-tile .ph { display: flex; align-items: center; justify-content: center; color: #a1a1a6; font-weight: 800; font-size: 28px; }
.sub-tile span { display: block; padding: 10px 12px 12px; font-size: 14px; font-weight: 600; line-height: 1.25; }

.fit-opt.toggle.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar .count a { color: var(--blue); font-weight: 500; }
.cat-chips + .cat-chips { margin-top: -4px; }

/* ---------- Walmart-style account + sign-in ---------- */
:root { --navy: #14336b; }
.acct-band { background: var(--navy); color: #fff; margin: 0 -20px 0; padding: 22px 20px 26px; }
.acct-band h1 { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.acct-band p { margin: 0 0 14px; opacity: .85; font-size: 14.5px; line-height: 1.4; }
.acct-band.signed { display: flex; align-items: center; gap: 14px; padding-bottom: 34px; }
.acct-band.signed p { margin: 0; }
.acct-band .avatar { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--navy); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; flex: none; }
.dealer-pill { margin-left: auto; background: #ffc220; color: #1d1d1f; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--pill); }
.btn-band { display: block; text-align: center; background: #fff; color: var(--navy); font-weight: 700; font-size: 16px; padding: 13px; border-radius: var(--pill); }
.quick-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: -18px 0 8px; position: relative; }
.quick-tile { background: #fff; border-radius: var(--radius-sm); box-shadow: 0 2px 10px rgba(0,0,0,.10); padding: 14px 10px; text-align: center; color: var(--ink); }
.quick-tile .ico { width: 26px; height: 26px; fill: var(--navy); display: block; margin: 0 auto 6px; }
.quick-tile b { display: block; font-size: 14px; }
.quick-tile small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.points-banner { display: block; margin: 12px 0 0; background: #fff8e1; border: 1px solid #ffe08a; border-radius: var(--radius-sm); padding: 12px 14px; color: var(--ink); }
.points-banner b { display: block; font-size: 15px; }
.points-banner span { font-size: 13px; color: var(--blue); }
.acct-group { margin-top: 22px; }
.acct-group h3 { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.acct-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-bottom: 1px solid #ececf0; color: var(--ink); }
.acct-row .ico { width: 22px; height: 22px; fill: var(--navy); flex: none; }
.acct-row .t { flex: 1; min-width: 0; }
.acct-row .t b { display: block; font-size: 15.5px; font-weight: 500; }
.acct-row .t small { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-row .chev { width: 18px; height: 18px; color: #a1a1a6; flex: none; }
.signout { margin-top: 26px; }
.linkish { background: none; border: 0; color: var(--blue); font-size: 14.5px; font-weight: 500; padding: 8px 0; }
.linkish[disabled] { color: var(--muted); }
.linkish.danger { color: var(--sale); }
.center-block { display: block; margin: 8px auto 0; }
.app-ver { text-align: center; color: #a1a1a6; font-size: 12px; margin: 18px 0 4px; }
.signin { max-width: 420px; margin: 0 auto; padding: 14px 0 10px; }
.signin-logo { height: 34px; width: auto; display: block; margin: 6px auto 22px; }
.signin h1 { font-size: 24px; font-weight: 800; text-align: center; margin: 0 0 8px; line-height: 1.2; }
.signin .lead { text-align: center; color: var(--muted); font-size: 15px; line-height: 1.45; margin: 0 0 20px; }
.signin label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.signin input[type=email] { width: 100%; font-size: 17px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; }
.signin input:focus { outline: none; border-color: var(--navy); }
.signin .btn-primary { background: var(--navy); }
.signin .btn-primary:active { background: #0c2350; }
.code-boxes { display: flex; justify-content: center; gap: 8px; margin: 0 0 18px; }
.code-box { width: 46px; height: 56px; text-align: center; font-size: 24px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 12px; }
.signin-links { display: flex; justify-content: space-between; margin-top: 10px; }
.perks { list-style: none; padding: 0; margin: 22px 0 0; }
.perks li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14.5px; }
.perks .ico { width: 22px; height: 22px; fill: var(--navy); flex: none; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.45; margin-top: 22px; }
.fine a { color: var(--blue); }
.rewards-card { background: linear-gradient(135deg, var(--navy), #2457b3); color: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.rewards-card small { opacity: .8; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.rewards-card b { display: block; font-size: 32px; margin: 6px 0 2px; }
.rewards-card span { opacity: .9; font-size: 14px; }

/* ---------- Ask Giant (centre tab + chat) ---------- */
.tabbar a.tab-ask { position: relative; }
.ask-bubble { width: 50px; height: 50px; margin-top: -22px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(255,106,0,.45); border: 3px solid #fff; }
.ask-bubble svg { width: 26px !important; height: 26px !important; }
.tabbar a.tab-ask.active { color: var(--accent); }
.ask-wrap { padding-bottom: 92px; }
.ask-head { display: flex; align-items: baseline; justify-content: space-between; }
.ask-hello { text-align: center; padding: 18px 10px 10px; }
.ask-hello img { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 10px; display: block; }
.ask-hello b { display: block; font-size: 20px; margin-bottom: 6px; }
.ask-hello p { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 0; }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.ask-sugg .fit-opt { padding: 10px 14px; border-radius: var(--pill); font-size: 14px; font-weight: 500; }
.ask-msg { margin: 12px 0; font-size: 15.5px; line-height: 1.45; }
.ask-msg.me { margin-left: auto; max-width: 82%; width: fit-content; background: var(--navy, #14336b); color: #fff; padding: 10px 14px; border-radius: 18px 18px 4px 18px; }
.ask-msg.giant { display: flex; gap: 10px; align-items: flex-start; }
.ask-msg.giant > div { background: var(--surface); padding: 10px 14px; border-radius: 18px 18px 18px 4px; min-width: 0; flex: 1; }
.ask-ava img { width: 32px; height: 32px; border-radius: 9px; display: block; }
.ask-cards { margin: 10px -14px -4px; padding: 2px 14px 6px; }
.ask-msg.typing > div { display: flex; gap: 5px; flex: none; }
.ask-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #a1a1a6; animation: askdot 1s infinite; }
.ask-msg.typing i:nth-child(2) { animation-delay: .15s; } .ask-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes askdot { 0%,60%,100% { opacity: .3 } 30% { opacity: 1 } }
.ask-bar { position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 25; display: flex; gap: 8px; padding: 8px 14px; background: rgba(255,255,255,.95); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid #ececf0; }
.ask-bar input { flex: 1; font-size: 16px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--pill); }
.ask-bar input:focus { outline: none; border-color: var(--accent); }
.ask-bar button { width: 46px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; }
.ask-bar button svg { width: 20px; height: 20px; }
.ask-fine { text-align: center; font-size: 11.5px; color: #a1a1a6; margin-top: 14px; }
.ask-cards .imgwrap { background: #fff; }
.ask-cards .imgwrap img { mix-blend-mode: normal; }
