/* Superior Medical — Concept Design System */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #F2EDE3;
  --forest: #243D2F;
  --forest-light: #3A5C47;
  --terra: #C4623B;
  --terra-light: #D97B55;
  --white: #FDFCF8;
  --black: #1A1612;
  --muted: #7B7268;
  --border: #E0DDD4;
  --blush: #EAD4C4;
  --sage: #4A7A5E;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Dark mode */
html.dark body { background: #141210; color: #E8E4DC; }
html.dark { --white: #1C1A16; --cream: #231F1A; --black: #E8E4DC; --border: #2E2B25; --muted: #968E82; --blush: #3A2E27; }

/* Typography */
.serif { font-family: 'Playfair Display', Georgia, serif; }
h1,h2,h3,h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.1; color: var(--black); }
p { line-height: 1.7; color: var(--muted); }
a { color: inherit; text-decoration: none; cursor: pointer; }

/* NAV */
.c-nav {
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.c-nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.c-nav-logo em { color: var(--terra); font-style: normal; }
.c-nav-links { display: flex; gap: 28px; }
.c-nav-links a { font-size: 13px; font-weight: 500; color: var(--muted); transition: color 0.15s; }
.c-nav-links a:hover { color: var(--black); }
.c-nav-actions { display: flex; align-items: center; gap: 10px; }
.c-nav-mobile-actions { display: none; }
.c-nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.15s;
}
.c-nav-cart:hover { background: var(--cream); color: var(--black); }
.c-nav-cart svg { width: 18px; height: 18px; }
.cart-count {
  background: var(--terra);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
}
.cart-count.hidden { display: none; }
.c-dark-toggle {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}
.c-dark-toggle:hover { background: var(--cream); color: var(--black); }
.c-dark-toggle svg { width: 16px; height: 16px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.3px; border-radius: 3px; cursor: pointer; transition: all 0.15s; border: none; font-family: inherit; }
.btn-terra { background: var(--terra); color: #fff; padding: 12px 26px; }
.btn-terra:hover { background: var(--terra-light); }
.btn-forest { background: var(--forest); color: #fff; padding: 12px 26px; }
.btn-forest:hover { background: var(--forest-light); }
.btn-outline { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); padding: 11px 26px; }
.btn-outline:hover { background: var(--forest); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.45); padding: 11px 26px; }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.btn-ghost { background: transparent; color: var(--muted); border: 0.5px solid var(--border); padding: 11px 20px; }
.btn-ghost:hover { background: var(--cream); color: var(--black); }
.btn-sm { font-size: 11px; padding: 8px 16px; letter-spacing: 0.5px; }
.btn-portal { background: var(--forest); color: #fff; padding: 8px 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; border-radius: 3px; }

/* FOOTER */
.c-footer { background: #141210; }
.c-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 32px;
  padding: 56px 48px;
}
.footer-signup { display: flex; gap: 8px; margin: 4px 0 10px; max-width: 280px; }
.footer-signup input { flex: 1; min-width: 0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 4px; padding: 9px 12px; font-size: 13px; color: #FDFCF8; font-family: inherit; outline: none; }
.footer-signup input::placeholder { color: rgba(255,255,255,0.3); }
.footer-signup input:focus { border-color: var(--terra); }
.footer-signup button { background: var(--terra); color: #fff; border: none; border-radius: 4px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; transition: opacity 0.15s; }
.footer-signup button:hover { opacity: 0.9; }
.footer-signup button:disabled { opacity: 0.5; cursor: default; }
.footer-signup-msg { font-size: 12px; color: rgba(255,255,255,0.5); min-height: 16px; line-height: 1.5; }
.footer-brand { font-family: 'Playfair Display', Georgia, serif; font-size: 16px; font-weight: 700; color: #FDFCF8; }
.footer-brand em { color: var(--terra); font-style: normal; }
.footer-tagline { font-size: 12px; color: rgba(255,255,255,0.35); line-height: 1.7; margin-top: 10px; max-width: 210px; }
.footer-col-title { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.25); margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.5); transition: color 0.15s; }
.footer-links a:hover { color: rgba(255,255,255,0.85); }
.c-footer-bottom {
  background: #0E0C0A;
  padding: 14px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 0.5px solid rgba(255,255,255,0.06);
}
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.25); }
.footer-badges { display: flex; gap: 8px; }
.f-badge { font-size: 9px; font-weight: 600; letter-spacing: 0.5px; color: rgba(255,255,255,0.3); border: 0.5px solid rgba(255,255,255,0.12); padding: 4px 10px; border-radius: 2px; }

/* CARDS */
.card { background: var(--white); border: 0.5px solid var(--border); border-radius: 6px; }
.card-hover { transition: box-shadow 0.2s, transform 0.2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }

/* MODALS */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,22,18,0.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 8px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  border: 0.5px solid var(--border);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.modal-title { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--black); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 4px; display: flex; }
.modal-close:hover { background: var(--cream); color: var(--black); }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: 28px; }

