/* ================================================================
   NEOLIFE WELLNESS — Shared Global Stylesheet
   Professional, Accessible, Fully Responsive
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

/* ── CSS Custom Properties ────────────────────────────────────── */
:root {
  /* Brand colours */
  --primary:        #1a6b36;
  --primary-light:  #2d8c4a;
  --primary-dark:   #0f4322;
  --accent:         #5fa76a;
  --gold:           #c27c2a;

  /* Neutral palette */
  --white:          #ffffff;
  --bg:             #f7faf3;
  --card:           #ffffff;
  --ink:            #172119;
  --muted:          #506454;
  --gray-50:        #f3f8f2;
  --gray-100:       #e8f0e6;
  --gray-200:       #d2e3d1;
  --gray-300:       #b6cfb5;
  --gray-500:       #7a9a7d;
  --line:           #d5e8d4;

  /* Aliases used in older pages */
  --white:          #ffffff;
  --success:        #1e7e3a;
  --gray-900:       #111a13;
  --font-heading:   'Playfair Display', Georgia, serif;

  /* Shadows */
  --shadow-xs:  0 1px 4px  rgba(15, 67, 34, .06);
  --shadow-sm:  0 3px 12px rgba(15, 67, 34, .08);
  --shadow:     0 8px 30px rgba(15, 67, 34, .11);
  --shadow-lg:  0 20px 56px rgba(15, 67, 34, .14);
  --shadow-xl:  0 32px 80px rgba(15, 67, 34, .18);

  /* Spacing */
  --spacing-xs: .5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3.5rem;
  --spacing-2xl: 5rem;

  /* Border radius */
  --rounded-sm:   6px;
  --rounded-md:  10px;
  --rounded-lg:  16px;
  --rounded-xl:  24px;
  --rounded-2xl: 32px;
  --rounded-full: 9999px;

  /* Typography */
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 260ms var(--ease);
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.18;
  margin: 0 0 .75rem;
  color: var(--ink);
}

p   { margin: 0 0 .85rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }
ul  { padding-left: 1.25rem; }

/* ── Layout Utilities ─────────────────────────────────────────── */
.container {
  width: min(1160px, 92vw);
  margin-inline: auto;
}

.section {
  padding: var(--spacing-2xl) 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--spacing-xl);
}

.section-header .eyebrow {
  display: inline-block;
  background: rgba(26, 107, 54, .10);
  color: var(--primary);
  border-radius: var(--rounded-full);
  padding: 4px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  margin-bottom: .5rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}
.grid-2  { grid-template-columns: repeat(2, 1fr); }
.grid-3  { grid-template-columns: repeat(3, 1fr); }
.grid-4  { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Card ─────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rounded-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.card p  { color: var(--muted); margin: 0; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: var(--rounded-full);
  padding: 11px 26px;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition),
              background-color var(--transition), border-color var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(26, 107, 54, .32);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(26, 107, 54, .42);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: rgba(26, 107, 54, .06);
  color: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--gray-300);
}
.btn-ghost:hover {
  background: var(--gray-50);
  color: var(--ink);
  border-color: var(--gray-500);
}

.btn-small {
  padding: 7px 18px;
  font-size: .875rem;
}

.btn-wide { width: 100%; }

