html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background-color: #f4f4f4d4; line-height: 1.6; }

/* ===== HEADER ===== */
.header { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; flex-wrap: wrap; background: #f4f4f4d4; position: relative; }
.header-left { flex: 1; }
.header-center { flex: 2; display: flex; justify-content: center; }
.header-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 30px; }

.logo-img { height: 70px; width: auto; }
.logo-title { display: flex; align-items: center; }

/* ===== SEARCH BAR ===== */
.search-box { position: relative; width: 100%; max-width: 350px; }
.search-input { width: 100%; padding: 8px 12px; padding-right: 35px; border: 2px solid #d4af37; border-radius: 6px; font-size: 1rem; outline: none; }
.search-input:focus { border-color: #060606; }
.search-icon { position: absolute; right: 15px; top: 55%; transform: translateY(-50%); cursor: pointer; }

/* ===== BUTTONS ===== */
.sell-btn { padding: 8px 14px; background: rgba(152,152,152,0.574); color: #060606; border-radius: 6px; font-size: 14px; font-weight: bold; text-decoration: none; transition: all 0.3s ease; }
.sell-btn:hover { background: #40d832b1; transform: scale(1.05); }
.sell-btn:active { transform: scale(0.95); }

/* ===== HAMBURGER TO CROSS (UPDATED) ===== */
.hamburger {
  font-size: 28px;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 1101;
  transition: transform 0.3s ease;
}
.hamburger.active { transform: rotate(90deg); }

/* ===== MENU (Hamburger, UPDATED) ===== */
.menu {
  position: fixed;
  top: 0;
  right: -100%; /* hidden by default */
  width: 20%;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: right 0.4s ease;
  z-index: 1100;
}
.menu.active { right: 0; }

.menu a, .menu .dropdown-toggle {
  padding: 12px 20px;
  text-decoration: none;
  color: #000000;
  border-bottom: 1px solid #101010c6;
  font-size: 16px;
}
.menu a:hover, .menu .dropdown-toggle:hover { background: #a3a3a3cf; }

/* ===== OVERLAY (dark background) ===== */
.menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  overflow-y: auto;
  visibility: hidden;
  transition: opacity 0.4s ease;
  z-index: 1000;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* ===== DROPDOWN INSIDE MENU ===== */
.menu .dropdown { position: relative; display: block; }
.menu .dropdown-toggle { display: block; padding: 12px 20px; color: #070707; text-decoration: none; border-bottom: 1px solid #101010c6; cursor: pointer; }
.menu .dropdown-toggle:hover { background: #a3a3a3cf; }
.menu .dropdown-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  position: relative;
  border-top: 1px solid #ddd;
}
.menu .dropdown-menu a {
  padding: 10px 20px;
  text-decoration: none;
  color: #000000;
  border-bottom: 1px solid #101010c6;
  font-size: 14px;
}
.menu .dropdown-menu a:hover { background: #a3a3a3cf; }
.menu .dropdown.active .dropdown-menu { display: flex; }

/* ===== SHOW DROPDOWN ON HOVER (desktop) ===== */
@media (min-width: 769px) {
  .menu .dropdown { position: relative; }
  .menu .dropdown-menu {
    position: absolute;
    top: 100%; left: 0;
    min-width: 200px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }
  .menu .dropdown:hover .dropdown-menu { display: flex; }
}

/* ===== MOBILE VIEW ===== */
.mobile-sell { display: none; text-align: center; width: 100%; margin-top: 10px; }
@media(max-width: 768px) {
  .header { flex-direction: row; }
  .header-right .sell-btn { display: none; }
  .mobile-sell { display: block; }
  .header-center { order: 4; width: 100%; margin-top: 10px; justify-content: center; }
  .search-input { width: 95%; }
  .search-icon { right: 22px; }
  .logo-img { height: 53px; }
  .logo-title { gap: 5px; }
  .menu { top: 60px; right: 10px; min-width: 160px; border-radius: 6px; }
  .menu a { padding: 10px 18px; font-size: 14px; }
}
/* ===== SLIDER ===== */
.slider-container {
  position: relative;
  width: 96%;
  max-width: 1300px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.slide img { width: 100%; height: 300px; object-fit: cover; display: block; }
.slider-wrapper { display: flex; transition: transform 0.6s ease-in-out; }
.slide { min-width: 100%; box-sizing: border-box; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.45); border: none; color: #fff;
  font-size: 18px; padding: 8px 12px; cursor: pointer; border-radius: 50%; transition: 0.3s; z-index: 10;
}
.slider-btn:hover { background: rgba(0,0,0,0.8); }
.prev { left: 15px; }
.next { right: 15px; }
.slider-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: #ccc; cursor: pointer; transition: 0.3s; }
.slider-dots button.active { background: #000; transform: scale(1.2); }

/* ===== BOOK CARDS ===== */
.books { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.book-card { background: #fff; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 200px; text-align: center; transition: transform 0.2s; cursor: pointer; }
.book-card:hover { transform: translateY(-6px); }
.book-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px 10px 0 0; }
.book-info { padding: 12px; }
.book-title { font-size: 16px; font-weight: 200; font-style: italic; margin: 5px 0; }
.book-price { color: #060606; font-weight: bold; font-size: 18px; margin: 5px 0; }

/* ===== FOOTER ===== */
.footer {
  background-color: #1e1e1e;
  color: #f1f1f1;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.footer h2, .footer h3, .footer h4 { color: #fff; margin-bottom: 15px; }
.footer p { font-size: 14px; line-height: 1.6; color: #ddd; }
.footer-section ul { list-style: none; padding: 0; }
.footer-section ul li { margin: 8px 0; }
.footer-section ul li a { color: #cfc614; text-decoration: none; transition: color 0.3s ease; }
.footer-section ul li a:hover { color: #ff6347; }
.social-icons { margin-top: 15px; display: flex; gap: 15px; }
.social-icons a img { width: 32px; height: 32px; border-radius: 6px; transition: transform 0.3s ease; }
.social-icons a img:hover { transform: scale(1.1); }

/* ===== AD BANNER ===== */
.ad-banner-line {
  width: 90%; margin: 10px auto 0; text-align: center; overflow: hidden;
  background: rgba(0,0,0,0.7); color: #f5e71f; font-weight: bold; font-size: 18px; padding: 8px; border-radius: 6px; white-space: nowrap; position: relative; z-index: 10;
}
.ad-banner-line::after {
  content: attr(data-text); display: inline-block; padding-left: 100%; animation: scrollBanner 13s linear infinite; white-space: nowrap;
}
.ad-banner-line:hover::after, .ad-banner-line:active::after { animation-play-state: paused; }
@keyframes scrollBanner { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ===== RESPONSIVE ===== */
@media(max-width: 1024px) { .slide img { height: 250px; } .book-card { width: 180px; } .book-card img { height: 180px; } }
@media(max-width: 768px) {
  .book-card { width: 160px; }
  .book-card img { height: 170px; }
  .book-title { font-size: 14px; font-weight: bold; }
  .book-price { font-size: 16px; }
  .slider-btn { font-size: 16px; padding: 6px 10px; } .prev { left: 10px; } .next { right: 10px; } .slider-dots { gap: 6px; }
  .footer { grid-template-columns: 1fr 1fr; text-align: center; }
}
@media(max-width: 480px) {
  .book-card { width: 140px; }
  .book-card img { height: 150px; }
  .book-title { font-size: 13px; font-weight: bold; }
  .book-price { font-size: 15px; }
  nav a { display: block; margin: 2px 0; }
  .slide img { height: 160px; }
  .slider-btn { font-size: 14px; padding: 5px 8px; } .prev { left: 8px; } .next { right: 8px; } .slider-dots { gap: 5px; bottom: 8px; }
  .ad-banner-line { font-size: 12px; padding: 5px; }
  .footer { grid-template-columns: 1fr; text-align: center; }
  .social-icons { justify-content: center; }
}

/* ===== RESPONSIVE MENU ===== */
@media(max-width: 768px) {
  .logo-img { height: 60px; }
  .logo-title { gap: 5px; }
  .menu a { padding: 10px 18px; font-size: 14px; }
}
/* Mobile menu scrollable */
@media(max-width: 768px) {
  .menu {
    top: 60px;
    right: -100%;
    min-width: 200px;
    border-radius: 6px;
    max-height: calc(100vh - 60px); /* screen height ke hisaab se */
    overflow-y: auto; /* scrollable menu */
  }
}
