/* ==========================================
   DISCOVERY.CSS - Landing & Catalog Pages (OPTIMIZED)
   Pages: home.html, featured_books.html, book_list.html
   Dependencies: core.css (must be loaded first)
   ========================================== */

/* ==========================================
   HOME PAGE - HERO SECTION
   ========================================== */

.bk-home-container {
  font-family: inherit;
}

.bk-hero {
  background: linear-gradient(135deg, #29325c 0%, #217ef7 100%);
  color: white;
  padding: var(--space-20) var(--space-5);
  margin-bottom: 5px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bk-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: 0.1;
}

.bk-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-16);
  position: relative;
  z-index: 1;
}

.bk-hero-text {
  text-align: left;
}

.bk-hero-title {
  font-size: clamp(var(--text-4xl), 6vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--space-5);
  line-height: 1.2;
}

.bk-hero-brand {
  background: linear-gradient(45deg, #ffd700, #ffed4a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bk-hero-subtitle {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-10);
  line-height: 1.6;
  opacity: 0.9;
  max-width: 500px;
}

.bk-hero-stats {
  display: flex;
  gap: var(--space-10);
  margin-bottom: var(--space-10);
  justify-content: flex-start;
}

.bk-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bk-hero-stat i {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-3);
  color: #ffd700;
}

.bk-stat-number {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 700;
  margin-bottom: var(--space-1);
  display: block;
  line-height: 1;
}

.bk-stat-label {
  font-size: var(--text-sm);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bk-hero-actions {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.bk-hero-visual {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}

.bk-floating-books {
  position: relative;
  width: 100%;
  height: 100%;
}

.bk-floating-book {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-4xl);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.bk-floating-book:hover {
  transform: scale(1.1);
}

.bk-book-1 {
  top: 20%;
  left: 10%;
  animation: float 6s ease-in-out infinite;
}

.bk-book-2 {
  top: 50%;
  right: 10%;
  animation: float 6s ease-in-out infinite reverse;
}

.bk-book-3 {
  bottom: 20%;
  left: 30%;
  animation: float 6s ease-in-out infinite;
  animation-delay: 2s;
}

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

/* ==========================================
   ENHANCED FILTERS CONTAINER
   ========================================== */

.bk-filters-container {
  background-color: white;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-1);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
  border: 1px solid var(--border-light);
}

.bk-filters-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-5);
}

/* Enhanced Search Filter */
.bk-search-filter {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.bk-search-filter input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  padding-left: var(--space-12);
  padding-right: var(--space-20);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: var(--text-base);
  transition: var(--transition);
  color: var(--text-color);
  background-color: #f9fafc;
}

.bk-search-filter::before {
  content: "🔍";
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-lg);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.bk-search-filter input:focus {
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.bk-search-filter input::placeholder {
  color: var(--text-light);
}

.bk-search-btn {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  padding: var(--space-2) var(--space-4);
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  height: 36px;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.bk-search-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-50%) scale(1.02);
}

