@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --main-color: #ff8800;
}

body,
html {
  font-family: "Poppins";
}

a,
a:hover,
a:visited {
  color: #1d1d1d;
  text-decoration: none;
}

.text-main {
  color: var(--main-color) !important;
}

.bg-main {
  background-color: var(--main-color);
  color: #fff;
}
.btn.bg-main:hover {
  background-color: var(--main-color);
  color: #fff;
}

.border-main {
  border: 1px solid var(--main-color);
  color: var(--main-color);
}
.btn.border-main:hover {
  border: 1px solid var(--main-color);
  color: var(--main-color);
}

.gradint-text {
  text-align: center;
  font-family: Poppins;
  font-style: normal;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(163deg, #ffce33 3.08%, #f80 83.01%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-brand .logo {
  width: 40px;
  height: auto;
  object-fit: contain;
}

.login-btn {
  border: 1px solid var(--main-color);
  background-color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--main-color);
  font-weight: lighter;
  transition: background-color 500ms ease-in-out, color 500ms ease-in-out;
}

.login-btn:hover {
  border: 1px solid var(--main-color);
  background-color: var(--main-color);
  color: #fff;
}

.cart-btn {
  position: relative;
  border: 1px solid var(--main-color);
  background-color: var(--main-color);
  padding: 5px 10px;
  border-radius: 5px;
  color: #fff;
  font-weight: lighter;
  transition: background-color 500ms ease-in-out, color 500ms ease-in-out;
}
.cart-count {
  width: 20px;
  height: 20px;
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: red;
  color: white;
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
}
.cart-btn:hover {
  border: 1px solid var(--main-color);
  background-color: #fff;
  color: var(--main-color);
}

.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  background-image: url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?ixlib=rb-1.2.1&auto=format&fit=crop&w=2000");
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .parallax {
    height: 400px;
  }
}

.parallax::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.parallax-content {
  position: relative;
  z-index: 1;
}

/* Enhanced book card styles for new design */
.book-card {
  position: relative;
  background-color: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 1px solid #f1f1f1;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 350px;
  margin: 0 auto;
}

.book-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(255, 136, 0, 0.2);
  border-color: #ff8800;
}

/* Modern book image container */
.book-image-container {
  position: relative;
  overflow: hidden;
  height: 250px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.book-card:hover .book-image {
  transform: scale(1.08);
}

.book-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(45deg, #ff8800, #ffce33);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 136, 0, 0.3);
}

/* Modern book content */
.book-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.book-category {
  color: #ff8800;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.book-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  height: 2.8rem;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.book-author {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.book-rating {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.stars {
  color: #ffc107;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.rating-text {
  color: #6c757d;
  font-size: 0.85rem;
}

.book-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ff8800;
  margin-bottom: 1rem;
}

/* Modern book actions */
.book-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-view {
  flex: 1;
  background: linear-gradient(45deg, #ff8800, #ffce33);
  border: none;
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-view:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 136, 0, 0.4);
  color: white;
  text-decoration: none;
}

.btn-cart {
  background: white;
  border: 2px solid #ff8800;
  color: #ff8800;
  padding: 0.7rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-cart:hover {
  background: #ff8800;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 136, 0, 0.3);
}

/* Legacy support for old book cards (home page) */
.book-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.book-card:hover img {
  transform: scale(1.02);
}

.book-card .details {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  padding: 15px;
  border-radius: 10px;
  display: none;
  z-index: 2;
  background: rgba(0, 0, 0, 0.85);
  text-align: center;
  width: 85%;
}

.book-card .details button {
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.book-card:hover .details {
  display: block;
}

.book-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Enhanced feature section compatibility */
.features-section .feature-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #f1f1f1;
  height: 100%;
}

.features-section .feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(255, 136, 0, 0.15);
  border-color: #ff8800;
}

.features-section .feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #ff8800, #ffce33);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  color: white;
  font-size: 2rem;
}

.features-section .feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
}

.features-section .feature-card p {
  color: #6c757d;
  line-height: 1.6;
}

#prev-btn,
#next-btn {
  width: 35px;
  height: 35;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ff8800;
  border: none;
  background-color: transparent;
  outline: none;
  font-size: 18px;
  margin: 5px;
}

footer ul li {
  margin-bottom: 10px;
}

.quick-link {
  margin-right: 20px;
}

.hover-primary:hover {
  color: #ff8800 !important;
}

.email {
  word-wrap: break-word;
  white-space: normal;
}
.review-text {
  width: 30%;
}

