/* ══════════════════════════════════════════════════════════════
   ChromaForge — Digital Products E-commerce
   Design: Dark Luxury + Neo-brutalist accents
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg-deep: #080b0f;
  --bg-surface: #0f1319;
  --bg-card: #161b24;
  --bg-hover: #1c2330;
  --border: #252d38;
  --border-light: #2e3744;
  --text-primary: #e8ecf1;
  --text-secondary: #8b95a5;
  --text-muted: #545d6b;
  --accent: #6c5ce7;
  --accent-glow: rgba(108, 92, 231, 0.25);
  --accent2: #00d2ff;
  --success: #00e676;
  --warning: #ffab40;
  --danger: #ff5252;
  --gradient-hero: linear-gradient(135deg, #6c5ce7 0%, #00d2ff 50%, #00e676 100%);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --transition: 200ms ease;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1,h2,h3,h4 { font-family: var(--font-display); line-height:1.2; }
h1 { font-size:clamp(2.2rem, 5vw, 3.8rem); font-weight:800; letter-spacing:-0.02em; }
h2 { font-size:clamp(1.6rem, 3vw, 2.4rem); font-weight:700; letter-spacing:-0.01em; }
h3 { font-size:1.25rem; font-weight:600; }

.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navigation ── */
.nav {
  position:sticky; top:0; z-index:100;
  background:rgba(15,19,25,0.85); backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border);
  padding:0 24px; height:60px;
  display:flex; align-items:center; justify-content:space-between;
}
.nav-logo { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text-primary); }
.nav-logo-icon { font-size:26px; }
.nav-logo-text { font-family:var(--font-display); font-weight:800; font-size:18px; letter-spacing:-0.02em; }
.nav-links { display:flex; gap:24px; list-style:none; align-items:center; }
.nav-links a { color:var(--text-secondary); text-decoration:none; font-size:14px; font-weight:500; transition:color var(--transition); }
.nav-links a:hover { color:var(--text-primary); }
.nav-cart { position:relative; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 14px; color:var(--text-primary); cursor:pointer; font-size:14px; display:flex; align-items:center; gap:6px; transition:all var(--transition); }
.nav-cart:hover { border-color:var(--accent); }
.cart-count { background:var(--accent); color:#fff; border-radius:50%; width:20px; height:20px; font-size:11px; display:flex; align-items:center; justify-content:center; font-weight:700; }

/* ── Hero ── */
.hero {
  position:relative; overflow:hidden;
  padding:80px 24px 100px; text-align:center;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(108,92,231,0.12) 0%, transparent 60%),
              radial-gradient(ellipse 40% 40% at 80% 80%, rgba(0,210,255,0.08) 0%, transparent 60%);
}
.hero::before {
  content:''; position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:600px; height:600px;
  background:radial-gradient(circle, rgba(108,92,231,0.06) 0%, transparent 70%);
  pointer-events:none;
}
.hero-badge {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 16px; border-radius:20px;
  background:rgba(108,92,231,0.1); border:1px solid rgba(108,92,231,0.25);
  font-size:13px; color:var(--accent2); margin-bottom:24px;
}
.hero h1 { max-width:800px; margin:0 auto 20px; }
.hero p { max-width:600px; margin:0 auto 36px; color:var(--text-secondary); font-size:1.1rem; }
.hero-cta { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ── Buttons ── */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 28px; border-radius:var(--radius-sm);
  font-family:var(--font-display); font-size:15px; font-weight:600;
  text-decoration:none; cursor:pointer;
  transition:all var(--transition); border:none;
}
.btn-primary {
  background:var(--accent); color:#fff;
  box-shadow:0 0 24px var(--accent-glow);
}
.btn-primary:hover { background:#7c6ff0; transform:translateY(-1px); box-shadow:0 0 36px var(--accent-glow); }
.btn-outline {
  background:transparent; border:1px solid var(--border-light); color:var(--text-primary);
}
.btn-outline:hover { border-color:var(--accent); background:rgba(108,92,231,0.05); }
.btn-sm { padding:6px 14px; font-size:13px; }

/* ── Product Grid ── */
.section { max-width:1200px; margin:0 auto; padding:60px 24px; }
.section-header { text-align:center; margin-bottom:48px; }
.section-header h2 { margin-bottom:8px; }
.section-header p { color:var(--text-secondary); }

.product-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(340px, 1fr));
  gap:20px;
}
.product-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-lg); overflow:hidden;
  transition:all var(--transition); position:relative;
}
.product-card:hover {
  border-color:var(--accent);
  transform:translateY(-4px);
  box-shadow:0 8px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(108,92,231,0.15);
}
.product-card-badge {
  position:absolute; top:16px; right:16px; z-index:2;
  padding:4px 12px; border-radius:20px; font-size:11px; font-weight:700;
  letter-spacing:0.03em;
}
.badge-hot { background:rgba(255,82,82,0.15); color:var(--danger); }
.badge-new { background:rgba(0,214,118,0.15); color:var(--success); }
.badge-trend { background:rgba(0,210,255,0.15); color:var(--accent2); }

