/* main color scheme */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --background-color: #ecf0f1;
  --text-color: #2c3e50;
  --accent-color: #e74c3c;
}

/* some mobile responsiveness*/
@media (max-width: 768px) {
  .main-menu {
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: "Arial", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
}

/* navigation */
nav {
  background-color: var(--primary-color);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* navigation Styles */
.main-menu {
  display: flex;
  gap: 1rem;
}

.main-menu a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.main-menu a:hover {
  color: var(--secondary-color);
  background-color: rgba(255, 255, 255, 0.1);
}

.main-menu a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
}

.theme-switcher select {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--secondary-color);
  background-color: white;
  color: var(--text-color);
}

/* search form */
.search-form {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.form-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

#search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.book-card {
  border: 1px solid var(--secondary-color);
  padding: 1rem;
  border-radius: 8px;
  transition: transform 0.2s;
}

.book-card:hover {
  transform: translateY(-5px);
}

/* weather widget styling */
.weather-card {
  background: var(--secondary-color);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem auto;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.weather-card .temp {
  font-size: 2.5rem;
  margin: 1rem 0;
}

.weather-card .condition {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.book-suggestion {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

/* form validation styling */
.invalid {
  border-color: var(--accent-color) !important;
  background-color: rgba(231, 76, 60, 0.1);
}

.error-message {
  color: var(--accent-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.branding {
  color: white;
}

/* weather recommendations */
.weather-recommendations {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.weather-recommendations ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

/* help pages styling */
.help-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.help-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.help-nav a {
  display: inline-block;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  background-color: white;
  color: var(--primary-color);
  transition: all 0.2s ease;
}

.help-nav a:hover {
  background-color: var(--primary-color);
  color: white;
}

/* about page styling */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.mission,
.features {
  margin-bottom: 2rem;
}

.features ul {
  list-style: disc;
  padding-left: 2rem;
}

/* contact form styling */
.contact-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--secondary-color);
  border-radius: 4px;
}

/* catalog styling */
.catalog-filters {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.book-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.book-card img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 1rem;
}

.book-card h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.book-card .price {
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

.book-options {
  margin: 1rem 0;
}

/* featured books */
.featured-books {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.featured-books h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.book-card.featured {
  border: 2px solid var(--accent-color);
}

/* price slider */
.price-display {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

#price-slider {
  width: 100%;
  margin: 1rem 0;
}

.book-image {
  position: relative;
  width: 100%;
  max-width: 200px;
  height: 280px;
  margin: 0 auto 1rem;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* loading state styling */
.loading {
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* footer styling */
.site-footer {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.footer-section h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: white;
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--secondary-color);
}
