:root {
  --primary: #007bff;
  --bg-color: #f0f2f5;
  --text-color: #222;
  --header-bg: #fff;
  --link-color: #222;
}

body.dark {
  --primary: #0056b3;
  --bg-color: #121212;
  --text-color: #eee;
  --header-bg: #1a1a1a;
  --link-color: #eee;
}

/* ----------------------------------- */
/* Layout & sticky footer */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
}

header {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: var(--header-bg);
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

main#content {
  flex: 1 0 auto; /* Makes content take up remaining space */
  display: flex;
  flex-direction: column;
}

footer#footer-container {
  flex-shrink: 0;
  text-align: center;
  padding: 20px;
  background: var(--header-bg);
  font-size: 14px;
  color: var(--text-color);
}

/* ----------------------------------- */
/* Header styling */
.logo { height: 45px; }
nav { display: flex; flex-wrap: wrap; gap: 15px; }
nav a { text-decoration: none; color: var(--link-color); font-weight: 600; }
nav a.active { color: var(--primary); text-decoration: underline; }
#theme-toggle { background: none; border: none; cursor: pointer; font-size: 18px; }

/* ----------------------------------- */
/* Hero sections */
.hero, .shop-hero {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 80px 20px;
  transition: background 0.3s;
}

.shop-hero { padding: 60px 20px; }

/* ----------------------------------- */
/* Shop grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 40px auto;
  max-width: 1000px;
}
.product {
  background: white;
  color: #333;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  text-align: center;
}

/* ----------------------------------- */
/* Auth forms */
.auth-container {
  text-align: center;
  background: var(--primary);
  color: white;
  padding: 60px 20px;
}
.auth-container form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 350px;
  margin: 0 auto;
}
.auth-container input, .auth-container button {
  padding: 12px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
}
.auth-container button {
  background: white;
  color: var(--primary);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-container button:hover { background: #eee; }

/* ----------------------------------- */
/* Footer links */
footer#footer-container a {
  color: var(--link-color);
  text-decoration: none;
  margin: 0 8px;
}
footer#footer-container a:hover { text-decoration: underline; }

/* ----------------------------------- */
/* Responsive adjustments */
@media (max-width: 768px) {
  header { padding: 10px 15px; }
  nav { gap: 10px; }
  .hero, .shop-hero { padding: 60px 15px; }
}
