/* ============================================================
   bloodtest.in — Design System
   Premium health-tech UI — emerald brand — human-friendly
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --ink: #111827;
  --body: #4b5563;
  --muted: #6b7280;
  --faint: #9ca3af;

  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --primary: #c50000;
  --primary-deep: #991b1b;
  --primary-dark: #7f0000;
  --primary-soft: #ffeaea;
  --primary-faint: #fff5f5;

  --accent: #c50000;
  --accent-deep: #991b1b;
  --accent-soft: #ffeaea;

  --success: #129452;
  --success-soft: #e4f6ec;
  --warning: #d97706;
  --warning-soft: #fdf1dc;
  --danger: #dc2626;
  --danger-soft: #fdeaea;
  --info: #2563eb;
  --info-soft: #e8effd;

  --star: #f59e0b;
  --star-soft: #fef3dc;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --shadow-sm: 0 1px 2px rgba(11, 31, 26, .05), 0 1px 3px rgba(11, 31, 26, .05);
  --shadow-md: 0 2px 6px rgba(11, 31, 26, .06), 0 8px 24px rgba(11, 31, 26, .07);
  --shadow-lg: 0 4px 12px rgba(11, 31, 26, .08), 0 18px 48px rgba(11, 31, 26, .12);

  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; }
.ic { width: 18px; height: 18px; flex: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Typography utilities ---------- */
.text-sm { font-size: 13px; }
.text-lg { font-size: 17px; }
.text-muted { color: var(--muted); }
.fw-700 { font-weight: 700; }
.strike { text-decoration: line-through; color: var(--muted); }
.green { color: var(--success); font-weight: 600; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.divider { height: 1px; background: var(--border); border: 0; margin: 20px 0; }
.req { color: var(--danger); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
  text-decoration: none !important;
}
.btn .ic { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 26px; font-size: 15px; border-radius: 12px; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(197, 0, 0, .3); }
.btn-primary:hover { background: var(--primary-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(197, 0, 0, .28); }

.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(255, 72, 72, .3); }
.btn-accent:hover { background: var(--accent-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 72, 72, .3); }

.btn-outline { background: #fff; border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-faint); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary-deep); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0e7a45; color: #fff; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.5;
}
.badge-primary { background: var(--primary-soft); color: var(--primary-deep); }
.badge-accent  { background: var(--accent-soft); color: var(--accent-deep); }
.badge-success { background: var(--success-soft); color: #0b7a44; }
.badge-warning { background: var(--warning-soft); color: #b45309; }
.badge-danger  { background: var(--danger-soft); color: #b91c1c; }
.badge-info    { background: var(--info-soft); color: #1d4ed8; }

/* ---------- Alerts ---------- */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
  margin-bottom: 12px;
}
.alert-success { background: var(--success-soft); border-color: #b9e4cb; color: #0b7a44; }
.alert-danger  { background: var(--danger-soft); border-color: #f3c1c1; color: #b91c1c; }
.alert-warning { background: var(--warning-soft); border-color: #f1d9a9; color: #b45309; }
.alert-info    { background: var(--info-soft); border-color: #bcd0fa; color: #1d4ed8; }
.flash-stack { padding-top: 16px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(197, 0, 0, .12); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a74' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.form-check input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-help-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; margin: 2px 0 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #9ca3af; font-size: 12.5px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 22px; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar-item .ic { width: 14px; height: 14px; }
.topbar-link { color: #d1d5db; font-weight: 600; }
.topbar-link:hover { color: #fff; }
@media (max-width: 820px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 7px 0 6px; gap: 3px 0; }
  .topbar-left { display: flex; order: 2; width: 100%; justify-content: center; gap: 14px; font-size: 11.5px; }
  .topbar-right { order: 1; width: 100%; justify-content: space-between; gap: 10px; font-size: 12px; }
  .topbar-item .ic { width: 12px; height: 12px; }
  .topbar-link { white-space: nowrap; }
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(197, 0, 0, .35);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  padding-bottom: 2px;
}
.logo-icon .ic { width: 22px; height: 22px; }
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -.02em; }
.logo-text span { color: var(--primary); }
.logo-light .logo-text { color: #fff; }
.logo-light .logo-text span { color: #f87171; }

/* City pill */
.city-select { position: relative; }
.city-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}
.city-btn:hover { border-color: var(--primary); color: var(--primary); }
.city-btn .ic { width: 16px; height: 16px; color: var(--primary); }
.city-btn .caret { width: 13px; height: 13px; color: var(--muted); transition: transform .18s; }
.city-select.open .caret { transform: rotate(180deg); }
.city-panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  width: min(300px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease;
}
.city-panel.open { opacity: 1; visibility: visible; transform: none; }
.city-panel-title { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.city-search {
  width: 100%; box-sizing: border-box;
  padding: 8px 12px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 13px;
}
.city-search:focus { outline: none; border-color: var(--primary); }
.city-scroll { max-height: 300px; overflow: auto; }
.city-group-label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 4px 0 4px; }
.city-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.city-empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 14px 0; }
.city-option {
  padding: 8px 10px;
  border: 0; border-radius: 8px;
  background: transparent;
  font-size: 13.5px; font-weight: 500;
  color: var(--body);
  cursor: pointer; text-align: left;
  transition: all .12s;
}
.city-option:hover { background: var(--bg); color: var(--ink); }
.city-option.active { background: var(--primary-soft); color: var(--primary-deep); font-weight: 700; }

/* Search */
.nav-search {
  flex: 1; max-width: 460px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 16px;
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  transition: all .15s;
}
.nav-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(197, 0, 0, .1); }
.nav-search .ic { width: 17px; height: 17px; color: var(--muted); }
.nav-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); min-width: 0; }

/* Actions */
.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-login { background: transparent; border-color: var(--border-strong); color: var(--ink); }

.user-menu { position: relative; }
.user-avatar {
  display: inline-flex; align-items: center; gap: 6px;
  width: 38px; height: 38px;
  border: 0; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-deep);
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  cursor: pointer; justify-content: center;
}
.user-avatar .caret { width: 13px; height: 13px; }
.user-avatar:hover { background: var(--primary); color: #fff; }
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  min-width: 230px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease;
}
.user-dropdown.open { opacity: 1; visibility: visible; transform: none; }
.user-dropdown hr { margin: 10px 0; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--body);
}
.user-dropdown a:hover { background: var(--primary-faint); color: var(--primary-deep); }
.user-dropdown a .ic { width: 16px; height: 16px; }
.ud-name { font-family: var(--font-display); font-weight: 800; color: var(--ink); margin: 2px 12px 0; }
.ud-mail { font-size: 12.5px; color: var(--muted); margin: 0 12px 6px; }

.cart-link { position: relative; display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); background: var(--bg); transition: all .15s; }
.cart-link:hover { background: var(--primary-soft); color: var(--primary-deep); }
.cart-link .ic { width: 21px; height: 21px; }
.cart-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 800;
  border: 2px solid #fff;
}

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
.nav-toggle .ic { width: 24px; height: 24px; }

/* ---------- Page head / crumbs ---------- */
.page-head { padding: 34px 0 6px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin-bottom: 6px; }
.page-head h1 em, .section-title em, .text-lg em { font-style: normal; color: var(--primary); margin-right: 3px; }
.page-head p { color: var(--muted); max-width: 640px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--primary); }
.crumbs .ic { width: 13px; height: 13px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(197, 0, 0, .10), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255, 72, 72, .07), transparent 55%),
    linear-gradient(180deg, #fafafa 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(197, 0, 0, .10) 1px, transparent 1.5px);
  background-size: 26px 26px;
  mask-image: linear-gradient(90deg, transparent 45%, rgba(0,0,0,.5));
  -webkit-mask-image: linear-gradient(90deg, transparent 45%, rgba(0,0,0,.5));
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 64px 0 72px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; margin-bottom: 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--primary-deep);
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow .ic { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -.025em; margin-bottom: 18px; }
.hero h1 span { color: var(--primary); position: relative; white-space: nowrap; }
.hero-lead { font-size: 16.5px; color: var(--body); max-width: 520px; margin-bottom: 26px; }
.hero-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 7px 7px 20px;
  max-width: 540px;
  box-shadow: var(--shadow-md);
  transition: all .15s;
}
.hero-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(197, 0, 0, .12), var(--shadow-md); }
.hero-search .ic { width: 19px; height: 19px; color: var(--muted); }
.hero-search input { flex: 1; border: 0; outline: 0; font-size: 15px; color: var(--ink); min-width: 0; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.hero-chip {
  padding: 6px 13px;
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--body);
  transition: all .14s;
}
.hero-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-faint); }

