body {
  margin: 0;
  font-family: 'Libre Baskerville', serif;
  background-color: #fff5df;
  color: #2e302d;
}

/* Navbar */
.navbar {
  background-color: #fff5df;
  border-bottom: 1px solid #bb963b;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 83%;
  margin: auto;
}

.logo img {
  height: 70px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  font-size: 20px;
}

.nav-links a {
  text-decoration: none;
  color: #2e302d;
  font-weight: 500;
  transition: color 0.3s ease;
}



.nav-links a:hover {
  color: #bb963b;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-actions span{
   color: #2e302d;
}

.search-input {
  padding: 10px 15px;
  border-radius: 50px;
  outline: none;
  font-size: 14px;
  border: 1.5px solid #2e302d;
  background-color: transparent;
  color: #2e302d;
}

.search-container {
    margin-bottom: 20px;
    text-align: center;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #2e302d;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.icon-btn:hover {
  transform: scale(1.1);
  color: #bb963b;
}

/* *************** slider-section ****************** */
.slider-section {
  padding: 60px 20px;
  background-color: #fff5df;
  width: 80%;
  margin: auto;
  position: relative;
}

.slider-slide {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  animation: fadeIn 0.8s ease-in-out;
  height:70vh ;

}

.slider-slide.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-content {
  flex: 1;
  min-width: 300px;
  max-width: 70%;
  color: #2e302d;
}

.slide-content h2 {
  font-size: 36px;
  color: #bb963b;
  margin-bottom: 30px;
  margin-top: 2px;
}

.slide-content p {
  font-size: 20px;
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 30px;
}

.slide-image {
  flex: 1;
  min-width: 300px;
  max-width: 30%;
  text-align: right;
}

