/* Global Reset for Box Sizing */
html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* --- CSS Variables (Color Palette) --- */
:root {
    /* Primary brand colors */
    --primary-dark: #212529; /* A slightly softer dark */
    --primary-light: #f8f9fa; /* A very light, subtle background */

    /* Accent colors */
    --accent-red: #e74c3c; /* Consistent accent red */
    --accent-blue: #3498db; /* A modern blue for general actions/links */
    --accent-green: #2ecc71; /* A modern green for success/buy */
    --accent-orange: #f39c12; /* A modern orange for wishlist/warnings */

    /* Text colors */
    --text-dark: #343a40; /* Slightly softer dark text */
    --text-medium: #6c757d; /* For secondary text/paragraphs */
    --text-light: #f8f9fa; /* For text on dark backgrounds */

    /* Border & Shadow */
    --border-color: #dee2e6;
    --shadow-light: rgba(0,0,0,0.08);
    --shadow-medium: rgba(0,0,0,0.15);
    --shadow-strong: rgba(0,0,0,0.25);
}

/* --- Global Styles --- */
body {
  font-family: 'Inter', sans-serif; /* Using Inter for a modern look */
  margin: 0;
  background-color: var(--primary-light);
  color: var(--text-dark);
  line-height: 1.7; /* Slightly more line height for better readability */
  font-size: 1.05rem; /* A touch larger base font size */
}

/* --- Navigation Bar --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem; /* More horizontal padding */
  background: var(--primary-dark);
  color: var(--text-light);
  box-shadow: 0 4px 12px var(--shadow-medium); /* More prominent, modern shadow */
  position: relative;
  z-index: 1000;
}
.logo {
  font-size: 1.6rem; /* Slightly larger logo */
  font-weight: 700; /* Bolder */
  color: var(--text-light); /* Ensure logo color is light */
  text-decoration: none; /* Remove underline if it's a link */
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.8rem; /* More space between links */
  margin: 0;
  padding: 0;
}
.nav-links li a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  font-weight: 500; /* Medium weight for links */
}
.nav-links li a:hover, .nav-links li a:focus {
  color: var(--accent-red);
}
#userEmail {
    color: var(--text-medium); /* Lighter color for sub-info */
    font-size: 0.85rem;
    margin-left: 1.2rem;
}

/* --- Hamburger Menu (Mobile Navigation) --- */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-light); /* Use variable for color */
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}
.hamburger-menu span:not(:last-child) {
    margin-bottom: 4px;
}

/* --- Mobile Navigation Specifics --- */
@media (max-width: 768px) {
  nav {
      padding: 1rem 1.5rem; /* Adjust padding for smaller screens */
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--primary-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 1rem 0;
    text-align: center;
    z-index: 999;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links li {
    margin: 0.5rem 0;
  }
  .nav-links li a {
    padding: 0.8rem 0;
    display: block;
  }
  .hamburger-menu {
    display: flex;
  }
  #userEmail {
      display: none; /* Hide user email on very small screens */
  }
}

