/* ══════════════════════════════════════════════════════
   RigDrop — Gaming E-Commerce Storefront
   Dark cyberpunk theme with neon green accents
   ══════════════════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #06060b;
  --bg-secondary: #0d0d16;
  --bg-card: #111120;
  --bg-card-hover: #16162a;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.15);
  --accent-glow: rgba(0, 255, 136, 0.4);
  --accent-strong: rgba(0, 255, 136, 0.6);
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-dim: #55556a;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 255, 136, 0.2);
  --danger: #ff4466;
  --danger-dim: rgba(255, 68, 102, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: 0.2s ease;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.hidden { display: none !important; }

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

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

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  text-decoration: none;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -8px;
  right: -12px;
}

.cart-count.empty { display: none; }

/* ── Mobile Nav ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 640px) {
  .mobile-menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
}

/* ── Hero Section ── */
.hero {
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), #00cc6a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.btn-primary:hover {
  background: #00e67a;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--bg-primary);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  text-decoration: none;
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255, 68, 102, 0.2);
}

.btn-danger:hover {
  background: rgba(255, 68, 102, 0.25);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Section Headers ── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ── Category Filters ── */
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--text-dim);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* ── Product Card ── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.product-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-discount {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
}

.badge-category {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.product-info {
  padding: 20px;
}

.product-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.product-desc {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.price-sale {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

.price-original {
  font-size: 0.95rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.savings-tag {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.product-card .btn {
  width: 100%;
}

.btn-added {
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
  box-shadow: none !important;
  pointer-events: none;
}

/* ── Features Strip ── */
.features-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 60px 0;
}

.feature-item {
  text-align: center;
  padding: 16px;
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-item p {
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ── Page Header ── */
.page-header {
  padding: 40px 0 32px;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ── Cart Page ── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  align-items: center;
  transition: border-color var(--transition);
}

.cart-item:hover {
  border-color: var(--border-accent);
}

.cart-item-image {
  width: 100px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--accent);
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
}

.cart-item-original {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-decoration: line-through;
  margin-left: 8px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.qty-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.qty-value {
  width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 6px 0;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  transition: color var(--transition);
}

.remove-btn:hover {
  color: var(--danger);
}

/* ── Cart Summary ── */
.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 88px;
}

.cart-summary h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.summary-row .label {
  color: var(--text-secondary);
}

.summary-row .value {
  font-weight: 600;
}

.summary-row.savings .value {
  color: var(--accent);
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.summary-row.total {
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.summary-row.total .value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  color: var(--accent);
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 16px;
}

/* ── Empty Cart ── */
.cart-empty {
  text-align: center;
  padding: 80px 0;
}

.cart-empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

.cart-empty h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.cart-empty p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ── Success Page ── */
.success-page {
  text-align: center;
  padding: 100px 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 2.5rem;
}

.success-page h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  margin-bottom: 12px;
}

.success-page p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-logo span { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

/* ── Loading Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0s; }
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.1s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }
.product-card:nth-child(6) { animation-delay: 0.25s; }
.product-card:nth-child(7) { animation-delay: 0.3s; }
.product-card:nth-child(8) { animation-delay: 0.35s; }
.product-card:nth-child(9) { animation-delay: 0.4s; }
.product-card:nth-child(10) { animation-delay: 0.45s; }
.product-card:nth-child(11) { animation-delay: 0.5s; }
.product-card:nth-child(12) { animation-delay: 0.55s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 2rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .features-strip { grid-template-columns: repeat(2, 1fr); }
  .cart-item { flex-direction: column; text-align: center; }
  .cart-item-image { width: 100%; height: 120px; }
  .cart-item-actions { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .features-strip { grid-template-columns: 1fr; }
  .filters { gap: 6px; }
  .filter-btn { padding: 6px 14px; font-size: 0.82rem; }
}
