/* ========================================================================
   Bargain App by CartCoders — Modern Landing Page Styles
   Premium dark-theme SaaS design with gradient accents
   ======================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Core palette */
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #111118;
  --bg-card:       #16161f;
  --bg-card-hover: #1c1c28;
  --bg-surface:    #1e1e2a;

  /* Accent gradient */
  --accent-start: #5d1b9c;   /* logo deep purple */
  --accent-mid:   #7e31c7;   /* medium purple */
  --accent-end:   #a855f7;   /* light purple */
  --accent-green: #22c55e;
  --accent-cyan:  #06b6d4;

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted:     #94a3b8;
  --text-accent:    #a855f7;

  /* Borders */
  --border-color:   rgba(148,163,184,.12);
  --border-hover:   rgba(148,163,184,.25);

  /* Misc */
  --radius-sm:  8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
  --shadow-glow: 0 0 60px rgba(93,27,156,.12);
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust:100%; font-size:16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; transition: var(--transition); }
/* WCAG Accessibility Focus States */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent-start);
    outline-offset: 2px;
}
img { max-width:100%; height:auto; display:block; }
ul, ol { list-style: none; }
input, textarea, button { font-family: inherit; font-size: inherit; }

/* ---------- Utility ---------- */
.container-modern {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(93,27,156,.1);
  border: 1px solid rgba(93,27,156,.25);
  color: var(--text-accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset:0;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease;
}
#preloader.loaded { opacity:0; pointer-events:none; }
#preloader::after {
  content: '';
  width: 40px; height: 40px;
  border: 3px solid rgba(93,27,156,.2);
  border-top-color: var(--accent-start);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================================================
   HEADER / NAVBAR
   ======================================================================== */
.modern-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.modern-header.scrolled {
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}
.header-logo img {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
}
.header-logo .logo-highlight { color: var(--text-accent); }

/* Desktop nav */
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,.06);
}

/* CTA button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid));
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(93,27,156,.3);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(93,27,156,.45);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: .875rem;
  border: 1px solid var(--border-hover);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--accent-start);
  color: var(--accent-start);
  transform: translateY(-2px);
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.mobile-toggle span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity:0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px; left:0; right:0; bottom:0;
  background: rgba(10,10,15,.97);
  backdrop-filter: blur(20px);
  padding: 32px 24px;
  z-index: 999;
}
.mobile-nav.open { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav a {
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.mobile-nav a:hover { background: rgba(255,255,255,.06); color: var(--text-primary); }

/* ========================================================================
   HERO SECTION
   ======================================================================== */
.hero-section {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
}
/* Background glow */
.hero-bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-bg-glow::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(93,27,156,.18) 0%, transparent 70%);
  filter: blur(60px);
}
.hero-bg-glow::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,.12) 0%, transparent 70%);
  filter: blur(80px);
}
/* Grid pattern */
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 40%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Trust badges */
.hero-trust {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: .875rem;
}
.trust-item svg { width: 20px; height: 20px; color: var(--accent-green); }

/* Shopify stars */
.star-rating { display: flex; gap: 2px; }
.star-rating svg { width: 16px; height: 16px; color: #facc15; fill: #facc15; }

/* ========================================================================
   SECTION HEADER (reusable)
   ======================================================================== */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 64px;
}
.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ========================================================================
   FEATURES SECTION
   ======================================================================== */
.features-section { background: var(--bg-primary); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
.feature-card {
  position: relative;
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  opacity: 0;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.feature-card:hover::before { opacity:1; }
.feature-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: rgba(93,27,156,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 28px; height: 28px; color: var(--text-accent); }
.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.7;
}

/* ========================================================================
   HOW IT WORKS (USAGE GUIDE)
   ======================================================================== */
.usage-section { background: var(--bg-secondary); }
.usage-steps {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 32px;
  position: relative;
}
/* Connector line */
.usage-steps::before {
  content: '';
  position: absolute;
  top: 44px; left: 15%; right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-start), var(--accent-end), transparent);
}
.usage-step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid));
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(93,27,156,.3);
}
.usage-step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.usage-step p {
  color: var(--text-secondary);
  font-size: .9rem;
}