.product-card-body { padding:24px; }
.product-card-icon { font-size:36px; margin-bottom:12px; }
.product-card h3 { font-size:1.1rem; margin-bottom:6px; }
.product-card-desc { color:var(--text-secondary); font-size:13px; line-height:1.5; margin-bottom:16px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.product-card-features { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.product-tag { font-size:11px; padding:3px 10px; border-radius:12px; background:var(--bg-hover); color:var(--text-muted); }
.product-card-footer { display:flex; align-items:center; justify-content:space-between; padding:16px 24px; border-top:1px solid var(--border); background:var(--bg-surface); }
.product-price { font-family:var(--font-display); font-weight:700; font-size:1.2rem; }
.product-price small { font-weight:400; font-size:12px; color:var(--text-muted); }
.product-rating { display:flex; align-items:center; gap:4px; font-size:13px; color:var(--warning); }

/* ── Product Detail Page ── */
.product-detail { max-width:1000px; margin:0 auto; padding:60px 24px; display:grid; grid-template-columns:1fr 1fr; gap:60px; }
.product-detail-gallery { position:sticky; top:80px; align-self:start; }
.product-gallery-main {
  width:100%; aspect-ratio:1;
  background:linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border:1px solid var(--border); border-radius:var(--radius-lg);
  display:flex; align-items:center; justify-content:center;
  font-size:100px; margin-bottom:16px;
}
.product-detail-info h1 { font-size:2rem; margin-bottom:8px; }
.product-detail-price { font-size:2rem; font-weight:800; font-family:var(--font-display); margin:16px 0; }
.product-detail-price small { font-size:14px; color:var(--text-muted); font-weight:400; }
.product-detail-desc { color:var(--text-secondary); margin-bottom:24px; font-size:1.05rem; line-height:1.7; }
.feature-list { list-style:none; margin-bottom:24px; }
.feature-list li { padding:8px 0; padding-left:24px; position:relative; color:var(--text-secondary); }
.feature-list li::before { content:'✓'; position:absolute; left:0; color:var(--success); font-weight:700; }

/* ── Cart Sidebar ── */
.cart-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:200; opacity:0; pointer-events:none; transition:opacity 0.3s; }
.cart-overlay.open { opacity:1; pointer-events:auto; }
.cart-sidebar {
  position:fixed; top:0; right:0; bottom:0; width:400px; max-width:100vw;
  background:var(--bg-surface); border-left:1px solid var(--border);
  z-index:201; transform:translateX(100%); transition:transform 0.3s ease;
  display:flex; flex-direction:column;
}
.cart-sidebar.open { transform:translateX(0); }
.cart-header { padding:20px 24px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.cart-items { flex:1; overflow-y:auto; padding:16px 24px; }
.cart-item { display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--border); }
.cart-item-info { flex:1; }
.cart-item-name { font-weight:600; font-size:14px; }
.cart-item-price { color:var(--text-muted); font-size:13px; }
.cart-item-remove { background:none; border:none; color:var(--danger); cursor:pointer; font-size:18px; }
.cart-footer { padding:20px 24px; border-top:1px solid var(--border); }
.cart-total { display:flex; justify-content:space-between; margin-bottom:16px; font-size:1.1rem; font-weight:700; }
.cart-empty { text-align:center; color:var(--text-muted); padding:40px; }

/* ── Testimonials ── */
.testimonial-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:16px; }
.testimonial-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:24px; }
.testimonial-text { font-size:14px; color:var(--text-secondary); font-style:italic; margin-bottom:16px; line-height:1.6; }
.testimonial-author { display:flex; align-items:center; gap:10px; }
.testimonial-avatar { width:36px; height:36px; border-radius:50%; background:var(--accent); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; }
.testimonial-name { font-weight:600; font-size:13px; }
.testimonial-role { font-size:11px; color:var(--text-muted); }