/* --- General Layout and Animation --- */
.container {
  padding: 2.5rem; /* More padding */
  max-width: 1100px; /* Slightly wider max-width */
  margin: 0 auto;
}
.page {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}
.page.active {
  display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); } /* More pronounced fade-in */
    to { opacity: 1; transform: translateY(0); }
}
.card {
  background: var(--text-light);
  padding: 2rem; /* More padding inside cards */
  margin: 1.5rem 0;
  border-radius: 10px; /* Slightly more rounded */
  box-shadow: 0 6px 20px var(--shadow-light); /* Softer, broader shadow */
  border: none; /* Remove subtle border, let shadow define it */
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* Smooth hover */
}
.card:hover {
    transform: translateY(-5px); /* Lift card on hover */
    box-shadow: 0 10px 30px var(--shadow-medium); /* More prominent shadow on hover */
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem; /* More space between grid items */
  margin-top: 2rem;
}
.grid .card {
  margin: 0; /* Override margin from .card for grid items */
  text-align: center;
}
.card h4 {
    margin-top: 0;
    color: var(--primary-dark); /* Make card titles darker for stronger hierarchy */
    font-size: 1.3rem; /* Slightly larger card titles */
    margin-bottom: 0.75rem;
}
.card p {
    font-size: 1rem;
    color: var(--text-medium);
}
.card a { /* Buy button */
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.8rem 1.6rem; /* Slightly more padding */
    background-color: var(--accent-green);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px; /* Slightly more rounded */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 600; /* Bolder */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow */
}
.card a:hover {
    background-color: #27ae60; /* Slightly darker green */
    transform: translateY(-2px); /* Lift */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* NEW: Product image styling within cards */
.card img {
    max-width: 140px; /* Slightly larger image */
    height: auto;
    display: block;
    margin: 0 auto 1.5rem auto; /* More margin below */
    border-radius: 8px; /* More rounded images */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Subtle image shadow */
}

/* --- Hero section styles --- */
.hero {
  /* This is the updated line for your hero.jpeg image */
  /* Assumes 'hero.jpeg' is in the same directory as this style.css file */
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('hero.jpeg') center/cover no-repeat;
  color: var(--text-light);
  padding: 160px 20px; /* More vertical padding */
  text-align: center;
  border-radius: 12px; /* Slightly more rounded corners */
  margin-bottom: 3rem; /* More space below hero */
  box-shadow: 0 10px 30px var(--shadow-strong); /* Stronger shadow */
}
.hero h1 {
  font-size: 4.5rem; /* Larger hero heading */
  font-weight: 800; /* Extra bold */
  margin-bottom: 1rem;
  text-shadow: 0 5px 10px rgba(0,0,0,0.6); /* More defined shadow */
}
.hero p {
  font-size: 1.8rem;
  margin-bottom: 3rem;
  font-weight: 400; /* Regular weight */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.hero button {
  background: var(--accent-red);
  color: var(--text-light);
  border: none;
  padding: 1.2rem 3rem; /* Larger padding */
  font-size: 1.4rem; /* Larger text */
  cursor: pointer;
  border-radius: 9999px; /* Pill shape */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 15px rgba(231,76,60,0.4); /* Shadow matching button color */
}
.hero button:hover {
  background: #c0392b; /* Slightly darker red */
  transform: translateY(-3px); /* More pronounced lift */
  box-shadow: 0 8px 20px rgba(231,76,60,0.5);
}

/* Mobile specific Hero adjustments */
@media (max-width: 600px) {
  .hero {
    padding: 100px 15px; /* Reduce padding */
  }
  .hero h1 {
    font-size: 3rem; /* Smaller font size */
  }
  .hero p {
    font-size: 1.4rem; /* Smaller font size */
  }
}

/* --- Form styles --- */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* More space between form elements */
    background: var(--text-light);
    padding: 3rem; /* More padding */
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--shadow-light);
    margin-top: 2rem;
}
form h3 {
    text-align: center;
    color: var(--primary-dark); /* Form titles more consistent with main text */
    margin-bottom: 2rem; /* More space below title */
    font-size: 2rem; /* Larger title */
    font-weight: 700;
}
form label {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.5rem; /* More space */
}
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="tel"], /* Added for phone number */
form textarea {
    padding: 1rem; /* More padding */
    border: 1px solid var(--border-color);
    border-radius: 6px; /* Slightly more rounded */
    font-size: 1.05rem; /* Larger font */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}
form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="number"]:focus,
form input[type="tel"]:focus, /* Added for phone number */
form textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.25); /* Stronger blue glow */
}
form textarea {
    resize: vertical;
    min-height: 120px;
}
form button {
    background: var(--accent-blue);
    color: var(--text-light);
    border: none;
    padding: 1rem 2rem; /* More padding */
    font-size: 1.1rem; /* Larger font */
    border-radius: 6px; /* Slightly more rounded */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-weight: 600; /* Bolder */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow on buttons */
}
form button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
form button:focus {
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.25);
}
/* Loading state for buttons */
form button.is-loading {
    background-color: var(--text-medium);
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: none;
}

#auth form + form {
    margin-top: 2.5rem;
}
#auth #googleLoginBtn {
    background: #dd4b39;
    box-shadow: 0 2px 8px rgba(221, 75, 57, 0.2);
}
#auth #googleLoginBtn:hover {
    background: #c23321;
    box-shadow: 0 4px 12px rgba(221, 75, 57, 0.3);
}
#auth #logoutBtn {
    background: var(--accent-red);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}
#auth #logoutBtn:hover {
