:root {
  --accent-color: #ff9800;
  --accent-light: #ffb74d;
  --accent-dark: #f57c00;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-card: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 6px 16px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 160px;
  font-size: 14px;
}

.search-box button {
  border: none;
  background: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 16px;
}

/* Main Container */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - var(--header-height) - 200px);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto 24px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 24px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 16px;
}

.btn-primary {
  background: #fff;
  color: var(--accent-color);
}

.btn-primary:hover {
  background: var(--bg-secondary);
  color: var(--accent-dark);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-secondary:hover {
  background: #fff;
  color: var(--accent-color);
}

/* Section Title */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.featured-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.featured-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.featured-card-body {
  padding: 20px;
}

.featured-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.featured-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.featured-card .tag {
  display: inline-block;
  background: var(--accent-light);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  margin-top: 12px;
}

/* Content List */
.content-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  transition: background 0.3s;
}

.content-item:hover {
  background: var(--bg-secondary);
}

.content-item img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.content-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content-item h4 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.content-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-item-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Three Column Section */
.three-column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.column-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.column-box h3 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-light);
}

.column-box ul {
  list-style: none;
}

.column-box li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.column-box li:last-child {
  border-bottom: none;
}

.column-box a {
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-box a:hover {
  color: var(--accent-color);
}

.column-box .num {
  background: var(--accent-light);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 20px;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  color: var(--text-muted);
  margin: 0 8px;
}

.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Category Header */
.category-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.category-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.category-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  font-size: 14px;
  color: var(--text-muted);
}

.category-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.pagination a:hover {
  background: var(--accent-color);
  color: #fff;
}

.pagination .current {
  background: var(--accent-color);
  color: #fff;
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 16px;
}

/* Article Page */
.article-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 28px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-featured-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 22px;
  margin: 32px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent-color);
}

.article-content h3 {
  font-size: 18px;
  margin: 24px 0 12px;
  color: var(--accent-dark);
}

.article-content p {
  margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}

/* Product Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.specs-table th,
.specs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.specs-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  width: 30%;
}

.specs-table tr:hover td {
  background: var(--bg-secondary);
}

/* Related Grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.related-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s;
}

.related-card:hover {
  transform: translateY(-2px);
}

.related-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-card h4 {
  padding: 12px;
  font-size: 14px;
  color: var(--text-primary);
}

/* Two Column Section */
.two-column {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* 404 Page */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h1 {
  font-size: 28px;
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.error-page .btn {
  margin: 0 8px;
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: #fff;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--accent-light);
}

.footer-brand p {
  font-size: 14px;
  color: #aaa;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #fff;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #aaa;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #888;
}

/* Responsive */
@media (max-width: 992px) {
  .featured-grid,
  .three-column,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 16px;
    margin-top: 12px;
    overflow-x: auto;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .featured-grid,
  .three-column,
  .related-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .content-item {
    flex-direction: column;
  }

  .content-item img {
    width: 100%;
    height: 160px;
  }

  .article-container {
    padding: 24px;
  }

  .article-header h1 {
    font-size: 22px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .category-stats {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 12px;
  }

  .hero {
    padding: 32px 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 240px;
  }

  .pagination a,
  .pagination span {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}