/* ── Badge / Pill ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--rounded-full);
  padding: 4px 12px;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(26, 107, 54, .10);
  color: var(--primary);
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--spacing-md);
}
.form-group:last-child { margin-bottom: 0; }

label {
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--rounded-lg);
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45, 140, 74, .16);
}
textarea { resize: vertical; min-height: 110px; }

/* ── Page Hero Header ─────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: #fff;
  padding: 64px 0 52px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='rgba(255,255,255,0.04)' d='M46.7-48.5C58.9-35.2,65.8-17.6,65.3-.3C64.8,17,56.8,34,44.5,46C32.2,58,15.6,65.1-2.5,67.1C-20.6,69.1-40.2,66,-52.6,55C-65,44,-70.2,25,-69.7,5.9C-69.2,-13.2,-63,-32.3,-50.7,-45.7C-38.3,-59.1,-19.2,-66.8,-0.3,-66.5C18.5,-66.2,34.6,-61.8,46.7,-48.5Z' transform='translate(100 100)'/%3E%3C/svg%3E") no-repeat 110% 50% / 480px;
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  margin-bottom: .5rem;
}
.page-hero p { color: rgba(255,255,255,.82); font-size: 1.1rem; margin: 0; }

/* ── Site Header ──────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(210, 227, 209, 0.6);
  box-shadow: 0 2px 18px rgba(15, 67, 34, .07);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none !important;
  flex-shrink: 0;
}
.logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.logo:hover { color: var(--primary); }

header nav {
  flex: 1;
}
header nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
header nav ul li a {
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: color var(--transition);
}
header nav ul li a:hover { color: var(--primary); }

.nav-auth {
  display: flex;
  gap: .625rem;
  align-items: center;
  flex-shrink: 0;
}

/* Mobile nav toggle in header */
.auth-nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--rounded-md);
  padding: 7px 9px;
  cursor: pointer;
  gap: 4px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.auth-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 99px;
  transition: all .3s;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(160deg, #10341a 0%, #0c2914 100%);
  color: #d4ecd7;
  padding: 64px 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}

.footer-brand h3 {
  font-family: var(--font-sans);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: .4rem;
}
.footer-brand p { color: #9ec6a5; font-size: .92rem; line-height: 1.55; }

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.45);
  margin-bottom: var(--spacing-sm);
}
.footer-col a, .footer-col p {
  display: block;
  color: #9ec6a5;
  font-size: .9rem;
  margin-bottom: .5rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  text-align: center;
}
.footer-bottom p {
  color: rgba(255,255,255,.35);
  font-size: .82rem;
  margin: 0;
}

/* ── Alert / Notification banners ────────────────────────────── */
.alert {
  border-radius: var(--rounded-lg);
  padding: 14px 18px;
  font-size: .93rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.alert-error   { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }
.alert-warning { background: #fff8e1; color: #6d4c00; border: 1px solid #ffe082; }
.alert-info    { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }

/* ── Text helpers ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-primary{ color: var(--primary); }
.text-white  { color: #fff; }
.font-bold   { font-weight: 700; }
.fw-800      { font-weight: 800; }

/* ── Divider ──────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--spacing-lg) 0;
}

/* ── Loading spinner ──────────────────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: var(--spacing-lg) auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive header ────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .auth-nav-toggle { display: inline-flex; }

  header nav { display: none; }
  header nav.is-open {
    display: block;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 99;
  }
  header nav.is-open ul {
    flex-direction: column;
    gap: .5rem;
  }
  header nav.is-open ul li a {
    display: block;
    padding: .6rem .75rem;
    border-radius: var(--rounded-md);
  }
  header nav.is-open ul li a:hover {
    background: var(--gray-50);
  }
  .nav-auth { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

/* ── Stat tiles ───────────────────────────────────────────────── */
.stat-card {
  background: linear-gradient(145deg, #fff 0%, #f3faf3 100%);
  border: 1px solid var(--line);
  border-radius: var(--rounded-xl);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-value {
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  color: var(--muted);
  font-weight: 600;
  font-size: .88rem;
}

/* ── Icon circle ──────────────────────────────────────────────── */
.icon-circle {
  width: 52px; height: 52px;
  border-radius: var(--rounded-full);
  background: rgba(26, 107, 54, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.icon-circle.lg { width: 64px; height: 64px; font-size: 1.6rem; }

/* ── Medicine / product cards ─────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--spacing-lg);
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rounded-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.product-card-body {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.product-card-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
}
.product-card-tag {
  display: inline-block;
  background: var(--gray-100);
  color: var(--muted);
  border-radius: var(--rounded-full);
  padding: 2px 10px;
  font-size: .75rem;
  font-weight: 600;
}

/* ── Table ────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
th {
  background: var(--gray-50);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .78rem;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--line);
}
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ── Scroll reveal ────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.fade-up.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Misc ─────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
