/* dentalcost — visual identity.
   Colours are sampled from the logo: brand blue #0064F8 (tooth, "cost"), navy #001844
   ("dental"), slate #50647C (tagline). Layout follows the price-comparison conventions
   dentists already know from general shopping sites: search first, a category bar,
   "menor preço via…" cards, a store-by-store table and a price history per product. */

:root {
  --brand: #0064f8;
  --brand-600: #0056d8;
  --brand-700: #0047b3;
  --brand-50: #eaf2ff;
  --brand-100: #d5e5ff;
  --navy: #001844;
  --navy-2: #0b2a5c;
  --slate: #50647c;

  --bg: #f3f6fb;
  --card: #ffffff;
  --ink: #0e1b33;
  --ink-2: #50647c;
  --ink-3: #8a97aa;
  --line: #e2e8f1;

  --good: #0a8f5a;
  --good-soft: #e3f6ec;
  --warn: #b45309;
  --warn-soft: #fff4e0;
  --danger: #d92d20;
  --danger-soft: #fdecea;

  /* names the older components use */
  --accent: var(--brand);
  --accent-soft: var(--brand-50);

  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 24, 68, .06), 0 4px 16px rgba(0, 24, 68, .06);
  --shadow-lg: 0 16px 48px rgba(0, 24, 68, .18);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Outfit', var(--font);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; color: var(--navy); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.err { color: var(--danger); font-size: 13px; }
