/* Medi Health Works — bold, straightforward recovery & health store. */
:root {
  --red: #C41E3A;          /* primary (white on it 5.8:1) */
  --red-dark: #9E1830;
  --red-soft: #FBE9EC;
  --ink: #1E2227;          /* header, footer, headings */
  --muted: #5A616B;
  --grey: #F4F4F5;
  --border: #868D96;
  --line: #E4E5E8;
  --bs-body-font-family: "Work Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bs-body-color: #1E2227;
  --bs-link-color: #C41E3A;
  --bs-link-color-rgb: 196, 30, 58;
  --bs-link-hover-color: #9E1830;
  --bs-border-radius: 4px;
}
body { font-size: 1rem; line-height: 1.6; overflow-x: clip; }
h1, h2, h3 { font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.4rem); line-height: 1.08; text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem); text-transform: uppercase; }
h3 { font-size: 1rem; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.section { padding: clamp(48px, 6vw, 80px) 0; }
.bg-grey { background: var(--grey); }
.title-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.title-bar::before { content: ""; width: 6px; height: 28px; background: var(--red); }
.title-bar h2 { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 2000; padding: .6rem 1rem; background: var(--red); color: #fff; }
.skip-link:focus { top: 1rem; color: #fff; }

/* buttons: square-ish, uppercase */
.btn { --bs-btn-font-weight: 700; --bs-btn-border-radius: 4px; --bs-btn-padding-y: .75rem; --bs-btn-padding-x: 1.5rem; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.btn-danger { --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red); --bs-btn-hover-bg: var(--red-dark); --bs-btn-hover-border-color: var(--red-dark); --bs-btn-active-bg: var(--red-dark); --bs-btn-disabled-bg: var(--red); }
.btn-outline-dark { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink); }
.btn-sm { min-height: 44px; font-size: .8rem; }

/* header: charcoal bar */
.site-header { position: sticky; top: 0; z-index: 1030; background: var(--ink); }
.site-header .bar { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; font-weight: 800; letter-spacing: .03em; font-size: 1.05rem; }
.brand:hover { color: #fff; }
.brand span span { color: #FF6B80; }
.site-header .nav-link { color: #E6E8EB; font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; padding: .5rem .8rem !important; border-bottom: 3px solid transparent; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: #fff; border-bottom-color: var(--red); }
.site-header :focus-visible { outline-color: #FF8A9B; }
.cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 4px; background: var(--red); color: #fff; }
.cart-link:hover { background: var(--red-dark); color: #fff; }
.cart-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--ink); font-size: .72rem; font-weight: 800; line-height: 20px; text-align: center; }
.cart-count[data-n="0"] { display: none; }
.burger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #5A616B; border-radius: 4px; background: transparent; color: #fff; }
.offcanvas { --bs-offcanvas-width: min(86vw, 320px); --bs-offcanvas-bg: var(--ink); --bs-offcanvas-color: #fff; }
.offcanvas .nav-link { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .9rem 0; border-bottom: 1px solid #3A3F46; }
.offcanvas .nav-link.active { color: #FF8A9B; }
.offcanvas :focus-visible { outline-color: #FF8A9B; }
.strip { background: var(--red); color: #fff; font-size: .85rem; font-weight: 600; text-align: center; padding: .45rem 0; }

/* hero: full-width photo with dark overlay */
.hero { position: relative; color: #fff; background: var(--ink) url("../img/hero.jpg") center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 34, 39, .92) 0%, rgba(30, 34, 39, .75) 55%, rgba(30, 34, 39, .45) 100%); }
.hero .container { position: relative; padding-top: clamp(64px, 10vw, 140px); padding-bottom: clamp(64px, 10vw, 140px); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero p { max-width: 34rem; color: #E6E8EB; font-size: 1.1rem; }
.hero .tag { display: inline-block; background: var(--red); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .7rem; margin-bottom: 1rem; }
.hero :focus-visible { outline-color: #fff; }
.btn-outline-light { --bs-btn-hover-color: var(--ink); }

/* category row */
.cat { display: flex; align-items: center; justify-content: space-between; gap: .5rem; height: 100%; padding: 1rem 1.1rem; background: #fff; border-left: 4px solid var(--red); text-decoration: none; color: var(--ink); font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .04em; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.cat:hover { background: var(--red-soft); color: var(--ink); }
.cat span:last-child { color: var(--red); }

/* product cards */
.card-p { position: relative; height: 100%; display: flex; flex-direction: column; background: #fff; }
.card-p .ph { position: relative; aspect-ratio: 1; background: var(--grey); overflow: hidden; }
.card-p .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card-p:hover .ph img { transform: scale(1.04); }
.card-p .off { position: absolute; top: 0; right: 0; background: var(--red); color: #fff; font-size: .75rem; font-weight: 800; padding: .3rem .6rem; }
.card-p .bd { padding: .85rem 0 0; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.card-p .cat-name { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.card-p h3 a { color: var(--ink); text-decoration: none; }
.card-p h3 a::after { content: ""; position: absolute; inset: 0; }
.card-p .price { font-weight: 800; font-size: 1.1rem; }
.card-p .price s { color: var(--muted); font-weight: 500; font-size: .9rem; margin-left: .35rem; }
.card-p .btn { position: relative; z-index: 1; margin-top: auto; }

/* misc */
.cover-img { width: 100%; object-fit: cover; }
.num-list { list-style: none; padding: 0; margin: 0; counter-reset: n; }
.num-list li { counter-increment: n; display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.num-list li::before { content: counter(n, decimal-leading-zero); flex: 0 0 auto; font-weight: 800; color: var(--red); }
.stats { background: var(--ink); color: #fff; }
.stat b { display: block; font-size: 1.8rem; font-weight: 800; color: #fff; }
.stat span { color: #C7CBD1; font-size: .9rem; }
.stock { color: #1E7A46; font-weight: 700; font-size: .9rem; }

/* product page */
.pd-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--grey); }
.qty { display: inline-flex; border: 1px solid var(--border); }
.qty button { width: 44px; height: 48px; border: 0; background: #fff; font-size: 1.2rem; }
.qty button:hover { background: var(--grey); }
.qty input { width: 50px; border: 0; border-inline: 1px solid var(--line); text-align: center; font-weight: 700; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.ticks li::before { content: "+"; color: var(--red); font-weight: 800; margin-right: .6rem; }

/* forms + summary */
.form-control, .form-select { min-height: 48px; border-color: var(--border); border-radius: 4px; }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(196, 30, 58, .2); }
.form-label { font-weight: 600; }
.box { padding: 1.5rem; background: #fff; border-top: 4px solid var(--red); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.box.grey { background: var(--grey); box-shadow: none; }
.sum-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.sum-total { display: flex; justify-content: space-between; margin-top: .5rem; padding-top: .75rem; border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.15rem; }
.cart-row { display: grid; grid-template-columns: 76px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-row img { width: 76px; height: 76px; object-fit: cover; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; min-height: 32px; }

/* footer */
.site-footer { background: var(--ink); color: #C7CBD1; padding: 52px 0 24px; font-size: .92rem; border-top: 4px solid var(--red); }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer :focus-visible { outline-color: #FF8A9B; }
.fine { border-top: 1px solid #3A3F46; margin-top: 2rem; padding-top: 1.25rem; font-size: .82rem; }

.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 1090; width: min(340px, calc(100vw - 32px)); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } .card-p:hover .ph img { transform: none; } }

/* policy pages */
.legal-nav { position: sticky; top: 92px; }
.legal-nav ul { list-style: none; padding: 0; margin: 0; border-left: 4px solid var(--line); }
.legal-nav a { display: block; padding: .5rem 1rem; color: var(--ink); text-decoration: none; font-weight: 600; margin-left: -4px; border-left: 4px solid transparent; }
.legal-nav a:hover { color: var(--red); }
.legal-nav a[aria-current="page"] { color: var(--red); border-left-color: var(--red); }
.legal { max-width: 52rem; }
.legal h2 { font-size: 1.15rem; text-transform: none; margin: 2rem 0 .75rem; }
.legal li { margin-bottom: .4rem; }
@media (max-width: 991.98px) { .legal-nav { position: static; } }
