/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #00c853;
  --primary-dark: #009624;
  --primary-light: #5efc82;
  --primary-glow: rgba(0, 200, 83, 0.2);
  --accent: #00e676;
  --bg-dark: #f5f7fa;
  --bg-card: #ffffff;
  --bg-card2: #f0f2f5;
  --bg-nav: rgba(10, 10, 10, 0.97);
  --text-white: #111111;
  --text-light: #333333;
  --text-muted: #666666;
  --border: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 200, 83, 0.6);
  --shadow-green: 0 0 30px rgba(0, 200, 83, 0.25);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-white);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #eee; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,200,83,0.3); }
  50% { box-shadow: 0 0 40px rgba(0,200,83,0.7); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes heroGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(0,200,83,0.2); }
  50% { border-color: rgba(0,200,83,0.8); }
}

/* ===== UTILITY ===== */
.text-green { color: var(--primary); }
.bg-green { background: var(--primary); }
.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.4rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}
.section-title span { color: var(--primary); }
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-green);
  color: #000;
}
.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.btn-outline-custom:hover {
  background: var(--primary);
  color: #000;
  box-shadow: var(--shadow-green);
}

/* ===== PARTICLES BACKGROUND ===== */
.particles-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: particleFloat linear infinite;
  opacity: 0;
}

/* ===== NAVBAR ===== */
.navbar-custom {
  background: var(--bg-nav) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}
