/* Reuse the existing CSS variables and styles */
:root {
  --primary-color: #7d4f50;
  --secondary-color: #6a3f40;
  --background-color: #f9f9f9;
  --text-color: #333;
  --text-light: #777;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: "Merriweather", serif;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

/* Header */
header {
  text-align: center;
  padding: 100px 20px;
  background-color: var(--white);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Navigation */
nav {
  background-color: var(--white);
  padding: 20px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

nav ul li a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
}

/* Cart Icon */
.cart {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
}

.cart a:hover {
  color: var(--primary-color);
}

.cart-count {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 50%;
  font-size: 0.9rem;
}

/* Cart Modal */
.cart-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.cart-modal.active {
  display: flex;
}

.cart-modal-content {
  background-color: var(--white);
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow);
}

/* Cart Modal Header */
.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* Close Button */
.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  transition: var(--transition);
}

.close-button:hover {
  color: var(--primary-color);
}

.cart-modal-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cart-modal-content ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cart-modal-content ul li button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.cart-modal-content ul li button:hover {
  background-color: var(--secondary-color);
}

.cart-modal-content .total {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 20px;
  text-align: right;
}

.cart-modal-content .checkout-button {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background-color: var(--primary-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
}

.cart-modal-content .checkout-button:hover {
  background-color: var(--secondary-color);
}

/* Book Details Section */
.book-details {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.book-details img {
  flex: 1;
  max-width: 300px;
  height: 400px; /* Adjusted height */
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.book-details-content {
  flex: 2;
  min-width: 300px;
}

.book-details h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.book-details .price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.book-details .cta-button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background-color: var(--primary-color);
  border-radius: 8px;
  transition: var(--transition);
  margin-bottom: 20px;
}

.book-details .cta-button:hover {
  background-color: var(--secondary-color);
}

.book-details h3 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
}

.book-details p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.book-details .book-info {
  margin-top: 20px;
}

.book-details .book-info p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.book-details .book-info p strong {
  color: var(--text-color);
}

.book-details .reviews {
  margin-top: 40px;
}

.book-details .review-item {
  margin-bottom: 20px;
}

.book-details .review-item h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.book-details .review-item p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

.book-details .related-books {
  margin-top: 40px;
}

.book-details .related-books h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.book-details .related-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.book-details .related-books-grid .book-item {
  background: var(--white);
  padding: 20px;
  box-shadow: var(--shadow);
  border-radius: 8px;
  text-align: center;
  transition: var(--transition);
}

.book-details .related-books-grid .book-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.book-details .related-books-grid .book-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.book-details .related-books-grid .book-item h4 {
  font-size: 1.2rem;
  margin: 15px 0 10px;
}

.book-details .related-books-grid .book-item p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 15px;
}

.book-details .related-books-grid .book-item .price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Footer Styles */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-column p {
  font-size: 1rem;
  color: var(--white);
  opacity: 0.8;
  line-height: 1.6;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: var(--white);
  opacity: 0.8;
  transition: var(--transition);
}

.footer-column ul li a:hover {
  opacity: 1;
  color: var(--white);
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer-social a {
  font-size: 1.5rem;
  color: var(--white);
  opacity: 0.8;
  transition: var(--transition);
}

.footer-social a:hover {
  opacity: 1;
  color: var(--white);
}

.footer-bottom {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.9rem;
  color: var(--white);
  opacity: 0.8;
}

.footer-bottom a {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom a:hover {
  opacity: 1;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .footer-column {
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Adjust Header */
  header {
    padding: 60px 20px;
  }

  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  /* Adjust Navigation */
  nav ul {
    display: none;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--white);
    padding: 20px;
    box-shadow: var(--shadow);
  }

  nav ul.active {
    display: flex;
  }

  nav .hamburger {
    display: flex;
  }

  /* Adjust Book Details */
  .book-details {
    flex-direction: column;
    align-items: center;
  }

  .book-details img {
    max-width: 100%;
    height: 300px; /* Adjusted height for mobile */
  }
}