.slide-image img {
  max-width: 280px;
  height: auto;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* نقاط التبديل */
.slider-dots {
  text-align: center;
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.dot {
  display: inline-block;
  height: 12px;
  width: 12px;
  margin: 0 8px;
  background-color: #bb963b;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #2e302d;
}

.dot:hover {
  background-color: #2e302d;
}

/****************** categories************ */

.categories {
  padding: 40px 20px;
  background: #fff5df;
  width: 80%;
  margin: auto;
}

.categories-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.categories-head h2 {
  font-size: 36px;
  color: #bb963b;
}

.categories-boxes {
  display: flex;
  justify-content: space-evenly;
  gap: 20px;
}

.cat-card {
  width: 170px;
  height: 170px;
  /* border: 2px solid #bb963b; */
  border-radius: 10px;
  text-align: center;
  padding: 20px;
  font-size: 16px;
  color: #2e302d;
  background-color:#fff5df ;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.cat-card p {
  margin-top: 10px;
  font-size: 20px;
}

/* ****************top sale *******************/
.top-sales {
  padding: 60px 20px;
  background: #fff5df;
  width: 80%;
  margin: auto;
}

.section-title {
  text-align: center;
  color: #bb963b;
  font-size: 32px;
  margin-bottom: 30px;
}

.book-list {
  display: flex;
  gap: 4%;
  justify-content: center;
  flex-wrap: wrap;
}

.top-book-card {
  display: flex;
  width: 48%;
  border-radius: 12px;
  padding: 20px;
  padding-left: 0;
  gap: 20px;
  align-items: flex-start;
  box-sizing: border-box;
}

.book-image {
  width: 200px;
  height: 280px;
  overflow: hidden;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);

}

.book-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.book-info {
  color: #2e302d;
  flex: 1;
  font-size: 20px;
  text-align: justify;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;

}

.book-info h3 {
  margin-bottom: 15px;
  margin-top: 15px;
  font-size: 24px;
  color: #bb963b;
}

.book-info .price {
  font-weight: bold;
  margin: 15px 0;
}

.book-info .desc {
  margin: 10px 0;
  margin-bottom: 25px;
  font-size: 16px;
}

/* ***********overlay********* */
.promo-card {
  position: relative;
  background-image: url('./images/Ramses-II.jpg');
  background-size: cover;
  background-position: center;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  width: 80%;
  display: flex;
  align-items: flex-start;
  justify-content: start;
  margin: 60px auto;

}

.promo-content {
  background: linear-gradient(to right,
      rgba(46, 48, 45, 0.95) 0%,
      rgba(46, 48, 45, 0.9) 30%,
      rgba(46, 48, 45, 0.6) 60%,
      rgba(46, 48, 45, 0.2) 85%,
      rgba(46, 48, 45, 0) 100%);
  padding: 40px;
  color: #fff5df;
  width: 60%;
  height: 320px;
  line-height: 1.6;
}

.ancient-quote {
  font-size: 30px;
  text-align: justify;
  color: #bb963b;
  margin-bottom: 20px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.promo-message {
  font-size: 20px;
  color: #fff5df;
  margin-bottom: 30px;
}

.promo-btn {
  background-color: #bb963b;
  color: #fff5df;
  border: none;
  padding: 12px 30px;
  border-radius: 40px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.promo-btn:hover {
  background-color: #2e302d;
}

/* ******************** */

.featured-products {
  background: #fff5df;
  padding: 60px 20px;
  width: 80%;
  margin: auto;
  text-align: justify;
}
.featured-products a{
  text-decoration: none;
}

.featured-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 30px;
}

.featured-card {
  width: 20%;
  border-radius: 12px;
  text-align: center;
  color: #2e302d;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  background-color: #fff5df;
  padding: 15px;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(187, 150, 59, 0.4);
}

.featured-card img {
  transition: transform 0.3s ease;
  height: 280px;
}

.featured-card:hover img {
  transform: scale(1.03);
}

.quantity-control, 
.add-to-cart,
.quantity-input {
  position: relative;
  z-index: 2;
}

.featured-card h3 {
  font-size: 18px;
  color: #bb963b;
  margin-bottom: 10px;
}

.featured-card .price {
  font-weight: bold;
  margin-bottom: 8px;
}

.featured-card .desc {
  font-size: 14px;
  line-height: 1.4;
}
.featured-card p {
  margin: 0;
}

.featured-card .btn {
  margin-top: auto;
  
}

.featured-card .quantity-control{
  margin-bottom: 20px;
}

.featured-btn-container {
  text-align: center;
}

.featured-btn {
  background-color: #bb963b;
  color: #fff5df;
  border: none;
  padding: 12px 30px;
  border-radius: 40px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.featured-btn:hover {
  background-color: #2e302d;
}

/* ****************footer***************** */

.site-footer {
  background-color: #2e302d;
  color: #fff5df;
  padding: 40px 20px 10px;

}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  justify-items: flex-start;
  align-items: center;
  gap: 40px;
  margin: auto;
  max-width: 80%;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-logo {
  width: 70%;
  text-align: center;
  margin: 15px auto;
}

.footer-section h4 {
  color: #bb963b;
  margin-bottom: 15px;
  font-size: 18px;
}

.footer-section p {
  margin-bottom: 15px;
  line-height: 1.4;
  text-align: justify;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: #fff5df;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #bb963b;
}

.social-icons {
  margin-top: 10px;
}

.social-icons a {
  color: #bb963b;
  font-size: 25px;
  margin-right: 15px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.social-icons a:hover {
  transform: scale(1.1);
  color: #fff5df;
}

.email-input {
  padding: 12px 30px;
  border-radius: 20px;
  border: none;
  margin-right: 10px;
  outline: none;
  font-size: 14px;
}

.subscribe-btn {
  background-color: #bb963b;
  color: #fff5df;
  border: none;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.subscribe-btn:hover {
  background-color: #fff5df;
  color: #2e302d;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 14px;
  border-top: 1px solid rgba(255, 245, 223, 0.2);
  margin-top: 40px;
}

/* button */
.btn {
  background-color: #bb963b;
  color: #fff5df;
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration-line: none;
}

.btn:hover {
  background-color: #2e302d;
}

/* slider arrows */
.slider-arrow {
  position: static;
  transform: none;
  background: #bb963b;
  color: #fff5df;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.slider-arrow:hover {
  background: #2e302d;
  transform: scale(1.1);
}

.slider-arrow i {
  margin: 0;
  padding: 0;
  line-height: 1;
}

/* Auth Forms */
.auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
}

.auth-title {
  color: #bb963b;
  margin-bottom: 30px;
  font-size: 32px;
}

.form-container {
  background-color: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.form-container label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: #2e302d;
}

.form-container input {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1.5px solid #bb963b;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background-color: transparent;
}

.form-container .auth-btn {
  width: 100%;
  margin-top: 10px;
}

.form-container .auth-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  text-decoration: none;
  color: #bb963b;
}

.form-container .auth-link:hover {
  color: #2e302d;
}

.btn-disabled {
    background-color: grey;
    pointer-events: none;
}

.btn-cart-change {
    background-color: orange;
    transition: background-color 0.3s ease;
}

.btn-cart-change:hover {
    background-color: #e68a00;
}

.btn-cart-add {
    background-color: #bb963b ;
    transition: background-color 0.3s ease;
}

.btn-cart-add:hover {
    background-color: #8f7229;
}

.quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #fff;
  padding: 4px;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: fit-content;
  margin: 0 auto;
  border: 1px solid #bb963b;
}

.item-details .quantity-control {
    margin: 10px 0;
    margin-right: auto;
    margin-left: 0;
}

.item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.quantity-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background-color: #bb963b;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background-color: #2e302d;
  transform: scale(1.1);
}

.quantity-input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #2e302d;
  padding: 4px;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input:focus {
  outline: none;
}

/* Product Details Page */
.product-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 80%;
    margin: 40px auto;
    background-color: #fff5df;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-image-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

.main-image {
    flex: 1;
    max-width: calc(100% - 80px);
    height: auto;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.thumbnail-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
}

.thumbnail {
    width: 60px;
    height: auto;
    border: 2px solid #bb963b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover, 
.thumbnail.active {
    border-color: #2e302d;
    transform: scale(1.05);
}

.product-info-section {
    flex: 2;
    min-width: 400px;
}

.product-info-section h1 {
    color: #bb963b;
    margin-top: 0;
}

.product-info-section p {
    line-height: 1.6;
    margin-bottom: 10px;
}

.product-info-section strong {
    color: #2e302d;
}

.product-info-section .add-to-cart-btn {
    display: block;
    margin: 20px auto;
    width: 200px;
}

/* Rating Stars */
.stars-outer {
    position: relative;
    display: inline-block;
}

.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    width: 0%;
}

.stars-outer::before,
.stars-inner::before {
    content: '★★★★★';
    display: block;
    font-size: 1.2em;
}

.stars-outer::before {
    color: #ddd;
}

.stars-inner::before {
    color: #bb963b;
}

/* Detailed Ratings */
.detailed-rating-section {
    margin-top: 20px;
    border-top: 1px solid #bb963b;
    padding-top: 20px;
}

.detailed-rating-section h3 {
    color: #bb963b;
    margin-bottom: 15px;
}

.rating-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-label {
    width: 80px;
    font-weight: bold;
    font-size: 0.9em;
}

.rating-bar-container {
    flex-grow: 1;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 0 10px;
    overflow: hidden;
}

.rating-bar {
    height: 100%;
    background-color: #bb963b;
    border-radius: 5px;
    width: 0%;
}

.rating-count {
    font-size: 0.9em;
    color: #2e302d;
    min-width: 30px;
    text-align: right;
}

/* Checkout Page */
.checkout-container {
    max-width: 1000px;
    margin: 20px auto;
    background-color: #fff5df;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #bb963b;
}

.cart-item img {
    width: 80px;
    height: auto;
    margin-right: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.item-price {
    font-weight: bold;
    color: #2e302d;
}

.remove-item {
    color: #dc3545;
    cursor: pointer;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.remove-item:hover {
    color: #bb2d3b;
}

.checkout-summary {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    color: #2e302d;
}

.total {
    font-size: 1.2em;
    font-weight: bold;
    border-top: 1px solid #bb963b;
    padding-top: 10px;
}

.checkout-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2e302d;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #bb963b;
    border-radius: 8px;
    background-color: #fff;
    color: #2e302d;
    box-sizing: border-box;
}

.checkout-btn {
    background-color: #bb963b;
    color: #fff5df;
    border: none;
    padding: 12px 25px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #2e302d;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #2e302d;
}

.back-button {
    display: block;
    margin: 20px auto;
    width: fit-content;
    padding: 15px 40px;
    background-color: #2e302d;
    color: #fff5df;
    text-decoration: none;
    border-radius: 40px;
    transition: background-color 0.3s ease;
    font-size: 18px;
}

.back-button:hover {
    background-color: #bb963b;
}

.clear-cart-btn {
    background-color: #dc3545;
    color: #fff5df;
    border: none;
    padding: 15px 40px;
    border-radius: 40px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    margin: 20px auto;
    font-size: 18px;
}

.clear-cart-btn:hover {
    background-color: #bb2d3b;
}

.back-to-products {
    display: block;
    width: fit-content;
    margin: 20px auto;
    padding: 12px 25px;
    background-color: #bb963b;
    color: #fff5df;
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.back-to-products:hover {
    background-color: #2e302d;
    transform: translateX(-5px);
}

.back-to-products i {
  margin-right: 8px;
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #2e302d;
  color: #fff5df;
}

body.dark-mode .navbar {
  background-color: #2e302d;
  border-bottom-color: #bb963b;
}

body.dark-mode .nav-links a {
  color: #fff5df;
}

body.dark-mode .nav-links a:hover {
  color: #bb963b;
}

body.dark-mode .nav-actions span {
  color: #fff5df;
}

body.dark-mode .search-input {
  border-color: #fff5df;
  color: #fff5df;
  background-color: #444;
}

body.dark-mode .icon-btn {
  color: #fff5df;
}

body.dark-mode .icon-btn:hover {
  color: #bb963b;
}

body.dark-mode .slider-section,
body.dark-mode .categories,
body.dark-mode .top-sales,
body.dark-mode .featured-products,
body.dark-mode .product-detail-container,
body.dark-mode .checkout-container {
  background-color: #2e302d;
}

body.dark-mode .slide-content,
body.dark-mode .book-info,
body.dark-mode .featured-card,
body.dark-mode .empty-cart {
  color: #fff5df;
}

body.dark-mode .cat-card {
  background-color: #2e302d;
  box-shadow: 0 8px 16px rgba(255, 245, 223, 0.1);
}

body.dark-mode .cat-card p {
  color: #fff5df;
}

body.dark-mode .featured-card {
  background-color: #2e302d;
}

body.dark-mode .featured-card:hover {
  box-shadow: 0 5px 15px rgba(187, 150, 59, 0.4);
}

body.dark-mode .form-container {
  background-color: #444;
  box-shadow: 0 8px 16px rgba(255, 245, 223, 0.1);
}

body.dark-mode .form-container label,
body.dark-mode .form-container input,
body.dark-mode .quantity-input,
body.dark-mode .product-info-section strong,
body.dark-mode .item-price,
body.dark-mode .summary-row,
body.dark-mode .form-group label,
body.dark-mode .form-group input,
body.dark-mode .form-group select {
  color: #fff5df;
}

body.dark-mode .form-container input,
body.dark-mode .form-group input,
body.dark-mode .form-group select {
  border-color: #bb963b;
  background-color: #555;
}

body.dark-mode .quantity-control {
  background-color: #555;
  border-color: #bb963b;
}

body.dark-mode .checkout-summary {
  background-color: #444;
  box-shadow: 0 4px 8px rgba(255, 245, 223, 0.1);
}

body.dark-mode .dot.active {
  background-color: #fff5df;
}

.error-message {
  color: #dc3545;
  font-size: 0.85em;
  margin-top: -15px;
  margin-bottom: 15px;
  text-align: left;
}

.invalid-input {
  border-color: #dc3545 !important;
}
