/* ===== ReVitaLab — design system ===== */
:root {
  /* type */
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  /* palette (Clinical Light — permanently applied; can still be overridden via Tweaks) */
  --topbar-bg: #0c3a41;
  --hero-bg: #e7edf0;
  --hero-bg-2: #f6fafb;
  --hero-text: #0c2c31;
  --hero-muted: #516a6f;
  --accent: #0fa6cd;
  --accent-2: #1196bd;
  --accent-soft: #0d87aa;
  --page-bg: #ffffff;
  --ink: #0c2c31;
  --ink-soft: #4a6166;
  --card: #ffffff;
  --line: #e4ebee;
  --footer-bg: #0b313a;
  --hero-is-light: 1; /* 1 when hero background is light */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .head { font-family: var(--font-head); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ===== top bar ===== */
.topbar {
  background: var(--topbar-bg);
  color: #cfe7ec;
  font-size: 13px;
  letter-spacing: .02em;
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 42px;
}
.topbar .left { display: flex; gap: 22px; align-items: center; }
.topbar .right { display: flex; gap: 18px; align-items: center; }
.topbar a { display: inline-flex; align-items: center; gap: 7px; opacity: .9; }
.topbar a:hover { opacity: 1; color: #fff; }
.topbar .sep { width: 1px; height: 14px; background: rgba(255,255,255,.18); }

/* ===== header ===== */
.header {
  background: #fff;
  position: sticky; top: 0; z-index: 60;
  box-shadow: 0 1px 0 rgba(12,44,49,.07);
}
.header .wrap { display: flex; align-items: center; height: 78px; gap: 28px; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: 18px; }
.nav-item {
  position: relative;
  font-family: var(--font-head);
  font-weight: 600; font-size: 14px; letter-spacing: .04em;
  color: #11343a; text-transform: uppercase; white-space: nowrap;
  padding: 28px 0; display: inline-flex; align-items: center; gap: 6px;
}
.nav-item:hover { color: var(--accent); }
.nav-item.active { color: var(--accent); }
.nav-item .caret { font-size: 9px; opacity: .6; margin-top: 2px; }
.nav-underline {
  position: absolute; left: 0; bottom: 22px; height: 2px; width: 0;
  background: var(--accent); transition: width .22s ease;
}
.nav-item:hover .nav-underline, .nav-item.active .nav-underline { width: 100%; }

.dropdown {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(8,40,45,.35);
  padding: 10px; min-width: 230px; opacity: 0; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease; z-index: 80;
}
.nav-item:hover .dropdown { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.dropdown a {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: #20454b; letter-spacing: .01em;
  font-family: var(--font-body); text-transform: none;
}
.dropdown a:hover { background: #eef8fb; color: var(--accent); }
.dropdown a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.header .tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: #16414a;
  transition: all .16s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: #f3fbfd; }
.cart-btn {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px;
  border-radius: 999px; border: 1.5px solid var(--accent); background: #fff;
  color: var(--accent); font-weight: 700; font-family: var(--font-head); position: relative;
  transition: all .16s ease;
}
.cart-btn:hover { background: var(--accent); color: #fff; }
.cart-btn .bag { width: 30px; height: 30px; display: grid; place-items: center; }
.cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #ef5b5b; color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; font-family: var(--font-body);
  border: 2px solid #fff;
}

/* ===== hero ===== */
.hero {
  background:
    radial-gradient(120% 90% at 85% 20%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    linear-gradient(180deg, var(--hero-bg-2), var(--hero-bg));
  color: var(--hero-text); position: relative; overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(color-mix(in srgb, var(--hero-text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--hero-text) 6%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 80%);
}
.hero .wrap {
  position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px;
  align-items: center; min-height: 620px; padding-top: 40px; padding-bottom: 56px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  color: var(--accent-soft); border-radius: 999px; padding: 9px 18px 9px 12px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  font-family: var(--font-head);
}
.eyebrow .pulse {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
  position: relative;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 70px); line-height: 1.02; margin: 26px 0 0;
  font-weight: 800; letter-spacing: -.02em;
}
.hero h1 .it { font-style: italic; font-weight: 600; color: var(--accent-2); }
.hero p.sub {
  margin: 24px 0 0; max-width: 440px; font-size: 17.5px; line-height: 1.6;
  color: var(--hero-muted);
}
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 26px;
  border-radius: 10px; font-family: var(--font-head); font-weight: 700; font-size: 15px;
  letter-spacing: .03em; text-transform: uppercase; transition: all .18s ease; border: 1.5px solid transparent;
}
.btn .arr { transition: transform .18s ease; }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--accent-soft); color: #0a2c33; }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: color-mix(in srgb, var(--hero-text) 30%, transparent); color: var(--hero-text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.hero-stats { display: flex; gap: 34px; margin-top: 46px; }
.hero-stats .s .n { font-family: var(--font-head); font-weight: 800; font-size: 30px; color: var(--hero-text); }
.hero-stats .s .l { font-size: 12.5px; color: var(--hero-muted); letter-spacing: .04em; margin-top: 2px; text-transform: uppercase; }

/* hero vials cluster — five overlapping vials */
.vial-cluster {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  gap: 0; min-height: 480px;
}
.cluster-glow {
  position: absolute; left: 50%; top: 52%; width: 540px; height: 440px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 0;
  background: radial-gradient(46% 46% at 50% 46%, color-mix(in srgb, var(--accent-2) 32%, transparent), transparent 72%);
  filter: blur(6px);
}
.hero-vial {
  display: block; width: auto; height: auto;
  filter: drop-shadow(0 22px 20px rgba(4,22,26,.5));
}
.vial-cluster .v-c   { height: 360px; z-index: 4; margin-left: -50px; }
.vial-cluster .v-i-l { height: 318px; z-index: 3; margin-left: -46px; }
.vial-cluster .v-i-r { height: 318px; z-index: 3; margin-left: -50px; }
.vial-cluster .v-o-l { height: 270px; z-index: 2; }
.lab-badge {
  position: absolute; left: 2%; bottom: 6%; z-index: 5;
  width: 99px; height: 99px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--accent-2), var(--accent));
  color: #fff; display: grid; place-items: center; text-align: center;
  box-shadow: 0 18px 40px -10px color-mix(in srgb, var(--accent) 60%, transparent);
  border: 3px dashed rgba(255,255,255,.5);
}
.lab-badge .inner { font-family: var(--font-head); font-weight: 800; font-size: 8.5px; letter-spacing: .06em; line-height: 1.3; }
.lab-badge .flask { font-size: 21px; margin-bottom: 2px; }

/* ===== section shells ===== */
.section { padding: 86px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 52px; }
.section-head .tag {
  font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); display: inline-block; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(30px, 3.6vw, 46px); margin: 0; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.08; }
.section-head p { margin: 16px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.6; }

/* category chips */
.cat-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0 auto 44px; }
.chip {
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 13.5px; color: #325057;
  letter-spacing: .02em; transition: all .16s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -26px rgba(10,44,49,.4); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card .media {
  position: relative; height: 230px;
  background: radial-gradient(120% 100% at 50% 0%, #f0f7f9, #e4eef1);
  display: grid; place-items: center; overflow: hidden;
}
.card .media .pimg { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.card .ribbon {
  position: absolute; top: 14px; left: 14px; z-index: 4;
  background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 11px; border-radius: 7px;
}
.card .ribbon.sold { background: #8aa0a5; }
.card .fav {
  position: absolute; top: 12px; right: 12px; z-index: 4; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: 1px solid var(--line); display: grid; place-items: center;
  color: #6b8186; transition: all .16s ease;
}
.card .fav:hover { color: #ef5b5b; border-color: #ef5b5b; }
.card .fav.on { color: #ef5b5b; }
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card .pcat { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-family: var(--font-head); }
.card h3 { margin: 7px 0 0; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.card .pdesc { margin: 7px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.card .stars { display: flex; align-items: center; gap: 3px; margin-top: 11px; color: #f3b23e; font-size: 13px; }
.card .stars .ct { color: var(--ink-soft); font-size: 12px; margin-left: 5px; }
.card .foot { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; }
.card .price { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--ink); }
.card .price s { font-weight: 600; font-size: 14px; color: #9fb0b4; margin-right: 6px; }
.add-btn {
  height: 44px; padding: 0 15px; border-radius: 10px; background: var(--ink); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .03em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all .16s ease; border: none;
  white-space: nowrap; flex: 1 1 auto; min-width: 124px; max-width: 100%;
}
.add-btn:hover { background: var(--accent); }
.add-btn.added { background: #1f9d57; }
.add-btn:disabled { background: #c2cdd0; cursor: not-allowed; }

/* features */
.features { background: #fff; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feat {
  text-align: left; padding: 30px 26px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfdfe); transition: all .2s ease;
}
.feat:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-4px); }
.feat .ic {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); margin-bottom: 18px;
}
.feat h4 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.feat p { margin: 9px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* compliance band */
.band {
  background: linear-gradient(120deg, var(--hero-bg-2), var(--hero-bg));
  color: var(--hero-text); border-radius: 22px; padding: 52px 56px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.band h3 { font-size: 32px; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.band p { margin: 14px 0 0; color: var(--hero-muted); font-size: 16px; line-height: 1.6; max-width: 520px; }
.band .pills { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.band .pill {
  background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  color: var(--accent-soft); padding: 14px 18px; border-radius: 12px; font-family: var(--font-head);
  font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 10px;
}

/* footer */
.footer { background: var(--footer-bg); color: #b8d2d7; padding: 70px 0 0; }
.footer .top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 50px; }
.footer h5 { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin: 0 0 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { font-size: 14.5px; color: #9fbdc3; transition: color .15s ease; }
.footer ul a:hover { color: var(--accent-2); }
.footer .blurb { font-size: 14.5px; line-height: 1.65; color: #9fbdc3; margin: 18px 0 0; max-width: 300px; }
.footer .news { display: flex; gap: 8px; margin-top: 16px; }
.footer .news input {
  flex: 1; height: 46px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05);
  padding: 0 15px; color: #fff; font-family: var(--font-body); font-size: 14px;
}
.footer .news input::placeholder { color: #7fa0a7; }
.footer .news button { height: 46px; padding: 0 18px; border-radius: 10px; border: none; background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 13px; }
.footer .news button:hover { background: var(--accent-2); }
.footer .bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: #8aabb1;
}
.footer .bottom .pay { display: flex; gap: 8px; }
.footer .bottom .pay span { padding: 5px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.disclaim { background: #051f24; color: #6f9298; font-size: 12px; text-align: center; padding: 14px 0; line-height: 1.6; }

/* ===== cart drawer ===== */
.overlay { position: fixed; inset: 0; background: rgba(6,28,32,.5); backdrop-filter: blur(2px); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw; background: #fff; z-index: 210;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.1,1); display: flex; flex-direction: column;
  box-shadow: -20px 0 60px -20px rgba(6,28,32,.5);
}
.drawer.open { transform: translateX(0); }
.drawer .dhead { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer .dhead h3 { margin: 0; font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.drawer .dhead .x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: #44636a; }
.drawer .dhead .x:hover { background: #f2f6f7; }
.drawer .ditems { flex: 1; overflow-y: auto; padding: 8px 24px; }
.ditem { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ditem .thumb { width: 64px; height: 80px; border-radius: 10px; background: radial-gradient(120% 100% at 50% 0%, #eef6f8, #dfeaed); flex: none; display: grid; place-items: center; overflow: hidden; }
.ditem .thumb .pthumb { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.ditem .meta { flex: 1; min-width: 0; }
.ditem .meta .nm { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink); }
.ditem .meta .ct { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.ditem .qty { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 9px; margin-top: 10px; }
.ditem .qty button { width: 30px; height: 30px; background: #fff; border: none; color: var(--ink); font-size: 16px; display: grid; place-items: center; }
.ditem .qty button:hover { color: var(--accent); }
.ditem .qty span { width: 34px; text-align: center; font-weight: 700; font-size: 14px; font-family: var(--font-head); }
.ditem .right { text-align: right; display: flex; flex-direction: column; justify-content: space-between; }
.ditem .right .pr { font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--ink); }
.ditem .right .rm { font-size: 12px; color: #b0383f; margin-top: 8px; background: none; border: none; padding: 0; }
.ditem .right .rm:hover { text-decoration: underline; }
.drawer .empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--ink-soft); padding: 40px; }
.drawer .empty .big { font-size: 48px; margin-bottom: 14px; }
.drawer .dfoot { border-top: 1px solid var(--line); padding: 22px 24px; }
.drawer .dfoot .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }
.drawer .dfoot .row.total { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--ink); margin: 14px 0 18px; }
.drawer .dfoot .checkout { width: 100%; height: 54px; border-radius: 12px; background: var(--accent); color: #fff; border: none; font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
.drawer .dfoot .checkout:hover { background: var(--ink); }
.drawer .dfoot .secure { text-align: center; font-size: 12px; color: var(--ink-soft); margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 7px; }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 12px; z-index: 300;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none; transition: all .26s ease; box-shadow: 0 18px 40px -14px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ck { width: 22px; height: 22px; border-radius: 50%; background: #1f9d57; display: grid; place-items: center; font-size: 12px; }

@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .vial-cluster { min-height: 380px; margin-top: 10px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer .top { grid-template-columns: 1fr 1fr; }
  .band { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav, .topbar .left { display: none; }
  .grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
}