.sk { color: var(--ink-3); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary, .primary { background: var(--brand); color: #fff; border: 0; }
.btn-primary:hover, .primary:hover { background: var(--brand-600); }
.btn-primary[disabled], .primary[disabled] { background: #c3ccd9; cursor: default; }
.btn-go { background: var(--good); color: #fff; }
.btn-go:hover { background: #087a4d; }
.btn-ghost, .secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover, .secondary:hover { border-color: var(--brand); color: var(--brand); }
.primary { width: 100%; height: 46px; border-radius: 11px; font-weight: 650; font-size: 15px; }
.primary.narrow { width: auto; padding: 0 22px; }
.secondary { width: 100%; height: 40px; margin-top: 8px; border-radius: 11px; font-weight: 600; }
.link { border: 0; background: transparent; color: var(--brand); font-weight: 600; font-size: 13px; padding: 0 4px; }
.danger-link { border: 0; background: transparent; color: var(--danger); font-size: 13px; padding: 6px 0; }
.icon { border: 0; background: transparent; font-size: 24px; color: var(--ink-3); line-height: 1; }

/* ---------------- top line ---------------- */
.topline {
  background: var(--navy); color: #c9d6ee; font-size: 12.5px; text-align: center; padding: 7px 20px;
}
.topline span { color: #fff; font-weight: 600; }

/* ---------------- header ---------------- */
.hdr { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 1px 0 var(--line); }
.hdr-in { display: flex; align-items: center; gap: 24px; height: 76px; }
.logo { flex: none; display: flex; align-items: center; }
.logo img { height: 40px; width: auto; display: block; }

.search { position: relative; flex: 1; display: flex; max-width: 720px; }
.search input {
  flex: 1; height: 48px; padding: 0 18px; border: 2px solid var(--brand);
  border-right: 0; border-radius: 12px 0 0 12px; background: #fff; outline: none; font-size: 15px;
}
.search input::placeholder { color: var(--ink-3); }
.search button {
  width: 58px; border: 0; border-radius: 0 12px 12px 0; background: var(--brand); color: #fff;
  display: grid; place-items: center;
}
.search button:hover { background: var(--brand-600); }

.suggest {
  position: absolute; left: 0; right: 0; top: 54px; z-index: 60; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 8px; max-height: 70vh; overflow: auto;
}
.suggest h5 { margin: 8px 10px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sg {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px;
  color: var(--ink); text-decoration: none; font-size: 14px;
}
.sg:hover, .sg.on { background: var(--brand-50); }
.sg img, .sg .ph, .sg .noimg { width: 38px; height: 38px; object-fit: contain; flex: none; border-radius: 6px; background: #f7f9fc; }
.sg .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg .p { font-weight: 700; color: var(--navy); white-space: nowrap; }
.sg .k { color: var(--ink-3); font-size: 12.5px; }

.hdr-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hact {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 10px; border: 0; background: transparent; color: var(--navy); text-decoration: none;
  font-size: 12px; font-weight: 600; border-radius: 10px;
}
.hact:hover { background: var(--brand-50); color: var(--brand); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.hact .count.pop { animation: pop .35s ease-out; }
.hact .count {
  position: absolute; top: 0; right: 14px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #fff;
}
.account { position: relative; margin-left: 6px; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-btn {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; color: var(--navy); cursor: pointer;
}
.menu-btn .nm { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.menu-body {
  position: absolute; right: 0; top: 48px; z-index: 50; min-width: 230px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 10px; display: flex; flex-direction: column; gap: 2px;
}
.menu-body a, .menu-body button {
  text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: 14px;
}
.menu-body a:hover, .menu-body button:hover { background: var(--brand-50); }
.menu-body .danger-link { color: var(--danger); }

/* ---------------- category bar ---------------- */
.catbar { background: var(--brand); color: #fff; position: relative; }
.catbar-in { display: flex; align-items: center; gap: 4px; height: 46px; }
.allcats {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 0; border: 0;
  background: transparent; color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.allcats:hover, .allcats[aria-expanded=true] { color: #d6e6ff; }
/* Departments scroll sideways -- trackpad, mouse wheel (app.js), swipe -- with no
   buttons; the name cut off at the edge is the cue that there is more. */
.catlinks {
  display: flex; gap: 2px; white-space: nowrap; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.catlinks::-webkit-scrollbar { display: none; }
.catlinks a {
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 12px;
  border-radius: 8px; opacity: .95;
}
.catlinks a:hover { background: rgba(255, 255, 255, .16); opacity: 1; }
.megamenu {
  position: absolute; left: 0; right: 0; top: 46px; z-index: 55; background: #fff; color: var(--ink);
  box-shadow: var(--shadow-lg); border-top: 1px solid var(--line);
}
.mega-in { display: grid; grid-template-columns: 280px 1fr; height: min(70vh, 560px); }
.mega-depts, .mega-types { min-height: 0; }
.mega-depts { border-right: 1px solid var(--line); overflow: auto; padding: 10px 0; }
.mega-depts button {
  width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left;
  border: 0; background: transparent; padding: 9px 20px; font-size: 14px; color: var(--ink);
}
.mega-depts button.on, .mega-depts button:hover { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.mega-depts .n { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.mega-types { padding: 18px 26px; overflow: auto; }
.mega-types h3 { margin: 0 0 12px; font-size: 18px; }
.mega-types h3 a { color: inherit; text-decoration: none; }
.mega-types h3 a:hover { color: var(--brand); }
.mega-types ul { list-style: none; margin: 0; padding: 0; columns: 3 200px; column-gap: 24px; }
.mega-types li { break-inside: avoid; padding: 4px 0; }
.mega-types li a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.mega-types li a:hover { color: var(--brand); }
.mega-back { display: none; border: 0; background: transparent; color: var(--brand); font-weight: 600; font-size: 14px; padding: 0 0 12px; }

/* ---------------- main / sections ---------------- */
.main { min-height: 60vh; padding-bottom: 60px; }
.sec { margin-top: 34px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { margin: 0; font-size: 23px; }
.sec-head a { font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.sec-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

/* ---------------- home ---------------- */
.home-carousel-track { display: grid; overflow: hidden; }
.home-carousel-track > * {
  grid-area: 1 / 1; align-self: stretch; transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}
.home-carousel-track > .is-active { transform: translateX(0); }
.home-carousel-track > :not(.is-active) { transform: translateX(100%); pointer-events: none; }
.home-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.home-carousel-controls button { border: 0; cursor: pointer; }
.home-carousel-arrow {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: var(--navy); font-size: 25px; line-height: 1;
}
.home-carousel-arrow:hover { background: var(--brand-50); color: var(--brand); }
.home-carousel-dots { position: relative; display: flex; gap: 8px; align-items: center; }
.home-carousel-dot { position: relative; display: grid; place-items: center; width: 26px; height: 32px; padding: 0; background: transparent; }
.home-carousel-dot::before {
  content: ''; display: block; width: 8px; height: 8px; border-radius: 50%;
  background: #a5b2c6; transition: opacity .3s ease;
}
.home-carousel-dot.is-active::before { opacity: 0; }
.home-carousel-indicator {
  position: absolute; left: 0; top: 12px; width: 26px; height: 8px; border-radius: 999px;
  background: var(--brand); pointer-events: none;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}
.home-carousel-dots[data-active="1"] .home-carousel-indicator { transform: translateX(34px); }
.home-carousel-controls button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .home-carousel-track > *, .home-carousel-indicator, .home-carousel-dot::before { transition: none; }
}

.bf-banner {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  justify-content: space-between; gap: 32px; min-height: 286px; margin-top: 24px;
  padding: 38px 48px; border-radius: 22px; color: #fff;
  background: radial-gradient(ellipse 48% 85% at 0% 100%, rgba(0, 100, 248, .58), transparent 76%),
              radial-gradient(ellipse 48% 85% at 100% 0%, rgba(0, 100, 248, .65), transparent 76%),
              #070a10;
  box-shadow: 0 16px 36px rgba(0, 24, 68, .14);
}
.bf-copy { position: relative; z-index: 1; min-width: 0; }
.bf-kicker {
  display: inline-block; padding: 5px 11px; border: 1px solid rgba(142, 192, 255, .48);
  border-radius: 999px; color: #cfe3ff; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.bf-title {
  margin: 15px 0 7px; font: 800 clamp(42px, 5vw, 66px)/.98 var(--display);
  letter-spacing: -.045em; text-transform: uppercase;
}
.bf-title span { display: block; color: #84b9ff; }
.bf-subtitle { margin: 0 0 22px; color: #e7f1ff; font-size: 18px; font-weight: 500; }
.bf-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 46px; padding: 0 22px; border-radius: 10px; background: var(--brand);
  color: #fff; font-weight: 700; text-decoration: none;
}
.bf-link:hover { background: var(--brand-600); }
.bf-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.bf-link span { font-size: 20px; line-height: 1; }
.bf-art {
  position: relative; display: grid; place-items: center; flex: none; width: 240px; height: 240px;
  margin: -18px 18px -18px 0; border: 1px solid rgba(142, 192, 255, .4);
  border-radius: 50%; background: radial-gradient(circle, rgba(0, 100, 248, .42), rgba(0, 24, 68, .18) 66%, transparent 72%);
  box-shadow: 0 0 0 34px rgba(0, 100, 248, .07), 0 0 0 76px rgba(0, 100, 248, .035);
}
.bf-art img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 12px 25px rgba(0, 100, 248, .45)); }

.hero {
  margin: 24px 0 0; border-radius: 22px; padding: 46px 48px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(900px 400px at 85% -10%, rgba(0, 100, 248, .95), transparent 60%),
              linear-gradient(120deg, var(--navy) 0%, #062a6b 55%, var(--brand) 120%);
}
.hero::after {
  content: ''; position: absolute; right: -60px; bottom: -80px; width: 380px; height: 380px;
  background: url('/static/brand/icon-192.png') center/contain no-repeat; opacity: .12; transform: rotate(-12deg);
}
.hero h1 { color: #fff; font-size: 40px; line-height: 1.12; margin: 0 0 10px; max-width: 760px; font-weight: 700; }
.hero h1 em { font-style: normal; color: #8ec0ff; }
.hero p.lead { font-size: 17px; color: #cfe0ff; margin: 0 0 24px; max-width: 640px; }
.hero-search { display: flex; max-width: 680px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18); position: relative; z-index: 1; }
.hero-search input { flex: 1; border: 0; outline: none; padding: 0 14px; font-size: 16px; height: 50px; color: var(--ink); background: transparent; }
.hero-search button { height: 50px; padding: 0 26px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; font-size: 16px; }
.hero-search button:hover { background: var(--brand-600); }
.popular { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; position: relative; z-index: 1; align-items: center; }
.popular span { font-size: 13px; color: #b9cff5; }
.popular a {
  color: #fff; text-decoration: none; font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
}
.popular a:hover { background: rgba(255, 255, 255, .22); }
.hero-list {
  display: inline-block; margin-top: 18px; position: relative; z-index: 1; color: #cfe0ff;
  font-size: 14.5px; text-decoration: none;
}
.hero-list b { color: #fff; font-weight: 600; }
.hero-list:hover b { text-decoration: underline; }
.hero-stats { display: flex; gap: 34px; margin-top: 30px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: var(--display); font-size: 26px; color: #fff; }
.hero-stats span { font-size: 13px; color: #b9cff5; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; gap: 14px; }
.step .num {
  flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px;
}
.step h3 { margin: 0 0 4px; font-size: 16px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14px; }

.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.dept-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--navy); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.dept-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.dept-tile b { font-family: var(--display); font-size: 16px; }
.dept-tile span { font-size: 12.5px; color: var(--ink-3); }
.dept-tile .ic {
  width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-family: var(--display); margin-bottom: 6px;
}

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(212px, 1fr); gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.rail > * { scroll-snap-align: start; }
.rail-wrap { position: relative; }
.rail-arr {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 26px; line-height: 1;
  box-shadow: var(--shadow); display: grid; place-items: center; padding: 0 0 3px; transition: opacity .15s;
}
.rail-arr:hover { border-color: var(--brand); color: var(--brand); }
.rail-arr.prev { left: -16px; }
.rail-arr.next { right: -16px; }
.rail-arr:disabled { opacity: 0; pointer-events: none; }
@media (hover: none), (max-width: 900px) { .rail-arr { display: none; } }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 4px; }

.cta-list {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; margin-top: 34px;
  background-image: linear-gradient(90deg, #fff 55%, var(--brand-50));
}
.cta-list h2 { margin: 0 0 4px; font-size: 22px; }
.cta-list p { margin: 0; color: var(--ink-2); }

/* ---------------- product card ---------------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); }
.prod {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow .16s, transform .16s, border-color .16s;
}
.prod:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #cdd7e6; }
.prod.ghost { height: 340px; opacity: .45; }
.prod .pimg { aspect-ratio: 1; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.prod .pimg img { width: 100%; height: 100%; object-fit: contain; }
.noimg { color: #c3ccd9; font-size: 34px; display: grid; place-items: center; width: 100%; height: 100%; background: #f7f9fc; }
.off {
  position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--good); color: #fff; font-size: 12px;
  font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
.prod .brand { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.prod .pname {
  font-size: 14px; line-height: 1.35; font-weight: 500; color: var(--ink); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.9em;
}
.prod .pname:hover { color: var(--brand); }
.prod .via { font-size: 12.5px; color: var(--ink-2); margin-top: auto; }
.prod .via b { color: var(--navy); font-weight: 600; }
.prod .price { font-family: var(--display); font-size: 23px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.prod .oos { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.prod .compare { font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; }
.prod .compare:hover { text-decoration: underline; }
.prod .compare.one { color: var(--warn); }
.prod .addl {
  margin-top: 8px; height: 36px; border: 1px solid var(--brand); border-radius: 9px; background: #fff;
  color: var(--brand); font-weight: 600; font-size: 13.5px; transition: background .14s, color .14s;
}
.prod .addl:hover { background: var(--brand); color: #fff; }
.prod .addl.in { background: var(--brand-50); border-color: transparent; }
.prod .addl.pick { display: grid; place-items: center; text-decoration: none; background: var(--brand); color: #fff; }
.prod .addl.pick:hover { background: var(--brand-600); }
.prod .nvar {
  align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--brand-700); text-decoration: none;
  background: var(--brand-50); border-radius: 999px; padding: 2px 9px;
}
/* A family card reads as a stack: a second edge peeks out under the card. */
.prod.fam { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 var(--line); }
.prod.fam:hover { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 var(--line), var(--shadow); }

/* variant picker (product page) */
.variants { margin: 14px 0 0; }
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; color: var(--navy); }
.vhead b { white-space: nowrap; }
.vfilter { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 13px; min-width: 0; flex: 0 1 240px; outline: none; }
.vfilter:focus { border-color: var(--brand); }
.vlist { display: flex; flex-wrap: wrap; gap: 6px; }
.variants.many .vlist { max-height: 228px; overflow: auto; padding: 2px; }
.vchip {
  display: flex; flex-direction: column; gap: 1px; min-width: 76px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; text-decoration: none; color: var(--ink); line-height: 1.25;
}
.vchip span { font-size: 13.5px; font-weight: 600; }
.vchip small { font-size: 11.5px; color: var(--ink-2); }
.vchip:hover { border-color: var(--brand); }
.vchip.on { border: 2px solid var(--brand); background: var(--brand-50); padding: 5px 9px; }
.vchip.oos span, .vchip.oos small { color: var(--ink-3); }

/* ---------------- results ---------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 18px 0 4px; font-size: 13px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.res-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 16px; }
.res-head h1 { margin: 0; font-size: 26px; }
.res-head .cnt { color: var(--ink-2); font-size: 14px; }
.res-tools { display: flex; gap: 8px; align-items: center; }
.filt-btn {
  display: none; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-weight: 600; color: var(--navy); white-space: nowrap;
}
.filt-btn .nf {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; font-style: normal;
}
.facets-top, .facets-foot { display: none; }
.res-head select { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 12px; font-weight: 500; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand-100); background: var(--brand-50);
  color: var(--brand-700); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600;
}
.chip.clear { background: transparent; border-color: transparent; color: var(--ink-3); font-weight: 500; }
.res-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.facets {
  position: sticky; top: 140px; max-height: calc(100vh - 156px); overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0 12px;
}
.facet { padding: 12px 16px 8px; }
.facet + .facet { border-top: 1px solid var(--line); }
.facet h3 { margin: 2px 0 10px; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--navy); }
.facet .n { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.frow {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent;
  border-radius: 8px; padding: 5px 6px; font-size: 13.5px; color: var(--ink-2);
}
.frow:hover { background: #f3f6fb; color: var(--ink); }
.frow.on { color: var(--brand); font-weight: 650; }
.frow .box { width: 16px; height: 16px; border: 1.5px solid #c3ccd9; border-radius: 4px; flex: none; }
.frow.on .box { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 2.5px #fff; }
.frow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftypes { list-style: none; margin: 0 0 4px 12px; padding: 0 0 0 8px; border-left: 2px solid var(--brand-50); }
.more { border: 0; background: transparent; color: var(--brand); font-size: 12.5px; font-weight: 600; padding: 4px 6px; }
.frange { display: flex; gap: 6px; align-items: center; }
.frange input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 13px; }
.frange button { height: 36px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; padding: 0 12px; }
.fsearch { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 13px; margin-bottom: 6px; outline: none; }
.fsearch:focus, .frange input:focus { border-color: var(--brand); }
.pager { display: flex; gap: 8px; justify-content: center; padding: 28px 0 10px; align-items: center; }
.pager button { height: 40px; padding: 0 16px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-weight: 600; }
.pager button:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); }
.pager button[disabled] { opacity: .4; cursor: default; }
.pager .at { color: var(--ink-3); font-size: 13px; }
.empty { padding: 60px 0; text-align: center; color: var(--ink-3); }

/* ---------------- product page ---------------- */
.pp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; margin-top: 8px; }
.pp-media { aspect-ratio: 1; max-height: 460px; display: grid; place-items: center; border-radius: 14px; background: #fff; }
.pp-media img { width: 100%; height: 100%; object-fit: contain; }
.pp .brand { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.pp h1 { font-size: 26px; line-height: 1.22; margin: 6px 0 10px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #eef2f8; color: var(--ink-2); white-space: nowrap; }
.tag.good { background: var(--good-soft); color: var(--good); font-weight: 600; }
.tag.one { background: var(--warn-soft); color: var(--warn); }
.tag.save { background: var(--good-soft); color: var(--good); font-weight: 650; }
.bestbox { margin-top: 18px; border: 2px solid var(--brand-100); background: linear-gradient(180deg, #f7faff, #fff); border-radius: 16px; padding: 18px 20px; }
.bestbox .lbl { font-size: 13px; color: var(--ink-2); }
.bestbox .lbl b { color: var(--navy); }
.bestbox .big { font-family: var(--display); font-size: 38px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; margin: 4px 0; }
.bestbox .sub { font-size: 13.5px; color: var(--ink-2); }
.bestbox .sub b { color: var(--good); }
.bestbox .acts { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.bestbox .acts .btn { flex: 1; min-width: 180px; }
.pp-sec { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin-top: 18px; }
.pp-sec h2 { margin: 0 0 4px; font-size: 21px; }
.pp-sec > p.muted { margin: 0 0 12px; font-size: 13.5px; }
.offers-list { display: flex; flex-direction: column; }
.offer {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 130px 150px; gap: 14px; align-items: center;
  padding: 14px 8px; border-top: 1px solid var(--line);
}
.offer.best { background: var(--brand-50); border-radius: 12px; border-top-color: transparent; }
.offer.best + .offer { border-top-color: transparent; }
.store { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--navy); }
.sav {
  width: 36px; height: 36px; border-radius: 10px; color: #fff; flex: none;
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px;
}
.offer .as { font-size: 13px; color: var(--ink-2); }
.offer .as small { display: block; color: var(--ink-3); }
.offer .pr { text-align: right; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--navy); }
.offer .pr.oos { color: var(--ink-3); font-size: 15px; }
.offer .pr small { display: block; font-family: var(--font); font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.best-flag { font-size: 11px; font-weight: 700; color: var(--good); text-transform: uppercase; letter-spacing: .04em; }

.hist { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 22px; align-items: start; }
.chart { width: 100%; height: auto; aspect-ratio: 720 / 260; display: block; }
.chart .grid-l { stroke: #e8edf5; }
.chart .ax { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.hstats { display: flex; flex-direction: column; gap: 10px; }
.hstat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.hstat span { display: block; font-size: 12px; color: var(--ink-3); }
.hstat b { font-family: var(--display); font-size: 20px; color: var(--navy); }
.hstat.low b { color: var(--good); }

/* ---------------- alert box (product page) ---------------- */
.alert-box { margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--brand-100); border-radius: 14px; background: #fbfdff; }
.alert-box b { color: var(--navy); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 6px; }
.inline-form select, .inline-form input { height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; }
.inline-form input { width: 110px; }
.inline-form .add { height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 600; }
.inline-form .add:hover { background: var(--navy-2); }
.inline-form .add[disabled] { background: var(--good); }

/* ---------------- footer ---------------- */
.ftr { background: var(--navy); color: #b9c7de; margin-top: 40px; }
.ftr-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 30px; padding-top: 40px; padding-bottom: 28px; }
.ftr-brand p { color: #9fb2d3; margin: 12px 0 0; font-size: 14px; }
.ftr h4 { color: #fff; font-family: var(--display); font-size: 15px; margin: 0 0 12px; }
.ftr ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.ftr li { padding: 3px 0; }
.ftr-note { font-size: 13px; line-height: 1.6; margin: 0; }
.ftr h4.ftr-contact-h { margin-top: 20px; }
.ftr-mail { color: #fff; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ftr-mail:hover { text-decoration: underline; }
.ftr-legal { border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; padding-bottom: 22px; font-size: 12.5px; color: #7f93b6; }
.ftr-legal a { color: #b9c7de; }
.ftr-legal a:hover { color: #fff; }

/* ---------------- privacy policy ---------------- */
.legal {
  max-width: 780px; margin: 28px auto 0; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 34px 40px 40px; color: var(--ink); font-size: 15px; line-height: 1.7;
}
.legal h1 { font-size: 30px; margin: 0; }
.legal-date { color: var(--ink-3); font-size: 13px; margin: 4px 0 22px; }
.legal h2 { font-size: 20px; margin: 34px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 130px; }
.legal h3 { font-size: 15.5px; margin: 20px 0 4px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin: 3px 0; }
.legal a { color: var(--brand); }
.legal-note { background: var(--brand-50); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--navy); }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 6px; }
.legal-toc a {
  font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-700);
}
.legal-toc a:hover { background: var(--brand-100); }
.legal-table { overflow-x: auto; margin: 8px 0 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink-2); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.legal code { font-size: 13px; background: #f3f6fb; padding: 1px 6px; border-radius: 5px; }
.login-legal { text-align: center; margin: 14px 0 0; }
@media (max-width: 640px) { .legal { padding: 22px 18px 28px; border-radius: 14px; } .legal h1 { font-size: 24px; } }

/* ---------------- overlays, drawer, toast ---------------- */
/* With a sheet open, the page under it stays put (on a phone it scrolled instead). */
body:has(.plan-overlay:not([hidden])), body:has(.overlay:not([hidden])) { overflow: hidden; }
.overlay, .plan-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0, 24, 68, .45);
  display: grid; place-items: center; padding: 24px;
}
.sheet, .plan-sheet {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  max-width: 820px; width: 100%; max-height: 88vh; overflow: auto; padding: 26px;
}
.plan-sheet { max-width: 1000px; }
.login-sheet { max-width: 440px; }
.login-sheet h2 { margin: 16px 0 4px; }
#googleBtn { display: flex; justify-content: center; min-height: 44px; margin: 14px 0 4px; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted, #50647c); font-size: 13px; margin: 10px 0; }
.login-or::before, .login-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.login-sent { margin-top: 14px; padding: 16px; border-radius: 12px; background: #eef5ff; }
.login-sent h3 { margin: 0 0 6px; color: var(--navy); }
.close-x {
  position: sticky; top: 0; z-index: 2; float: right; border: 0; background: #eef2f8; box-shadow: 0 0 0 4px #fff;
  width: 32px; height: 32px; border-radius: 9px; font-size: 19px; line-height: 1; color: var(--navy);
}
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 430px; max-width: 94vw; z-index: 90;
  background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 19px; }
.drawer-body { flex: 1; overflow: auto; padding: 10px 14px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; gap: 11px; align-items: center; padding: 10px 6px; border-radius: 10px; }
.li:hover { background: #f7f9fc; }
.li img, .li .noimg { width: 46px; height: 46px; flex: none; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 18px; }
.li .n { flex: 1; font-size: 13px; line-height: 1.35; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.qty button { width: 28px; height: 30px; border: 0; background: transparent; color: var(--ink-2); }
.qty span { width: 24px; text-align: center; font-size: 13px; font-weight: 600; }
.rm { border: 0; background: transparent; color: var(--ink-3); font-size: 18px; }
.rm:hover { color: var(--danger); }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-size: 14px; max-width: min(640px, 92vw); width: max-content;
}
.toast.ok { background: var(--good); }
.toast.err { background: var(--danger); }

/* ---------------- plan ---------------- */
.verdict { border-radius: 14px; padding: 16px 18px; margin-bottom: 20px; background: var(--warn-soft); border: 1px solid #f5d9a8; color: #7c4a06; }
.verdict.ok { background: var(--brand-50); border-color: var(--brand-100); color: var(--navy); }
.frontier { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.pcard { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; }
.pcard.sel { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.pcard.dead { background: #f7f9fc; color: var(--ink-3); }
.pcard .k { font-size: 12px; color: var(--ink-3); }
.pcard .v { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--navy); margin: 3px 0; }
.pcard.dead .v { color: var(--ink-3); }
.pcard .d { font-size: 12.5px; color: var(--ink-2); }
.pcard .badge { font-size: 11px; font-weight: 800; color: var(--good); letter-spacing: .04em; }
.vendor { border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; overflow: hidden; }
.vendor-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 16px; background: #f7f9fc; border-bottom: 1px solid var(--line); }
.vendor-head .who { font-weight: 700; color: var(--navy); }
.tier { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: #eef2f8; color: var(--ink-2); margin-left: 8px; font-weight: 600; }
.tier.A { background: var(--good-soft); color: var(--good); }
.tier.B { background: var(--brand-50); color: var(--brand); }
.vendor ul { list-style: none; margin: 0; padding: 6px 16px 12px; }
.vendor li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13.5px; border-bottom: 1px solid #f0f3f8; }
.vendor li:last-child { border-bottom: 0; }
.vendor li span:last-child { white-space: nowrap; color: var(--ink-2); }
.note { margin: 8px 16px 14px; padding: 9px 12px; border-radius: 9px; background: var(--warn-soft); color: #7c4a06; font-size: 12.5px; }
.cartlink {
  display: inline-block; margin: 12px 16px 14px; padding: 10px 16px; border-radius: 10px; border: 0;
  background: var(--good); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px;
}
.cartlink:hover { background: #087a4d; }
.ext-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px 0; }
.ext-row .cartlink { margin: 0; }
.bm-row { padding: 12px 16px 2px; }
.bm-row .cartlink { margin: 0; }
.bm-how { margin: 10px 0 6px; font-size: 13.5px; color: var(--ink); }
.bm-first { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-2); line-height: 2; }
.bm-drag {
  display: inline-block; padding: 3px 12px; border-radius: 999px; border: 1.5px dashed var(--brand);
  background: var(--brand-50); color: var(--brand-700); font-weight: 700; text-decoration: none; cursor: grab;
}
.vendor details { padding: 4px 16px 12px; }
.vendor summary { cursor: pointer; font-size: 13px; color: var(--ink-2); padding: 6px 0; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13.5px; border-bottom: 1px solid #f0f3f8; }
.checklist a { color: var(--ink); }
.byhand { margin: 10px 16px 14px; }
.byhand > p { margin: 0 0 6px; font-size: 13.5px; color: var(--navy); font-weight: 600; }
.ck-end { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.checklist a.ck-open { color: var(--blue, #0064F8); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.checklist a.ck-open:hover { text-decoration: underline; }
.vendor .hint { margin: 0 16px 12px; font-size: 12.5px; color: var(--muted, #50647c); }

/* ---------------- signed-in views (user.js) ---------------- */
.userview { margin: 24px 0 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.panel.center { text-align: center; max-width: 580px; margin: 30px auto; }
.panel h2 { margin: 0 0 6px; font-size: 22px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form input, .form textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 400; background: #fff; outline: none; color: var(--ink); }
.form input::placeholder, .form textarea::placeholder { color: var(--ink-3); }
.form textarea { resize: vertical; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.form input:focus, .form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.drop input { padding: 18px; border-style: dashed; }
.seg { display: inline-flex; background: #eef2f8; border-radius: 11px; padding: 3px; margin-top: 8px; }
.seg button { border: 0; background: transparent; padding: 7px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,24,68,.12); }
.lists { display: flex; flex-direction: column; margin-top: 8px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 10px; border-radius: 11px; color: inherit; text-decoration: none; border-bottom: 1px solid #f0f3f8; }
.list-row:hover { background: #f7f9fc; }
.counts { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.counts.big { margin: 6px 0; }
.st { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: 12px; font-weight: 700; }
.st.resolved { background: var(--good-soft); color: var(--good); }
.st.ambiguous { background: var(--warn-soft); color: var(--warn); }
.st.unknown { background: var(--danger-soft); color: var(--danger); }
.list-head { margin: 8px 0 14px; }
.list-head h2 { outline: none; border-radius: 6px; padding: 2px 4px; margin-left: -4px; }
.list-head h2:focus { background: #f3f6fb; }
.lines { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 26px minmax(120px, .8fr) 64px minmax(0, 2fr) 28px; gap: 12px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.line .raw { font-size: 13.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); padding-top: 3px; word-break: break-word; }
.qtyin { width: 60px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; }
.res { display: flex; gap: 10px; align-items: center; }
.res img, .noimg.sm { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; border: 1px solid var(--line); font-size: 18px; }
.res a { color: var(--ink); font-weight: 550; font-size: 13.5px; text-decoration: none; }
.res a:hover { color: var(--brand); }
.res .link { margin-left: auto; }
.change { grid-column: 2 / -1; }
.cands { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.cand { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; }
.cand:hover { border-color: var(--brand); background: var(--brand-50); }
.cand img, .cand .noimg { width: 36px; height: 36px; object-fit: contain; font-size: 16px; border-radius: 6px; }
.cands .cand.extra { display: none; }
.cands.all .cand.extra { display: grid; }
.cands .more { align-self: flex-start; }
.cand.first { border-color: var(--brand-100); background: var(--brand-50); }
.sugg {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 1px 7px;
  border-radius: 999px; background: #fff4de; color: #8a5a00; vertical-align: 1px;
}
.cand.first .sugg { background: var(--brand); color: #fff; }
.accept-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px; padding: 12px 16px; margin: 4px 0 10px;
  font-size: 13.5px; color: var(--navy);
}
.accept-bar .btn { white-space: nowrap; }
.cand .cn { font-size: 13px; }
.cand .cp { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.retry, .addline { display: flex; gap: 6px; margin-top: 6px; }
.retry input, .addline input { flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; }
.retry button, .addline button { height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 0 12px; font-weight: 600; }
.addline { margin-top: 14px; }
.plan-bar { margin-top: 20px; max-width: 460px; }
tr.off td { opacity: .5; }
.events { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13.5px; }
.events li { padding: 7px 0; border-bottom: 1px solid #f0f3f8; }
table.offers { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
table.offers th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 0 10px 8px; }
table.offers td { padding: 11px 10px; border-top: 1px solid var(--line); }
table.offers .price { font-weight: 700; text-align: right; white-space: nowrap; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .hact span:not(.count) { display: none; }
  .offer { grid-template-columns: 170px minmax(0, 1fr) 110px 130px; }
}
@media (max-width: 900px) {
  .bf-banner { min-height: 250px; padding: 30px 28px; }
  .bf-title { font-size: clamp(38px, 5.5vw, 54px); }
  .bf-art { width: 180px; height: 180px; margin-right: 0; }
  .bf-art img { width: 112px; height: 112px; }
  .hdr-in { height: auto; padding: 10px 20px; flex-wrap: wrap; gap: 12px; }
  .logo img { height: 32px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .res-layout, .pp, .hist, .cols { grid-template-columns: 1fr; }
  /* Filters: a full-screen sheet opened from the toolbar; the results stay behind it. */
  .res-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .res-tools { width: 100%; }
  .res-tools select { flex: 1; min-width: 0; }
  .filt-btn { display: inline-flex; }
  .facets { display: none; }
  .facets.open {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 85; max-height: none;
    border: 0; border-radius: 0; padding: 0; top: 0;
  }
  body:has(.facets.open) { overflow: hidden; }
  .facets-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--navy); }
  .facets-top .close-x { position: static; float: none; }
  .facets-body { flex: 1; overflow: auto; overscroll-behavior: contain; }
  .facets-foot { display: block; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
  .frow { padding: 8px 6px; font-size: 14.5px; }
  .steps { grid-template-columns: 1fr; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
  .hero { padding: 30px 24px; }
  .hero h1 { font-size: 29px; }
  /* One row per shop: name, price, button; the shop's own product name under it. */
  .offer { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; padding: 12px 6px; }
  .offer .as { grid-column: 1 / -1; order: 3; font-size: 12.5px; }
  .offer .btn { padding: 0 12px; }
  .mega-in { grid-template-columns: 1fr; }
  .mega-types { display: none; }
  .megamenu.drill .mega-depts { display: none; }
  .megamenu.drill .mega-types { display: block; padding: 14px 20px; }
  .megamenu.drill .mega-back { display: block; }
  .mega-types ul { columns: 1; }
  .mega-types li { padding: 7px 0; }
  .pp-media { max-height: 300px; }
  .hstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hstats .btn { grid-column: 1 / -1; }
  .hstat { padding: 8px 10px; }
  .hstat b { font-size: 16px; }
  .line { grid-template-columns: 24px 1fr 60px 24px; }
  .line .res, .line .ask { grid-column: 2 / -1; }
  .line .rm { grid-column: 4; grid-row: 1; }
}
@media (max-width: 700px) {
  .bf-banner { gap: 18px; padding: 28px 24px; }
  .bf-art { width: 140px; height: 140px; margin-right: 0; }
  .bf-art img { width: 90px; height: 90px; }
}
@media (max-width: 599px) {
  .bf-banner { justify-content: center; text-align: center; padding-inline: 12px; }
  .bf-copy { width: 100%; }
  .bf-kicker { font-size: 12px; }
  .bf-title { font-size: clamp(30px, 12.5vw, 70px); white-space: nowrap; }
  .bf-subtitle { font-size: clamp(16px, 3.8vw, 20px); }
  .bf-link { width: max-content; max-width: 100%; min-height: 48px; font-size: 16px; }
  .bf-art { display: none; }
}
@media (max-width: 560px) {
  .bf-banner { min-height: 0; margin-top: 14px; padding: 28px 12px; border-radius: 18px; }
  /* Phone (checked at 390px, 2026-09-30). The header fits one row of logo + actions
     once the account shows only its initial, so the pinned header takes ~60px less. */
  .hdr-in { padding: 8px 14px; gap: 8px; }
  .logo img { height: 29px; }
  .hact { padding: 6px 7px; }
  .hact .count { right: 6px; }
  .menu-btn .nm { display: none; }
  .hero-search input { min-width: 0; padding: 0 10px; }     /* else "Buscar" overflows */
  .hero-search button { padding: 0 16px; }
  /* "Qual destes?": the name gets the width, price and stores go under it. */
  .cand { grid-template-columns: 36px minmax(0, 1fr); }
  .cand .cp { grid-column: 2; font-size: 12px; }
  .line { gap: 8px; }
  .accept-bar { padding: 12px; }
  .accept-bar .btn { width: 100%; }
  /* Plan and carts: the product name takes the row, price and link go under it. */
  .overlay, .plan-overlay { padding: 8px; }
  .sheet, .plan-sheet { padding: 16px; max-height: 94vh; }
  .checklist li { flex-wrap: wrap; row-gap: 2px; }
  .checklist li > span:first-child { flex: 1 1 100%; }
  .ck-end { margin-left: auto; }
  .vendor-head { flex-wrap: wrap; gap: 4px 10px; }
  .vendor-head .tier { white-space: nowrap; }
  .byhand, .bm-row { margin-left: 12px; margin-right: 12px; padding-left: 0; padding-right: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* A rail has no template columns: with two of them, the cards that overflow took
     the auto width and squeezed the first two to nothing. */
  .rail { grid-auto-columns: 46%; }
  .chart .ax { font-size: 20px; }
  .hero-search input::placeholder { font-size: 14px; }
  .prod .price { font-size: 19px; }
  .ftr-in { grid-template-columns: 1fr; }
  .bestbox .big { font-size: 30px; }

  /* Home, compact: the first screen shows the search and the list shortcut, and the
     sections below stop being a column of full-width cards. */
  .hero { margin-top: 14px; padding: 24px 18px; border-radius: 18px; }
  .hero::after { width: 220px; height: 220px; right: -50px; bottom: -50px; }
  .hero h1 { font-size: 25px; }
  .hero p.lead { font-size: 15px; margin-bottom: 16px; }
  .popular { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -18px; padding-right: 18px; }
  .popular::-webkit-scrollbar { display: none; }
  .popular span, .popular a { flex: none; }
  .hero-list { font-size: 14px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 22px; }
  .hero-stats b { font-size: 21px; }
  .hero-stats span { font-size: 12px; }
  .sec { margin-top: 28px; }
  .sec-head h2 { font-size: 20px; }
  .sec-head p { font-size: 13px; }
  .steps { gap: 8px; }
  .step { padding: 14px; gap: 12px; }
  .step .num { width: 32px; height: 32px; font-size: 16px; }
  .step p { font-size: 13.5px; }
  .depts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dept-tile { padding: 12px 14px; }
  .dept-tile .ic { display: none; }
  .dept-tile b { font-size: 14.5px; line-height: 1.25; }
  .cta-list { padding: 20px; margin-top: 28px; }
  .cta-list h2 { font-size: 19px; }
  .cta-list .btn { width: 100%; }
  .pp { padding: 16px; gap: 16px; }
  .pp h1 { font-size: 21px; }
  .pp-sec { padding: 16px; }
  .store { gap: 8px; font-size: 14px; }
  .sav { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
  .offer .pr { font-size: 17px; }
  .res-head h1 { font-size: 22px; }
}
