/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: hsl(210, 30%, 96%);              /* clinical light blue background */
  --fg: hsl(210, 40%, 18%);              /* deep medical navy text */
  --card: hsl(0, 0%, 100%);              /* clean white cards */
  --primary: hsl(210, 85%, 42%);         /* pharmaceutical blue */
  --primary-fg: hsl(0, 0%, 100%);        /* white text on primary */
  --secondary: hsl(200, 60%, 94%);       /* soft hospital blue */
  --secondary-fg: hsl(210, 70%, 30%);    /* darker blue text */
  --muted: hsl(210, 25%, 92%);           /* soft cool gray */
  --muted-fg: hsl(210, 15%, 45%);        /* muted professional text */
  --border: hsl(210, 20%, 85%);          /* subtle clinical border */
  --trust-bg: hsl(200, 70%, 95%);        /* trust/health highlight */
  --footer-bg: hsl(210, 30%, 94%);       /* light blue-gray footer */
  --search-shadow: hsl(210, 80%, 75%);   /* soft medical glow */
  --radius: 0.75rem;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

.text-primary { color: var(--primary); }
.hidden { display: none !important; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1.5rem;
  height: 4rem; display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.logo-icon {
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: var(--primary); color: var(--primary-fg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem;
}
.logo-icon.sm { width: 1.75rem; height: 1.75rem; font-size: 0.65rem; }
.logo-text { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.logo-text.sm { font-size: 0.875rem; }

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; color: var(--muted-fg);
  padding: 0.5rem 0.75rem; border-radius: 0.5rem;
  transition: all 0.15s;
}
.nav-dropdown-btn:hover { color: var(--fg); background: var(--muted); }
.nav-dropdown-btn .chevron { transition: transform 0.2s; }
.nav-dropdown-btn.open .chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute; right: 0; top: 100%; margin-top: 0.5rem;
  width: 12rem; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 0.375rem 0; z-index: 50;
  opacity: 0; transform: translateY(-4px);
  animation: dropIn 0.2s ease forwards;
}
.nav-dropdown-menu a {
  display: block; padding: 0.625rem 1rem; font-size: 0.875rem;
  transition: background 0.15s;
}
.nav-dropdown-menu a:hover { background: var(--muted); }

@keyframes dropIn {
  to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown { display: none; }
@media (min-width: 768px) {
  .nav-dropdown { display: block; }
  .mobile-toggle { display: none; }
}

/* Mobile */
.mobile-toggle { padding: 0.5rem; color: var(--muted-fg); }
.mobile-menu {
  border-top: 1px solid var(--border); background: var(--card);
  animation: slideDown 0.2s ease;
}
.mobile-menu a {
  display: block; padding: 0.75rem 1.5rem; font-size: 0.875rem;
  transition: background 0.15s;
}
.mobile-menu a:hover { background: var(--muted); }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .mobile-toggle { display: none; }
}

/* ===== Hero ===== */
.hero { padding: 7rem 1rem 4rem; }
@media (min-width: 640px) { .hero { padding: 9rem 1rem 5rem; } }
.hero-inner { max-width: 40rem; margin: 0 auto; text-align: center; }
.hero h1 {
  font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.25; margin-bottom: 0.75rem;
}
@media (min-width: 640px) { .hero h1 { font-size: 2.25rem; } }
.hero-sub { color: var(--muted-fg); font-size: 1rem; margin-bottom: 2rem; max-width: 28rem; margin-left: auto; margin-right: auto; }
@media (min-width: 640px) { .hero-sub { font-size: 1.125rem; } }

/* Search */
.search-container { position: relative; }
.search-bar { position: relative; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; }
.search-bar input {
  width: 100%; height: 3.5rem;
  padding: 0 7rem 0 3rem;
  border-radius: 1rem; border: 1px solid var(--border);
  background: var(--card); color: var(--fg);
  font-size: 1rem; outline: none;
  box-shadow: 0 4px 24px -4px hsla(174, 40%, 80%, 0.4);
  transition: all 0.2s;
}
.search-bar input::placeholder { color: var(--muted-fg); }
.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 4px 32px -4px hsla(174, 40%, 80%, 0.6), 0 0 0 2px var(--primary);
}
.search-clear {
  position: absolute; right: 6rem; top: 50%; transform: translateY(-50%);
  padding: 0.25rem; color: var(--muted-fg);
}
.search-clear:hover { color: var(--fg); }
.search-btn {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  height: 2.5rem; padding: 0 1.25rem;
  background: var(--primary); color: var(--primary-fg);
  border-radius: 0.75rem; font-size: 0.875rem; font-weight: 500;
  transition: opacity 0.15s;
}
.search-btn:hover { opacity: 0.9; }