/* Filter Groups */
.bk-filters-group {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.bk-genre-filter,
.bk-level-filter,
.bk-language-filter,
.bk-access-filter,
.bk-sort-filter {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 180px;
}

.bk-filters-group label {
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-color);
  font-size: var(--text-sm);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.bk-filters-group label i {
  color: var(--primary-color);
  font-size: var(--text-sm);
}

.bk-filters-group select {
  appearance: none;
  background-color: #f9fafc;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-8) var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-color);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 16px;
  transition: var(--transition);
  flex: 1;
  font-weight: 500;
  min-width: 140px;
}

.bk-filters-group select:hover {
  border-color: var(--border-dark);
  background-color: white;
}

.bk-filters-group select:focus {
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.bk-filters-group select:not([value=""]):not(:invalid) {
  border-left: 3px solid var(--primary-color);
  background-color: white;
}

/* Results Summary */
.bk-results-summary {
  background-color: #f8fafc;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
  border-left: 4px solid var(--primary-color);
}

.bk-results-summary p {
  margin: 0;
  color: var(--text-color);
  font-size: var(--text-base);
  line-height: 1.5;
}

.bk-results-summary strong {
  color: var(--primary-color);
  font-weight: 600;
}

.bk-clear-filters {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  margin-left: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: var(--text-sm);
}

.bk-clear-filters:hover {
  background-color: var(--primary-light);
  text-decoration: none;
  transform: translateY(-1px);
}

.bk-clear-filters i {
  font-size: var(--text-xs);
  transition: transform 0.2s ease;
}

.bk-clear-filters:hover i {
  transform: rotate(90deg);
}

/* ==========================================
   SEARCH SUGGESTIONS (ENHANCED)
   ========================================== */

.bk-search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
  display: none;
}

.bk-search-suggestions.show {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bk-suggestion-item {
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bk-suggestion-item:hover,
.bk-suggestion-item.selected {
  background: #f8fafc;
  border-left: 3px solid var(--primary-color);
}

.bk-suggestion-item:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.bk-suggestion-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.bk-suggestion-content strong {
  color: var(--text-color);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}

.bk-suggestion-content strong mark {
  background: var(--primary-light);
  color: var(--primary-color);
  padding: var(--space-1);
  border-radius: var(--radius-xs);
}

.bk-suggestion-content small {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.bk-suggestion-price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
  margin-left: var(--space-3);
}

.bk-suggestion-loading,
.bk-suggestion-empty {
  padding: var(--space-4) var(--space-5);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-style: italic;
}

.bk-suggestion-loading i {
  margin-right: var(--space-2);
  color: var(--primary-color);
}

/* ==========================================
   FEATURED BOOKS HEADER
   ========================================== */

.bk-featured-container {
  max-width: 1400px;
  margin: var(--space-5) auto;
  padding: var(--space-5);
}

.bk-featured-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #002955 100%);
  color: white;
  padding: var(--space-16) var(--space-10);
  margin-bottom: var(--space-10);
  position: relative;
  overflow: hidden;
}

.bk-featured-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-10);
  align-items: center;
  margin-top: var(--space-5);
}

.bk-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
  backdrop-filter: blur(10px);
}

.bk-featured-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  margin: 0 0 var(--space-5) 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.bk-featured-subtitle {
  font-size: var(--text-xl);
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: var(--space-8);
}

.bk-featured-stats {
  display: flex;
  gap: var(--space-10);
}

.bk-featured-stat {
  text-align: center;
}

.bk-featured-stat .bk-stat-number {
  display: block;
  font-size: var(--text-4xl);
  font-weight: 700;
  color: #ffd700;
  line-height: 1;
}

.bk-featured-stat .bk-stat-label {
  font-size: var(--text-sm);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--space-1);
}

.bk-floating-stars {
  position: relative;
  width: 200px;
  height: 200px;
}

.bk-floating-stars i {
  position: absolute;
  font-size: var(--text-2xl);
  color: #ffd700;
  animation: floatingStar 3s ease-in-out infinite;
}

.bk-star-1 { top: 20%; left: 20%; animation-delay: 0s; }
.bk-star-2 { top: 10%; right: 30%; animation-delay: 0.5s; }
.bk-star-3 { bottom: 30%; left: 10%; animation-delay: 1s; }
.bk-star-4 { bottom: 20%; right: 20%; animation-delay: 1.5s; }
.bk-star-5 { top: 50%; left: 50%; animation-delay: 2s; font-size: var(--text-4xl); }

@keyframes floatingStar {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-15px) rotate(180deg); opacity: 1; }
}

/* ==========================================
   CATEGORIES & NAVIGATION
   ========================================== */