/* City / area test links (MaxLab-style landing rows) */
.area-test-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; text-decoration: none; transition: all .14s;
}
.area-test-link:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(197,0,0,.08); }
.area-test-link b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.area-test-link small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.area-test-price { font-size: 13.5px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.area-test-price small { color: var(--muted); font-weight: 500; text-decoration: line-through; margin-left: 4px; }

/* MaxLab-style inline pipe-separated links (homepage/city pages) */
.city-inline {
  padding: 15px; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.06);
  line-height: 2.5;
}
.city-inline-link {
  border-right: 2px solid var(--border-strong);
  margin-right: 9px; padding-right: 9px;
  font-size: 13px; font-weight: 600; color: var(--body);
  text-decoration: none; white-space: nowrap; transition: color .14s;
}
.city-inline-link:first-child { padding-left: 0; }
.city-inline-link:hover { color: var(--primary); }
.city-inline-scroll {
  max-height: 135px; overflow-x: auto; overflow-y: auto; padding-right: 10px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.city-inline-scroll::-webkit-scrollbar { width: 6px; }
.city-inline-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.city-inline-scroll::-webkit-scrollbar-track { background: transparent; }
.cat-test-row {
  display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.cat-test-row::-webkit-scrollbar { height: 6px; }
.cat-test-row::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.cat-test-row::-webkit-scrollbar-track { background: transparent; }
.cat-test-row .test-card { flex: 0 0 300px; scroll-snap-align: start; }
.view-all-wrap { display: flex; justify-content: center; margin-top: 16px; }
.view-all-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; background: #fff; border: 1.5px solid var(--primary);
  border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--primary);
  cursor: pointer; transition: all .14s;
}
.view-all-btn:hover { background: var(--primary); color: #fff; }
.view-all-btn .ic { width: 15px; height: 15px; }
.grid[hidden] { display: none; }

.hero-stats { display: flex; gap: 34px; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.hero-stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* Hero art — booking card mock */
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art-inner {
  width: min(380px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
  transform: rotate(1.2deg);
}
.hai-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; }
.hai-row + .hai-row { border-top: 1px dashed var(--border); }
.hai-icon {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-deep);
}
.hai-icon.tint-2 { background: var(--star-soft); color: #b45309; }
.hai-icon.tint-3 { background: var(--info-soft); color: #1d4ed8; }
.hai-icon.tint-4 { background: var(--accent-soft); color: var(--accent-deep); }
.hai-info { flex: 1; min-width: 0; }
.hai-info b { display: block; font-family: var(--font-display); font-size: 14px; color: var(--ink); }
.hai-info span { font-size: 12.5px; color: var(--muted); }
.hai-price { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--primary); }
.hai-price.free { color: var(--accent); }
.hero-badge {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 10px 14px;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.hero-badge .ic { width: 20px; height: 20px; color: var(--primary); }
.hero-badge.bb-1 { top: -14px; right: -6px; }
.hero-badge.bb-2 { bottom: 18px; left: -34px; }
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding: 48px 0 60px; }
  .hero-art { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head[style*="center"], .section-head { }
.section-title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 6px; }
.section-sub { color: var(--muted); margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.link-more:hover { gap: 10px; }
.link-more .ic { width: 15px; height: 15px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1024px) { .grid-4, .grid-6 { grid-template-columns: repeat(3, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Category tiles ---------- */
.cat-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  transition: all .16s ease;
}
.cat-tile:hover { transform: translateY(-3px); background: var(--primary); border-color: var(--primary); box-shadow: 0 10px 24px rgba(197, 0, 0, .25); }
.cat-icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-faint); color: var(--primary);
  border-radius: 16px;
  margin-bottom: 16px;
  transition: all .16s;
}
.cat-tile:hover .cat-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.cat-icon .ic { width: 28px; height: 28px; }
.cat-name { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; transition: color .16s; }
.cat-tile:hover .cat-name { color: #fff; }
.cat-count {
  margin-top: auto; padding-top: 10px;
  display: inline-flex; align-items: center;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
  transition: all .16s;
}
.cat-tile:hover .cat-count { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #ffeaea; }

/* ---------- Test cards ---------- */
.test-card {
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.test-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.test-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.test-card-title { font-size: 17.5px; font-weight: 800; margin: 0; }
.test-card-title a { color: var(--ink); }
.test-card-title a:hover { color: var(--primary); }
.test-card-desc {
  font-size: 13.5px; color: var(--muted); margin: 0 0 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.test-meta { display: flex; flex-wrap: wrap; gap: 14px; }
.test-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.test-meta .ic { width: 15px; height: 15px; color: var(--primary); }
.test-card-side {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price-old { font-size: 13px; color: var(--faint); text-decoration: line-through; }
.price-off { font-size: 12px; font-weight: 800; color: var(--success); }
.add-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1.5px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700; font-size: 13.5px;
  cursor: pointer;
  transition: all .15s;
}
.add-btn:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(197, 0, 0, .3); }
.stepper {
  display: inline-flex; align-items: center;
  background: var(--primary); border-radius: 10px;
  box-shadow: 0 4px 14px rgba(197, 0, 0, .3);
  overflow: hidden;
}
.stepper button {
  width: 36px; height: 38px;
  border: 0; background: transparent;
  color: #fff; font-size: 17px; font-weight: 700;
  cursor: pointer;
  transition: background .12s;
}
.stepper button:hover { background: rgba(255, 255, 255, .16); }
.stepper .qty { min-width: 30px; text-align: center; color: #fff; font-weight: 800; font-size: 14.5px; }

/* ---------- Package cards ---------- */
.pkg-card {
  position: relative;
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid transparent;
  transition: all .18s ease;
}
.pkg-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, #c50000, #ff4848);
}
.pkg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }
.pkg-1 { background: linear-gradient(160deg, #ffeaea, #fff7f7); }
.pkg-2 { background: linear-gradient(160deg, #fef2f2, #fffafa); }
.pkg-2::before { background: linear-gradient(90deg, #991b1b, #ff4848); }
.pkg-3 { background: linear-gradient(160deg, #f3f4f6, #fafafa); }
.pkg-3::before { background: #9ca3af; }
.pkg-badge { align-self: flex-start; margin-bottom: 14px; }
.pkg-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.pkg-card p { font-size: 13.5px; color: var(--body); margin-bottom: 18px; }
.pkg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.pkg-price { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--ink); }
.pkg-price small { display: block; font-size: 12px; color: var(--muted); font-family: var(--font-body); font-weight: 500; text-decoration: line-through; }

/* ---------- Lab cards ---------- */
.lab-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.lab-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lab-avatar {
  width: 52px; height: 52px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--primary-soft); color: var(--primary-deep);
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
}
.lab-avatar.alt { background: var(--info-soft); color: #1d4ed8; }
.lab-avatar.alt2 { background: var(--star-soft); color: #b45309; }
.lab-card-body { flex: 1; min-width: 0; }
.lab-card-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.lab-card-title a { color: var(--ink); }
.lab-card-title a:hover { color: var(--primary); }
.rating-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--star-soft); color: #b45309;
  border-radius: 7px; padding: 2px 8px;
  font-size: 12px; font-weight: 800;
}
.rating-badge .ic { width: 12px; height: 12px; fill: var(--star); stroke: none; }
.lab-card-desc {
  font-size: 13.5px; color: var(--muted); margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lab-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.lab-tag {
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 700; color: var(--body);
}
.lab-tag.nabl { background: var(--success-soft); border-color: #b9e4cb; color: #0b7a44; }
.lab-tag.home { background: var(--info-soft); border-color: #bcd0fa; color: #1d4ed8; }
.lab-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.lab-meta span { display: inline-flex; align-items: center; gap: 5px; }
.lab-meta .ic { width: 14px; height: 14px; color: var(--primary); }
.lab-card-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lab-tests-count { text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lab-tests-count b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; }
@media (max-width: 900px) { .lab-card { flex-wrap: wrap; } .lab-card-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { padding: 28px 24px; position: relative; }
.step-num {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  border-radius: 13px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 16px rgba(197, 0, 0, .3);
  margin-bottom: 16px;
}
.step h3 { font-size: 16.5px; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* ---------- How it works (homepage) ---------- */
.how-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; }
.how-step {
  text-align: center; padding: 30px 26px 26px; position: relative;
  background: linear-gradient(180deg, #fff7f5, #fff);
  border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 8px 22px rgba(29, 43, 43, .06);
}
.how-badge {
  width: 64px; height: 64px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff8a4d, var(--primary));
  color: #fff; border-radius: 50%;
  box-shadow: 0 8px 18px rgba(197, 0, 0, .28);
}
.how-badge .ic { width: 28px; height: 28px; }
.how-num {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--primary); margin-bottom: 8px;
  padding: 3px 10px; border-radius: 999px; background: rgba(197, 0, 0, .08);
}
.how-step h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; color: var(--dark); }
.how-step p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.65; }
.how-connector { width: 44px; border-top: 2px dashed var(--border-strong); position: relative; }
.how-connector::after {
  content: ''; position: absolute; top: -5px; right: 0;
  width: 8px; height: 8px; border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong);
  transform: rotate(45deg);
}
@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-connector { width: 100%; transform: rotate(90deg); margin: 2px 0 6px; }
}


/* ---------- Partner CTA ---------- */
.cta-partner {
  position: relative;
  border-radius: 24px;
  padding: 48px 52px;
  background:
    radial-gradient(600px 300px at 90% -20%, rgba(255, 72, 72, .28), transparent 60%),
    radial-gradient(500px 280px at -10% 120%, rgba(255, 72, 72, .16), transparent 55%),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-deep) 55%, var(--primary) 100%);
  color: #e8f4ef;
  display: flex; align-items: center; justify-content: space-between; gap: 34px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cta-partner h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 8px; }
.cta-partner p { margin: 0 0 18px; max-width: 560px; color: #ffd9d9; }
.cta-points { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-point {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: #eaf7f1;
}
.cta-point .ic { width: 14px; height: 14px; }
@media (max-width: 900px) { .cta-partner { flex-direction: column; align-items: flex-start; padding: 36px 26px; } }

/* ---------- Accordion / FAQ ---------- */
.accordion { display: flex; flex-direction: column; gap: 12px; }
.acc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all .16s;
}
.acc-item.open { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.acc-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 20px;
  background: transparent; border: 0;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: var(--ink); text-align: left; cursor: pointer;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 8px;
}
.acc-head > :first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.acc-head > :not(:first-child) { flex-shrink: 0; }
.acc-head .ic { width: 17px; height: 17px; color: var(--muted); transition: transform .2s; }
.acc-item.open .acc-head .ic { transform: rotate(180deg); color: var(--primary); }
.acc-body {
  display: none;
  padding: 0 20px 18px;
  font-size: 14px; color: var(--body);
}
.acc-item.open .acc-body { display: block; }

/* ---------- Filter bars / chips ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.f-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
/* Category filter — compact 2-line wrapped strip (rest scrolls vertically) */
.cat-filter {
  flex-wrap: wrap;
  max-height: 112px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  row-gap: 8px;
}
.cat-filter::-webkit-scrollbar { width: 5px; }
.cat-filter::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.cat-filter::-webkit-scrollbar-track { background: transparent; }
.cat-filter .chip { flex-shrink: 0; }
.chip {
  padding: 7px 15px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 13px; font-weight: 600; color: var(--body);
  cursor: pointer; text-decoration: none;
  transition: all .14s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip .chip-count { font-size: 11px; font-weight: 700; opacity: .65; margin-left: 5px; }
.chip.active .chip-count { opacity: .9; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(197, 0, 0, .3); }

/* Multi-step onboarding indicator (lab-register) */
.ob-steps { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.ob-step { display: flex; align-items: center; gap: 9px; }
.ob-num {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border-strong); background: #fff;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.ob-step.active .ob-num, .ob-step.done .ob-num { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(197,0,0,.25); }
.ob-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ob-step.active .ob-label, .ob-step.done .ob-label { color: var(--body); }
.ob-line { flex: 1; min-width: 26px; height: 2px; background: var(--border-strong); border-radius: 2px; }
.ob-step.done + .ob-line { background: var(--primary); }


/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 52px 24px;
}
.empty-state .emoji {
  width: 64px; height: 64px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  background: var(--primary-faint); color: var(--primary);
  border-radius: 18px;
}
.empty-state .emoji .ic { width: 30px; height: 30px; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }

/* ---------- Layout 2col ---------- */
.layout-2col { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; }
.layout-2col > div { min-width: 0; }
.grid > * { min-width: 0; }
@media (max-width: 1024px) { .layout-2col { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
@media (max-width: 640px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap .tbl { min-width: 700px; }
}
.tbl thead th {
  background: var(--bg);
  text-align: left;
  padding: 13px 18px;
  font-family: var(--font-display);
  font-size: 11.5px; font-weight: 800;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl tbody td { padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--body); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--primary-faint); }
.tbl tbody td b, .tbl tbody td strong { color: var(--ink); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 262px 1fr; gap: 26px; align-items: start; padding: 28px 0 60px; }
.dash-side {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  box-shadow: var(--shadow-sm);
}
.dash-side-user {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 16px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.dash-side-user b { display: block; font-family: var(--font-display); font-size: 14px; color: var(--ink); }
.dash-side-user span { font-size: 12px; color: var(--muted); }
.avatar-lg {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.dash-nav { display: flex; flex-direction: column; gap: 3px; }
.dash-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--body);
  transition: all .13s;
}
.dash-nav a .ic { width: 17px; height: 17px; }
.dash-nav a:hover { background: var(--bg); color: var(--ink); }
.dash-nav a.active { background: var(--primary-soft); color: var(--primary-deep); font-weight: 700; }
.dash-nav a.logout-link { margin-top: 8px; color: var(--danger); border-top: 1px solid var(--border); border-radius: 0; padding-top: 14px; }
.dash-nav a.logout-link:hover { background: var(--danger-soft); }

.dash-main { min-width: 0; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.dash-head h1 { font-size: 24px; font-weight: 800; margin-bottom: 2px; }
.dash-head p { color: var(--muted); margin: 0; font-size: 13.5px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: all .16s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-ico {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px;
  background: var(--primary-soft); color: var(--primary-deep);
}
.stat-ico.tint-1 { background: var(--star-soft); color: #b45309; }
.stat-ico.tint-2 { background: var(--info-soft); color: #1d4ed8; }
.stat-ico.tint-3 { background: var(--accent-soft); color: var(--accent-deep); }
.stat-ico.tint-4 { background: var(--danger-soft); color: #b91c1c; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -.02em; }
.stat-card span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1024px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } .dash { grid-template-columns: 1fr; } .dash-side { position: static; } }
@media (max-width: 640px) { .stat-cards { grid-template-columns: 1fr; } }

/* ---------- Cart ---------- */
.cart-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: all .15s;
}
.cart-item:hover { border-color: var(--border-strong); }
.ci-body { flex: 1; min-width: 0; }
.ci-name { font-family: var(--font-display); font-weight: 800; font-size: 15.5px; color: var(--ink); margin-bottom: 2px; }
.ci-price { font-size: 13px; color: var(--muted); }
.ci-price b { color: var(--primary); }
.ci-remove {
  border: 0; background: transparent;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--muted); cursor: pointer;
  transition: all .13s;
}
.ci-remove:hover { background: var(--danger-soft); color: var(--danger); }
.ci-remove .ic { width: 17px; height: 17px; }

.summary-card {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.summary-card h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--body); padding: 6px 0; }
.sum-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; }
.sum-row.total b { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.sum-row.total span { font-weight: 800; color: var(--primary); font-family: var(--font-display); font-size: 18px; }

/* ---------- Lab detail ---------- */
.lab-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.lab-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.lab-group-head h3 { font-size: 15.5px; margin: 0; }
.lab-price-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}
.lab-price-row:last-child { border-bottom: 0; }
.lab-price-row:hover { background: var(--primary-faint); }
.lpr-info { flex: 1; min-width: 0; }
.lpr-name { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.lpr-sub { font-size: 12.5px; color: var(--muted); }
.lpr-price { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--ink); white-space: nowrap; }
/* Phones (414px etc.): lab row becomes 2 lines — name top, price + button below */
@media (max-width: 640px) {
.lab-price-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "logo info btn"
      "logo price btn";
    align-items: center;
    column-gap: 12px;
    row-gap: 4px;
    padding: 12px 16px;
  }
  .lpr-logo { grid-area: logo; align-self: start; margin-top: 2px; }
  .lpr-info { grid-area: info; min-width: 0; }
  .lpr-price { grid-area: price; justify-self: start; white-space: normal; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
  .lpr-price .price-now { font-size: 18px; }
  .lpr-price .price-old { font-size: 11.5px; }
  .lpr-price .price-off { font-size: 11px; }
.lpr-btn { grid-area: btn; justify-self: end; align-self: center; }
}
/* Very small phones (=360px): price takes a full row under logo+info+button */
@media (max-width: 360px) {
  .lab-price-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo info"
      "logo btn"
      "price price";
  }
  .lpr-btn { justify-self: start; }
  .lpr-price { grid-area: price; justify-self: stretch; }
}
.lowest-flag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--success-soft); color: #0b7a44;
  font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.save-tag {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 11.5px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
  background:
    radial-gradient(700px 380px at 90% -10%, rgba(197, 0, 0, .1), transparent 60%),
    linear-gradient(180deg, #fafafa, var(--bg));
}
.auth-card {
  width: 100%; max-width: 440px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}
.auth-title { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-title em { font-style: normal; color: var(--primary); }
.auth-sub { font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.auth-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--faint); font-size: 12.5px; font-weight: 600;
  margin: 20px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px;
  align-items: center; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--info);
  animation: toast-in .25s ease;
  max-width: min(420px, 90vw);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast.hide { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Floating cart (mobile) ---------- */
.cart-fab {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--primary); color: #fff;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 14.5px;
  box-shadow: 0 10px 30px rgba(197, 0, 0, .45);
}
.cart-fab:hover { background: var(--primary-deep); color: #fff; transform: translateX(-50%) translateY(-2px); }
.cart-fab .ic { width: 18px; height: 18px; }
.cart-fab-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); border-radius: 999px;
  font-size: 12px; font-weight: 800;
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #9ca3af; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1fr; gap: 40px; padding: 60px 0 44px; }
.footer-brand { max-width: 300px; }
.footer-desc { font-size: 13.5px; line-height: 1.7; margin: 18px 0; color: #9ca3af; }
.footer-trust { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: #d1d5db;
}
.trust-chip .ic { width: 13px; height: 13px; color: #f87171; }
.footer-col h4 {
  color: #fff; font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #9ca3af; font-size: 13.5px; font-weight: 500; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 20px 0;
  font-size: 12.5px; color: #6b7280;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.footer-bottom .ic { width: 14px; height: 14px; color: #f87171; }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Responsive nav ---------- */
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .nav-search { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; max-width: none; margin: 0; border-radius: 0 0 14px 14px; border-left: 0; border-right: 0; padding: 12px 20px; }
  .nav-inner { flex-wrap: wrap; gap: 14px; }
  .nav-inner.open { height: auto; padding-bottom: 12px; }
  .nav-inner.open .nav-search { display: flex; }
  .city-select { margin-left: auto; }
  .nav-actions { margin-left: 0; }
  .nav-login { display: none; }
}
@media (max-width: 560px) {
  .city-panel { left: auto; right: 0; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .nav-inner { gap: 10px; }
  .logo-icon { width: 34px; height: 34px; border-radius: 10px; }
  .logo-icon .ic { width: 18px; height: 18px; }
  .logo-text { font-size: 17.5px; }
  .city-btn { padding: 7px 10px; font-size: 12.5px; gap: 5px; }
  .city-btn .ic { width: 14px; height: 14px; }
  .cart-link { width: 38px; height: 38px; }
  .user-avatar { width: 36px; height: 36px; }
  .nav-toggle { padding: 6px; }
  .nav-toggle .ic { width: 22px; height: 22px; }
}
@media (max-width: 380px) {
  .logo-text { font-size: 16px; }
  .logo-icon { width: 30px; height: 30px; }
  .city-btn { padding: 6px 9px; font-size: 12px; }
}

/* iPhone SE / small phones (375px): keep hamburger + logo + city + signup + cart on ONE line */
@media (max-width: 480px) {
  .nav-inner { gap: 8px; }
  .logo-text { display: none; }          /* icon-only logo saves ~100px */
  .logo { gap: 0; }
  .city-btn { padding: 7px 9px; gap: 5px; }
  .city-label { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-signup { padding: 7px 12px; font-size: 12.5px; }
  .cart-link { width: 36px; height: 36px; }
  .nav-toggle { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 360px) {
  .city-label { max-width: 56px; }
  .city-btn { padding: 6px 8px; }
  .nav-signup { padding: 6px 10px; font-size: 12px; }
  .nav-inner { gap: 6px; }
}

/* ---------- Search autosuggest ---------- */
.suggest-list {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 30, 20, 0.14);
  overflow: hidden;
  z-index: 1200;
  font-size: 13.5px;
}
.suggest-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--dark);
  border-bottom: 1px solid #f1f5f4;
}
.suggest-list a:last-child { border-bottom: 0; }
.suggest-list a:hover { background: #f4f9f8; }
.suggest-list .s-name { font-weight: 600; }
.suggest-list .s-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.suggest-list .s-meta b { color: var(--primary); }
.suggest-empty { padding: 12px 14px; color: var(--muted); }

/* ===== Pathology Dashboard (offline module) ===== */
.dash-nav-sep { margin: 14px 16px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #999; }
.path-new-order { background: var(--accent-soft); color: var(--primary-dark) !important; border-radius: 8px; }
.path-toggle-link { border: 1px dashed #c9c9c9; border-radius: 8px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 8px; background: #f3f4f6; font-weight: 600; font-size: 13.5px; color: #555; }
.tab.active { background: var(--primary-dark); color: #fff; }
.flow-steps { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.flow-step { flex: 1; min-width: 150px; border: 1px solid #e4e4e4; border-radius: 10px; padding: 10px 12px; background: #fafafa; }
.flow-step .flow-dot { width: 24px; height: 24px; border-radius: 50%; background: #e2e2e2; color: #777; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; margin-bottom: 6px; }
.flow-step.current { border-color: var(--primary); background: var(--accent-soft); }
.flow-step.current .flow-dot { background: var(--primary); color: #fff; }
.flow-step.done .flow-dot { background: #1a9c4c; color: #fff; }
.flow-step b { display: block; font-size: 13px; }
.flow-step span { font-size: 11.5px; color: #888; }
.channel-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.channel-card { flex: 1; min-width: 180px; border: 1.5px solid #e2e2e2; border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.channel-card b { display: block; font-size: 14px; }
.channel-card span { font-size: 12px; color: #888; }
.channel-card.selected { border-color: var(--primary); background: var(--accent-soft); }
.channel-card input { display: none; }
.path-suggest { position: relative; }
.suggest-item { padding: 9px 12px; border: 1px solid #eee; border-top: none; background: #fff; cursor: pointer; font-size: 13px; }
.suggest-item:hover { background: var(--accent-soft); }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; cursor: pointer; }

/* ---------- Core Web Vitals: render below-fold sections lazily ---------- */
@media (min-width: 768px) {
  .section { content-visibility: auto; contain-intrinsic-size: auto 900px; }
  .footer { content-visibility: auto; contain-intrinsic-size: auto 520px; }
}