/* ========================================================================
   PRICING SECTION
   ======================================================================== */
.pricing-section { background: var(--bg-secondary); position: relative; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
  align-items: stretch;
}
.pricing-card {
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.pricing-card.popular {
  border-color: var(--accent-start);
  box-shadow: 0 0 40px rgba(93,27,156,.15);
}
.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid));
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}
.pricing-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.pricing-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.pricing-amount span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-period { color: var(--text-muted); font-size: .875rem; margin-bottom: 24px; }
.pricing-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 0 24px;
}
.pricing-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--text-primary);
}
.pricing-features li svg { width: 18px; height: 18px; color: var(--accent-green); flex-shrink:0; }
.pricing-card .btn-primary { width: 100%; justify-content: center; }
.pricing-card .btn-secondary { width: 100%; justify-content: center; }

/* ========================================================================
   FAQ SECTION
   ======================================================================== */
.faq-section { background: var(--bg-primary); }
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item.active { border-color: rgba(93,27,156,.3); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.faq-question svg {
  width: 20px; height: 20px;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}
.faq-item.active .faq-question svg { transform: rotate(45deg); color: var(--text-accent); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
}
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: .925rem;
  line-height: 1.8;
}

/* ========================================================================
   ABOUT / STATS
   ======================================================================== */
.about-section { background: var(--bg-secondary); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-content h5 {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.about-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.25;
}
.about-content p {
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 32px;
}
.stats-row {
  display: flex;
  gap: 40px;
}
.stat-item h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item p {
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.about-visual {
  position: relative;
}
.about-visual-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.about-visual-card .stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.about-visual-card .stat-box {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  text-align: center;
}
.about-visual-card .stat-box h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.about-visual-card .stat-box p {
  color: var(--text-muted);
  font-size: .8rem;
}

/* ========================================================================
   NEWSLETTER / SUBSCRIBE
   ======================================================================== */
.subscribe-section {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.subscribe-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(93,27,156,.1) 0%, transparent 70%);
  filter: blur(60px);
}
.subscribe-box {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.subscribe-form {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
.subscribe-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
}
.subscribe-form input[type="email"]::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.subscribe-form input[type="email"]:focus {
  border-color: var(--accent-start);
  box-shadow: 0 0 0 3px rgba(93,27,156,.15);
}
.subscribe-form button {
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid));
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.subscribe-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(93,27,156,.4);
}
.subscribe-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: .8rem;
}

/* ========================================================================
   CONTACT SECTION
   ======================================================================== */
.contact-section { background: var(--bg-primary); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}
.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-info-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.contact-info-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}
.contact-info-card .icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: rgba(93,27,156,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info-card .icon-wrap svg { width: 22px; height: 22px; color: var(--text-accent); }
.contact-info-card h4 { font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.contact-info-card p { color: var(--text-secondary); font-size: .875rem; margin:0; }

/* Form */
.contact-form-modern {
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-start);
  box-shadow: 0 0 0 3px rgba(93,27,156,.12);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* ========================================================================
   PRIVACY POLICY
   ======================================================================== */
.privacy-section { background: var(--bg-secondary); }
.privacy-content {
  max-width: 800px;
  margin: 0 auto;
}
.privacy-content a {
  color: var(--text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.privacy-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text-primary);
}
.privacy-content p {
  color: var(--text-secondary);
  font-size: .925rem;
  line-height: 1.8;
  margin-bottom: 16px;
}
.privacy-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}
.privacy-content ul li {
  color: var(--text-secondary);
  font-size: .925rem;
  line-height: 1.8;
  list-style: disc;
  margin-bottom: 6px;
}

/* ========================================================================
   FOOTER
   ======================================================================== */
.modern-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: .875rem;
  margin-top: 12px;
  line-height: 1.7;
  max-width: 300px;
}
.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: .875rem;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--text-primary); transform: translateX(4px); }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--accent-start);
  border-color: var(--accent-start);
  transform: translateY(-2px);
}
.footer-social a svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  color: var(--text-muted);
  font-size: .8rem;
}
.footer-bottom-links {
  display: flex;
  gap: 24px;
}
.footer-bottom-links a {
  color: var(--text-muted);
  font-size: .8rem;
  transition: var(--transition);
}
.footer-bottom-links a:hover { color: var(--text-primary); }