/* STATUS BADGES */
.badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; }
.badge-pending { background: #FFF3E0; color: #9A5A0A; }
.badge-confirmed { background: #E3F0FF; color: #1A4B8C; }
.badge-shipped { background: #E3F7F0; color: #0F6048; }
.badge-delivered { background: #E8F5E9; color: #1B5E20; }
.badge-cancelled { background: #FEECEC; color: #9B1C1C; }
.badge-approved { background: #E8F5E9; color: #1B5E20; }
.badge-rejected { background: #FEECEC; color: #9B1C1C; }

/* FORMS */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; }
.form-input {
  background: var(--cream);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--black);
  transition: border-color 0.15s;
  outline: none;
  width: 100%;
}
.form-input:focus { border-color: var(--forest); }
.form-input.error { border-color: #C4623B; }
.form-error { font-size: 12px; color: var(--terra); font-weight: 500; display: none; }
.form-error.show { display: block; }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* UTILITY */
.eyebrow { font-size: 10px; font-weight: 600; color: var(--terra); letter-spacing: 2.5px; text-transform: uppercase; }
.section { padding: 80px 48px; }
.section-sm { padding: 56px 48px; }
.text-center { text-align: center; }
.text-forest { color: var(--forest); }
.text-terra { color: var(--terra); }
.text-muted { color: var(--muted); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-10 { margin-top: 40px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* TABLE */
.c-table { width: 100%; border-collapse: collapse; }
.c-table th { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 0.5px solid var(--border); text-align: left; }
.c-table td { padding: 14px 16px; font-size: 13px; border-bottom: 0.5px solid var(--border); color: var(--black); }
.c-table tr:last-child td { border-bottom: none; }
.c-table tr:hover td { background: var(--cream); }

/* DIVIDER */
.divider { height: 0.5px; background: var(--border); }

/* PAGE HERO */
.page-hero { background: var(--cream); padding: 64px 48px; }
.page-hero h1 { font-size: 42px; letter-spacing: -1px; margin-bottom: 12px; }
.page-hero p { font-size: 15px; max-width: 480px; }

/* OVERLAY DARK for sections */
.bg-forest { background: var(--forest); }
.bg-black { background: #1A1612; }
.bg-cream { background: var(--cream); }
.bg-terra { background: var(--terra); }
.bg-white { background: var(--white); }
.text-white { color: #FDFCF8; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.35s ease both; }

/* ── Content / legal / info pages (Phase 2) ───────────────── */
.content-wrap { max-width: 820px; margin: 0 auto; padding: 64px 48px; }
.content-narrow { max-width: 720px; }
.prose h2 { font-size: 22px; margin: 36px 0 14px; letter-spacing: -0.3px; color: var(--black); }
.prose h3 { font-size: 16px; margin: 22px 0 8px; color: var(--black); }
.prose p { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.prose ul { margin: 0 0 16px 20px; }
.prose li { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 6px; }
.prose a { color: var(--forest); border-bottom: 0.5px solid var(--forest); }
.legal-meta { font-size: 12px; color: var(--muted); margin-bottom: 28px; }
.legal-section { margin-bottom: 30px; }
.legal-section h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.6px; border-bottom: 0.5px solid var(--border); padding-bottom: 10px; margin: 0 0 14px; }
.info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; max-width: 1000px; margin: 36px auto 0; }
.info-card { background: var(--white); border: 0.5px solid var(--border); border-radius: 6px; padding: 26px 22px; }
.info-card h3 { font-size: 15px; margin-bottom: 8px; color: var(--black); }
.info-card p { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ===== RESPONSIVE: NAV ===== */
.c-nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--black); align-items: center; }
.c-nav-toggle svg { width: 24px; height: 24px; }
@media (max-width: 860px) {
  .c-nav { padding: 0 20px; }
  .c-nav-toggle { display: flex; }
  /* On mobile the auth buttons move from the top bar into the hamburger dropdown. */
  .c-nav-auth-desktop { display: none; }
  .c-nav-links.open .c-nav-mobile-actions { display: flex; gap: 10px; align-items: center; padding-top: 16px; margin-top: 8px; border-top: 0.5px solid var(--border); }
  .c-nav-links.open .c-nav-mobile-actions a,
  .c-nav-links.open .c-nav-mobile-actions button { padding: 9px 16px; border-bottom: none; font-size: 12px; }
  .c-nav-links { display: none; }
  .c-nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 0.5px solid var(--border);
    padding: 8px 20px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
    gap: 0;
  }
  .c-nav-links.open a { padding: 14px 0; font-size: 15px; border-bottom: 0.5px solid var(--border); }
}

/* ===== RESPONSIVE: SHARED ===== */
img, video, table { max-width: 100%; }
body { overflow-x: hidden; }
@media (max-width: 1024px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .info-grid { grid-template-columns: 1fr; }
  .content-wrap { padding: 48px 24px; }
  .c-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 24px; }
  .c-footer-bottom { flex-direction: column; gap: 10px; text-align: center; padding: 16px 24px; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .c-footer-grid { grid-template-columns: 1fr; }
}
