:root {
  /* Color Palette - Cyber/Modern Dark */
  --bg-body: #020617;
  --bg-surface: #0f172a;
  --primary: #4f46e5;
  --primary-glow: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --danger: #ef4444;

  /* Spacing & Radius */
  --radius-md: 12px;
  --radius-full: 9999px;
  --header-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(circle at 50% 0%, #17153b 0%, var(--bg-body) 60%);
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
button { font-family: inherit; cursor: pointer; }

/* Layout Wrapper */
.header-wrapper, main, .footer-content {
  max-width: 1280px; /* Slightly wider for 4 cards */
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ========== Header (Screenshot Match) ========== */
.site-header {
  height: var(--header-height);
  background: rgba(2, 6, 23, 0.6); /* Transparent/Glass */
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Brand Section (Avatar + Name) */
.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

/* Navigation Links (Right Side) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

/* Action Icons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 2.5rem;
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  position: relative;
  transition: transform 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  transform: scale(1.1);
  color: var(--text-main);
}

.profile-btn {
  width: 35px;
  height: 35px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 50%;
}

.cart-badge {
  position: absolute;
  top: -5px; right: -8px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
}

/* ========== Featured Grid (Strict Horizontal Row) ========== */
/* This specifically forces 4 columns on desktop */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Force 4 columns */
  gap: 1.5rem;
  padding: 1rem 0;
  width: 100%;
}

/* Standard Product Grid (for other pages) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

/* Cards */
.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure uniform height */
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.3);
}

.product-image-wrapper {
  background: white;
  border-radius: 8px;
  height: 180px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.product-image-wrapper img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.product-title {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-glow);
  margin-top: auto; /* Push to bottom */
  margin-bottom: 1rem;
}

.btn-add-cart {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 0.9rem;
  transition: 0.3s;
}

.btn-add-cart:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ========== Hero ========== */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}
.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(to bottom, #fff, #94a3b8);
  -webkit-background-clip: text;
  color: transparent;
}
.hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; }

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-glow));
  color: white;
  padding: 0.8rem 2.5rem;
  border-radius: var(--radius-full);
  border: none;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr); /* 2x2 on tablets */
  }
}
@media (max-width: 768px) {
  .header-wrapper {
    position: relative;
  }
  .nav-links {
    display: none; /* Hide nav links on mobile */
  }
  .featured-grid {
    grid-template-columns: 1fr; /* Stack on mobile */
  }
  .brand-section {
    width: 100%;
    justify-content: flex-start;
  }
  .header-actions {
    margin-left: auto;
    border: none;
  }
}