/* ========================================================================
   SCROLL ANIMATIONS
   ======================================================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: .1s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: .2s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: .3s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: .4s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: .5s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: .6s; }

/* ========================================================================
   FORM MESSAGES
   ======================================================================== */
.form-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 16px;
}
.form-alert.success {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  color: #22c55e;
}
.form-alert.error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #ef4444;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 1024px) {
  .features-grid,
  .pricing-grid { grid-template-columns: repeat(2,1fr); }
  .usage-steps { grid-template-columns: 1fr; gap: 40px; }
  .usage-steps::before { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-section { padding: 120px 0 60px; }
  .header-nav { display: none; }
  .mobile-toggle { display: flex; }
  #header-install-btn { display: none; }
  .features-grid,
  .pricing-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr !important; }
  .section-padding { padding: 60px 0; }
  .hero-content h1 { font-size: 2rem; }
  .subscribe-form { flex-direction: column; }
  .subscribe-form button { width: 100%; }
  .stats-row { gap: 24px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .pricing-card { padding: 24px 20px; }
  .contact-form-modern { padding: 24px 20px; }
  .header-logo { font-size: 1.1rem; gap: 8px; }
  .header-logo img { width: 32px; height: 32px; }
}
@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons a { width: 100%; justify-content: center; }
  .hero-content h1 { font-size: 1.8rem; }
  .section-padding { padding: 40px 0; }
  .pricing-card { padding: 20px 16px; }
  .contact-form-modern { padding: 20px 16px; }
  .section-header h2 { font-size: 1.8rem; }
}

/* ---------- Light Mode ---------- */
body.light-mode {
  --bg-primary:    #ffffff;
  --bg-secondary:  #f8fafc;
  --bg-card:       #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-surface:    #f1f5f9;

  --text-primary:   #0f172a;
  --text-secondary: #334155;
  --text-muted:     #64748b;
  --text-accent:    #5d1b9c;

  --border-color:   rgba(15,23,42,.1);
  --border-hover:   rgba(15,23,42,.2);
}

body.light-mode .modern-header.scrolled {
  background: rgba(255,255,255,.9);
}
body.light-mode .header-nav a:hover,
body.light-mode .header-nav a.active {
  background: rgba(15,23,42,.08);
}

body.light-mode .mobile-nav {
  background: rgba(255,255,255,.98);
}

body.light-mode .hero-bg-glow::before {
  background: radial-gradient(circle, rgba(93,27,156,.1) 0%, transparent 70%);
}

body.light-mode .hero-bg-glow::after {
  background: radial-gradient(circle, rgba(139,92,246,.08) 0%, transparent 70%);
}

body.light-mode .mobile-toggle span {
  background: var(--text-primary);
}

