/* ============================================================
   Made Hero Collective — shared/global styles (loaded on every
   page via main.html). Family 2: dark high-contrast.
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --bg-elevated: #131316;
  --surface: #1a1a1e;
  --surface-2: #202024;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f4f2;
  --text-muted: #9a9a9f;
  --text-faint: #6b6b70;
  --accent: #8f2318;
  --accent-hover: #a52c1f;
  --accent-soft: rgba(143, 35, 24, 0.16);
  --white: #ffffff;
  --black: #000000;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --shadow-lift: 0 20px 50px rgba(0, 0, 0, 0.55);
  --font-display: 'Oswald', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.05;
}

body.body-menu-open,
body:has(#cart-overlay.active) { overflow: hidden; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(180deg, rgba(0,0,0,0.65), transparent);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-header.is-solid {
  background: rgba(11, 11, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-left { display: flex; align-items: center; gap: 26px; }

.icon-btn {
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  -webkit-tap-highlight-color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.18s ease;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }

.brand-mark {
  display: inline-flex;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.brand-mark img { height: 48px; width: auto; display: block; }

.nav-right { display: flex; align-items: center; gap: 16px; }

.cart-badge {
  position: absolute;
  top: -6px; right: -8px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 0;
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
#cart-btn { position: relative; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .site-header { padding: 16px 18px; }
  .brand-mark img { height: 38px; }
}

/* ===== Overlay / drawer shared ===== */
#menuOverlay.overlay, #cart-overlay.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 260ms ease;
  z-index: 999;
}
body.body-menu-open #menuOverlay.overlay,
#cart-overlay.overlay.active { opacity: 1; pointer-events: auto; visibility: visible; }

#mobileMenu.drawer {
  position: fixed; top: 0; left: 0;
  width: min(92vw, 420px); height: 100dvh;
  background: linear-gradient(165deg, var(--bg-elevated) 0%, var(--bg) 75%);
  color: var(--text);
  z-index: 1000;
  transform: translateX(-104%);
  transition: transform 420ms cubic-bezier(.22,1,.36,1);
  box-shadow: var(--shadow-lift);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
body.body-menu-open #mobileMenu.drawer { transform: translateX(0); }

.drawer-shell { min-height: 100%; display: flex; flex-direction: column; padding: 22px 26px 26px; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }

.drawer-brand-mini { display: flex; align-items: center; }
.drawer-brand-mini img { height: 28px; width: auto; }

.close-btn {
  width: 40px; height: 40px;
  color: var(--text);
  display: inline-grid; place-items: center;
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.3s ease;
}
.close-btn:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }

.drawer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.drawer-nav .item {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  opacity: 0;
  transform: translateY(14px);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease,
              opacity 380ms ease, transform 380ms ease;
}
.drawer-nav .item:nth-child(5) { grid-column: 1 / -1; }

body.body-menu-open .drawer-nav .item { opacity: 1; transform: translateY(0); }
body.body-menu-open .drawer-nav .item:nth-child(1) { transition-delay: 90ms; }
body.body-menu-open .drawer-nav .item:nth-child(2) { transition-delay: 130ms; }
body.body-menu-open .drawer-nav .item:nth-child(3) { transition-delay: 170ms; }
body.body-menu-open .drawer-nav .item:nth-child(4) { transition-delay: 210ms; }
body.body-menu-open .drawer-nav .item:nth-child(5) { transition-delay: 250ms; }

