/* Main color scheme */
:root {
  --background-color: #FDFDFD;
  --sidebar-footer-color: #C5D5C3; /* Lightened from #A2B29F */
  --button-link-color: #7A9E9F;
  --accent-color: #C8B8DC;
  --text-color: #3E3E3E;
  --header-text-color: #2A2A2A; /* Darkened for better contrast */
  --logo-color: #5D4080; /* Changed to purple for better contrast */
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header styles */
.header {
  height: 100px;
  background-color: var(--sidebar-footer-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--logo-color);
  /* Using a more attractive font for the logo */
  font-family: 'Georgia', serif;
  /* Minimum 80px space before menu */
  margin-right: 80px;
}

.nav-menu {
  display: flex;
  list-style: none;
  /* Minimum 80px space before categories */
  margin-right: 80px;
}

.nav-menu li {
  margin: 0 15px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--header-text-color); /* Changed to darker color for better readability */
  font-weight: bold;
}

.nav-menu a:hover {
  color: var(--logo-color); /* Changed to purple for better contrast */
}

.categories-dropdown {
  position: relative;
  display: inline-block;
  /* Minimum 80px space before search */
  margin-right: 80px;
}

.categories-dropdown select {
  padding: 10px 15px;
  background-color: var(--button-link-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.categories-dropdown select:hover {
  background-color: var(--accent-color);
}

.search-container {
  display: flex;
  align-items: center;
}

.search-container input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px 0 0 5px;
}

.search-container button {
  padding: 10px 15px;
  background-color: var(--button-link-color);
  color: white;
  border: none;
  border-radius: 0 5px 5px 0;
  font-weight: bold;
  cursor: pointer;
}

.search-container button:hover {
  background-color: var(--accent-color);
}

/* Hero section styles */
.hero {
  width: 100%;
  height: 500px; /* Changed from 400px to 500px */
  background-color: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 100px; /* Added margin to account for fixed header */
  margin-bottom: 10px; /* Changed from 20px to 10px */
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content section styles */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding-top: 100px; /* Added padding to account for fixed header */
}

.content1x {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding-top: 10px; /* Added padding to account for fixed header */
}

.content h1 {
  margin-bottom: 20px;
  color: var(--button-link-color);
}

.content p {
  margin-bottom: 20px;
}

/* Footer styles */
.footer {
  height: 120px;
  background-color: var(--sidebar-footer-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.footer h3 {
  margin-bottom: 10px;
  color: var(--header-text-color); /* Better contrast for footer heading */
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.footer-contact a {
  color: var(--header-text-color); /* Better contrast for footer links */
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* Sidebar styles */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-footer-color);
  padding: 20px;
  border-radius: 5px;
  position: fixed;
  top: 100px; /* Position directly under header */
  right: 40px; /* Increased spacing from right edge */
  height: calc(100vh - 100px - 120px - 40px); /* Full height minus header, footer and some margin */
  overflow-y: auto; /* Allow scrolling if content exceeds height */
  z-index: 999;
  margin-top: 20px; /* Add space between header and sidebar */
}

.sidebar h2 {
  margin-bottom: 15px;
  color: var(--header-text-color); /* Better contrast */
}

/* Search results page styles */
.search-results-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding-top: 100px; /* Added padding to account for fixed header */
}

.search-results-content {
  margin-right: 310px; /* Make space for sidebar with proper padding */
}

.search-results-content h1 {
  margin-bottom: 20px;
  color: var(--button-link-color);
}

.search-results-content p {
  margin-bottom: 20px;
}

/* Product grid styles */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.product-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-card h3 {
  color: var(--button-link-color);
  margin-bottom: 10px;
}

.product-card p {
  margin-bottom: 10px;
}

.product-card .price {
  font-weight: bold;
  color: var(--logo-color);
}

/* Responsive styles */
@media (max-width: 600px) {
  .header {
    flex-wrap: wrap;
    height: auto;
    padding: 10px;
    position: static; /* Remove fixed positioning on mobile */
  }
  
  .logo {
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .nav-menu {
    margin-right: 0;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-menu li {
    margin: 5px;
  }
  
  .categories-dropdown {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
    order: 4;
  }
  
  .search-container {
    width: 100%;
    order: 5;
  }
  
  .search-container input {
    flex: 1;
  }
  
  .hero {
    height: 200px;
    margin-top: 0; /* Remove margin on mobile */
    margin-bottom: 10px;
    padding-top: 10px;
  }
  
  .content {
    padding-top: 0; /* Remove padding on mobile */
  }
  
  .search-results-container {
    padding-top: 0; /* Remove padding on mobile */
  }
  
  .sidebar {
    display: none;
  }
  
  .search-results-content {
    margin-right: 0; /* Remove margin on mobile */
  }
  
  /* Hide hero section on all pages except home */
  .hero:not(:first-child) {
    display: none;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
}