body.light-mode .stat-item h3 {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light-mode .about-content h2,
body.light-mode .section-header h2,
body.light-mode .hero-content h1 {
  color: var(--text-primary);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-surface);
  border-color: var(--border-hover);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ---------- New Hero Trust Badges ---------- */
.hero-trust-box {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  gap: 24px;
  margin-top: 40px;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.trust-box-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-box-divider {
  width: 1px;
  height: 40px;
  background-color: var(--border-color);
}

.shopify-stars-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.shopify-stars-col .star-rating {
  display: flex;
  gap: 4px;
  color: #fff;
}

.shopify-stars-col .star-rating svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.shopify-stars-col span {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
}

body.light-mode .shopify-stars-col .star-rating,
body.light-mode .shopify-stars-col span,
body.light-mode .trust-bag-icon {
  color: var(--text-primary);
}

.trust-bag-icon {
  width: 36px;
  height: 36px;
  color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hero-trust-box {
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }
  .trust-box-divider {
    width: 100%;
    height: 1px;
  }
}

/* Additional badge styles */
.free-plan-ribbon {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 6px 18px 6px 12px;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  clip-path: polygon(0% 0%, 100% 0%, 90% 50%, 100% 100%, 0% 100%);
  width: 140px;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}
.free-plan-ribbon span:last-child {
  font-weight: 600;
  font-size: 0.75rem;
}
.iso-badge-text {
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.iso-badge-text span.iso-large {
  font-size: 0.95rem;
}
.iso-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  position: relative;
}
.iso-circle::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid var(--bg-primary);
  border-radius: 50%;
}

/* Document Links Section (Usage Guide & Privacy) */
.doc-links-section {
  background: var(--bg-primary);
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}
.doc-links-container {
  display: flex;
  justify-content: center;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
.doc-link-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-decoration: none;
  transition: var(--transition);
  color: var(--text-primary);
}
.doc-link-card:hover {
  border-color: var(--text-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.doc-link-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(168, 85, 247, 0.1);
  color: var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doc-link-icon svg {
  width: 24px;
  height: 24px;
}
.doc-link-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.doc-link-content h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.doc-link-content p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.doc-link-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  color: var(--text-secondary);
}
.doc-link-card:hover .doc-link-arrow {
  background: var(--text-accent);
  color: #fff;
}
.doc-link-arrow svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .doc-links-container {
    flex-direction: column;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Utility Classes for Code Audit Cleanup */
.mt-16 { margin-top: 16px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-24 { margin-top: 24px !important; }
.mt-40 { margin-top: 40px !important; }
.mb-12 { margin-bottom: 12px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-24 { margin-bottom: 24px !important; }
.gap-10 { gap: 10px !important; }
.gap-12 { gap: 12px !important; }
.gap-16 { gap: 16px !important; }
.flex-col { display: flex; flex-direction: column; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.w-full { width: 100% !important; }
.max-w-400 { max-width: 400px; }
.text-decoration-none { text-decoration: none !important; }
.text-lg-bold { font-weight: 800; font-size: 1rem; line-height: 1.1; }
.text-sm-semi { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); line-height: 1.2; }
.icon-md { width: 32px; height: 32px; color: var(--text-accent); }
.flex-wrap { flex-wrap: wrap; }
.d-flex { display: flex; }
.section-padding-large { padding-top: 140px; min-height: 100vh; }

/* Guide Tip & Help Blocks */
.guide-tip-box { background: rgba(148,163,184,.1); padding: 16px 20px; border-radius: var(--radius-sm); border-left: 4px solid var(--accent-start); color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }
.guide-help-block { background: rgba(148, 163, 184, 0.05); }
.guide-help-label { text-transform: uppercase; letter-spacing: 1px; font-weight: 600; font-size: 0.85rem; color: var(--text-muted); }
.guide-help-title { font-size: 1.6rem; }

/* Secondary Button Outline */
.btn-outline { background: transparent; border: 1px solid var(--border-color); box-shadow: none; color: var(--text-primary); text-decoration: none; }
.btn-outline:hover { background: rgba(148,163,184,.1); color: var(--text-primary); }

/* Additional Utility Classes */
.text-sub { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 12px; line-height: 1.5; }
.form-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); border-radius: var(--radius-sm); font-size: 0.9rem; outline: none; }
.form-input:focus { border-color: var(--accent-start); }
.btn-sm-full { padding: 10px 14px; width: 100%; justify-content: center; font-size: 0.9rem; }
.text-xs { font-size: 0.8rem; }
.text-accent-link { color: var(--text-accent); text-decoration: underline; text-underline-offset: 2px; }
.text-accent-link:hover { color: var(--accent-start); }
.section-padding-extra { padding-top: 160px; }
.d-block { display: block !important; }
.mb-4 { margin-bottom: 4px !important; }
.m-0 { margin: 0 !important; }
.text-sm { font-size: 0.9rem !important; }

/* Guide specific styles */
.guide-layout { display: flex; gap: 40px; align-items: flex-start; }
.guide-sidebar { width: 280px; position: sticky; top: 120px; flex-shrink: 0; background: var(--bg-card); padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); height: calc(100vh - 140px); display: flex; flex-direction: column; }
.guide-sidebar h4 { font-size: 1.1rem; margin-bottom: 16px; color: var(--text-primary); flex-shrink: 0; }
.guide-nav { list-style: none; padding: 0; margin: 0; flex-grow: 1; overflow-y: auto; padding-right: 10px; }
.guide-nav::-webkit-scrollbar { width: 4px; }
.guide-nav::-webkit-scrollbar-track { background: transparent; }
.guide-nav::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 4px; }
.guide-nav::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.5); }
.guide-nav li { margin-bottom: 10px; }
.guide-nav > li > a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: var(--transition); display: block; padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 500; }
.guide-nav > li > a:hover, .guide-nav > li > a.active { color: var(--text-primary); background: rgba(148,163,184,.1); }

