body {
  font-family: 'Poppins', sans-serif;
  background-color: #0d0d0d;
  margin: 0;
  color: #333;
}

/* header */
header {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  background: #000000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
  color: #4455ee;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* nav bar */
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a,
.dropdown span {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.nav-links a:hover,
.dropdown span:hover {
  color: #4455ee;
}

/* dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-title {
  cursor: pointer;
  padding: 10px 5px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #1c1c1c;
  min-width: 220px;
  border-radius: 10px;
  padding: 10px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: #2a2a2a;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* search-box */
.search-box {
  display: flex;
  align-items: center;
  position: relative;
  background: transparent;
  border-radius: 30px;
  box-shadow: 2px 0px 11px 2px rgba(248, 248, 250, 0.605);
  padding: 5px 10px;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  color: white;
  padding: 8px 12px;
  font-size: 16px;
  width: 100px;
}

.search-box button {
  background: #4455ee;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s;
}

.search-box button:hover {
  background: #5b06ca;
  color: white;
  transform: scale(1.05);
}

.suggestions-list {
  position: absolute;
  top: 55px;
  left: 0;
  width: 100%;
  background: #1c1c1c;
  border-radius: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.suggestions-list li {
  padding: 12px 15px;
  color: white;
  cursor: pointer;
}

.suggestions-list li:hover {
  background: #2a2a2a;
}

/* main card  */
.cart-icon {
  position: relative;
  background: transparent;
  text-decoration: none;
  color: #fff;
  border-radius: 40px;
  margin-left: 50px;
  width: 90px;
  height: 45px;
  display: flex;
  box-shadow: 2px 0px 11px 2px rgba(248, 248, 250, 0.605);
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.3s;
}

.cart-icon:hover {
  background: #5b06ca;
  color: white;
  transform: scale(1.1);
}

.cart-icon i {
  font-size: 20px;
}

#cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: red;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* hero */
.hero {
  margin-top: 50px;
  text-align: center;
  padding: 50px 30px;
  background-image: url(./Image/image2.jpg);
  background-repeat: no-repeat;
  background-position: bottom;
  background-size: cover;
  color: #fafafb;
  text-shadow: 20px 5px 15px rgb(12, 12, 12);
  box-shadow: 2px 0px 30px 4px rgba(135, 135, 215, 0.605);
}

.hero h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  color: #ddd;
  font-weight: 00;
  margin-bottom: 30px;
}

/* hero animation */
.animate-hero h2,
.animate-hero p,
.animate-hero .shop-btn {
  opacity: 0;
  transform: translateY(40px);
}

.animate-hero h2 {
  animation: heroFadeUp 1s ease forwards;
}

.animate-hero p {
  animation: heroFadeUp 1s ease forwards;
  animation-delay: 0.3s;
}

.animate-hero .shop-btn {
  animation: heroFadeUp 1s ease forwards;
  animation-delay: 0.6s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* shop-btn */
.shop-btn {
  background: #fff;
  color: #333;
  text-decoration: none;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.shop-btn:hover {
  transform: scale(1.1);
  background: #4455ee;
  color: white;
}

/* categories-section */
.categories-section {
  padding: 70px 80px;
  background: #0d0d0d;
  text-align: center;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.category-card {
  background: #131212;
  color: white;
  padding: 40px 20px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0px 0px 15px 0px rgba(248, 248, 250, 0.301);
  transition: 0.3s;
}

.category-card i {
  font-size: 36px;
  margin-bottom: 15px;
  color: #4455ee;
}

.category-card:hover {
  transform: translateY(-10px);
  background: #1e1e1e;
}

/* Books Section */
.books-section {
  padding: 10px 80px;
  background: #0d0d0d;
}

.section-title {
  text-align: center;
  color: white;
  font-size: 32px;
  margin-bottom: 40px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  justify-items: center;
}

.book-card {
  width: 200px;
  height: 300px;
  perspective: 1000px;
  margin: 20px;
}

.book-inner {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 10px;
  box-shadow: 2px 0px 11px 2px rgba(248, 248, 250, 0.605);
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.book-card:hover .book-inner {
  transform: rotateY(180deg);
}

.book-front,
.book-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.book-front {
  background: #fff;
  text-align: center;
}

.book-front img {
  width: 100%;
  height: 80%;
  object-fit: cover;
}

.book-front h3 {
  margin: 10px 0;
  font-size: 16px;
}

.book-back {
  background: #4455ee;
  color: #fff;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.book-back button {
  background: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
}

.why-booknest {
  padding: 80px 80px;
  background: #0d0d0d;
  text-align: center;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

/* why booknest */
.why-card {
  background: #131212;
  color: white;
  padding: 40px 25px;
  border-radius: 20px;
  box-shadow: 0px 0px 15px 0px rgba(248, 248, 250, 0.301);
  transition: 0.3s;
}

.why-card i {
  font-size: 40px;
  color: #4455ee;
  margin-bottom: 15px;
}

.why-card:hover {
  transform: translateY(-10px);
  background-color: rgba(245, 245, 245, 0.788);
  color: #000000;
}

/* cta section */
.cta-section {
  padding: 80px 40px;
  background: linear-gradient(135deg, #4455ee, #5b06ca);
  text-align: center;
  color: white;
}

.cta-section h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
}

.cta-btn {
  background: white;
  color: #333;
  padding: 14px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.cta-btn:hover {
  background: #000;
  color: white;
  transform: scale(1.1);
}

/* footer */
.main-footer {
  background: #1a1a1a;
  color: #fff;
  padding: 70px 80px 30px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #ffffff;
}

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

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: #cfcfcf;
  text-decoration: none;
  font-size: 15px;
  transition: 0.3s;
}

.footer-col ul li a:hover {
  color: #4455ee;
}

.footer-right {
  border-left: 1px solid #333;
  padding-left: 30px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.footer-social i {
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.footer-social i:hover {
  color: #4455ee;
}

.footer-subscribe {
  display: flex;
  align-items: center;
  margin-top: 20px;
  width: 320px;
  height: 44px;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
}

.footer-subscribe input {
  flex: 1;
  padding: 0 14px;
  background: transparent;
  border: none;
  color: white;
  font-size: 14px;
  height: 100%;
}

.footer-subscribe input::placeholder {
  color: #aaa;
}

.footer-subscribe input:focus {
  outline: none;
}

.footer-subscribe button {
  background: rgb(40, 39, 39);
  border: none;
  color: white;
  width: 50px;
  height: 90%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: 0.3s;
}

.footer-subscribe button:hover {
  background: #5b06ca;
}

.footer-subscribe button:active {
  transform: scale(0.95);
}

.footer-error {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  height: 14px;
}

.footer-error.error {
  color: #ff5c5c;
}

.footer-error.success {
  color: #4caf50;
}

.footer-bottom {
  text-align: center;
  margin-top: 50px;
  font-size: 14px;
  color: #aaa;
  border-top: 1px solid #333;
  padding-top: 20px;
}

/* animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.9s ease;
}

.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}

/* cart section */
.cart-page-button {
  color: white;
  text-decoration: none;
}

.cart-page-button:hover {
  color: #4455ee;
}

.cart-section {
  padding: 60px 80px;
  color: white;
}

.cart-section h2 {
  margin-bottom: 30px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #131212;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 12px;
}

.cart-item h4 {
  margin: 0;
}

.cart-item button {
  background: red;
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
}

.cart-summary {
  margin-top: 30px;
  text-align: right;
}

#clear-cart {
  margin-top: 15px;
  background: #4455ee;
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 25px;
  cursor: pointer;
}

.cart-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 20px;
}

#checkout-btn {
  margin-top: 15px;
  background: #4455ee;
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

#checkout-btn:hover {
  background: #5b06ca;
  transform: scale(1.05);
}

#checkout-btn:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
}

/* CHECKOUT PAGE */

.checkout-section {
  padding: 80px;
  background: #0d0d0d;
  color: white;
}

.checkout-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.checkout-form {
  background: #131212;
  padding: 40px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.checkout-form h3 {
  margin-bottom: 10px;
}

.checkout-form input {
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: #1e1e1e;
  color: white;
}

.checkout-form input:focus {
  outline: 2px solid #4455ee;
}

.checkout-form button {
  margin-top: 10px;
  background: #4455ee;
  border: none;
  padding: 14px;
  border-radius: 30px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.checkout-form button:hover {
  background: #5b06ca;
  transform: scale(1.05);
}

.order-summary {
  background: #131212;
  padding: 40px;
  border-radius: 16px;
}

.order-summary h3 {
  margin-bottom: 20px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #ddd;
}

.summary-total {
  margin-top: 25px;
  font-size: 20px;
  font-weight: bold;
  text-align: right;
}


/* About section */

.about-section {
  padding: 80px 80px 40px;
  background: #0d0d0d;
  color: white;
  text-align: center;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.8;
  color: #ddd;
}

.about-content p {
  margin-bottom: 25px;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding: 60px 80px 80px;
  background: #0d0d0d;
}

.highlight {
  background: #131212;
  padding: 35px 25px;
  border-radius: 16px;
  box-shadow: 0px 0px 15px 0px rgba(248, 248, 250, 0.301);
  transition: 0.3s;
}

.highlight:hover {
  transform: translateY(-8px);
  background-color: rgba(32, 31, 31, 0.703);
}

.highlight h3 {
  margin-bottom: 15px;
  color: #4455ee;
}

.highlight p {
  color: #ccc;
  font-size: 15px;
}

/* CONTACT PAGE */

.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 80px;
  background: #131212;
}

.contact-header h1 {
  color: #4455ee;
  margin: 0;
}

.back-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  color: #4455ee;
}

.contact-section {
  padding: 80px;
  background: #0d0d0d;
  color: white;
}

.contact-desc {
  text-align: center;
  color: #ccc;
  margin-bottom: 60px;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: auto;
}

.contact-info h3 {
  margin-bottom: 20px;
}

.contact-info p {
  margin: 15px 0;
  color: #ddd;
}

.contact-info i {
  color: #4455ee;
  margin-right: 10px;
}

.social-icons {
  margin-top: 25px;
}

.social-icons i {
  margin-right: 15px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.social-icons i:hover {
  color: #4455ee;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  background: #131212;
  border: none;
  padding: 14px;
  border-radius: 10px;
  color: white;
  font-size: 14px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #4455ee;
}

.contact-form button {
  background: #4455ee;
  border: none;
  padding: 14px;
  border-radius: 30px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.contact-form button:hover {
  background: #5b06ca;
  transform: scale(1.05);
}

.error {
  color: #ff5c5c;
  font-size: 12px;
  height: 12px;
}