.drawer-nav .item:hover, .drawer-nav .item.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.item-arrow {
  position: absolute; top: 14px; right: 16px;
  font-size: 1rem; line-height: 1;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.item-label {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.drawer-nav .item:hover .item-arrow, .drawer-nav .item.is-active .item-arrow { opacity: 1; transform: translate(0, 0); }

@media (prefers-reduced-motion: reduce) {
  #mobileMenu.drawer, #menuOverlay.overlay, .drawer-nav .item, .close-btn { transition: none !important; }
}

.drawer-newsletter { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--border); }
.drawer-newsletter-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.drawer-newsletter-text { margin: 0 0 14px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.4; }
.drawer-newsletter-form { display: flex; gap: 8px; }
.drawer-newsletter-form input[type="email"] {
  flex: 1 1 auto; min-width: 0; padding: 12px 13px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-size: 0.86rem; outline: none;
}
.drawer-newsletter-form input[type="email"]:focus { border-color: var(--accent); }
.drawer-newsletter-form button {
  flex: 0 0 auto; padding: 0 18px;
  background: var(--accent); color: var(--white); border: 1px solid var(--accent);
  font-family: var(--font-display); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.drawer-newsletter-form button:disabled { cursor: default; }
.drawer-newsletter-form button.is-success { width: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ===== Cart slideout ===== */
#cart-overlay.overlay { display: flex; justify-content: flex-end; align-items: stretch; visibility: hidden; z-index: 1100; }
.cart-slideout {
  width: min(94vw, 440px); height: 100dvh;
  background: var(--bg-elevated);
  transform: translateX(104%);
  transition: transform 360ms cubic-bezier(.22,1,.36,1);
  box-shadow: var(--shadow-lift);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
#cart-overlay.active .cart-slideout { transform: translateX(0); }
#cart-overlay.no-transition, #cart-overlay.no-transition .cart-slideout { transition: none !important; }

.cart-inner { height: 100%; display: flex; flex-direction: column; }
.cart-header {
  position: sticky; top: 0; z-index: 2; min-height: 80px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  background: rgba(19,19,22,0.94); backdrop-filter: blur(14px);
}
.cart-heading-wrap { display: flex; align-items: center; gap: 10px; }
.cart-heading-title { margin: 0; font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.cart-count-badge {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 0;
  background: var(--accent); color: var(--white); font-size: 0.7rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-items { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cart-items.centered { display: grid; place-items: center; }
.cart-empty-hero {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px; padding: 44px 24px; border: 1px solid var(--border);
}
.cart-empty-icon { color: var(--text-faint); }
.cart-empty-text { margin: 0; color: var(--text-muted); font-family: var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.9rem; }
.cart-empty-cta { margin-top: 4px; }

.product-item { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 10px; transition: border-color 0.2s ease; }
.product-item:hover { border-color: var(--border-strong); }
.product-item:last-child { margin-bottom: 0; }
.product-image { flex: 0 0 auto; width: 84px; height: 105px; object-fit: cover; background: var(--bg); border-radius: 0; }
.product-details { min-width: 0; flex: 1 1 auto; display: grid; gap: 5px; padding-right: 26px; }
.product-name { margin: 0; font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.01em; line-height: 1.2; }
.product-option { font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.product-line-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.quantity-container { display: inline-flex; align-items: center; border: 1px solid var(--border); overflow: hidden; }
.quantity-btn { width: 28px; height: 28px; border: 0; background: transparent; color: var(--text); cursor: pointer; font-size: 0.9rem; transition: background-color 0.15s ease; }
.quantity-btn:hover { background: var(--accent); color: var(--white); }
.quantity-display { min-width: 24px; text-align: center; font-weight: 700; font-size: 0.76rem; }
.product-price-wrap { text-align: right; }
.product-price-each { display: block; font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.product-total { display: block; font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.delete-btn {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px;
  display: grid; place-items: center; background: none; border: 1px solid var(--border);
  padding: 0; cursor: pointer; color: var(--text-muted);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.delete-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

.cart-footer { border-top: 1px solid var(--border); background: rgba(19,19,22,0.94); padding: 20px 24px 24px; }
.cart-summary { display: grid; gap: 14px; }
.estimated-total { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; font-size: 0.86rem; color: var(--text-muted); letter-spacing: 0.02em; text-transform: uppercase; }
#cart-est-total { font-size: 1.25rem; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: normal; }
.shipping-note { margin: 0; color: var(--text-muted); font-size: 0.8rem; line-height: 1.35; text-align: center; }
.checkout-btn {
  width: 100%; min-height: 52px; background: var(--accent); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  transition: background-color 180ms ease;
}
.checkout-btn:hover { background: var(--accent-hover); }
.cart-trust-row { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--text-muted); font-size: 0.74rem; }
.cart-trust-row svg { width: 13px; height: 13px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); overflow: hidden; }

/* -- CTA band -- */
.footer-cta { border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.footer-cta-inner {
  width: min(1120px, 100%); margin: 0 auto; padding: 40px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.footer-cta-copy { display: flex; flex-direction: column; gap: 6px; }
.footer-cta-eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.footer-cta-title { margin: 0; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.footer-cta-form {
  display: flex; align-items: stretch; flex: 0 1 420px; min-width: 280px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0;
  padding: 5px; transition: border-color 180ms ease, box-shadow 180ms ease;
}
.footer-cta-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.footer-cta-form input {
  flex: 1; min-width: 0; background: transparent; border: none;
  padding: 12px 8px 12px 18px; font-family: var(--font-body); font-size: 0.94rem; color: var(--text);
}
.footer-cta-form input::placeholder { color: var(--text-faint); }
.footer-cta-form input:focus { outline: none; }
.footer-cta-form button {
  flex: 0 0 auto; padding: 0 26px; background: var(--accent); color: var(--white); border: none;
  border-radius: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.78rem; cursor: pointer; transition: background 180ms ease, transform 180ms ease;
}
.footer-cta-form button:hover { background: var(--accent-hover); transform: translateY(-1px); }
.footer-cta-form button:active { transform: translateY(0); }
.footer-cta-form button.is-success { background: var(--accent-hover); }

/* -- Nav row -- */
.footer-main { border-bottom: 1px solid var(--border); }
.footer-main-inner {
  width: min(1120px, 100%); margin: 0 auto; padding: 28px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-socials { display: flex; align-items: center; gap: 14px; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-socials a { color: var(--text); transition: color 0.2s ease; }
.footer-socials a:hover { color: var(--accent); }
.footer-divider { width: 1px; height: 12px; background: var(--border-strong); }
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.footer-nav a { font-size: 0.86rem; color: var(--text-muted); border-bottom: 1px solid transparent; transition: color 180ms ease, border-color 180ms ease; }
.footer-nav a:hover { color: var(--text); border-color: currentColor; }

/* -- Giant watermark wordmark -- */
.footer-wordmark {
  display: block; width: 100%; text-align: center; white-space: nowrap; overflow: hidden;
  padding: 0.02em 24px 0; margin-top: -0.06em;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.02em; line-height: 0.82; font-size: clamp(3.2rem, 15vw, 12rem);
  color: rgba(245, 244, 242, 0.06); transition: color 260ms ease;
}
.footer-wordmark:hover { color: var(--accent-soft); }

.footer-bottom { border-top: 1px solid var(--border); padding: 18px 24px; }
.footer-bottom-inner { width: min(1120px, 100%); margin: 0 auto; text-align: center; color: var(--text-muted); font-size: 0.82rem; }

@media (max-width: 760px) {
  .footer-cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-cta-form { width: 100%; flex-basis: auto; }
  .footer-main-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-nav { justify-content: center; }
}

/* ===== Toast ===== */
.global-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 3000;
  display: flex; align-items: center; gap: 12px; opacity: 0; pointer-events: none;
  min-width: 260px; max-width: min(92vw, 360px); padding: 14px 16px;
  background: var(--surface); color: var(--text); border-left: 3px solid var(--accent);
  font-size: 0.86rem; box-shadow: var(--shadow-lift);
  transform: translateX(calc(100% + 40px));
  transition: opacity .28s ease, transform .28s cubic-bezier(.22,.61,.36,1);
}
.global-toast .toast-icon { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 0; font-size: 0.76rem; font-weight: 800; background: var(--accent); color: var(--white); }
.global-toast.show { opacity: 1; transform: translateX(0); }
.global-toast.error { border-left-color: #e05a4a; }

/* ===== Shared buttons ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; background: var(--accent); color: var(--white);
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem;
  border: 1px solid var(--accent); border-radius: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(143,35,24,0.35); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; background: transparent; color: var(--text);
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem;
  border: 1px solid var(--border-strong); border-radius: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.btn-outline:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 520px) {
  .drawer-shell, .cart-header, .cart-items, .cart-footer { padding-left: 18px; padding-right: 18px; }
}