.bk-categories-section {
  max-width: 1200px;
  margin: var(--space-16) auto;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.bk-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.bk-category-card {
  background: white;
  padding: var(--space-8) var(--space-5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-color);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.bk-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #0056b3);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.bk-category-card:hover {
  color: var(--primary-color);
  border-color: var(--border-light);
}


.bk-category-editors::before { background: linear-gradient(90deg, #ffd700, #ffed4a); }
.bk-category-trending::before { background: linear-gradient(90deg, #ff6b35, #ff8a50); }
.bk-category-new::before { background: linear-gradient(90deg, #28a745, #20c997); }
.bk-category-classics::before { background: linear-gradient(90deg, #6f42c1, #8a63d2); }

.bk-category-icon {
  font-size: var(--text-4xl);
  color: var(--primary-color);
  margin-bottom: var(--space-4);
  transition: var(--transition);
}

.bk-category-editors .bk-category-icon { color: #ffd700; }
.bk-category-trending .bk-category-icon { color: #ff6b35; }
.bk-category-new .bk-category-icon { color: #28a745; }
.bk-category-classics .bk-category-icon { color: #6f42c1; }

.bk-category-card:hover .bk-category-icon {
  transform: scale(1.1);
}

.bk-category-card h3 {
  margin: 0 0 var(--space-3) 0;
  color: var(--text-color);
  font-size: var(--text-xl);
}

.bk-category-card p {
  margin: 0 0 var(--space-3) 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.bk-category-count {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--background-light);
  border-radius: var(--radius-sm);
  color: var(--text-color);
  font-weight: 500;
  font-size: var(--text-sm);
}

.bk-category-arrow {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  opacity: 0;
  transition: var(--transition);
  color: var(--primary-color);
}

.bk-category-card:hover .bk-category-arrow {
  opacity: 1;
}

/* ==========================================
   FEATURED COLLECTIONS
   ========================================== */

.bk-featured-section,
.bk-recommendations-section,
.bk-popular-section,
.bk-recent-section {
  max-width: 1200px;
  margin: var(--space-16) auto;
  padding: 0 var(--space-5);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.bk-featured-section.section-visible,
.bk-recommendations-section.section-visible,
.bk-popular-section.section-visible,
.bk-recent-section.section-visible {
  opacity: 1;
  transform: translateY(0);
}

.bk-section-header {
  text-align: center;
  padding: var(--space-8) 0;
  margin-bottom: var(--space-10);
}

.bk-section-header h2 {
  font-size: var(--text-4xl);
  color: var(--text-color);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.bk-section-header p {
  color: var(--text-muted);
  font-size: var(--text-lg);
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.bk-featured-books,
.bk-recommended-books,
.bk-popular-books,
.bk-recent-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.bk-section-footer {
  text-align: center;
}

/* ==========================================
   FEATURED CONTROLS
   ========================================== */

.bk-featured-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: var(--space-5);
}

.bk-controls-left .bk-section-title {
  margin: 0;
  border: none;
  padding: 0;
}

.bk-book-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: var(--text-base);
  margin-left: var(--space-2);
}

.bk-filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.bk-genre-filter,
.bk-level-filter,
.bk-sort-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.bk-filter-group label {
  font-weight: 500;
  color: var(--text-color);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.bk-filter-group select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  min-width: 120px;
}

.bk-view-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-4);
}

.bk-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
}

.bk-view-btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.bk-view-btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.bk-view-btn:hover {
  background: var(--bg-hover);
  color: var(--text-color);
}

.bk-view-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.bk-view-btn.active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ==========================================
   FEATURED GRID ENHANCEMENTS
   ========================================== */

.bk-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-8);
}

.bk-featured-book-wrapper {
  position: relative;
}

.bk-featured-badge {
  position: absolute;
  top: -var(--space-3);
  right: -var(--space-1);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(135deg, #ffd700, #ffed4a);
  color: #8b6914;
  border-radius: var(--radius);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}

.bk-featured-info {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.bk-featured-reason {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-style: italic;
  color: var(--text-color);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.bk-featured-reason i {
  color: var(--primary-color);
  margin-top: var(--space-1);
  flex-shrink: 0;
}

.bk-featured-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.bk-featured-date,
.bk-featured-by {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ==========================================
   BENEFITS & CTA SECTIONS
   ========================================== */

.bk-benefits-section {
  background: var(--background-light);
  padding: var(--space-20) var(--space-5);
  margin: var(--space-16) 0;
}

.bk-benefits-section .bk-section-header {
  max-width: 1200px;
  margin: 0 auto var(--space-12) auto;
}

.bk-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
}

.bk-benefit-card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.bk-benefit-card:hover {
  border-color: var(--border-light);
}

.bk-benefit-icon {
  font-size: var(--text-4xl);
  color: var(--primary-color);
  margin-bottom: var(--space-5);
}

.bk-benefit-card h3 {
  margin: 0 0 var(--space-4) 0;
  color: var(--text-color);
  font-size: var(--text-2xl);
}

.bk-benefit-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.bk-cta-section,
.bk-upgrade-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  color: white;
  padding: var(--space-20) var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 100%;
}

.bk-cta-section::before,
.bk-upgrade-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: 0.1;
}

.bk-cta-content,
.bk-upgrade-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.bk-cta-content h2,
.bk-upgrade-content h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  font-weight: 700;
}

.bk-cta-content p,
.bk-upgrade-content p {
  font-size: var(--text-xl);
  margin-bottom: var(--space-10);
  opacity: 0.9;
  line-height: 1.6;
}

.bk-cta-actions,
.bk-upgrade-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.bk-cta-features,
.bk-upgrade-features {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  flex-wrap: wrap;
}

.bk-cta-feature,
.bk-upgrade-feature {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: white;
  font-weight: 500;
}

.bk-cta-feature i,
.bk-upgrade-feature i {
  color: #4CAF50;
  font-size: var(--text-lg);
}

/* ==========================================
   FEATURED BOOKS SPECIFIC SECTIONS
   ========================================== */

.bk-featured-categories {
  margin-bottom: var(--space-16);
}

.bk-featured-books-section {
  margin-bottom: var(--space-16);
}

.bk-selection-criteria {
  max-width: 1200px;
  margin: var(--space-16) auto;
  padding: 0 var(--space-5);
}

.bk-criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.bk-criteria-card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid transparent;
}

.bk-criteria-card:hover {
  border-color: var(--border-light);
}

.bk-criteria-icon {
  font-size: var(--text-4xl);
  color: var(--primary-color);
  margin-bottom: var(--space-5);
}

.bk-criteria-card h3 {
  margin: 0 0 var(--space-4) 0;
  color: var(--text-color);
  font-size: var(--text-xl);
  font-weight: 600;
}

.bk-criteria-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: var(--text-base);
}

.bk-featured-cta {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #002955 100%);
  color: white;
  padding: var(--space-20) var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: var(--space-16);
}

.bk-featured-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: 0.1;
}

.bk-cta-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.bk-cta-content h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  font-weight: 700;
}

.bk-cta-content p {
  font-size: var(--text-xl);
  margin-bottom: var(--space-10);
  opacity: 0.9;
  line-height: 1.6;
}

.bk-cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.bk-cta-newsletter {
  max-width: 600px;
  margin: 0 auto;
}

.bk-cta-newsletter h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.bk-cta-newsletter p {
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
  opacity: 0.8;
}

.bk-newsletter-form {
  display: flex;
  gap: var(--space-3);
  max-width: 400px;
  margin: 0 auto;
}

.bk-newsletter-form input[type="email"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: var(--text-base);
  backdrop-filter: blur(10px);
}

.bk-newsletter-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.bk-newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.bk-newsletter-form button {
  padding: var(--space-3) var(--space-5);
  background: white;
  color: var(--primary-color);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.bk-newsletter-form button:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.bk-newsletter-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================
   FEATURED BOOKS LIST VIEW
   ========================================== */

.bk-featured-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.bk-featured-list-item {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}

.bk-featured-list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.bk-list-cover {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 160px;
}

.bk-list-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.bk-list-placeholder {
  width: 100%;
  height: 100%;
  background: var(--background-light);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-2xl);
}

.bk-list-featured-badge {
  position: absolute;
  top: -var(--space-2);
  right: -var(--space-2);
  background: linear-gradient(135deg, #ffd700, #ffed4a);
  color: #8b6914;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.bk-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bk-list-header h3 {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.3;
}

.bk-list-authors {
  margin: 0 0 var(--space-4) 0;
  color: var(--text-muted);
  font-size: var(--text-base);
  font-style: italic;
}

.bk-list-reason {
  margin: 0 0 var(--space-4) 0;
  color: var(--text-color);
  font-size: var(--text-base);
  line-height: 1.5;
  font-style: italic;
}

.bk-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.bk-tag {
  padding: var(--space-1) var(--space-3);
  background: var(--background-light);
  color: var(--text-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.bk-tag-genre { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
.bk-tag-level { background: #f3e5f5; color: #7b1fa2; border-color: #ce93d8; }
.bk-tag-free { background: #e8f5e8; color: #2e7d32; border-color: #a5d6a7; }
.bk-tag-price { background: #fff3e0; color: #ef6c00; border-color: #ffcc02; }
.bk-tag-audio { background: #fce4ec; color: #c2185b; border-color: #f8bbd9; }

.bk-list-meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.bk-list-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-end;
  justify-content: space-between;
  min-width: 140px;
}

.bk-list-actions .bk-btn {
  width: 100%;
  text-align: center;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
}

/* ==========================================
   NO CONTENT STATES
   ========================================== */

.bk-no-books {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--background-light);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-color);
}

.bk-no-books-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.bk-no-books h3 {
  color: var(--text-color);
  margin-bottom: var(--space-3);
}

.bk-no-books p {
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.bk-no-featured {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-20) var(--space-8);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.bk-no-featured-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.bk-no-featured h3 {
  color: var(--text-color);
  margin-bottom: var(--space-3);
}

.bk-no-featured p {
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
  .bk-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-10);
  }
  
  .bk-hero-text {
    text-align: center;
  }
  
  .bk-hero-stats {
    justify-content: center;
  }
  
  .bk-hero-visual {
    order: -1;
    margin: 0 auto;
  }
  
  .bk-filters-container {
    padding: var(--space-4);
    margin-bottom: var(--space-6);
  }
  
  .bk-filters-form {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }
  
  .bk-search-filter {
    max-width: none;
    width: 100%;
    min-width: auto;
  }
  
  .bk-filters-group {
    flex-direction: column;
    gap: var(--space-4);
    width: 100%;
  }
  
  .bk-genre-filter,
  .bk-level-filter,
  .bk-language-filter,
  .bk-access-filter,
  .bk-sort-filter {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    width: 100%;
    min-width: auto;
  }
  
  .bk-filters-group select {
    width: 100%;
    min-width: auto;
  }
  
  .bk-featured-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .bk-featured-stats {
    justify-content: center;
  }
  
  .bk-categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  
  .bk-featured-books,
  .bk-recommended-books,
  .bk-popular-books,
  .bk-recent-books-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-6);
  }
  
  .bk-benefits-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .bk-cta-features,
  .bk-upgrade-features {
    flex-direction: column;
    gap: var(--space-5);
  }
}

@media (max-width: 480px) {
  .bk-hero {
    padding: var(--space-16) var(--space-4);
  }
  
  .bk-hero-stats {
    flex-direction: column;
    gap: var(--space-6);
  }
  
  .bk-hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .bk-hero-visual {
    width: 200px;
    height: 200px;
  }
  
  .bk-filters-container {
    padding: var(--space-3);
    margin-bottom: var(--space-5);
  }
  
  .bk-search-filter input {
    padding: var(--space-2) var(--space-3);
    padding-left: var(--space-8);
    padding-right: var(--space-16);
    font-size: var(--text-sm);
  }
  
  .bk-search-filter::before {
    left: var(--space-3);
    font-size: var(--text-base);
  }
  
  .bk-search-btn {
    right: var(--space-1);
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    height: 32px;
  }
  
  .bk-categories-grid {
    grid-template-columns: 1fr;
  }
  
  .bk-featured-books,
  .bk-recommended-books,
  .bk-popular-books,
  .bk-recent-books-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-5);
  }
}

/* ==========================================
   ACCESSIBILITY & MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  .bk-filters-container,
  .bk-search-suggestions,
  .bk-suggestion-item,
  .bk-category-card,
  .bk-benefit-card,
  .bk-featured-section,
  .bk-recommendations-section,
  .bk-popular-section,
  .bk-recent-section {
    animation: none;
    transition: none;
  }
  
  @keyframes float {
    0%, 100% { transform: none; }
  }
  
  @keyframes floatingStar {
    0%, 100% { transform: none; }
  }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
  .bk-search-suggestions {
    border: 2px solid #000;
  }
  
  .bk-suggestion-item:hover,
  .bk-suggestion-item.selected {
    background: #000;
    color: #fff;
  }
  
  .bk-suggestion-content strong mark {
    background: #ff0;
    color: #000;
  }
}

/* Dark Mode Preparation */
@media (prefers-color-scheme: dark) {
  .bk-search-suggestions {
    background: #1f2937;
    border-color: #374151;
  }
  
  .bk-suggestion-item {
    border-bottom-color: #374151;
  }
  
  .bk-suggestion-item:hover,
  .bk-suggestion-item.selected {
    background: #374151;
  }
  
  .bk-suggestion-content strong {
    color: #e5e7eb;
  }
  
  .bk-suggestion-content small {
    color: #9ca3af;
  }
  
  .bk-suggestion-loading,
  .bk-suggestion-empty {
    color: #9ca3af;
  }
}