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

/* CSS Variables for Beautiful Color Scheme */
:root {
  /* Primary Colors - Deep Ocean Blue */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* Secondary Colors - Warm Coral */
  --secondary-50: #fef2f2;
  --secondary-100: #fee2e2;
  --secondary-200: #fecaca;
  --secondary-300: #fca5a5;
  --secondary-400: #f87171;
  --secondary-500: #ef4444;
  --secondary-600: #dc2626;
  --secondary-700: #b91c1c;
  --secondary-800: #991b1b;
  --secondary-900: #7f1d1d;

  /* Accent Colors - Golden Yellow */
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-200: #fde68a;
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;
  --accent-800: #92400e;
  --accent-900: #78350f;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Success & Error */
  --success-500: #10b981;
  --error-500: #ef4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-700) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-700) 100%);
  --gradient-hero: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 50%, var(--accent-600) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Dark Mode Variables */
:root[data-theme="dark"] {
  /* Dark Primary Colors */
  --primary-50: #0f172a;
  --primary-100: #1e293b;
  --primary-200: #334155;
  --primary-300: #475569;
  --primary-400: #64748b;
  --primary-500: #94a3b8;
  --primary-600: #cbd5e1;
  --primary-700: #e2e8f0;
  --primary-800: #f1f5f9;
  --primary-900: #f8fafc;

  /* Dark Secondary Colors */
  --secondary-50: #450a0a;
  --secondary-100: #7f1d1d;
  --secondary-200: #991b1b;
  --secondary-300: #b91c1c;
  --secondary-400: #dc2626;
  --secondary-500: #ef4444;
  --secondary-600: #f87171;
  --secondary-700: #fca5a5;
  --secondary-800: #fecaca;
  --secondary-900: #fee2e2;

  /* Dark Accent Colors */
  --accent-50: #451a03;
  --accent-100: #78350f;
  --accent-200: #92400e;
  --accent-300: #b45309;
  --accent-400: #d97706;
  --accent-500: #f59e0b;
  --accent-600: #fbbf24;
  --accent-700: #fcd34d;
  --accent-800: #fde68a;
  --accent-900: #fef3c7;

  /* Dark Neutral Colors */
  --gray-50: #0f172a;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-700: #e2e8f0;
  --gray-800: #f1f5f9;
  --gray-900: #f8fafc;

  /* Dark Gradients */
  --gradient-primary: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --gradient-secondary: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #d97706 100%);

  /* Dark Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-50) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Dark mode body background */
:root[data-theme="dark"] body {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
  color: var(--gray-800);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Enhanced Header & Navigation */
.header {
  background: var(--gradient-primary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  position: relative;
}

/* Logo Section */
.logo-section {
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-icon i {
  font-size: 1.5rem;
  color: var(--accent-300);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--primary-200);
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--primary-100);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-2px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow: var(--shadow-md);
}

.nav-link i {
  font-size: 1rem;
}

/* Right Section */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.search-toggle,
.theme-toggle {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  color: var(--primary-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-toggle:hover,
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--gradient-accent);
  border: none;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  white-space: nowrap;
}

.cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.cart-count {
  background: var(--secondary-500);
  color: white;
  border-radius: 50%;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  min-width: 20px;
  text-align: center;
  font-weight: 700;
}

.cart-text {
  font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Enhanced Search Bar */
.search-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-bar.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.search-container-enhanced {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 2px solid var(--primary-200);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .search-container-enhanced {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.search-input-enhanced {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  font-size: 1rem;
  color: var(--gray-800);
  background: transparent;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .search-input-enhanced {
  background: var(--gray-100);
  color: var(--gray-800);
}

.search-input-enhanced:focus {
  outline: none;
}

.search-input-enhanced::placeholder {
  color: var(--gray-400);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .search-input-enhanced::placeholder {
  color: var(--gray-500);
}

.search-btn,
.search-close {
  padding: 1rem;
  border: none;
  background: var(--primary-600);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 50px;
}

.search-btn:hover,
.search-close:hover {
  background: var(--primary-700);
}

.search-close {
  background: var(--gray-400);
}

.search-close:hover {
  background: var(--gray-500);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 999;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .mobile-nav {
  background: rgba(30, 41, 59, 0.95);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  color: var(--gray-700);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .mobile-nav-link {
  color: var(--gray-700);
}

.mobile-nav-link:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .mobile-nav-link:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* Hero Section */
.hero {
  background: var(--gradient-hero);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, white 0%, var(--accent-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--primary-100);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-300);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--primary-200);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

/* Main Content */
.main {
  padding: 4rem 0;
}

/* Controls */
.controls {
  margin-bottom: 3rem;
}

.controls-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .controls-header h2 {
  color: var(--gray-900);
}

.controls-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .controls-header p {
  color: var(--gray-600);
}

.controls-header p {
  font-size: 1.1rem;
  color: var(--gray-600);
}

.controls-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.category-filter,
.sort-filter {
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--primary-200);
  border-radius: 12px;
  font-size: 1rem;
  background: white;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  min-width: 180px;
  box-shadow: var(--shadow-sm);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .category-filter,
:root[data-theme="dark"] .sort-filter {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

.category-filter:focus,
.sort-filter:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.category-filter:hover,
.sort-filter:hover {
  border-color: var(--primary-400);
  box-shadow: var(--shadow-md);
}

/* Books Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.book-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.4s ease;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  position: relative;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .book-card {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-800);
}

.book-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 20px;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .book-card:hover::before {
  background: var(--gradient-accent);
  opacity: 0.1;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.book-card:hover::before {
  opacity: 0.05;
}

.book-cover {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  transition: transform 0.3s ease;
}

.book-card:hover .book-cover {
  transform: scale(1.05);
}

.book-info {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.book-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
  line-height: 1.4;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .book-title {
  color: var(--gray-900);
}

.book-author {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-style: italic;
  font-weight: 400;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .book-author {
  color: var(--gray-600);
}

.book-category {
  display: inline-block;
  background: var(--gradient-accent);
  color: white;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.book-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success-500);
}

.add-to-cart {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  white-space: nowrap;
}

.add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.add-to-cart:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-600);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .no-results {
  color: var(--gray-600);
}

.no-results-icon {
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .no-results-icon {
  background: var(--gray-200);
}

.no-results-icon i {
  font-size: 2rem;
  color: var(--gray-400);
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .no-results h3 {
  color: var(--gray-800);
}

.clear-filters-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.clear-filters-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Enhanced Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: white;
  box-shadow: var(--shadow-xl);
  transition: right 0.4s ease;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--gray-200);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-sidebar {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gradient-primary);
  color: white;
}

.cart-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.close-cart {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-cart:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  align-items: center;
  transition: all 0.3s ease;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-item:hover {
  background: var(--gray-200);
}

.cart-item:hover {
  background: var(--gray-50);
}

.cart-item-cover {
  width: 70px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  color: var(--gray-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-item-title {
  color: var(--gray-900);
}

.cart-item-author {
  color: var(--gray-600);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-item-author {
  color: var(--gray-600);
}

.cart-item-price {
  color: var(--success-500);
  font-weight: 700;
  font-size: 1rem;
}

.remove-item {
  background: var(--gradient-secondary);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.remove-item:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.cart-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-600);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-empty {
  color: var(--gray-600);
}

.cart-empty-icon {
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-empty-icon {
  background: var(--gray-200);
}

.cart-empty-icon i {
  font-size: 2rem;
  color: var(--gray-400);
}

.cart-empty h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-empty h4 {
  color: var(--gray-800);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-footer {
  background: var(--gray-200);
}

.cart-summary {
  margin-bottom: 1rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .cart-total {
  background: var(--gray-100);
  color: var(--gray-900);
}

.total-amount {
  color: var(--success-500);
}

.checkout-btn {
  width: 100%;
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Cart & Checkout Overlays */
.cart-overlay,
.checkout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active,
.checkout-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Enhanced Checkout Modal */
.checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.checkout-modal.active {
  opacity: 1;
  visibility: visible;
}

.checkout-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.4s ease;
  border: 1px solid var(--gray-200);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .checkout-content {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.checkout-header {
  padding: 2rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gradient-primary);
  color: white;
  border-radius: 20px 20px 0 0;
}

.checkout-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.close-checkout {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-checkout:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.checkout-body {
  padding: 2rem;
}

.order-summary,
.payment-methods,
.contact-section {
  margin-bottom: 2rem;
}

.order-summary h3,
.payment-methods h3,
.contact-section h3 {
  color: var(--gray-800);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkout-items {
  margin-bottom: 1rem;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  gap: 1rem;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .checkout-item:hover {
  background: var(--gray-200);
}

.checkout-item:hover {
  background: var(--gray-50);
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-item-info {
  flex: 1;
  min-width: 0;
}

.checkout-item-title {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .checkout-item-title {
  color: var(--gray-900);
}

.checkout-item-author {
  color: var(--gray-600);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .checkout-item-author {
  color: var(--gray-600);
}

.checkout-item-price {
  color: var(--success-500);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.checkout-total {
  text-align: center;
  padding: 1.5rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: 12px;
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
  justify-content: center;
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .payment-option {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.payment-option:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .payment-option:hover {
  background: var(--gray-300);
  border-color: var(--primary-400);
}

.payment-option i {
  font-size: 1.5rem;
  color: var(--primary-600);
}

.payment-option span {
  font-weight: 600;
  color: var(--gray-800);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .payment-option span {
  color: var(--gray-900);
}

.contact-section p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.contact-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  box-shadow: var(--shadow-md);
}

.email-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.email-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.whatsapp-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.whatsapp-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.contact-btn i {
  font-size: 2rem;
  flex-shrink: 0;
}

.contact-btn div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-btn span {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-btn small {
  font-size: 0.9rem;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Theme toggle button styles */
.theme-toggle {
  position: relative;
  overflow: hidden;
}

.theme-toggle i {
  transition: all 0.3s ease;
}

.theme-toggle.rotating i {
  transform: rotate(360deg);
}

/* Dark mode transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Preserve specific transitions that shouldn't be overridden */
.book-card,
.nav-link,
.cart-btn,
.add-to-cart,
.contact-btn,
.checkout-btn,
.search-toggle,
.theme-toggle {
  transition: all 0.3s ease !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    padding: 0 15px;
  }

  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

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

  .hero-stats {
    gap: 2rem;
  }

  .navbar {
    gap: 0.5rem;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .cart-btn {
    padding: 0.75rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }

  .navbar {
    padding: 0.75rem 0;
    gap: 0.5rem;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-icon i {
    font-size: 1.25rem;
  }

  .logo-main {
    font-size: 1.25rem;
  }

  .logo-sub {
    font-size: 0.7rem;
  }

  .cart-text {
    display: none;
  }

  .search-toggle,
  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding: 3rem 0;
  }

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

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

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .controls-header h2 {
    font-size: 2rem;
  }

  .controls-filters {
    flex-direction: column;
    align-items: center;
  }

  .category-filter,
  .sort-filter {
    min-width: 200px;
    width: 100%;
    max-width: 300px;
  }

  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
  }

  .cart-sidebar {
    width: 100vw;
    right: -100vw;
  }

  .checkout-content {
    width: 95%;
    margin: 0.5rem;
  }

  .checkout-body {
    padding: 1.5rem;
  }

  .checkout-header {
    padding: 1.5rem;
  }

  .checkout-header h2 {
    font-size: 1.25rem;
  }

  .contact-buttons {
    grid-template-columns: 1fr;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .search-container-enhanced {
    border-radius: 12px;
  }

  .search-input-enhanced {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }

  .search-btn,
  .search-close {
    padding: 0.875rem;
    min-width: 45px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .logo-main {
    font-size: 1.1rem;
  }

  .logo-sub {
    font-size: 0.65rem;
  }

  .search-toggle,
  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .cart-btn {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .cart-count {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }

  .hero {
    padding: 2rem 0;
  }

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

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .controls-header h2 {
    font-size: 1.75rem;
  }

  .controls-header p {
    font-size: 1rem;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .book-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .add-to-cart {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
  }

  .checkout-header {
    padding: 1rem;
  }

  .checkout-header h2 {
    font-size: 1.1rem;
  }

  .checkout-body {
    padding: 1rem;
  }

  .contact-btn {
    padding: 1rem;
  }

  .contact-btn i {
    font-size: 1.5rem;
  }

  .contact-btn span {
    font-size: 1rem;
  }

  .contact-btn small {
    font-size: 0.8rem;
  }

  .payment-option {
    padding: 1rem;
  }

  .search-input-enhanced {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .search-btn,
  .search-close {
    padding: 0.75rem;
    min-width: 40px;
  }

  .mobile-nav-link {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.5rem;
  }

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

  .controls-header h2 {
    font-size: 1.5rem;
  }

  .book-card {
    border-radius: 15px;
  }

  .book-info {
    padding: 1rem;
  }

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

  .checkout-content {
    border-radius: 15px;
  }
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-card {
  animation: fadeIn 0.6s ease forwards;
}

/* Custom Scrollbar */
.cart-items::-webkit-scrollbar,
.checkout-content::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track,
.checkout-content::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.cart-items::-webkit-scrollbar-thumb,
.checkout-content::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover,
.checkout-content::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Print Styles */
@media print {
  .header,
  .cart-sidebar,
  .checkout-modal,
  .mobile-nav {
    display: none !important;
  }

  .hero {
    background: none !important;
    color: black !important;
  }

  .book-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 6px 12px -2px rgb(0 0 0 / 0.3), 0 4px 8px -4px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 15px 30px -6px rgb(0 0 0 / 0.3), 0 8px 16px -8px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 30px 50px -10px rgb(0 0 0 / 0.3), 0 16px 32px -12px rgb(0 0 0 / 0.3);
  }

  .book-card,
  .cart-sidebar,
  .checkout-content {
    border: 2px solid var(--gray-800) !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* About Section */
.about-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-50) 100%);
}

:root[data-theme="dark"] .about-section {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
}

.about-header {
  text-align: center;
  margin-bottom: 4rem;
}

.about-header h2 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

:root[data-theme="dark"] .about-header h2 {
  color: var(--gray-900);
}

.about-header p {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

:root[data-theme="dark"] .about-header p {
  color: var(--gray-600);
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
}

.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.about-text h3 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

:root[data-theme="dark"] .about-text h3 {
  color: var(--gray-900);
}

.about-text h3 i {
  color: var(--primary-600);
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

:root[data-theme="dark"] .about-text p {
  color: var(--gray-700);
}

.story-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
}

.about-mission {
  margin-bottom: 5rem;
}

.about-mission h3 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

:root[data-theme="dark"] .about-mission h3 {
  color: var(--gray-900);
}

.about-mission h3 i {
  color: var(--primary-600);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.mission-item {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--gray-200);
}

:root[data-theme="dark"] .mission-item {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.mission-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.mission-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.mission-icon i {
  font-size: 2rem;
  color: white;
}

.mission-item h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

:root[data-theme="dark"] .mission-item h4 {
  color: var(--gray-900);
}

.mission-item p {
  color: var(--gray-600);
  line-height: 1.6;
}

:root[data-theme="dark"] .mission-item p {
  color: var(--gray-600);
}

.about-offerings {
  margin-bottom: 5rem;
}

.about-offerings h3 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

:root[data-theme="dark"] .about-offerings h3 {
  color: var(--gray-900);
}

.about-offerings h3 i {
  color: var(--accent-600);
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.offering-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--gray-200);
  text-align: center;
}

:root[data-theme="dark"] .offering-card {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.offering-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.offering-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.offering-icon i {
  font-size: 1.75rem;
  color: white;
}

.offering-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

:root[data-theme="dark"] .offering-card h4 {
  color: var(--gray-900);
}

.offering-card p {
  color: var(--gray-600);
  line-height: 1.6;
}

:root[data-theme="dark"] .offering-card p {
  color: var(--gray-600);
}

.about-stats {
  background: var(--gradient-primary);
  border-radius: 25px;
  padding: 3rem 2rem;
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-card {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-300);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary-100);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Categories Section */
.categories-section {
  padding: 6rem 0;
  background: white;
}

:root[data-theme="dark"] .categories-section {
  background: var(--gray-100);
}

.categories-header {
  text-align: center;
  margin-bottom: 4rem;
}

.categories-header h2 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

:root[data-theme="dark"] .categories-header h2 {
  color: var(--gray-900);
}

.categories-header p {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

:root[data-theme="dark"] .categories-header p {
  color: var(--gray-600);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--gray-200);
  text-align: center;
  cursor: pointer;
}

:root[data-theme="dark"] .category-card {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.category-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: white;
}

.category-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

:root[data-theme="dark"] .category-card h3 {
  color: var(--gray-900);
}

.category-card p {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

:root[data-theme="dark"] .category-card p {
  color: var(--gray-700);
}

.category-count {
  display: inline-block;
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

:root[data-theme="dark"] .category-count {
  background: var(--gray-300);
  color: var(--gray-900);
}

/* Bestsellers Section */
.bestsellers-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 100%);
}

:root[data-theme="dark"] .bestsellers-section {
  background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-100) 100%);
}

.bestsellers-header {
  text-align: center;
  margin-bottom: 3rem;
}

.bestsellers-header h2 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

:root[data-theme="dark"] .bestsellers-header h2 {
  color: var(--gray-900);
}

.bestsellers-header p {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

:root[data-theme="dark"] .bestsellers-header p {
  color: var(--gray-600);
}

.bestsellers-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.bestseller-filters {
  display: flex;
  gap: 1rem;
  background: white;
  padding: 0.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .bestseller-filters {
  background: var(--gray-200);
}

.bestseller-filter {
  padding: 0.875rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--gray-600);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

:root[data-theme="dark"] .bestseller-filter {
  color: var(--gray-700);
}

.bestseller-filter:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

:root[data-theme="dark"] .bestseller-filter:hover {
  background: var(--gray-300);
  color: var(--gray-900);
}

.bestseller-filter.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.bestsellers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.bestseller-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.4s ease;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  position: relative;
}

:root[data-theme="dark"] .bestseller-card {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.bestseller-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.bestseller-rank {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--gradient-accent);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.bestseller-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-secondary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.bestseller-cover {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  transition: transform 0.3s ease;
}

.bestseller-card:hover .bestseller-cover {
  transform: scale(1.05);
}

.bestseller-info {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.bestseller-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
  line-height: 1.4;
}

:root[data-theme="dark"] .bestseller-title {
  color: var(--gray-900);
}

.bestseller-author {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-style: italic;
  font-weight: 400;
}

:root[data-theme="dark"] .bestseller-author {
  color: var(--gray-600);
}

.bestseller-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 10px;
}

:root[data-theme="dark"] .bestseller-stats {
  background: var(--gray-200);
}

.bestseller-sales {
  font-size: 0.9rem;
  color: var(--success-500);
  font-weight: 600;
}

.bestseller-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-600);
  font-weight: 600;
}

.bestseller-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.bestseller-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success-500);
}

.bestseller-add-cart {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  white-space: nowrap;
}

.bestseller-add-cart:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.bestseller-add-cart:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Responsive Design for New Sections */
@media (max-width: 1024px) {
  .about-story {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-header h2,
  .categories-header h2,
  .bestsellers-header h2 {
    font-size: 2.5rem;
  }

  .mission-grid,
  .offerings-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .about-section,
  .categories-section,
  .bestsellers-section {
    padding: 4rem 0;
  }

  .about-header h2,
  .categories-header h2,
  .bestsellers-header h2 {
    font-size: 2rem;
  }

  .about-text h3,
  .about-mission h3,
  .about-offerings h3 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 2rem;
  }

  .bestseller-filters {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .categories-grid,
  .bestsellers-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 480px) {
  .about-section,
  .categories-section,
  .bestsellers-section {
    padding: 3rem 0;
  }

  .about-header h2,
  .categories-header h2,
  .bestsellers-header h2 {
    font-size: 1.75rem;
  }

  .mission-item,
  .offering-card,
  .category-card {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid,
  .bestsellers-grid {
    grid-template-columns: 1fr;
  }

  .bestseller-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .bestseller-add-cart {
    width: 100%;
    text-align: center;
  }
}
