/* ============================================================
   Live Metal Bulk Price Updater — Shared CSS
   KLYX | klyx.agency
   ============================================================ */

/* === VARIABLES === */
:root {
  --primary:   #1a1f36;
  --accent:    #2563EB;
  --accent-hover: #1d4ed8;
  --shopify:   #008060;
  --shopify-hover: #006b4f;
  --success:   #10b981;
  --text:      #374151;
  --text-light: #6b7280;
  --bg:        #f9fafb;
  --card-bg:   #ffffff;
  --border:    #e5e7eb;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 24px rgba(37,99,235,.12);
  --radius:    12px;
  --radius-sm: 8px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Exo 2', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; }
h1,h2,h3,h4,h5,h6 {
  font-family: 'Exo 2', 'Inter', system-ui, sans-serif;
  color: var(--primary);
  line-height: 1.25;
}

/* === TYPOGRAPHY === */
.section-label {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .5rem;
}

/* === LAYOUT === */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.btn-shopify {
  background: var(--shopify);
  color: #fff;
}
.btn-shopify:hover {
  background: var(--shopify-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,128,96,.25);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  height: 64px;
  max-width: 1140px;
  margin: 0 auto;
}
.nav-logo {
  font-family: 'Exo 2', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: -.02em;
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: #fff; }
.nav-cta { flex-shrink: 0; }
/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--primary);
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: rgba(255,255,255,.85);
  padding: .6rem 0;
  font-size: .95rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile .btn-shopify { margin-top: .75rem; border-radius: 99px; text-align: center; justify-content: center; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta.desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0f172a 60%, #1e3a5f 100%);
  color: #fff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(37,99,235,.18) 0%, transparent 65%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(37,99,235,.18);
  border: 1px solid rgba(37,99,235,.4);
  color: #93c5fd;
  border-radius: 99px;
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #fff;
  margin-bottom: 1.25rem;
  font-weight: 800;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.72);
  max-width: 640px;
  margin: 0 auto 2rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: .5rem;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
}
.trust-badge .check { color: var(--success); font-size: 1rem; font-weight: 700; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 5rem 1.5rem;
}
.section-alt { background: #fff; }
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  margin-bottom: .75rem;
}
.section-header p {
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* === FEATURE CARDS === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
  color: var(--primary);
}
.feature-card p { color: var(--text-light); font-size: .95rem; margin: 0; }

/* === HOW IT WORKS STEPS === */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.step {
  text-align: center;
  position: relative;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .5rem; color: var(--primary); }
.step p { color: var(--text-light); font-size: .92rem; margin: 0; }

/* === METAFIELDS TABLE === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.meta-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  font-size: .93rem;
}
.meta-table th {
  background: var(--primary);
  color: #fff;
  padding: .85rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.meta-table td {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.meta-table tr:last-child td { border-bottom: none; }
.meta-table tr:hover td { background: #f0f4ff; }
code {
  background: #f0f4ff;
  color: var(--accent);
  border-radius: 4px;
  padding: .15em .45em;
  font-family: 'Courier New', monospace;
  font-size: .88em;
  font-weight: 600;
}

/* === PRICING CARDS === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 780px;
  margin: 0 auto;
}
.price-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow);
  position: relative;
  transition: box-shadow .25s;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12), var(--shadow);
}
.price-card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  padding: .25rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.price-card.featured .price-card-badge { background: var(--success); }
.price-card h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: .75rem 0 1.5rem;
}
.price-amount sub { font-size: 1rem; font-weight: 500; color: var(--text-light); vertical-align: baseline; }
.price-features { margin-bottom: 1.75rem; }
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .35rem 0;
  color: var(--text);
  font-size: .93rem;
}
.price-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; margin-top: .05rem; }
.price-note {
  text-align: center;
  color: var(--text-light);
  font-size: .88rem;
  margin-top: 2rem;
}

/* === METALS PILLS === */
.metals-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}
.metal-pill {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: .5rem 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow);
  transition: all .2s;
}
.metal-pill:hover {
  border-color: var(--accent);
  background: rgba(37,99,235,.05);
  color: var(--accent);
}

