/* Modern Clean SEO Ebook Stylesheet */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0f172a;
  --accent: #16a34a;
  --accent-light: #dcfce7;
  --accent-badge: #ea580c;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #334155;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.logo span {
  color: var(--primary);
}

.logo-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-btn {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 700px;
  margin: 0 auto 30px;
}

/* Search and Filters */
.controls-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: -30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 6px;
}

.filter-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.results-stats {
  margin-top: 15px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Product Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.book-card-thumb {
  background: #f1f5f9;
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.book-card:hover .book-card-thumb img {
  transform: scale(1.03);
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-badge);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

.book-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-sale {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}

.price-reg {
  font-size: 0.8rem;
  text-decoration: line-through;
  color: var(--text-muted);
}

.card-btn {
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.card-btn:hover {
  background: var(--primary-hover);
  color: #fff;
}

/* Individual Book / Article Page */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 20px 0;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.article-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.book-sidebar {
  position: sticky;
  top: 92px;
}

.sticky-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.sidebar-cover {
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.sidebar-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-price-tag {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.sidebar-sale {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.sidebar-reg {
  font-size: 1.1rem;
  text-decoration: line-through;
  color: var(--text-muted);
}

.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #16a34a;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.cta-button:hover {
  background: #15803d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

.guarantee-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.guarantee-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Article Content */
.article-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.article-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #1e293b;
  margin-bottom: 24px;
  padding: 18px 24px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-content p {
  margin-bottom: 16px;
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.75;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.tag-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.15s ease;
}

.tag-pill:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.spec-table th, .spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.95rem;
}

.spec-table th {
  background: #f8fafc;
  width: 35%;
  font-weight: 600;
  color: var(--text-muted);
}

/* Related Section */
.related-section {
  margin: 60px 0;
}

.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-heading);
}

/* Footer */
footer.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 24px;
  border-top: 1px solid #1e293b;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 36px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-col p {
  max-width: 350px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 860px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  
  .book-sidebar {
    position: static;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .article-content {
    padding: 24px;
  }
}
