.hero {
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) var(--pad) clamp(2rem, 5vw, 3rem);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.95;
  max-width: 600px;
  margin-inline: auto;
}

.storebadges-hero {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.storebadges-hero a {
  display: inline-flex;
  line-height: 0;
}

.storebadges-hero img {
  height: 40px;
  width: auto;
  display: block;
}

.search-section {
  max-width: var(--measure);
  margin: 0 auto 2rem;
  padding: 0 var(--pad);
}

.search-box {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.search-box:focus {
  outline: none;
  border-color: #667eea;
}

.filter-section {
  max-width: var(--measure);
  margin: 0 auto 1.5rem;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

.language-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lang-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: #f5f5f5;
  border-color: #667eea;
}

.lang-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad) 3rem;
}

.book-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.book-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.book-card h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: #111;
  flex: 1;
}

.lang-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  background: #f0f0f0;
  color: #666;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.book-card .author {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
}

.book-card .description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
  flex-grow: 1;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem var(--pad) 3rem;
  max-width: var(--measure);
  margin: 0 auto;
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.page-info {
  padding: 0.5rem 1rem;
  color: #666;
  font-size: 0.95rem;
}

.no-results {
  text-align: center;
  padding: 3rem var(--pad);
  color: #666;
  font-size: 1.1rem;
  grid-column: 1 / -1;
  width: 100%;
}

.results-count {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  padding: 0 var(--pad) 1rem;
}

@media (prefers-color-scheme: dark) {
  .hero {
    background: linear-gradient(135deg, #4a5a9a 0%, #5a3b72 100%);
  }
  
  .search-box {
    background: #1a1a1a;
    border-color: #333;
    color: #eee;
  }
  
  .search-box:focus {
    border-color: #667eea;
  }

  .filter-label {
    color: #bbb;
  }

  .lang-btn {
    background: #1a1a1a;
    border-color: #333;
    color: #bbb;
  }

  .lang-btn:hover {
    background: #2a2a2a;
    border-color: #667eea;
  }

  .lang-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
  }
  
  .book-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
  }
  
  .book-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  }
  
  .book-card h2 {
    color: #eee;
  }

  .lang-badge {
    background: #2a2a2a;
    color: #aaa;
  }
  
  .book-card .author {
    color: #aaa;
  }
  
  .book-card .description {
    color: #bbb;
  }
  
  .page-btn {
    background: #1a1a1a;
    border-color: #333;
    color: #eee;
  }
  
  .page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
  }
  
  .page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
  }
}

@media (max-width: 640px) {
  .book-grid {
    grid-template-columns: 1fr;
  }
  
  .storebadges-hero img {
    height: 36px;
  }
}

