/* ==========================================================================
   MPGA Labs — "Make Peptides Great Again"
   Core stylesheet — patriotic / American-made research lab theme
   ========================================================================== */

:root {
  --navy: #0b1f3a;
  --navy-light: #16335c;
  --red: #b9202e;
  --red-dark: #8f1622;
  --white: #ffffff;
  --off-white: #f6f6f2;
  --gold: #c9a227;
  --gray: #5a6470;
  --gray-light: #e3e6ea;
  --gray-bg: #f0f1f4;
  --success: #1f7a3f;
  --danger: #b9202e;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 8px 30px rgba(11, 31, 58, 0.15);
  --max-width: 1240px;
  --font-head: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.6em;
}

/* ==========================================================================
   Top bar — patriotic stripe
   ========================================================================== */
.usa-stripe {
  background: var(--navy);
  background-image: linear-gradient(90deg, var(--red) 0 4px, var(--navy) 4px calc(100% - 4px), var(--red) calc(100% - 4px) 100%);
  color: var(--white);
  font-size: 0.8rem;
  text-align: center;
  padding: 7px 12px;
  letter-spacing: 0.04em;
}
.usa-stripe strong { color: #ffd9d9; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
header.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.15;
  color: var(--navy);
}
@media (min-width: 1100px) {
  .logo { font-size: 1.35rem; }
}
.logo .logo-mark {
  width: 40px;
  height: 40px;
  flex: none;
}
.logo .tagline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-top: 2px;
}

nav.main-nav {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
nav.main-nav a {
  color: var(--navy);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white) !important;
  border: none;
  cursor: pointer;
}
.icon-btn:hover { background: var(--red); }
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 1240px) {
  .nav-toggle { display: inline-block; }
  nav.main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    white-space: normal;
    gap: 10px;
    padding: 14px 0 4px;
    border-top: 1px solid var(--gray-light);
    margin-top: 10px;
  }
  nav.main-nav.open { display: flex; }
  .nav-wrap { flex-wrap: wrap; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s ease;
  text-align: center;
}
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }

.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-light); color: #fff; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #122a4d 60%, var(--navy) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 40px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 70px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero h1 { color: #fff; font-size: 3rem; }
.hero p.lead { font-size: 1.1rem; color: #d6dde8; max-width: 520px; }
.hero .badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 28px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-pill.gold { color: var(--gold); border-color: var(--gold); }

.hero-flag {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 24px; }
  .hero h1 { font-size: 2.2rem; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
section { padding: 60px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--gray); }

.bg-navy { background: var(--navy); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-white { background: #fff; }
.bg-stripe {
  background: var(--off-white);
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
}

/* Value props grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.value-card {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.value-card .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 6px;
}

/* Category tiles */
.cat-tile {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--red);
}
.cat-tile .icon { font-size: 1.8rem; margin-bottom: 10px; display: block; }

/* ==========================================================================
   Product cards / grid
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.product-thumb {
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-thumb svg { width: 56%; height: 56%; }

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 3px;
  z-index: 2;
}
.product-badge.gold { background: var(--gold); color: var(--navy); }
.product-badge.oos { background: var(--gray); }

.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-sku { font-size: 0.7rem; color: var(--gray); letter-spacing: 0.04em; }
.product-name { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; min-height: 2.6em; }
.product-purity { font-size: 0.78rem; color: var(--success); font-weight: 700; }
.product-price { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-top: auto; }
.product-stock { font-size: 0.75rem; color: var(--gray); }
.product-stock.low { color: var(--red); font-weight: 700; }
.product-stock.oos { color: var(--gray); font-weight: 700; }

.product-actions { padding: 0 16px 16px; display: flex; gap: 8px; }

/* ==========================================================================
   Filters / shop layout
   ========================================================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 860px) { .shop-layout { grid-template-columns: 1fr; } }

.filter-panel {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 90px;
}
.filter-panel h4 { font-family: var(--font-body); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.1em; color: var(--gray); margin: 18px 0 8px; }
.filter-panel h4:first-child { margin-top: 0; }
.filter-panel label { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; padding: 4px 0; cursor: pointer; }
.filter-panel input[type="search"],
.filter-panel select { width: 100%; padding: 9px 10px; border: 1px solid var(--gray-light); border-radius: 4px; font-size: 0.88rem; }

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.shop-toolbar select { padding: 8px 10px; border: 1px solid var(--gray-light); border-radius: 4px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-weight: 700; font-size: 0.85rem; }
.form-field input, .form-field select, .form-field textarea {
  padding: 11px 12px;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  font-size: 0.92rem;
  font-family: inherit;
}
.form-field textarea { resize: vertical; min-height: 100px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 0.88rem; }
.checkbox-row input { margin-top: 4px; flex: none; }

.card-box {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ==========================================================================
   Cart
   ========================================================================== */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray); padding: 10px; border-bottom: 2px solid var(--gray-light); }
.cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--gray-light); vertical-align: middle; }
.cart-item-name { font-weight: 700; }
.cart-item-meta { font-size: 0.78rem; color: var(--gray); }
.qty-input { width: 60px; padding: 6px; border: 1px solid var(--gray-light); border-radius: 4px; text-align: center; }
.cart-thumb { width: 48px; height: 48px; border-radius: 4px; background: var(--navy); display: flex; align-items: center; justify-content: center; }
.cart-thumb svg { width: 60%; height: 60%; }
.remove-link { color: var(--red); font-size: 0.8rem; font-weight: 700; cursor: pointer; background: none; border: none; padding: 0; }

.cart-summary { background: #fff; border: 1px solid var(--gray-light); border-radius: var(--radius); padding: 22px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.92rem; }
.summary-row.total { font-size: 1.2rem; font-weight: 800; border-top: 2px solid var(--gray-light); margin-top: 10px; padding-top: 12px; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer.site-footer {
  background: var(--navy);
  color: #cbd5e6;
  padding: 50px 0 0;
  margin-top: 60px;
  font-size: 0.9rem;
}
footer.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
footer.site-footer a { color: #cbd5e6; }
footer.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0;
  text-align: center;
  font-size: 0.78rem;
  color: #93a4c0;
}
.footer-disclaimer {
  background: #071528;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  font-size: 0.76rem;
  color: #93a4c0;
  text-align: center;
}
.footer-disclaimer strong { color: #ffd9d9; }

/* ==========================================================================
   Banners / alerts / misc
   ========================================================================== */
.disclaimer-banner {
  background: var(--red);
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 16px;
  letter-spacing: 0.02em;
}

.breadcrumb { font-size: 0.8rem; color: var(--gray); margin-bottom: 18px; }
.breadcrumb a { color: var(--gray); }

table.legal-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
table.legal-table th, table.legal-table td { border: 1px solid var(--gray-light); padding: 10px; text-align: left; font-size: 0.88rem; }
table.legal-table th { background: var(--gray-bg); }

.faq-item { border-bottom: 1px solid var(--gray-light); padding: 16px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; font-family: var(--font-head); font-size: 1.05rem; }
.faq-item p { margin-top: 10px; color: var(--gray); }

/* Modal (age / research-use gate) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11,31,58,0.78);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-box {
  background: #fff; border-radius: var(--radius); max-width: 540px; width: 100%;
  padding: 30px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.modal-box h3 { color: var(--red); }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.hidden { display: none !important; }

/* Toast */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--navy); color: #fff;
  padding: 18px 28px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-weight: 700; font-size: 1.1rem; z-index: 1100; border-left: 4px solid var(--red);
  display: flex; align-items: center; gap: 10px;
}

/* Star divider */
.star-divider { text-align: center; color: var(--gold); letter-spacing: 14px; font-size: 0.9rem; margin: 0 0 30px; }

/* Calculator */
.calc-result { background: var(--gray-bg); border-radius: var(--radius); padding: 18px; margin-top: 16px; font-size: 0.95rem; }
.calc-result strong { color: var(--red); }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th, .admin-table td { border: 1px solid var(--gray-light); padding: 8px; text-align: left; }
.admin-table th { background: var(--gray-bg); position: sticky; top: 0; }
.admin-table input { width: 100%; padding: 6px; border: 1px solid var(--gray-light); border-radius: 4px; }

.coa-table img.flag-strip { height: 14px; vertical-align: middle; margin-right: 6px; }

/* small flag accent strip */
.flag-accent {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--red) 0 40px, var(--white) 40px 80px, var(--navy) 80px 120px);
}