.navbar-custom.scrolled {
  box-shadow: 0 4px 30px rgba(0,200,83,0.15);
}
.navbar-brand-custom {
  font-family: 'Poppins', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  animation: glowPulse 3s ease-in-out infinite;
}
.navbar-brand-custom span { color: #fff; -webkit-text-fill-color: #fff; }
.nav-link-custom {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  font-size: 0.93rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}
.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: var(--transition);
  border-radius: 2px;
}
.nav-link-custom:hover { color: var(--primary) !important; }
.nav-link-custom:hover::after { width: 60%; }
.nav-link-custom.active { color: var(--primary) !important; }
.search-bar-nav {
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: var(--transition);
  min-width: 300px;
}
.search-bar-nav:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-bar-nav input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
}
.search-bar-nav input::placeholder { color: var(--text-muted); }
.search-bar-nav .search-btn {
  background: var(--primary);
  border: none;
  padding: 0.55rem 1rem;
  color: #000;
  cursor: pointer;
  transition: var(--transition);
}
.search-bar-nav .search-btn:hover { background: var(--primary-light); }
.cart-icon-wrapper {
  position: relative;
  cursor: pointer;
}
.cart-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--primary);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePop 0.3s ease;
}
.navbar-toggler-custom {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.4rem 0.6rem !important;
}
.navbar-toggler-custom:focus { box-shadow: 0 0 0 3px var(--primary-glow) !important; }
.navbar-toggler-icon-custom {
  display: flex; flex-direction: column;
  gap: 5px; cursor: pointer;
}
.navbar-toggler-icon-custom span {
  display: block; width: 22px; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 88vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 50%, #f5f7fa 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 0;
}
.hero-bg-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,200,83,0.12) 0%, transparent 70%);
  border-radius: 50%;
  top: -100px; right: -100px;
  animation: heroGlow 6s ease-in-out infinite;
}
.hero-bg-glow2 {
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,200,83,0.08) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -50px; left: -50px;
  animation: heroGlow 8s ease-in-out infinite reverse;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
}
.hero-content { position: relative; z-index: 2; animation: slideInLeft 0.8s ease; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,200,83,0.1);
  border: 1px solid rgba(0,200,83,0.3);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: glowPulse 1.5s ease-in-out infinite;
}
.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  color: var(--text-white);
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.hero-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.hero-image-side {
  position: relative;
  z-index: 2;
  animation: slideInRight 0.8s ease;
}
.hero-books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem;
}
.hero-book-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  animation: float ease-in-out infinite;
}
.hero-book-card:nth-child(1) { animation-duration: 3s; }
.hero-book-card:nth-child(2) { animation-duration: 4s; }
.hero-book-card:nth-child(3) { animation-duration: 3.5s; }
.hero-book-card:hover { transform: translateY(-5px) scale(1.03); border-color: var(--primary); box-shadow: var(--shadow-green); }
.hero-book-cover {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.hero-book-info { padding: 0.6rem; }
.hero-book-title { font-size: 0.72rem; font-weight: 600; color: var(--text-white); margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-book-price { font-size: 0.75rem; color: var(--primary); font-weight: 700; }

/* ===== MARQUEE ===== */
.marquee-section {
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  height: 2px;
}
.category-marquee {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 1rem 0;
}
.marquee-track {
  display: flex;
  gap: 0;
  animation: marqueeScroll 25s linear infinite;
  width: max-content;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 2rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}
.marquee-item:last-child { border-right: none; }
.marquee-item .icon { color: var(--primary); font-size: 1rem; }

/* ===== FILTER SIDEBAR ===== */
.filter-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
  animation: fadeInUp 0.6s ease;
}
.filter-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.filter-title i { color: var(--primary); }
.filter-group { margin-bottom: 1.5rem; }
.filter-group-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}
.filter-option:hover { color: var(--primary); padding-left: 0.3rem; }
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  accent-color: var(--primary);
  width: 15px; height: 15px;
  cursor: pointer;
}
.filter-option label {
  font-size: 0.88rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
}
.filter-option:hover label { color: var(--primary); }
.filter-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card2);
  padding: 0.1rem 0.5rem;
  border-radius: 50px;
}
.price-range-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.price-input {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  width: 80px;
  outline: none;
  transition: var(--transition);
}
.price-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow); }
.range-slider {
  width: 100%;
  accent-color: var(--primary);
  margin-top: 0.5rem;
}
.filter-reset-btn {
  background: transparent;
  border: 1.5px solid rgba(255,50,50,0.4);
  color: rgba(255,100,100,0.8);
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  margin-top: 0.5rem;
}
.filter-reset-btn:hover { background: rgba(255,50,50,0.1); border-color: rgba(255,50,50,0.8); }
.star-rating-filter { display: flex; align-items: center; gap: 0.3rem; }
.star-rating-filter i { color: var(--text-muted); font-size: 0.9rem; cursor: pointer; transition: var(--transition); }
.star-rating-filter i.active { color: #ffc107; }

/* ===== SORT BAR ===== */
.sort-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease;
}
.results-count { color: var(--text-muted); font-size: 0.9rem; }
.results-count span { color: var(--primary); font-weight: 700; }
.sort-controls { display: flex; align-items: center; gap: 1rem; }
.sort-select {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-white);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.sort-select:focus { border-color: var(--primary); }
.view-toggle { display: flex; gap: 0.3rem; }
.view-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  transition: var(--transition);
}
.view-btn.active, .view-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }

