/* MATANGA Research — brand tokens pulled from matangaresearch.com */
:root {
  --ink: #122023;        /* deep teal-charcoal (primary background on the main site) */
  --ink-2: #1a2c30;
  --ink-3: #1e1e1f;
  --lime: #d5f0a3;       /* primary accent */
  --lime-bright: #e1fcad;
  --mist: #f5f5f5;
  --line: #e4e4e4;
  --muted: #8a9a9d;
  --white: #ffffff;
  --font-sans: "Plus Jakarta Sans", "Inter", sans-serif;
  --font-mono: "PT Mono", monospace;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* The hidden attribute must always win over display rules on labels/rows */
[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--mist);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(1060px, 92%); margin: 0 auto; }

/* Test-environment banner — remove when the real GS1 backend is wired */
.test-banner {
  background: #6b4d12;
  color: #ffe6a8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  padding: 0.5rem 1rem;
  line-height: 1.4;
}
.test-banner a { color: var(--lime-bright); }

/* Outbound GS1 US store links (channel-partner tracked) */
.gs1-link {
  color: var(--lime);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gs1-link:hover { color: var(--lime-bright); }

/* Header */
header {
  border-bottom: 1px solid rgba(228, 228, 228, 0.12);
  padding: 1.1rem 0;
}
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo {
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
  font-size: 1.05rem;
}
.logo span { color: var(--lime); }
.header-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

main { flex: 1; padding: 3rem 0 4rem; }

/* Hero */
.hero { max-width: 640px; margin-bottom: 2.6rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 0.8rem;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.hero p { color: var(--muted); font-size: 1.02rem; }

/* Product cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.4rem;
}
.card {
  background: var(--ink-2);
  border: 1px solid rgba(228, 228, 228, 0.1);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.card h2 { color: var(--white); font-size: 1.25rem; letter-spacing: -0.01em; }
.card .price {
  font-family: var(--font-mono);
  color: var(--lime-bright);
  font-size: 1.5rem;
}
.card .price small { color: var(--muted); font-size: 0.78rem; }
.card p { color: var(--muted); font-size: 0.94rem; }
.card ul { list-style: none; display: grid; gap: 0.45rem; font-size: 0.9rem; }
.card ul li::before { content: "— "; color: var(--lime); }
.card .spacer { flex: 1; }

.btn {
  display: inline-block;
  text-align: center;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-family: var(--font-sans);
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--lime-bright); }
.btn.secondary {
  background: transparent;
  color: var(--mist);
  border: 1px solid rgba(228, 228, 228, 0.3);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Checkout */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--ink-2);
  border: 1px solid rgba(228, 228, 228, 0.1);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.panel h2 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(228, 228, 228, 0.1);
}
fieldset { border: none; display: grid; gap: 0.85rem; margin-bottom: 1.6rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
label { display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
input, select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--white);
  background: var(--ink);
  border: 1px solid rgba(228, 228, 228, 0.18);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  outline: none;
}
input:focus, select:focus { border-color: var(--lime); }

.summary-line { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 0.35rem 0; }
.summary-line.total {
  border-top: 1px solid rgba(228, 228, 228, 0.12);
  margin-top: 0.6rem;
  padding-top: 0.8rem;
  font-family: var(--font-mono);
  color: var(--lime-bright);
  font-size: 1.05rem;
}

/* GS1 T&C + PayPal container renders light UI; give it a light well */
#gs1us-tc-container {
  background: var(--white);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1.2rem;
  min-height: 60px;
  color: var(--ink-3);
}
#gs1us-tc-container:empty { display: none; }

.status {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  display: none;
}
.status.show { display: block; }
.status.info { background: rgba(213, 240, 163, 0.1); color: var(--lime-bright); }
.status.error { background: rgba(255, 120, 120, 0.12); color: #ff9d9d; }

/* Success */
.gtin-list { display: grid; gap: 0.7rem; margin: 1.2rem 0; }
.gtin-item {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--lime-bright);
  background: var(--ink);
  border: 1px dashed rgba(213, 240, 163, 0.4);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.gtin-item .meta { color: var(--muted); font-size: 0.8rem; align-self: center; }

footer {
  border-top: 1px solid rgba(228, 228, 228, 0.12);
  padding: 1.4rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer a { color: var(--mist); }
