/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #06060b;
  --surface: #0e0e16;
  --surface2: #16161f;
  --surface3: #1e1e2a;
  --border: #252535;
  --border-hover: #3a3a50;
  --accent: #00d4ff;
  --accent-dim: rgba(0,212,255,0.15);
  --accent-glow: rgba(0,212,255,0.08);
  --green: #00e87b;
  --red: #ff4466;
  --orange: #ff9f1c;
  --text: #e6e6f0;
  --text-secondary: #8888a8;
  --text-muted: #555570;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Space Mono', monospace;
}

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== AMBIENT BACKGROUND ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.bg-glow {
  position: fixed; border-radius: 50%; filter: blur(140px); opacity: 0.07;
  pointer-events: none; z-index: 0;
  animation: glowDrift 16s ease-in-out infinite alternate;
}
.bg-glow-1 { width: 600px; height: 600px; top: -150px; right: -100px; background: var(--accent); }
.bg-glow-2 { width: 500px; height: 500px; bottom: -150px; left: -50px; background: #a855f7; animation-delay: -8s; }

@keyframes glowDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.15); }
}

/* ===== NAVBAR ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6,6,11,0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.scrolled { border-bottom-color: var(--border); background: rgba(6,6,11,0.92); }

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { font-size: 1.4rem; }
.logo-text { font-size: 1.2rem; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.logo-accent { color: var(--accent); }

.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px; font-size: 0.87rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  border-radius: var(--radius-xs); transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--accent-glow); }

.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.mobile-menu-btn span {
  width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  transition: all 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: rgba(6,6,11,0.97); backdrop-filter: blur(20px);
  z-index: 99; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  font-size: 1.5rem; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; padding: 16px 32px; border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.mobile-link:hover { color: var(--accent); background: var(--accent-glow); }

/* ===== HERO ===== */
.hero {
  position: relative; z-index: 1;
  padding: 140px 24px 80px;
  text-align: center;
}
.hero-content { max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 50px;
  background: var(--accent-dim); border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.5px; margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), #a855f7, var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

.hero-desc {
  font-size: 1.1rem; color: var(--text-secondary);
  line-height: 1.7; max-width: 560px; margin: 0 auto 36px;
  font-weight: 400;
}

/* Search Box */
.hero-search { max-width: 580px; margin: 0 auto 40px; }
.search-box {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50px; padding: 4px 4px 4px 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 8px 32px rgba(0,0,0,0.3);
}
.search-icon { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; background: none; outline: none;
  padding: 12px 12px; color: var(--text); font-family: var(--font);
  font-size: 0.93rem;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 10px 24px; border: none; border-radius: 50px;
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: #000; font-weight: 700; font-size: 0.85rem; font-family: var(--font);
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.search-btn:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(0,212,255,0.3); }

.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.tag {
  padding: 6px 14px; border-radius: 50px; font-size: 0.78rem; font-weight: 500;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* Hero Stats */
.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  padding-top: 8px;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.6rem; font-weight: 800; font-family: var(--mono); color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ===== SECTIONS ===== */
.section { position: relative; z-index: 1; padding: 80px 0; }
.section-title { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 12px; }
.section-desc { color: var(--text-secondary); font-size: 1rem; margin-bottom: 32px; }
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }

/* ===== CATEGORIES ===== */
.categories-grid {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.categories-grid::-webkit-scrollbar { display: none; }
.cat-card {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 50px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-secondary); font-family: var(--font);
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: all 0.25s; white-space: nowrap;
}
.cat-card:hover { border-color: var(--border-hover); color: var(--text); }
.cat-card.active {
  background: var(--accent-dim); border-color: var(--accent);
  color: var(--accent); box-shadow: 0 0 20px var(--accent-glow);
}
.cat-icon { font-size: 1.1rem; }

/* ===== SORT CONTROLS ===== */
.sort-controls { display: flex; gap: 6px; }
.sort-btn {
  padding: 6px 14px; border-radius: 50px; font-size: 0.78rem;
  font-weight: 500; font-family: var(--font);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.sort-btn:hover { color: var(--text-secondary); border-color: var(--border-hover); }
.sort-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ===== PRODUCT CARDS ===== */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}
.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.product-header {
  padding: 20px 20px 0;
  display: flex; align-items: flex-start; gap: 16px;
}
.product-img {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  background: var(--surface2); display: flex; align-items: center;
  justify-content: center; font-size: 2.5rem; flex-shrink: 0;
  border: 1px solid var(--border);
}
.product-meta { flex: 1; min-width: 0; }
.product-cat {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent); margin-bottom: 4px;
}
.product-name {
  font-size: 1rem; font-weight: 700; line-height: 1.3;
  margin-bottom: 4px; letter-spacing: -0.3px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-brand { font-size: 0.8rem; color: var(--text-muted); }

.product-prices { padding: 16px 20px; }

.price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: var(--radius-sm);
  margin-bottom: 6px; transition: background 0.2s;
}
.price-row:hover { background: var(--surface2); }
.price-row.best { background: rgba(0,232,123,0.06); border: 1px solid rgba(0,232,123,0.15); }

.store-info { display: flex; align-items: center; gap: 10px; }
.store-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.store-dot.amazon { background: #ff9900; }
.store-dot.flipkart { background: #2874f0; }
.store-dot.croma { background: #00b894; }
.store-name { font-size: 0.85rem; font-weight: 500; }

.price-info { display: flex; align-items: center; gap: 10px; }
.price-amount { font-family: var(--mono); font-weight: 700; font-size: 0.95rem; }
.price-row.best .price-amount { color: var(--green); }
.price-badge {
  font-size: 0.65rem; font-weight: 700; padding: 2px 8px;
  border-radius: 50px; background: rgba(0,232,123,0.15); color: var(--green);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.product-footer {
  padding: 0 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.savings-text { font-size: 0.8rem; color: var(--green); font-weight: 600; }
.buy-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 50px; font-size: 0.8rem;
  font-weight: 600; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: #000; transition: transform 0.2s, box-shadow 0.2s;
}
.buy-link:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(0,212,255,0.25); }

.no-results {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: 1.1rem;
}

/* ===== DEALS ===== */
.deals-section { background: linear-gradient(180deg, transparent, var(--surface) 40%, var(--surface) 60%, transparent); }
.deals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.deal-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  position: relative; overflow: hidden; transition: all 0.3s;
}
.deal-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.deal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
}
.deal-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; }
.deal-prices { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.deal-best { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--green); }
.deal-high { font-family: var(--mono); font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; }
.deal-save { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.deal-store { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ===== ABOUT / FEATURES ===== */
.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px;
}
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 32px; }
.feature { text-align: center; }
.feature-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== FOOTER ===== */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner { text-align: center; }
.footer-brand { margin-bottom: 16px; }
.footer-desc { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 20px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text-muted); font-size: 0.78rem; }
.footer-copy a { color: var(--accent); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { padding: 120px 20px 60px; }
  .hero-title { font-size: 2rem; }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 1.2rem; }
  .products-grid { grid-template-columns: 1fr; }
  .deals-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .sort-controls { overflow-x: auto; width: 100%; }
  .about-card { padding: 28px 20px; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .search-btn { padding: 10px 16px; font-size: 0.8rem; }
}
@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 12px; }
  .stat-divider { width: 40px; height: 1px; }
  .features-grid { grid-template-columns: 1fr; }
  .quick-tags { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
}