/* ===== BOOK CARD ===== */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.books-grid.list-view { grid-template-columns: 1fr; }
.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  animation: fadeInUp 0.5s ease both;
}
.book-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(0,200,83,0.2);
}
.book-card .wishlist-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.7);
  border: none;
  color: var(--text-muted);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  z-index: 2;
}
.book-card:hover .wishlist-btn { opacity: 1; }
.book-card .wishlist-btn:hover { color: #ff4d6d; transform: scale(1.15); }
.book-card .wishlist-btn.active { opacity: 1; color: #ff4d6d; }
.book-cover {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}
.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.book-card:hover .book-cover-img { transform: scale(1.05); }
.book-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.book-card:hover .book-cover-overlay { opacity: 1; }
.quick-view-btn {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(10px);
  transition: var(--transition);
}
.book-card:hover .quick-view-btn { transform: translateY(0); }
.book-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  letter-spacing: 0.5px;
  z-index: 2;
}
.badge-bestseller { background: linear-gradient(135deg, #ffc107, #ff8f00); color: #000; }
.badge-new { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #000; }
.badge-sale { background: linear-gradient(135deg, #f44336, #b71c1c); color: #fff; }
.badge-free { background: linear-gradient(135deg, #2196f3, #0d47a1); color: #fff; }
.book-info { padding: 1rem; }
.book-category {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.3rem;
}
.book-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  transition: var(--transition);
}
.book-card:hover .book-title { color: var(--primary); }
.book-author { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.book-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.7rem;
}
.stars { display: flex; gap: 1px; }
.stars i { color: #ffc107; font-size: 0.75rem; }
.rating-count { font-size: 0.75rem; color: var(--text-muted); }
.book-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.book-price { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.book-original-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.book-discount {
  font-size: 0.72rem;
  color: #ff7043;
  font-weight: 700;
  background: rgba(255,112,67,0.12);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.add-cart-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  justify-content: center;
  margin-top: 0.8rem;
}
.add-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-green);
}
.add-cart-btn.added {
  background: linear-gradient(135deg, #00e676, #00c853);
}
.book-card.list-card { display: flex; flex-direction: row; align-items: stretch; }
.book-card.list-card .book-cover { width: 140px; height: auto; flex-shrink: 0; border-radius: 0; }
.book-card.list-card .book-info { flex: 1; }

/* ===== TOAST Notification ===== */
.toast-container-custom {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.toast-custom {
  background: var(--bg-card2);
  border: 1px solid var(--primary);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  animation: slideInRight 0.4s ease;
  min-width: 250px;
}
.toast-custom i { color: var(--primary); font-size: 1.1rem; }
.toast-custom.error { border-color: #f44336; border-left-color: #f44336; }
.toast-custom.error i { color: #f44336; }

/* ===== CATEGORIES SECTION ===== */
.categories-section { padding: 4rem 0; }
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease both;
}
.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-green);
  background: linear-gradient(135deg, #ffffff, #e8f5e9);
}
.category-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  transition: var(--transition);
  display: block;
}
.category-card:hover .category-icon { transform: scale(1.2) rotate(-5deg); }
.category-name {
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.3rem;
  transition: var(--transition);
}
.category-card:hover .category-name { color: var(--primary); }
.category-count { font-size: 0.8rem; color: var(--text-muted); }

/* ===== FEATURES SECTION ===== */
.features-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f0f2f5, #e8f5e9);
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  animation: fadeInUp 0.6s ease both;
}
.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-green);
}
.feature-icon {
  width: 60px; height: 60px;
  background: rgba(0,200,83,0.12);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  margin: 0 auto 1.2rem;
  transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--primary); color: #000; transform: scale(1.1); }
.feature-title { font-weight: 700; margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: linear-gradient(135deg, #e8f5e9, #f1f8f1);
  border: 1px solid rgba(0,200,83,0.4);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
  margin: 2rem 0;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,200,83,0.08) 0%, transparent 70%);
}
.promo-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.7rem;
  position: relative;
}
.promo-sub { color: var(--text-muted); margin-bottom: 1.5rem; position: relative; }
.countdown { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; position: relative; }
.countdown-item { text-align: center; }
.countdown-num {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 60px; height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
}
.countdown-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ===== PAGINATION ===== */
.pagination-custom { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  font-weight: 700;
}

/* ===== FOOTER ===== */
.footer-custom {
  background: #050505;
  border-top: 1px solid var(--border);
  padding: 4rem 0 0;
  margin-top: 4rem;
}
.footer-brand {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
}
.footer-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 0.7rem; }
.social-btn {
  width: 38px; height: 38px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.social-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); transform: translateY(-3px); }
.footer-heading { font-weight: 700; color: var(--text-white); margin-bottom: 1.2rem; font-size: 1rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; transition: var(--transition); display: flex; align-items: center; gap: 0.4rem; }
.footer-links a:hover { color: var(--primary); padding-left: 4px; }
.footer-links a i { font-size: 0.7rem; }
.footer-newsletter input {
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-white);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
  flex: 1;
}
.footer-newsletter input:focus { border-color: var(--primary); }
.footer-newsletter .sub-btn {
  background: var(--primary);
  border: none;
  color: #000;
  padding: 0.6rem 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}