/* Results */
.search-results {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 0.5rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  overflow: hidden; z-index: 40;
  animation: dropIn 0.2s ease;
}
.result-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  transition: background 0.15s; cursor: pointer;
}
.result-item:hover { background: hsla(210,15%,95%,0.5); }
.result-icon {
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: var(--secondary); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.75rem;
}
.result-info { flex: 1; min-width: 0; text-align: left; }
.result-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-salt { font-size: 0.75rem; color: var(--muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-price { font-size: 0.875rem; font-weight: 500; flex-shrink: 0; }
.result-divider { margin: 0 1.25rem; border-top: 1px solid var(--border); }
.result-empty { padding: 1.5rem; font-size: 0.875rem; color: var(--muted-fg); text-align: center; }

/* Languages */
.languages { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.25rem; }
.lang { font-size: 0.75rem; color: var(--muted-fg); transition: color 0.15s; }
.lang:hover { color: var(--fg); }
.lang.active { color: var(--primary); font-weight: 500; }

/* ===== Trust Band ===== */
.trust-band { padding: 3rem 1rem; background: var(--trust-bg); }
.trust-inner { max-width: 56rem; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 640px) { .trust-inner { grid-template-columns: repeat(3, 1fr); } }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
.trust-icon {
  width: 3rem; height: 3rem; border-radius: 0.75rem;
  background: var(--secondary); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.trust-label { font-size: 0.875rem; font-weight: 600; }
.trust-desc { font-size: 0.75rem; color: var(--muted-fg); margin-top: -0.25rem; }

/* ===== Browse Section ===== */
.browse-section { padding: 4rem 1rem; }
.browse-inner { max-width: 56rem; margin: 0 auto; }
.browse-inner h2 { font-size: 1.25rem; font-weight: 600; text-align: center; margin-bottom: 0.5rem; }
.browse-sub { font-size: 0.875rem; color: var(--muted-fg); text-align: center; margin-bottom: 2rem; }
.salt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .salt-grid { grid-template-columns: repeat(4, 1fr); } }
.salt-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  text-align: left; transition: all 0.2s;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.salt-card:hover {
  border-color: hsla(174, 55%, 40%, 0.3);
  box-shadow: 0 4px 16px -4px hsla(174, 40%, 80%, 0.3);
  transform: translateY(-1px);
}
.salt-name { font-size: 0.875rem; font-weight: 500; }
.salt-count { font-size: 0.75rem; color: var(--muted-fg); }

/* ===== Footer ===== */
.footer { background: var(--footer-bg); border-top: 1px solid var(--border); }
.footer-inner { max-width: 56rem; margin: 0 auto; padding: 1.5rem 1rem; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.25rem; }
.footer-links a { font-size: 0.75rem; color: var(--muted-fg); transition: color 0.15s; }
.footer-links a:hover { color: var(--fg); }
.footer-copy { font-size: 0.75rem; color: var(--muted-fg); text-align: center; margin-top: 1.5rem; }

/* Secondary Credit Bar */
.footer-credit {
  background: hsl(210, 15%, 93%);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: center;
}
.footer-credit p {
  font-size: 0.625rem;
  color: hsl(210, 10%, 62%);
  margin: 0;
  letter-spacing: 0.02em;
}