/* ============================================================
   INNER PAGE LAYOUT (privacy, terms, faq, etc.)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0f172a 100%);
  color: #fff;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: .5rem; }
.page-hero p { color: rgba(255,255,255,.65); font-size: .95rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-decoration: none;
  font-weight: 500;
}
.back-link:hover { text-decoration: underline; }
.page-body {
  padding: 3rem 1.5rem 5rem;
}
.page-layout {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}
.toc {
  position: sticky;
  top: 80px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.toc h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.toc a {
  display: block;
  color: var(--text);
  font-size: .88rem;
  padding: .3rem 0;
  text-decoration: none;
  transition: color .2s;
  border-bottom: 1px solid var(--border);
}
.toc a:last-child { border-bottom: none; }
.toc a:hover { color: var(--accent); }
.content-area h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
  color: var(--primary);
}
.content-area h2:first-child { margin-top: 0; }
.content-area p { color: var(--text); margin-bottom: 1rem; line-height: 1.75; }
.content-area ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.content-area ul li { color: var(--text); margin-bottom: .35rem; }
.content-area a { color: var(--accent); }
.last-updated {
  background: #f0f4ff;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  padding: .75rem 1.25rem;
  font-size: .88rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.faq-section-title:first-of-type { margin-top: 0; }
.accordion {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.accordion-item:hover { box-shadow: var(--shadow-lg); }
.accordion-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  font-family: 'Inter', 'Exo 2', sans-serif;
}
.accordion-btn .icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  transition: transform .3s;
}
.accordion-btn.open .icon { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .25s;
}
.accordion-panel.open { max-height: 500px; }
.accordion-panel-inner {
  padding: 0 1.4rem 1.2rem;
  color: var(--text);
  font-size: .95rem;
  line-height: 1.75;
}

/* ============================================================
   CHANGELOG TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding-left: 2.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), #dbeafe);
}
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.65rem;
  top: .35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-version {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.timeline-version .version-tag {
  background: var(--primary);
  color: #fff;
  padding: .2rem .75rem;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.timeline-version .version-date {
  color: var(--text-light);
  font-size: .88rem;
}
.timeline-changes { list-style: none; padding: 0; }
.timeline-changes li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .25rem 0;
  color: var(--text);
  font-size: .93rem;
}
.timeline-changes li::before { content: '•'; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* ============================================================
   TUTORIAL
   ============================================================ */
.tutorial-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.tutorial-section h2 {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: .9rem;
  font-weight: 800;
  flex-shrink: 0;
}
.tutorial-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.tutorial-step .t-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(37,99,235,.12);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .15rem;
}
.tutorial-step p { margin: 0; color: var(--text); font-size: .95rem; }
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: .88rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.75;
}
.code-block .key { color: #93c5fd; }
.code-block .val { color: #86efac; }
.info-box {
  background: #eff6ff;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: .92rem;
  color: var(--text);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.65);
  padding: 3rem 1.5rem;
  text-align: center;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}
.footer-shopify-cta {
  margin-bottom: 2rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: center;
  margin: 1.25rem 0 1rem;
}
.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: .88rem;
  text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-contact {
  font-size: .88rem;
  color: rgba(255,255,255,.5);
  margin-top: .75rem;
}
.footer-contact a { color: rgba(255,255,255,.7); }
.footer-copy {
  margin-top: 1.5rem;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 1rem; }
  .page-layout { grid-template-columns: 1fr; }
  .toc { position: static; margin-bottom: 1.5rem; }
}
@media (max-width: 480px) {
  .hero { padding: 3.5rem 1rem 3rem; }
  .hero h1 { font-size: 1.75rem; }
  .btn { padding: .65rem 1.35rem; font-size: .88rem; }
}