.footer-newsletter .sub-btn:hover { background: var(--primary-light); }
.footer-newsletter { display: flex; margin-top: 0.5rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.83rem; margin: 0; }
.payment-icons { display: flex; gap: 0.5rem; align-items: center; }
.payment-icon {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* ===== MODAL ===== */
.modal-custom .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-white);
}
.modal-custom .modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
}
.modal-custom .modal-title { font-family: 'Poppins', sans-serif; font-weight: 700; }
.modal-custom .btn-close { filter: invert(1) sepia(1) saturate(5) hue-rotate(100deg); }
.modal-custom .modal-body { padding: 1.5rem; }

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.search-overlay.active { opacity: 1; pointer-events: all; }
.search-overlay-inner {
  width: 100%;
  max-width: 650px;
  animation: slideDown 0.3s ease;
}
.search-overlay-input {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 50px;
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  color: var(--text-white);
  outline: none;
  box-shadow: var(--shadow-green);
}
.search-overlay-close {
  position: absolute;
  top: 2rem; right: 2rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-white);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.search-overlay-close:hover { background: var(--primary); color: #000; }
.search-results-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1rem;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card2); }
.search-result-icon { font-size: 1.8rem; }
.search-result-info .title { font-weight: 600; font-size: 0.9rem; }
.search-result-info .author { font-size: 0.8rem; color: var(--text-muted); }
.search-result-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; margin-left: auto; }

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 500;
  box-shadow: var(--shadow-green);
}
.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover { transform: translateY(-3px) scale(1.1); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; color: #ccc; margin-bottom: 1rem; display: block; }
.empty-state h4 { color: var(--text-light); margin-bottom: 0.5rem; }

/* ===== TESTIMONIALS SECTION ===== */
.testimonials-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f0f2f5, #e8f5e9);
}
.testimonial-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease both;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-green);
}
.testimonial-quote {
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 0.3rem;
  font-family: Georgia, serif;
}
.testimonial-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  flex: 1;
}
.testimonial-footer { display: flex; align-items: center; gap: 1rem; }
.testimonial-avatar {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: 0.92rem; color: var(--text-white); }
.testimonial-book { font-size: 0.78rem; color: var(--primary); margin-top: 0.1rem; }
.testimonial-stars { display: flex; gap: 2px; margin-bottom: 0.25rem; }
.testimonial-stars i { color: #ffc107; font-size: 0.82rem; }
/* Stat mini cards in testimonials section */
.stat-mini-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  transition: var(--transition);
}
.stat-mini-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-green); }
.stat-mini-num { font-size: 1.8rem; font-weight: 800; color: var(--primary); font-family: 'Poppins', sans-serif; }
.stat-mini-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ===== DARK SURFACE OVERRIDES (Keep Navbar & Footer dark on light theme) ===== */
.footer-heading { color: #ffffff !important; }
.footer-desc { color: #aaaaaa !important; }
.footer-links a { color: #aaaaaa !important; }
.footer-links a:hover { color: var(--primary) !important; padding-left: 4px; }
.footer-bottom p { color: #aaaaaa !important; }
.payment-icon { background: #1a1a1a !important; border-color: rgba(255,255,255,0.1) !important; color: #aaaaaa !important; }
.footer-social .social-btn { background: #1a1a1a; border-color: rgba(255,255,255,0.15); color: #aaaaaa; }
.footer-social .social-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }
.navbar-custom .cart-icon-wrapper { color: rgba(255,255,255,0.92) !important; }
.navbar-custom .btn { color: rgba(255,255,255,0.8) !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .filter-section { position: static; margin-bottom: 1.5rem; }
  .hero-books-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 1.2rem; }
  .search-bar-nav { min-width: 200px; }
}
@media (max-width: 768px) {
  .hero-section { min-height: auto; padding: 3rem 0; }
  .hero-image-side { margin-top: 2rem; }
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .sort-bar { padding: 0.8rem 1rem; }
  .footer-bottom { justify-content: center; text-align: center; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .search-bar-nav { min-width: 150px; }
  .countdown-num { width: 50px; height: 50px; font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .hero-books-grid { grid-template-columns: repeat(2, 1fr); }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .countdown { gap: 0.5rem; }
}
