/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
}

/* Header */
.site-header {
  background-color: #ffffff;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  color: #3d5afe;
}

.navbar .nav-link {
  text-decoration: none;
  font-weight: 600;
  color: #3d5afe;
  margin-right: 20px;
}

.theme-toggle {
  background-color: #e0e0e0;
  border: none;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 400px;
  background-color: #222;
  overflow: hidden;
}

.three-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.overlay {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
}

.hero-sub {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

/* Main Product Grid Layout */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 2rem;
  background-color: #f4f4f4;
}

/* Product Card Styles */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.product-info {
  padding: 1rem;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.product-desc {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.product-price {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.add-to-cart-btn {
  background: #3d5afe;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  transition: background 0.3s ease;
}

.add-to-cart-btn:hover {
  background: #2a3eb1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .site-title {
    font-size: 1.2rem;
  }
  .navbar .nav-link {
    margin-right: 10px;
  }
}

/* -------- Dark Mode Styles for Index Page -------- */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .site-header {
  background-color: #1e1e1e;
}

body.dark-mode .site-title,
body.dark-mode .nav-link {
  color: #bb86fc;
}

body.dark-mode .product-card {
  background-color: #1e1e1e;
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.05);
}

body.dark-mode .add-to-cart-btn {
  background-color: #bb86fc;
  color: white;
}

body.dark-mode .add-to-cart-btn:hover {
  background-color: #985eff;
}

