/*
Theme Name: Buy American Manufactured
Theme URI: https://buyamericanmanufactured.com
Author: Buy American Manufactured
Description: America's premier affiliate hub for domestically manufactured goods.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: buyamericanmanufactured
*/

/* ============================================================
   BuyAmericanManufactured.com — Shared Design System
   Gold/Navy palette · Playfair Display + DM Sans
   ============================================================ */

:root {
  --cream: #FAF8F4;
  --cream2: #F2EDE5;
  --white: #FFFFFF;
  --ink: #1A1714;
  --ink2: #5A544C;
  --navy: #1B3A6B;
  --red: #8C6D38;
  --gold: #8C6D38;
  --border: rgba(26,23,20,0.1);
  --border-strong: rgba(26,23,20,0.22);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --max-w: 1440px;
  --gutter: 60px;
}

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--cream); color: var(--ink); line-height: 1.6; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ============================================================ FLAG MARK */
.flag-mark {
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
}
.flag-mark-white { border-color: rgba(255,255,255,0.14); }

/* ============================================================ NAV */
nav.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 var(--gutter);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.nav-logo-text { display: flex; flex-direction: column; gap: 2px; }
.nav-logo-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}
.nav-logo-sub {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink2);
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.2s;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a.active {
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.nav-cta {
  background: var(--navy) !important;
  color: white !important;
  opacity: 1 !important;
  padding: 10px 22px;
  border-radius: 2px;
  letter-spacing: 0.08em;
}
/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}
/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--white);
  z-index: 199;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 0;
}
.nav-mobile-overlay.open { display: flex; }
.nav-mobile-overlay a {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: block;
}
.nav-mobile-overlay .nav-cta {
  margin-top: 24px;
  background: var(--navy);
  color: white;
  padding: 16px 24px;
  border-radius: 2px;
  text-align: center;
  border-bottom: none;
}

/* ============================================================ FOOTER */
footer.site-footer {
  background: var(--ink);
  color: white;
  padding: 70px var(--gutter) 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  margin-bottom: 18px;
}
.footer-logo-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}
.footer-logo-sub {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
}
.footer-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  line-height: 1.8;
  max-width: 250px;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(255,255,255,0.22);
}

/* ============================================================ COMMON SECTION ELEMENTS */
.section-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.section-label.centered { justify-content: center; }
.section-label.centered::before { display: none; }
h1, h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
h1 { font-size: clamp(40px, 4vw, 64px); }
h2 { font-size: clamp(32px, 3.5vw, 52px); }
h3 {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-sub {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink2);
  margin-top: 12px;
  max-width: 480px;
  line-height: 1.7;
}
.link-arrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--navy);
  padding-bottom: 2px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.btn-primary:hover { background: #152F58; }
.btn-outline {
  background: transparent;
  color: var(--navy);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 2px;
  border: 1.5px solid var(--navy);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--navy); color: white; }
.btn-sm {
  background: var(--navy);
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-sm:hover { background: #152F58; }

/* Product card */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.product-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.product-img {
  height: 200px;
  background: repeating-linear-gradient(
    -55deg, var(--cream), var(--cream) 6px, var(--cream2) 6px, var(--cream2) 12px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 10px;
  color: var(--ink2);
  position: relative;
}
.badge-made {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--navy);
  color: white;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.badge-deal {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold);
  color: white;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 9px;
}
.product-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.product-cat {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}
.product-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 5px;
}
.product-brand {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink2);
  margin-bottom: auto;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.product-price {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
}
.product-was {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink2);
  text-decoration: line-through;
}

/* Trust bar */
.trust-bar {
  background: var(--cream2);
  border-bottom: 1px solid var(--border);
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink2);
}
.trust-dot { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }

/* Newsletter strip */
.newsletter-strip {
  background: var(--cream2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px var(--gutter);
  text-align: center;
}
.newsletter-strip .section-label { justify-content: center; }
.newsletter-strip .section-label::before { display: none; }
.newsletter-strip h2 { margin-bottom: 12px; }
.newsletter-strip p {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink2);
  margin-bottom: 36px;
}
.nl-form {
  display: flex;
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid var(--border-strong);
  background: var(--white);
}
.nl-form input {
  flex: 1;
  padding: 15px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
}
.nl-form button {
  background: var(--navy);
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 22px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.nl-form button:hover { background: #152F58; }

/* Page hero (inner pages) */
.page-hero {
  background: var(--navy);
  padding: 64px var(--gutter);
  color: white;
}
.page-hero .section-label { color: rgba(255,255,255,0.4); }
.page-hero .section-label::before { background: rgba(255,255,255,0.25); }
.page-hero h1 { color: white; margin-bottom: 12px; }
.page-hero p {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  max-width: 540px;
  line-height: 1.75;
}

/* ============================================================ FLAG INLINE SVG SNIPPET */
.flag-inline { border: 1px solid rgba(0,0,0,0.09); flex-shrink: 0; }
.flag-inline-sm { width: 24px; height: 16px; }
.flag-inline-md { width: 40px; height: 27px; }

/* ============================================================ RESPONSIVE BREAKPOINTS */

/* Tablet: <= 1024px */
@media (max-width: 1024px) {
  :root { --gutter: 36px; }

  nav.site-nav .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

/* Mobile: <= 720px */
@media (max-width: 720px) {
  :root { --gutter: 20px; }

  /* Nav */
  nav.site-nav { height: 72px; }
  .nav-mobile-overlay { top: 72px; inset: 72px 0 0 0; padding: 24px 20px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Trust bar */
  .trust-bar { gap: 14px; justify-content: flex-start; padding: 14px 20px; }
  .trust-item { font-size: 11px; }

  /* Newsletter */
  .newsletter-strip { padding: 52px 20px; }
  .nl-form { flex-direction: column; }
  .nl-form button { padding: 14px; text-align: center; }

  /* Page hero */
  .page-hero { padding: 48px 20px; }

  /* Buttons */
  .btn-primary, .btn-outline { padding: 14px 22px; width: 100%; text-align: center; }
}
