:root {
  --bg: #06060a;
  --bg-raised: #0d0d16;
  --line: #23233a;
  --ink: #eef0ff;
  --ink-dim: #8b8bb3;
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff2ee0;
  --neon-violet: #7c3aff;
  --glow-cyan: rgba(0, 240, 255, 0.35);
  --glow-magenta: rgba(255, 46, 224, 0.35);
  --danger: #ff4d6d;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(124, 58, 255, 0.16), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(0, 240, 255, 0.12), transparent 40%),
    var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand, .auth-tab, .btn { font-family: 'Space Grotesk', sans-serif; }

.hidden { display: none !important; }

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 6, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 19px;
  color: var(--ink);
}
.brand span {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px var(--glow-cyan), 0 0 26px var(--glow-cyan);
}
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.user-greeting { color: var(--ink-dim); font-size: 14px; }

/* ---------- BUTTONS ---------- */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  color: #06060a;
  box-shadow: 0 0 18px var(--glow-cyan), 0 0 30px var(--glow-magenta);
}
.btn-primary:hover {
  box-shadow: 0 0 26px var(--glow-cyan), 0 0 46px var(--glow-magenta);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}
.btn-block { width: 100%; margin-top: 6px; }

/* ---------- HERO ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}
.eyebrow {
  color: var(--neon-magenta);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 14px;
  text-shadow: 0 0 10px var(--glow-magenta);
}
.hero h1 {
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 14px;
  max-width: 620px;
  background: linear-gradient(90deg, var(--ink) 40%, var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { color: var(--ink-dim); font-size: 16px; margin: 0; }

/* ---------- PRODUCTS ---------- */
.product-section { max-width: 1080px; margin: 0 auto; padding: 20px 24px 80px; }
.product-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.product-header h2 { margin: 0; font-size: 20px; color: var(--ink); }
.product-count { color: var(--ink-dim); font-size: 13px; }
.loading-text { color: var(--ink-dim); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-4px);
  box-shadow: 0 0 24px var(--glow-cyan);
}
.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0a0a12;
  display: block;
}
.product-body { padding: 14px 16px 18px; }
.product-name { font-weight: 600; font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.product-price {
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 4px;
  text-shadow: 0 0 8px var(--glow-cyan);
}
.product-stock { color: var(--ink-dim); font-size: 12px; margin: 0; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
  padding: 30px 24px 50px;
}

/* ---------- AUTH MODAL ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 8, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
  box-shadow: 0 0 40px rgba(124, 58, 255, 0.25);
}
.auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.auth-close:hover { color: var(--neon-cyan); }

.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  padding: 9px 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.auth-tab.active {
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--glow-cyan);
}

.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label { font-size: 13px; color: var(--ink-dim); margin-top: 10px; }
.auth-form input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}
.password-field { position: relative; display: flex; align-items: center; }
.password-field input { flex: 1; padding-right: 64px; }
.toggle-pw {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--neon-magenta);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
}
.form-hint { color: var(--ink-dim); font-size: 12px; margin: 10px 0 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  color: var(--ink-dim);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.btn-google {
  background: #fff;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google:hover { background: #f2f2f2; }
.google-icon { width: 18px; height: 18px; }
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin: 8px 0 0;
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid rgba(255, 77, 109, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
}

/* ---------- LANGUAGE SWITCHER ---------- */
.lang-switcher { position: relative; }
.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.lang-current:hover { border-color: var(--neon-cyan); }
.lang-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 90px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 30;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--ink);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.lang-option:hover { background: rgba(0, 240, 255, 0.08); color: var(--neon-cyan); }

/* ---------- PASSWORD EYE TOGGLE ---------- */
.toggle-pw {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-magenta);
}
.toggle-pw svg { display: block; }

/* ---------- WHATSAPP FLOATING BUTTON ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.5), 0 4px 14px rgba(0,0,0,0.4);
  z-index: 40;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(37, 211, 102, 0.7), 0 4px 18px rgba(0,0,0,0.5);
}

/* ---------- PRODUCT CARD AS LINK ---------- */
.product-card-link { text-decoration: none; color: inherit; display: block; }

@media (max-width: 520px) {
  .hero h1 { font-size: 30px; }
}