/* ── FAQ ── */
.faq-list { max-width:720px; margin:0 auto; }
.faq-item { border:1px solid var(--border); border-radius:var(--radius); margin-bottom:12px; overflow:hidden; }
.faq-q { padding:16px 20px; cursor:pointer; font-weight:600; display:flex; justify-content:space-between; align-items:center; background:var(--bg-card); }
.faq-a { padding:0 20px; max-height:0; overflow:hidden; transition:all 0.3s; color:var(--text-secondary); font-size:14px; }
.faq-item.open .faq-a { padding:0 20px 16px; max-height:200px; }

/* ── Footer ── */
.footer { background:var(--bg-surface); border-top:1px solid var(--border); padding:60px 24px 30px; }
.footer-grid { max-width:1200px; margin:0 auto; display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; }
.footer h4 { font-size:13px; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); margin-bottom:16px; }
.footer a { display:block; color:var(--text-secondary); text-decoration:none; font-size:14px; padding:4px 0; transition:color var(--transition); }
.footer a:hover { color:var(--text-primary); }
.footer-bottom { max-width:1200px; margin:40px auto 0; padding-top:20px; border-top:1px solid var(--border); display:flex; justify-content:space-between; color:var(--text-muted); font-size:12px; }

/* ── Trust Bar ── */
.trust-bar { border-top:1px solid var(--border); border-bottom:1px solid var(--border); padding:20px 24px; display:flex; justify-content:center; gap:48px; flex-wrap:wrap; }
.trust-item { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-muted); }
.trust-icon { font-size:18px; }

/* ── Newsletter ── */
.newsletter { background:linear-gradient(135deg, rgba(108,92,231,0.08) 0%, rgba(0,210,255,0.05) 100%); border:1px solid var(--border); border-radius:var(--radius-lg); padding:48px; text-align:center; max-width:600px; margin:0 auto; }
.newsletter h3 { margin-bottom:8px; }
.newsletter p { color:var(--text-secondary); margin-bottom:20px; }
.newsletter-form { display:flex; gap:8px; }
.newsletter-input { flex:1; padding:12px 16px; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--bg-card); color:var(--text-primary); font-size:14px; }
.newsletter-input:focus { outline:none; border-color:var(--accent); }

/* ── Toast ── */
.toast {
  position:fixed; bottom:24px; right:24px; z-index:300;
  padding:14px 24px; border-radius:var(--radius-sm);
  background:var(--success); color:#000; font-weight:600; font-size:14px;
  box-shadow:0 4px 20px rgba(0,0,0,0.4);
  transform:translateY(100px); opacity:0; transition:all 0.3s;
}
.toast.show { transform:translateY(0); opacity:1; }

/* ── Checkout ── */
.checkout-grid { max-width:1000px; margin:40px auto; padding:0 24px; display:grid; grid-template-columns:1fr 360px; gap:40px; }
.checkout-form { display:flex; flex-direction:column; gap:16px; }
.checkout-form label { font-size:13px; font-weight:600; color:var(--text-secondary); }
.checkout-form input { width:100%; padding:12px 16px; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--bg-card); color:var(--text-primary); font-size:14px; }
.checkout-form input:focus { outline:none; border-color:var(--accent); }
.checkout-summary { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:24px; position:sticky; top:80px; }

/* ── Responsive ── */
@media (max-width:768px) {
  .nav-links { display:none; }
  .product-detail { grid-template-columns:1fr; gap:30px; }
  .product-gallery-main { font-size:60px; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .checkout-grid { grid-template-columns:1fr; }
  .cart-sidebar { width:100%; }
  .trust-bar { gap:20px; }
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to { opacity:1; transform:translateY(0); }
}
.animate-fade-up { animation:fadeUp 0.6s ease forwards; }
