/* 品牌大全 - 专业现代样式 */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary: #0891b2;
  --secondary-dark: #0e7490;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --bg-gray: #f1f5f9;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.site-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-light);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.main-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.sidebar-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-nav, .ranking-nav {
  list-style: none;
}

.category-nav li {
  margin-bottom: 0.25rem;
}

.category-parent {
  margin-bottom: 0.5rem;
}

.category-link {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.category-link:hover {
  background: var(--bg-gray);
  color: var(--primary);
}

.category-children {
  list-style: none;
  margin-left: 1.5rem;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
}

.category-children li a {
  display: block;
  padding: 0.4rem 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.category-children li a:hover {
  background: var(--bg-gray);
  color: var(--primary);
}

.ranking-nav li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.95rem;
  transition: var(--transition);
}

.ranking-nav li a:hover,
.ranking-nav li a.active {
  background: var(--bg-gray);
  color: var(--primary);
}

.content {
  min-width: 0;
}

.hero {
  background: linear-gradient(135deg, var(--bg-white) 0%, #eef2ff 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hero h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

section h3 .icon {
  font-size: 1.25rem;
}

section h3 .count {
  font-size: 0.875rem;
  font-weight: normal;
  color: var(--text-muted);
  margin-left: auto;
}

.rankings-section {
  margin-bottom: 2.5rem;
}

.rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.ranking-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.ranking-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.ranking-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.ranking-card h4 a {
  color: var(--text);
}

.ranking-card h4 a:hover {
  color: var(--primary);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.rank-num {
  font-weight: 700;
  color: var(--primary);
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gray);
  border-radius: 6px;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.brand-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.brand-link {
  display: block;
}

.brand-card .brand-logo {
  width: 100%;
  height: 140px;
  object-fit: contain;
  padding: 1.5rem;
  background: var(--bg-gray);
}

.brand-info {
  padding: 1.25rem;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.brand-name .en-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.5rem;
}

.brand-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brand-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.brand-meta .category {
  color: var(--text-muted);
}

.brand-meta .hot-score {
  color: var(--accent);
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--bg-gray);
  color: var(--text-light);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-light);
}

.page-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-link {
  display: block;
}

.product-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gray);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  font-size: 3rem;
  opacity: 0.3;
}

.product-info {
  padding: 1rem;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-brand {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--danger);
}

.brand-detail {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.brand-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.brand-logo-lg {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg-gray);
  padding: 1rem;
  flex-shrink: 0;
}

.brand-header-info {
  flex: 1;
}

.brand-header-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.brand-desc-full {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.brand-products {
  margin-top: 2rem;
}

.brand-products h3 {
  margin-bottom: 1rem;
}

.brand-rankings {
  margin-top: 2rem;
}

.brand-rankings h3 {
  margin-bottom: 1rem;
}

.brand-rankings ul {
  list-style: none;
}

.brand-rankings li {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-light);
}

.brand-rankings li:last-child {
  border-bottom: none;
}

.brand-rankings a {
  color: var(--primary);
  font-weight: 500;
}

.brand-rankings small {
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.product-detail {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.product-detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.product-main-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg-gray);
}

.product-image-placeholder {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gray);
  border-radius: var(--radius);
  font-size: 4rem;
  opacity: 0.3;
}

.product-detail-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-detail-brand {
  color: var(--primary);
  margin-bottom: 1rem;
}

.product-detail-brand a:hover {
  text-decoration: underline;
}

.product-detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 1.5rem;
}

.product-specs {
  background: var(--bg-gray);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.product-specs h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.product-specs ul {
  list-style: none;
}

.product-specs li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text);
}

.product-specs li::before {
  content: '✓';
  color: var(--success);
  margin-right: 0.5rem;
  font-weight: bold;
}

.product-description h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.product-description p {
  color: var(--text-light);
  line-height: 1.8;
}

.ranking-detail {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.ranking-row:last-child {
  border-bottom: none;
}

.ranking-row:hover {
  background: var(--bg-gray);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gray);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.rank-number.top {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

.rank-number.top.rank-2 {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.rank-number.top.rank-3 {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.rank-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-gray);
  padding: 0.25rem;
  flex-shrink: 0;
}

.rank-info {
  flex: 1;
}

.rank-info h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.rank-info p {
  font-size: 0.875rem;
  color: var(--text-light);
}

.ranking-tips {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid #bae6fd;
}

.ranking-tips h3 {
  margin-bottom: 1rem;
  color: var(--text);
}

.ranking-tips ul {
  list-style: none;
  padding: 0;
}

.ranking-tips li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed #bae6fd;
  line-height: 1.6;
}

.ranking-tips li:last-child {
  border-bottom: none;
}

.rank-link {
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.rank-link:hover {
  background: var(--bg-gray);
}

.jd-buy-btn {
  background: linear-gradient(135deg, #e1251b, #ff3b3c) !important;
  color: white !important;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.jd-buy-btn:hover {
  background: linear-gradient(135deg, #c41e15, #e1251b) !important;
  transform: scale(1.05);
}

.site-footer {
  background: var(--text);
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #334155;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  text-align: center;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.update-time {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .main-nav {
    display: none;
  }
  
  .hero {
    padding: 2rem 1.5rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .stat-num {
    font-size: 1.75rem;
  }
  
  .brand-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .product-detail-header {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  
  .sidebar {
    grid-template-columns: 1fr;
  }
  
  .brands-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ranking-row {
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
  }
  
  .rank-info {
    width: 100%;
    order: 3;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand-card, .ranking-card, .product-card {
  animation: fadeIn 0.4s ease;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
  grid-column: 1 / -1;
}