/*
Theme Name: SachVui Pro
Description: Modern, secure ebook download theme
Version: 2.0.0
Author: Claude AI
License: GPL v2 or later
Text Domain: sachvui-pro
Requires PHP: 8.0
*/

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

html, body {
  background-color: #fff !important;
  color: #333 !important;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 14px;
  line-height: 1.42857143;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  background-color: #fff !important;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.site-logo {
  flex-shrink: 0;
}

.logo-icon {
  font-size: 32px;
  background: linear-gradient(45deg, #4CAF50, #2196F3);
  width: 50px;
  height: 50px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-navigation {
  flex: 1;
  margin: 0 30px;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
  justify-content: center;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  color: #337ab7;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  display: block;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: #23527c;
}

.header-search {
  flex-shrink: 0;
}

.header-search .search-form {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.header-search .search-field {
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  width: 200px;
  outline: none;
}

.header-search .search-submit {
  background: #337ab7;
  border: none;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.header-search .search-submit:hover {
  background: #23527c;
}

/* Notice Banner */
.notice-banner {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 20px;
  margin: 20px auto;
  text-align: center;
  max-width: 1200px;
}

.notice-content p {
  margin: 0 0 15px 0;
  color: #155724;
  line-height: 1.5;
}

.notice-content p:last-of-type {
  margin-bottom: 20px;
}

.notice-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-zalo {
  background: #ff9500;
  color: white;
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-zalo:hover {
  background: #e6850e;
  color: white;
}

.btn-telegram {
  background: #0088cc;
  color: white;
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-telegram:hover {
  background: #006699;
  color: white;
}

/* Hero Section */
.hero-section {
  background: #e9ecef;
  padding: 40px 30px;
  margin: 20px auto;
  text-align: center;
  border-radius: 6px;
  max-width: 1200px;
}

.hero-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: #333;
  font-weight: 600;
}

.hero-description {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

.hero-link {
  color: #337ab7;
  text-decoration: none;
  background: #337ab7;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
  margin-left: 10px;
  transition: background-color 0.2s ease;
}

.hero-link:hover {
  background: #23527c;
  color: white;
}

/* Categories Grid */
.categories-section {
  margin: 30px auto;
  max-width: 1200px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
  margin: 0;
}

.category-item {
  display: block;
}

.category-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #337ab7;
  font-size: 14px;
  transition: all 0.2s ease;
}

.category-link:hover {
  background: #f8f9fa;
  border-color: #337ab7;
}

.category-icon {
  font-size: 16px;
  color: #337ab7;
}

/* Content with Sidebar Layout */
.content-with-sidebar {
  display: flex;
  gap: 30px;
  margin: 20px auto;
  max-width: 1200px;
}

.main-content-area {
  flex: 1;
  min-width: 0;
}

.category-sidebar,
.single-sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* Category Page */
.category-header {
  background: #337ab7;
  color: white;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.category-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.books-grid-category {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.book-item {
  text-align: center;
}

.book-item .book-cover {
  margin-bottom: 10px;
}

.book-item .book-cover img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.book-placeholder {
  width: 100%;
  height: 200px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.book-item .book-title {
  font-size: 13px;
  line-height: 1.3;
  margin: 0;
}

.book-item .book-title a {
  color: #333;
  text-decoration: none;
}

.book-item .book-title a:hover {
  color: #337ab7;
}

/* Single Book Page */
.book-header-section {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.book-cover-container {
  flex-shrink: 0;
  width: 150px;
}

.book-cover-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.book-info-section {
  flex: 1;
}

.book-edit {
  text-align: right;
  margin-bottom: 10px;
}

.book-edit a {
  color: #337ab7;
  text-decoration: none;
  font-size: 12px;
}

.book-title {
  color: #337ab7;
  font-size: 20px;
  margin: 0 0 15px 0;
  font-weight: 600;
}

.book-meta p {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
}

.category-link {
  color: #337ab7;
  text-decoration: none;
}

.category-link:hover {
  text-decoration: underline;
}

.download-info {
  margin: 15px 0;
  padding: 10px;
  background: #e7f3ff;
  border-radius: 4px;
}

.download-notice {
  font-size: 14px;
  margin-bottom: 10px;
}

.btn-buy {
  background: #337ab7;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
}

.btn-buy:hover {
  background: #23527c;
  color: white;
}

.download-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.btn-format {
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  color: white;
}

.btn-pdf {
  background: #dc3545;
}

.btn-epub {
  background: #28a745;
}

.btn-mobi {
  background: #ffc107;
  color: #000;
}

.btn-read {
  background: #17a2b8;
}

.btn-format:hover {
  opacity: 0.9;
  color: white;
}

/* Sidebar */
.sidebar-widget {
  background: #337ab7;
  color: white;
  margin-bottom: 20px;
  border-radius: 4px;
  overflow: hidden;
}

.widget-title {
  background: #337ab7;
  color: white;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.social-links {
  padding: 15px;
  font-size: 13px;
}

.social-link {
  color: white;
  text-decoration: none;
}

.social-link:hover {
  text-decoration: underline;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 0.2s ease;
}

.category-list a:hover {
  background: rgba(255,255,255,0.1);
}

.category-icon {
  font-size: 12px;
}

/* Footer */
.site-footer {
  background: #f8f9fa;
  border-top: 1px solid #e5e5e5;
  padding: 30px 0 20px 0;
  margin-top: 40px;
  color: #777;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #e5e5e5;
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-action {
  margin-bottom: 20px;
}

.btn-footer-action {
  background: #dc3545;
  color: white;
  padding: 15px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  line-height: 1.2;
  display: inline-block;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-footer-action:hover {
  background: #c82333;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.footer-copyright {
  color: #666;
  font-size: 14px;
}

.footer-copyright p {
  margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
  .books-grid-category {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .content-with-sidebar {
    flex-direction: column;
  }
  
  .category-sidebar,
  .single-sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .books-grid-category {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .main-navigation {
    margin: 0;
    order: 2;
  }
  
  .header-search {
    order: 1;
    margin-bottom: 10px;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0;
    text-align: center;
  }
  
  .book-header-section {
    flex-direction: column;
    text-align: center;
  }
  
  .book-cover-container {
    width: 200px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .books-grid-category,
  .categories-grid {
    grid-template-columns: 1fr;
  }
}