@media (max-width: 450px) {
  .review-text {
    width: 100%;
  }
}

/* Featured Books Section */
.featured-section {
  padding: 5rem 0;
  background: #f8f9fa;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.section-title p {
  color: #666;
  font-size: 1.1rem;
}

/* Features Section */
.feature-card {
  text-align: center;
  padding: 2rem;
  transition: all 0.3s ease;
}

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

.feature-icon {
  font-size: 2.5rem;
  color: var(--main-color);
  margin-bottom: 1.5rem;
}

.toast-container {
  z-index: 1050;
}

.add-to-cart-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/* Responsive Design for Book Cards */
@media (max-width: 768px) {
  .book-card {
    max-width: 100%;
  }

  .book-image-container {
    height: 200px;
  }

  .book-content {
    padding: 1rem;
  }

  .book-title {
    font-size: 1rem;
    height: 2.4rem;
  }

  .book-actions {
    flex-direction: column;
    gap: 0.3rem;
  }

  .btn-cart {
    width: 100%;
  }

  .book-card img {
    height: 180px;
  }

  .book-title {
    font-size: 0.95rem;
  }

  .book-price {
    font-size: 1.1rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-container {
    padding: 30px 20px;
  }
}

@media (max-width: 576px) {
  .book-image-container {
    height: 180px;
  }

  .book-content {
    padding: 0.8rem;
  }

  .book-title {
    font-size: 0.9rem;
    height: 2.2rem;
  }

  .book-price {
    font-size: 1rem;
  }

  .book-card img {
    height: 160px;
  }

  .book-card .details {
    padding: 10px;
  }

  .book-card .details button {
    padding: 8px;
    font-size: 0.8rem;
  }
}

/* No books available state */
.no-books-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  border: 1px solid #f1f1f1;
}

.no-books-image {
  width: 200px;
  height: 200px;
  margin-bottom: 2rem;
  opacity: 0.8;
  border-radius: 15px;
  object-fit: cover;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.no-books-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.no-books-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 400px;
}

.no-books-btn {
  background: linear-gradient(45deg, #ff8800, #ffce33);
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.no-books-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 136, 0, 0.3);
  color: white;
  text-decoration: none;
}

@media (max-width: 768px) {
  .no-books-container {
    padding: 3rem 1.5rem;
  }

  .no-books-image {
    width: 150px;
    height: 150px;
  }

  .no-books-title {
    font-size: 1.5rem;
  }

  .no-books-subtitle {
    font-size: 1rem;
  }
}

/* Custom Popup Styles */
.custom-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-popup {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.8) translateY(-50px);
  transition: all 0.3s ease;
}

.custom-popup-overlay.show .custom-popup {
  transform: scale(1) translateY(0);
}

.popup-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.popup-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.popup-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  flex-grow: 1;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  background: rgba(108, 117, 125, 0.1);
  color: #495057;
}

.popup-body {
  padding: 2rem;
}

.popup-book-info {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.popup-book-image {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  border: 2px solid #e9ecef;
}

.popup-book-details {
  flex-grow: 1;
}

.popup-book-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
}

.popup-message {
  margin: 0;
  color: #6c757d;
  line-height: 1.5;
  font-size: 0.95rem;
}

.popup-actions {
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  display: flex;
  gap: 1rem;
  border-top: 1px solid #e9ecef;
}

.btn-popup-secondary {
  flex: 1;
  background: white;
  border: 2px solid #e9ecef;
  color: #6c757d;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-popup-secondary:hover {
  border-color: #ff8800;
  color: #ff8800;
  background: rgba(255, 136, 0, 0.05);
}

.btn-popup-primary {
  flex: 1;
  background: linear-gradient(45deg, #ff8800, #ffce33);
  border: none;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-popup-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 136, 0, 0.3);
  color: white;
}

/* Responsive Design for Popup */
@media (max-width: 576px) {
  .custom-popup {
    max-width: 95%;
    margin: 1rem;
  }

  .popup-header {
    padding: 1rem 1.5rem;
  }

  .popup-body {
    padding: 1.5rem;
  }

  .popup-actions {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }

  .popup-book-info {
    flex-direction: column;
    text-align: center;
  }

  .popup-book-image {
    width: 60px;
    height: 75px;
    align-self: center;
  }

  .popup-title {
    font-size: 1.1rem;
  }

  .popup-book-title {
    font-size: 1rem;
  }

  .popup-message {
    font-size: 0.9rem;
  }
}