.guide-nav ul.sub-nav { list-style: disc; padding-left: 36px; margin-top: 4px; margin-bottom: 8px; color: var(--text-muted); }
.guide-nav ul.sub-nav li { margin-bottom: 4px; }
.guide-nav ul.sub-nav li::marker { color: var(--text-muted); font-size: 0.8em; }
.guide-nav ul.sub-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; display: block; padding: 4px 8px; transition: var(--transition); border-radius: var(--radius-sm); }
.guide-nav ul.sub-nav a:hover, .guide-nav ul.sub-nav a.active { color: var(--text-primary); background: rgba(148,163,184,.05); }

.guide-content { flex: 1; min-width: 0; }
.guide-section { background: var(--bg-card); padding: 40px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); margin-bottom: 30px; }
.guide-section h2 { font-size: 1.8rem; margin-bottom: 24px; color: var(--text-primary); }
.guide-section p { color: var(--text-secondary); margin-bottom: 16px; font-size: 1.05rem; }
.guide-section h3 { font-size: 1.2rem; color: var(--text-primary); margin-top: 24px; margin-bottom: 12px; font-weight: 600; }
.guide-section ul, .guide-section ol { margin-bottom: 24px; padding-left: 24px; color: var(--text-secondary); }
.guide-section ul { list-style: disc; }
.guide-section ol { list-style: decimal; }
.guide-section ul li, .guide-section ol li { margin-bottom: 12px; line-height: 1.6; }
.guide-section ol ul { margin-top: 12px; margin-bottom: 0; }

.guide-step { display: flex; gap: 24px; }
.step-number { width: 44px; height: 44px; background: var(--accent-start); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3rem; flex-shrink: 0; box-shadow: var(--shadow-glow); }
.step-content { flex: 1; }
.step-content h3 { font-size: 1.4rem; margin-bottom: 14px; color: var(--text-primary); font-weight: 600; }
.step-content p { color: var(--text-secondary); margin-bottom: 16px; font-size: 1rem; line-height: 1.7; }
.step-image { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border-color); overflow: hidden; margin-top: 16px; margin-bottom: 16px; background: var(--bg-surface); display: flex; align-items: center; justify-content: center; }
.step-image img { width: 100%; height: auto; display: block; }

body.light-mode .guide-nav a:hover { background: rgba(15,23,42,.05); }

@media (max-width: 991px) {
    .guide-layout { flex-direction: column; }
    .guide-sidebar { width: 100%; position: static; margin-bottom: 30px; }
    .guide-section { padding: 24px; }
    .guide-step { flex-direction: column; gap: 16px; }
}
