/* ============================================================
   Thailysis - Pure CSS Styles
   ============================================================ */

/* CSS Variables */
:root {
  --color-primary: #ee4d2d;
  --color-primary-dark: #d73211;
  --color-text: #222;
  --color-text-light: #666;
  --color-text-muted: #999;
  --color-bg: #fff;
  --color-bg-gray: #f5f5f5;
  --color-border: #e0e0e0;
  --color-success: #26aa99;
  --color-warning: #ffbf00;
  --color-info: #2196f3;

  --font-thai: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Consolas', monospace;

  --max-width: 1000px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

/* Base */
html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: var(--font-thai);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.site-logo:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.logo-text {
  color: inherit;
}

.site-nav {
  display: flex;
  gap: var(--spacing-lg);
}

.site-nav a {
  color: var(--color-text-light);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s;
}

/* ============================================================
   Main
   ============================================================ */

.site-main {
  flex: 1;
  padding: var(--spacing-2xl) 0;
}

.main-home {
  padding: 0;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  text-align: center;
  padding: var(--spacing-2xl) 0;
  margin-bottom: var(--spacing-2xl);
  border-bottom: 1px solid var(--color-border);
}

.hero-title {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
}

.hero-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--color-text-light);
}

/* ============================================================
   Section Titles
   ============================================================ */

.section-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-primary);
}

.subsection-title {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin: var(--spacing-xl) 0 var(--spacing-md);
}

/* ============================================================
   Articles Grid
   ============================================================ */

.articles-section {
  margin-bottom: var(--spacing-2xl);
}

.featured-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

/* Article Card */
.article-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.article-card-featured {
  background: var(--color-bg-gray);
  border-color: var(--color-primary);
}

.article-type {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-bg-gray);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
}

.type-deep-analysis { background: #e3f2fd; color: #1565c0; }
.type-top-list { background: #fff3e0; color: #e65100; }
.type-comparison { background: #e8f5e9; color: #2e7d32; }
.type-category { background: #f3e5f5; color: #7b1fa2; }

.article-card .article-title {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.article-card .article-title a {
  color: var(--color-text);
}

.article-card .article-title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.article-link {
  display: inline-block;
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================================
   Data Source Section
   ============================================================ */

.data-source-section {
  background: var(--color-bg-gray);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
}

.data-note {
  margin-top: var(--spacing-lg);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Stats Grid
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  text-align: center;
}

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

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: var(--spacing-xs);
}

.stat-percentage {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Article Page
   ============================================================ */

.article {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.article .article-title {
  font-size: 2rem;
  line-height: 1.3;
  margin: var(--spacing-sm) 0;
}

.article-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.data-source-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--color-bg-gray);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: var(--spacing-md);
}

.badge-label {
  color: var(--color-text-muted);
}

.badge-value {
  font-weight: 600;
}

.badge-date {
  color: var(--color-text-muted);
}

/* ============================================================
   Content Sections
   ============================================================ */

.content-section {
  margin-bottom: var(--spacing-xl);
}

.section-heading {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.section-text {
  line-height: 1.8;
}

.section-insight {
  font-style: italic;
  color: var(--color-text-light);
  margin-top: var(--spacing-md);
  padding-left: var(--spacing-md);
  border-left: 3px solid var(--color-primary);
}

/* ============================================================
   Tables
   ============================================================ */

.table-wrapper {
  overflow-x: auto;
  margin: var(--spacing-md) 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background: var(--color-bg-gray);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--color-bg-gray);
}

/* ============================================================
   Rankings
   ============================================================ */

.ranking-list {
  list-style: none;
  counter-reset: ranking;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

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

.ranking-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9rem;
}

.ranking-name {
  flex: 1;
  font-weight: 500;
}

.ranking-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.ranking-extra {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Lists
   ============================================================ */

.content-list {
  padding-left: var(--spacing-lg);
  margin: var(--spacing-md) 0;
}

.content-list li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

/* ============================================================
   Callouts
   ============================================================ */

.callout {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  margin: var(--spacing-lg) 0;
}

.callout-heading {
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.callout-body {
  line-height: 1.6;
}

.callout-info {
  background: #e3f2fd;
  border-left: 4px solid var(--color-info);
}

.callout-warning {
  background: #fff8e1;
  border-left: 4px solid var(--color-warning);
}

.callout-insight {
  background: #e8f5e9;
  border-left: 4px solid var(--color-success);
}

/* ============================================================
   Article Footer
   ============================================================ */

.article-footer {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
}

.tags-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.tag {
  font-size: 0.8rem;
  background: var(--color-bg-gray);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
}

/* ============================================================
   Navigation
   ============================================================ */

.article-nav,
.page-nav {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.nav-back {
  color: var(--color-text-light);
}

/* ============================================================
   Page (Static Pages)
   ============================================================ */

.page {
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: var(--spacing-xl);
}

.page-title {
  font-size: 2rem;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: #1a1a2e;
  color: white;
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

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

.footer-brand .footer-logo:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--spacing-sm);
  font-size: 0.9rem;
}

.footer-links h4 {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-bottom: var(--spacing-sm);
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--spacing-sm);
}

.footer-copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: var(--spacing-md);
  }

  .site-nav.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .article .article-title {
    font-size: 1.5rem;
  }

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

  .ranking-item {
    flex-wrap: wrap;
  }

  .ranking-extra {
    width: 100%;
    margin-top: var(--spacing-xs);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    position: relative;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .article-meta {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   NEW HOME PAGE DESIGN
   ============================================================ */

/* Dark Hero */
.hero-dark {
  background: #0f172a;
  color: #fff;
  padding: 4rem 1rem 5rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title-large {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-dark .hero-subtitle {
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.hero-dark .hero-subtitle strong {
  color: #fff;
  font-weight: 500;
}

/* Search Box */
.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto 1rem;
}

.search-input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  outline: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.search-input:focus {
  box-shadow: 0 10px 40px rgba(238, 77, 45, 0.2);
}

.search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--color-primary-dark);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  margin-top: 0.5rem;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: #f8fafc;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-type {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.search-result-type.type-category {
  background: #dbeafe;
  color: #1d4ed8;
}

.search-result-type.type-subcategory {
  background: #e0e7ff;
  color: #4338ca;
}

.search-result-type.type-brand {
  background: #d1fae5;
  color: #059669;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-extra {
  font-size: 0.75rem;
  color: #94a3b8;
}

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: #94a3b8;
}

.hero-trending {
  font-size: 0.8rem;
  color: #64748b;
}

.hero-trending a {
  color: #94a3b8;
  text-decoration: underline;
}

.hero-trending a:hover {
  color: #fff;
}

/* Stats Overview Bar */
.stats-overview {
  background: #fff;
  margin-top: -2rem;
  position: relative;
  z-index: 10;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 1.5rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  padding: 0.5rem;
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

.stat-desc {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Home Content */
.home-content {
  padding: 3rem 1rem;
}

.section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.section-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.section-link {
  font-size: 0.9rem;
  color: #3b82f6;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-decoration: none;
}

.category-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-0 { background: #fce7f3; color: #db2777; }
.icon-1 { background: #dbeafe; color: #2563eb; }
.icon-2 { background: #ffedd5; color: #ea580c; }
.icon-3 { background: #f3e8ff; color: #9333ea; }
.icon-4 { background: #dcfce7; color: #16a34a; }

.category-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.category-card:hover .category-name {
  color: var(--color-primary);
}

.category-count {
  font-size: 0.8rem;
  color: #64748b;
}

.category-price {
  font-size: 0.8rem;
  color: #16a34a;
}

.category-card-more {
  background: #f8fafc;
  border-style: dashed;
  justify-content: center;
  align-items: center;
  color: #64748b;
  font-size: 0.9rem;
}

.category-card-more:hover {
  color: var(--color-primary);
}

/* Insights Grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.insight-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
}

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.insight-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.insight-badge {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.insight-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.insight-visual {
  flex-shrink: 0;
}

/* Pie Circle */
.pie-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-primary) calc(var(--percentage) * 1%),
    #e2e8f0 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pie-circle::before {
  content: '';
  width: 70px;
  height: 70px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
}

.pie-value {
  position: relative;
  z-index: 1;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.insight-bars {
  flex: 1;
}

.bar-item {
  margin-bottom: 0.75rem;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.bar-label span {
  color: #64748b;
}

.bar-label strong {
  color: #1e293b;
}

.bar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
}

.bar-orange {
  background: var(--color-primary);
}

.bar-gray {
  background: #94a3b8;
}

.bar-note {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* Discount Bars */
.discount-bars {
  margin-bottom: 1rem;
}

.discount-item {
  margin-bottom: 1rem;
}

.discount-label {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.discount-track {
  height: 20px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.discount-fill {
  height: 100%;
  border-radius: 10px;
  font-size: 0.7rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  font-weight: 500;
}

.fill-teal {
  background: #14b8a6;
}

.fill-teal-light {
  background: #5eead4;
  color: #0f766e;
}

.insight-callout {
  background: #f8fafc;
  border-left: 4px solid #14b8a6;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #475569;
  border-radius: 0 4px 4px 0;
}

.insight-link {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #3b82f6;
}

/* Leaderboard */
.leaderboard-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  text-align: left;
}

.leaderboard-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.leaderboard-table tbody tr:hover {
  background: #f8fafc;
}

.rank-cell {
  font-family: var(--font-mono);
  color: #64748b;
}

.brand-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #1e293b;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 50%;
}

.category-cell {
  color: #64748b;
  font-size: 0.9rem;
}

.count-cell {
  text-align: right;
  font-weight: 500;
  color: #16a34a;
}

.text-right {
  text-align: right;
}

.leaderboard-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
  text-align: center;
}

.leaderboard-footer a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #3b82f6;
}

/* Data Disclaimer Bar */
.data-disclaimer-bar {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 0;
  text-align: center;
}

.data-disclaimer-bar p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* Responsive for new design */
@media (max-width: 768px) {
  .hero-title-large {
    font-size: 1.5rem;
  }

  .stats-bar {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-item {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
  }

  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

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

  .insight-body {
    flex-direction: column;
  }

  .pie-circle {
    margin: 0 auto;
  }
}

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

  .insights-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CATEGORY PAGE DESIGN
   ============================================================ */

/* Breadcrumb Bar */
.breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: #64748b;
}

.breadcrumb-bar a {
  color: #64748b;
  transition: color 0.2s;
}

.breadcrumb-bar a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb-bar .separator {
  margin: 0 0.5rem;
}

.breadcrumb-bar .current {
  color: #1e293b;
  font-weight: 500;
}

/* Category Header */
.category-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 2.5rem 0;
}

.category-badge {
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
}

.badge-category {
  background: #fce7f3;
  color: #be185d;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2rem;
}

.category-title .title-suffix {
  color: #94a3b8;
  font-weight: 300;
  font-size: 1.5rem;
}

/* Header Stats */
.header-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.header-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.header-stat-card .stat-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.header-stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.header-stat-card .stat-price {
  color: #16a34a;
}

.header-stat-card .stat-percent {
  color: #ea580c;
}

.header-stat-card .stat-brand {
  color: var(--color-primary);
  font-size: 1.25rem;
}

/* Category Main Layout */
.category-main {
  background: #f8fafc;
  padding: 2rem 0;
}

.category-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

.category-content {
  min-width: 0;
}

.category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Content Sections */
.content-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1.25rem;
}

.section-title-icon svg {
  color: #94a3b8;
}

/* Subcategory List */
.subcategory-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.subcategory-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s;
}

.subcategory-item:first-child {
  border-top: 1px solid #f1f5f9;
}

.subcategory-item:hover {
  background-color: #f8fafc;
  text-decoration: none;
}

.subcategory-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.subcategory-item:nth-child(1) .subcategory-rank { background: #fef3c7; color: #d97706; }
.subcategory-item:nth-child(2) .subcategory-rank { background: #e2e8f0; color: #475569; }
.subcategory-item:nth-child(3) .subcategory-rank { background: #fed7aa; color: #c2410c; }

.subcategory-info {
  flex: 1;
  min-width: 0;
}

.subcategory-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subcategory-item:hover .subcategory-name {
  color: var(--color-primary);
}

.subcategory-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
}

.stat-divider {
  color: #cbd5e1;
}

.stat-item.text-warning {
  color: #d97706;
}

.subcategory-arrow {
  color: #cbd5e1;
  font-size: 1rem;
  transition: transform 0.15s, color 0.15s;
}

.subcategory-item:hover .subcategory-arrow {
  color: var(--color-primary);
  transform: translateX(3px);
}

.subcategory-meta {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.text-danger {
  color: #dc2626 !important;
  font-weight: 500;
}

.text-muted {
  color: #475569;
  font-weight: 500;
}

.view-all-link {
  margin-top: 1rem;
  text-align: center;
}

.view-all-link a {
  font-size: 0.9rem;
  color: #3b82f6;
}

/* Insight Box */
.insight-box {
  background: #fff;
  line-height: 1.8;
}

.insight-box .insight-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.75rem;
}

.insight-box p {
  color: #475569;
  margin: 0 0 0.75rem;
}

.insight-box p:last-child {
  margin-bottom: 0;
}

.insight-box strong {
  color: #1e293b;
}

/* Shipping Comparison */
.shipping-comparison {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.shipping-card {
  padding: 1.25rem;
  border-radius: 8px;
  text-align: center;
}

.shipping-china {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.shipping-local {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.shipping-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.shipping-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

.shipping-percent {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.shipping-price {
  font-size: 0.85rem;
  color: #16a34a;
  margin-top: 0.5rem;
  font-weight: 500;
}

.shipping-insight {
  background: #f8fafc;
  border-left: 4px solid #14b8a6;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #475569;
  border-radius: 0 4px 4px 0;
}

/* All Subcategories Grid */
.all-subcategories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.child-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.child-link:hover {
  background: #e2e8f0;
  text-decoration: none;
}

.child-link .child-name {
  color: #1e293b;
  font-size: 0.9rem;
}

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

.child-link .child-count {
  color: #64748b;
  font-size: 0.8rem;
}

/* Sidebar Widgets */
.sidebar-widget {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.widget-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}

.widget-header h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
  margin: 0;
}

.widget-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  text-align: center;
}

.widget-footer a {
  font-size: 0.8rem;
  color: #3b82f6;
}

/* Brand List */
.brand-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.brand-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

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

.brand-item .brand-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-rank {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
}

.brand-rank.rank-gold {
  color: #ca8a04;
}

.brand-rank.rank-orange {
  color: var(--color-primary);
}

.brand-item .brand-name {
  font-size: 0.9rem;
  color: #1e293b;
}

.brand-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.badge-trending {
  background: #dcfce7;
  color: #15803d;
}

.badge-mass {
  background: #f1f5f9;
  color: #64748b;
}

/* Quick Stats */
.quick-stats {
  padding: 0.5rem 0;
}

.quick-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.quick-stat:last-child {
  border-bottom: none;
}

.qs-label {
  font-size: 0.85rem;
  color: #64748b;
}

.qs-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
}

/* Alert Widget */
.widget-alert .widget-header {
  background: #fef2f2;
}

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

.alert-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
}

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

.alert-name {
  color: #1e293b;
}

.alert-percent {
  color: #dc2626;
  font-weight: 600;
}

/* Category Page Responsive */
@media (max-width: 1024px) {
  .category-layout {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-widget {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .header-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-title {
    font-size: 1.5rem;
  }

  .category-title .title-suffix {
    display: block;
    font-size: 1rem;
  }

  .subcategory-item {
    padding: 0.75rem;
  }

  .subcategory-stats {
    flex-wrap: wrap;
  }

  .shipping-comparison {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-stats {
    grid-template-columns: 1fr;
  }

  .all-subcategories-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-widget {
    min-width: 100%;
  }
}

/* ============================================================
   SUBCATEGORY PAGE DESIGN
   ============================================================ */

/* Subcategory Header (Dark) */
.subcategory-header {
  background: #1e293b;
  color: white;
  padding: 2rem 0;
}

.subcat-header-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .subcat-header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.subcat-header-main {
  flex: 1;
}

.badge-subcategory {
  background: #374151;
  color: #9ca3af;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.subcat-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.5rem 0 0;
}

.subcat-subtitle {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
  font-weight: 300;
}

.subcat-subtitle .highlight {
  color: white;
  font-weight: 500;
}

.subcat-header-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid #374151;
  padding-top: 1rem;
}

@media (min-width: 768px) {
  .subcat-header-stats {
    border-top: none;
    border-left: 1px solid #374151;
    padding-top: 0;
    padding-left: 2rem;
  }
}

.subcat-stat-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subcat-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.subcat-stat-value.stat-green {
  color: #4ade80;
}

.subcat-stat-value.stat-yellow {
  color: #fbbf24;
}

/* Subcategory Main */
.subcategory-main {
  background: #f8fafc;
  padding: 2rem 0;
}

/* Info Bar */
.info-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.info-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #475569;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
}

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

.info-tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #64748b;
}

/* Positioning Cards */
.positioning-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.pos-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.pos-card-grade {
  background: #f8fafc;
}

.pos-card-grade.grade-a {
  background: #f0fdf4;
  border-color: #86efac;
}

.pos-card-grade.grade-b {
  background: #fefce8;
  border-color: #fde047;
}

.pos-card-grade.grade-c {
  background: #fef2f2;
  border-color: #fca5a5;
}

.pos-grade {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 8px;
  background: white;
}

.grade-a .pos-grade { color: #16a34a; }
.grade-b .pos-grade { color: #ca8a04; }
.grade-c .pos-grade { color: #dc2626; }

.pos-card-china {
  background: #fff7ed;
  border-color: #fed7aa;
}

.pos-percent {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ea580c;
}

.pos-info {
  flex: 1;
}

.pos-label {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.pos-desc {
  font-size: 0.8rem;
  color: #64748b;
}

/* Market Report */
.market-report {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.report-header {
  background: #1e293b;
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.report-header svg {
  color: #fb923c;
}

.report-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

.report-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1.5rem;
}

@media (min-width: 1024px) {
  .report-body {
    grid-template-columns: 2fr 1fr;
  }
}

.report-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem;
}

.report-content p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.report-content a {
  color: #3b82f6;
}

.report-callout {
  background: #fff7ed;
  border-left: 4px solid #f97316;
  padding: 1rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1.5rem;
}

.report-callout h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #9a3412;
  margin: 0 0 0.5rem;
}

.report-callout ul {
  margin: 0;
  padding-left: 1.25rem;
}

.report-callout li {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.report-callout li:last-child {
  margin-bottom: 0;
}

.report-sidebar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
}

.report-sidebar h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

/* Price Distribution */
.price-dist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dist-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dist-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.dist-header span:first-child {
  color: #475569;
}

.dist-percent {
  font-weight: 700;
  color: #1e293b;
}

.dist-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}

.dist-fill {
  height: 100%;
  border-radius: 5px;
}

.fill-green { background: #22c55e; }
.fill-blue { background: #3b82f6; }
.fill-purple { background: #a855f7; }

.report-summary {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.summary-label {
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-value {
  font-weight: 700;
  color: #1e293b;
  margin-top: 0.25rem;
}

.text-red { color: #dc2626; }
.text-yellow { color: #ca8a04; }
.text-green { color: #16a34a; }

/* Price Comparison */
.price-compare-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.price-compare-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compare-label {
  font-size: 0.85rem;
  color: #64748b;
}

.compare-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.compare-value.primary {
  color: var(--color-primary);
}

.compare-bar {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.compare-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 6px;
}

.compare-fill.secondary {
  background: #94a3b8;
}

.compare-insight {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* Shipping in Subcategory */
.shipping-count {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.shipping-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  padding-top: 1rem;
}

/* Top Brands Widget (Subcategory) */
.top-brands-widget {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

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

.brand-ranking-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

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

.brand-rank {
  font-family: monospace;
  font-size: 0.85rem;
  color: #94a3b8;
  min-width: 24px;
}

.brand-rank.rank-gold {
  color: #f59e0b;
  font-weight: 600;
}

.brand-rank.rank-silver {
  color: #ee4d2d;
  font-weight: 600;
}

.brand-ranking-item .brand-name {
  flex: 1;
  font-size: 0.9rem;
  color: #1e293b;
}

.brand-ranking-item .brand-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.brand-ranking-item .badge-trending {
  background: #d1fae5;
  color: #059669;
}

.brand-ranking-item .badge-leader {
  background: #f1f5f9;
  color: #64748b;
}

.brand-widget-footer {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

.brand-widget-footer a {
  font-size: 0.8rem;
  color: #3b82f6;
  text-decoration: none;
}

.brand-widget-footer a:hover {
  text-decoration: underline;
}

/* Siblings Grid */
.siblings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

.sibling-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.sibling-link:hover {
  background: #e2e8f0;
  text-decoration: none;
}

.sibling-name {
  color: #1e293b;
  font-size: 0.9rem;
}

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

.sibling-count {
  color: #64748b;
  font-size: 0.8rem;
}

.back-link {
  margin-top: 1.5rem;
  text-align: center;
}

.back-link a {
  font-size: 0.9rem;
  color: #3b82f6;
}

/* Subcategory Responsive */
@media (max-width: 768px) {
  .subcat-title {
    font-size: 1.5rem;
  }

  .subcat-header-stats {
    gap: 1rem;
  }

  .subcat-stat-value {
    font-size: 1rem;
  }

  .positioning-cards {
    grid-template-columns: 1fr;
  }

  .pos-card {
    flex-direction: column;
    text-align: center;
  }

  .report-header h2 {
    font-size: 0.95rem;
  }

  .siblings-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Featured Products - Tabs & Product Cards
   ============================================================ */

.featured-products-section {
  margin-top: 2rem;
}

.section-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Product Tabs */
.product-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.product-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.product-tab:hover {
  color: #1e293b;
}

.product-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-icon {
  font-size: 1.1rem;
}

.tab-count {
  font-size: 0.8rem;
  color: #94a3b8;
}

.product-tab.active .tab-count {
  color: var(--color-primary);
}

/* Tab Content */
.product-tab-content {
  display: none;
}

.product-tab-content.active {
  display: block;
}

.tab-description {
  color: #64748b;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 3px solid var(--color-primary);
}

/* Product List */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Product Card */
.product-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.product-featured {
  border-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}

/* Product Badge */
.product-badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  border-radius: 0 0 6px 0;
}

.badge-best {
  background: #22c55e;
}

.badge-mall {
  background: #ef4444;
}

/* Product Image */
.product-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
}

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

.product-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Product Info */
.product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.product-title a {
  color: #1e293b;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
}

.product-rating {
  color: #eab308;
  font-weight: 500;
}

.product-thai {
  color: #22c55e;
}

.product-brand {
  font-size: 0.75rem;
  color: #3b82f6;
  margin-top: 0.25rem;
}

/* Product Price Section */
.product-price-section {
  flex-shrink: 0;
  min-width: 90px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

.product-original-price {
  font-size: 0.75rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.product-sale-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.product-discount {
  font-size: 0.7rem;
  color: #ef4444;
  background: #fef2f2;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-top: 0.15rem;
}

.product-cta {
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  color: var(--color-primary);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.product-cta:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ============================================================
   Shipping Pie Chart Section
   ============================================================ */

.shipping-pie-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.shipping-pie-visual {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.legend-china {
  background: var(--color-primary);
}

.legend-dot.legend-local {
  background: #22c55e;
}

.legend-label {
  color: #475569;
}

.shipping-pie-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar-green {
  background: #22c55e;
}

@media (max-width: 640px) {
  .shipping-pie-section {
    flex-direction: column;
    align-items: center;
  }

  .shipping-pie-visual {
    margin-bottom: 1rem;
  }

  .shipping-pie-bars {
    width: 100%;
  }
}

/* Featured Products Responsive */
@media (max-width: 640px) {
  .product-tabs {
    gap: 0.25rem;
  }

  .product-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .tab-icon {
    font-size: 1rem;
  }

  .product-card {
    padding: 0.75rem;
  }

  .product-image {
    width: 64px;
    height: 64px;
  }

  .product-title {
    font-size: 0.85rem;
  }

  .product-meta {
    font-size: 0.75rem;
  }

  .product-sale-price {
    font-size: 1rem;
  }

  .product-price-section {
    min-width: 75px;
  }
}

/* ============================================================
   Categories Page - Full Grid
   ============================================================ */

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

.category-full-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.category-full-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
  transform: translateY(-2px);
}

.category-full-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.category-full-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-full-icon.icon-0 { background: #fef3c7; color: #d97706; }
.category-full-icon.icon-1 { background: #dbeafe; color: #2563eb; }
.category-full-icon.icon-2 { background: #dcfce7; color: #16a34a; }
.category-full-icon.icon-3 { background: #fce7f3; color: #db2777; }
.category-full-icon.icon-4 { background: #f3e8ff; color: #9333ea; }

.category-full-info {
  flex: 1;
  min-width: 0;
}

.category-full-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.category-full-name-en {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.category-full-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: #fef3c7;
  color: #d97706;
}

.category-full-badge.badge-warning {
  background: #fee2e2;
  color: #dc2626;
}

.category-full-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.category-full-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-full-stat .stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.category-full-stat .stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.category-full-stat .stat-value.text-danger {
  color: #dc2626;
}

.category-full-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
}

.category-full-footer .view-link {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
}

/* High/Low China Categories */
.child-link-warning {
  border-color: #fecaca;
  background: #fef2f2;
}

.child-link-warning:hover {
  background: #fee2e2;
  border-color: #f87171;
}

.child-link-warning .child-count {
  color: #dc2626;
}

.child-link-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.child-link-success:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

.child-link-success .child-count {
  color: #16a34a;
}

@media (max-width: 640px) {
  .categories-full-grid {
    grid-template-columns: 1fr;
  }

  .category-full-card {
    padding: 1rem;
  }

  .category-full-icon {
    width: 40px;
    height: 40px;
  }

  .category-full-name {
    font-size: 1rem;
  }

  .category-full-stats {
    gap: 0.5rem;
  }
}

/* ============================================================
   Brands Page - Listing & Profile Styles
   ============================================================ */

/* Badge for Brands */
.badge-brand {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

/* Brands Grid */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* Brand Card */
.brand-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.brand-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.15);
  transform: translateY(-2px);
  text-decoration: none;
}

.brand-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #64748b;
  flex-shrink: 0;
}

.brand-info {
  flex: 1;
  min-width: 0;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.brand-category {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.brand-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.badge-official {
  background: var(--color-primary);
  color: white;
}

/* Brand Score Bar */
.brand-score-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.brand-score-bar .score-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.score-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.score-max {
  font-size: 0.85rem;
  color: #94a3b8;
}

.score-high { color: #10b981; }
.score-mid { color: #f59e0b; }
.score-low { color: #ef4444; }

/* Brand Stats */
.brand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand-stat {
  text-align: center;
}

.brand-stat .stat-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.brand-stat .stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.tier-budget { color: #10b981; }
.tier-mid { color: #3b82f6; }
.tier-premium { color: #8b5cf6; }

.brand-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.brand-footer .view-link {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
}

/* Brand Categories Accordion */
.brand-categories-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-category-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.brand-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.brand-category-header:hover {
  background: #f8fafc;
}

.brand-category-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-count {
  font-size: 0.85rem;
  font-weight: 400;
  color: #64748b;
}

.toggle-icon {
  color: #94a3b8;
  transition: transform 0.2s;
}

.brand-category-header.open .toggle-icon {
  transform: rotate(180deg);
}

.brand-category-content {
  display: none;
  padding: 0 1.25rem 1.25rem;
}

.brand-category-content.open {
  display: block;
}

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

.brand-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  border: 1px solid transparent;
}

a.brand-list-item {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

a.brand-list-item:hover {
  background: #f0fdf4;
  border-color: #86efac;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

a.brand-list-item .brand-list-name {
  color: #16a34a;
}

a.brand-list-item::after {
  content: '→';
  color: #86efac;
  font-size: 0.85rem;
  margin-left: auto;
}

.brand-list-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.brand-list-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-list-score {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.brand-list-sold {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.brand-list-item.no-profile {
  cursor: default;
  background: #f8fafc;
  color: #94a3b8;
}

.brand-list-item.no-profile .brand-list-name {
  color: #94a3b8;
}

.brand-list-item.no-profile .brand-list-sold {
  color: #cbd5e1;
}

.brand-list-item.no-profile:hover {
  background: #f8fafc;
  transform: none;
  box-shadow: none;
}

.brand-list-score.score-high { background: #d1fae5; color: #059669; }
.brand-list-score.score-mid { background: #fef3c7; color: #d97706; }
.brand-list-score.score-low { background: #fee2e2; color: #dc2626; }

.brand-list-official {
  color: var(--color-primary);
  font-size: 0.75rem;
}

.brand-list-more {
  padding: 0.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  background: #f1f5f9;
  border-radius: 6px;
}

/* Price Tier Cards */
.price-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.price-tier-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tier-icon {
  font-size: 1.5rem;
}

.tier-header h3 {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.tier-count {
  font-size: 0.75rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.tier-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.tier-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tier-brand-link {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  background: #f8fafc;
  border-radius: 4px;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s;
}

.tier-brand-link:hover {
  background: #e2e8f0;
  text-decoration: none;
}

.tier-budget { border-left: 3px solid #10b981; }
.tier-mid { border-left: 3px solid #3b82f6; }
.tier-premium { border-left: 3px solid #8b5cf6; }

/* Origin Comparison */
.origin-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.origin-column {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.origin-china { border-top: 3px solid #ef4444; }
.origin-thai { border-top: 3px solid #10b981; }

.origin-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.origin-flag {
  font-size: 1.25rem;
}

.origin-brands {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.origin-brand-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.origin-brand-link:hover {
  background: #f1f5f9;
  text-decoration: none;
}

.origin-brand-link .brand-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.china-ratio {
  font-size: 0.75rem;
  color: #ef4444;
  background: #fee2e2;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.thai-ratio {
  font-size: 0.75rem;
  color: #10b981;
  background: #d1fae5;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* ============================================================
   Brand Profile Page
   ============================================================ */

.brand-profile-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 2rem 0;
}

.brand-profile-top {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.brand-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #f8fafc);
  border: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #64748b;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.brand-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge-official-large {
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-top-seller {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.badge-tier-budget { background: #d1fae5; color: #059669; }
.badge-tier-mid { background: #dbeafe; color: #2563eb; }
.badge-tier-premium { background: #ede9fe; color: #7c3aed; }

.brand-profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.brand-profile-desc {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  max-width: 600px;
}

.brand-profile-score {
  text-align: center;
  background: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  min-width: 140px;
}

.brand-profile-score .score-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.score-circle {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.score-circle .score-number {
  display: inline;
}

.score-circle .score-max {
  font-size: 1rem;
  font-weight: 400;
}

.score-circle.score-high .score-number { color: #10b981; }
.score-circle.score-mid .score-number { color: #f59e0b; }
.score-circle.score-low .score-number { color: #ef4444; }

.score-based {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* Brand Profile Stats */
.brand-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
}

.brand-stat-card {
  text-align: center;
}

.brand-stat-card .stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.25rem;
}

.brand-stat-card .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.stat-category {
  font-size: 1rem !important;
}

.stat-compare {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.compare-good { color: #10b981; }
.compare-bad { color: #ef4444; }

.stat-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.wide-range-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 0.375rem;
  vertical-align: middle;
}

/* Brand Profile Main Grid */
.brand-profile-main {
  padding: 2rem 0;
}

.brand-profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
}

/* Sidebar */
.brand-profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand-analysis-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.analysis-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.analysis-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: -0.5rem 0 1rem 0;
}

.analysis-note {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* Price Position Bar */
.price-position-bar {
  margin-bottom: 1rem;
}

.position-track {
  position: relative;
  height: 8px;
  background: linear-gradient(to right, #10b981, #f59e0b, #ef4444);
  border-radius: 4px;
  margin: 1.5rem 0 0.5rem;
}

.position-marker {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.marker-dot {
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  margin-top: 15px;
}

.marker-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.position-avg {
  position: absolute;
  top: -8px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avg-line {
  width: 1px;
  height: 24px;
  background: #64748b;
}

.avg-label {
  font-size: 0.65rem;
  color: #64748b;
  white-space: nowrap;
  margin-top: 2px;
}

.position-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* Category Breakdown */
.category-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.breakdown-name {
  color: #475569;
}

.breakdown-pct {
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 0 0.4rem;
  border-radius: 4px;
}

.breakdown-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  border-radius: 3px;
}

.fill-0 { background: #3b82f6; }
.fill-1 { background: #8b5cf6; }
.fill-2 { background: #ec4899; }
.fill-3 { background: #f59e0b; }
.fill-4 { background: #10b981; }

/* Product Lines Table */
.product-lines-table {
  overflow-x: auto;
}

.lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.lines-table th,
.lines-table td {
  padding: 0.5rem 0.4rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.lines-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.line-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.line-link {
  color: #3b82f6;
  text-decoration: none;
}

.line-link:hover {
  text-decoration: underline;
  color: #2563eb;
}

.line-count {
  text-align: center;
  color: #64748b;
}

.line-price {
  text-align: right;
  font-weight: 500;
  color: #334155;
}

.line-vs-market {
  text-align: right;
  font-weight: 600;
  font-size: 0.8rem;
}

.vs-lower {
  color: #10b981;
}

.vs-higher {
  color: #ef4444;
}

.lines-more {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  margin: 0.75rem 0 0 0;
}

/* Badge for Shop Count */
.badge-shops {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Competitors */
.competitors-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.competitor-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.competitor-link:hover {
  background: #f1f5f9;
  text-decoration: none;
}

.competitor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.competitor-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

/* Official Shop Info */
.official-shop-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fef2f2;
  border-radius: 8px;
}

.official-badge {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.official-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
}

/* Top Products */
.products-header {
  margin-bottom: 1.25rem;
}

.top-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.product-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  background: #f8fafc;
  overflow: hidden;
}

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

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

.product-rating {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #fbbf24;
  color: #1e293b;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.product-info {
  padding: 0.75rem;
}

.product-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.product-sold {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Brand Summary */
.brand-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.brand-summary-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.summary-content p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 0.75rem 0;
}

.summary-content p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Brand Insights Components
   ============================================================ */

/* Shop Comparison (Official vs Regular) */
.shop-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.shop-compare-box {
  border-radius: 8px;
  padding: 0.75rem;
}

.shop-compare-box.official {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
}

.shop-compare-box.regular {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
}

.shop-compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.shop-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.official-badge {
  background: #22c55e;
  color: white;
}

.regular-badge {
  background: #94a3b8;
  color: white;
}

.shop-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
}

.shop-compare-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.compare-stat {
  display: flex;
  flex-direction: column;
}

.compare-stat .stat-label {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.compare-stat .stat-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

/* Top Shops List */
.top-shops-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.top-shop-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 8px;
}

.shop-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.shop-info {
  flex: 1;
  min-width: 0;
}

.shop-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-official-tag {
  font-size: 0.6rem;
  background: #22c55e;
  color: white;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.shop-meta {
  font-size: 0.7rem;
  color: #64748b;
  display: flex;
  gap: 0.5rem;
}

.shop-avg-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

/* Price Distribution Bars */
.price-dist-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-dist-item {
  display: grid;
  grid-template-columns: 70px 1fr 80px;
  gap: 0.5rem;
  align-items: center;
}

.price-range-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
}

.price-dist-bar-container {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.price-dist-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.price-dist-count {
  font-size: 0.7rem;
  color: #64748b;
  text-align: right;
}

/* Product Classification (Main vs Accessory) */
.classification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.class-box {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
}

.class-box.main-product {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
}

.class-box.accessory {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fde047;
}

.class-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.25rem;
}

.class-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.class-pct {
  font-size: 0.9rem;
  font-weight: 600;
  color: #667eea;
}

.class-price {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Responsive Brand Pages */
@media (max-width: 900px) {
  .brand-profile-grid {
    grid-template-columns: 1fr;
  }

  .brand-profile-sidebar {
    order: 2;
  }

  .brand-profile-content {
    order: 1;
  }
}

@media (max-width: 768px) {
  .brand-profile-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand-profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .brand-profile-badges {
    justify-content: center;
  }

  .brand-profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .price-tier-grid {
    grid-template-columns: 1fr;
  }

  .origin-comparison {
    grid-template-columns: 1fr;
  }

  .brands-grid {
    grid-template-columns: 1fr;
  }

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

/* ============================================
   Product Line Page Styles
   ============================================ */

.product-line-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 2rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.product-line-top {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.product-line-info {
  flex: 1;
}

.product-line-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0.5rem 0;
}

.product-line-desc {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

.product-line-desc strong {
  color: #1e293b;
}

.product-line-main {
  padding: 2rem 0;
}

.product-line-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
}

.badge-brand {
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
}

.badge-brand:hover {
  background: #2563eb;
}

.badge-cheap {
  background: #10b981;
  color: #fff;
}

.badge-premium {
  background: #f59e0b;
  color: #fff;
}

/* Other Lines List */
.other-lines-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.other-lines-list li {
  padding: 0.375rem 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.other-line-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #475569;
  text-decoration: none;
  font-size: 0.875rem;
}

.other-line-link:hover {
  color: #3b82f6;
}

.line-count {
  color: #94a3b8;
  font-size: 0.75rem;
}

.view-all-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #3b82f6;
  font-size: 0.875rem;
  text-decoration: none;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* Top Shops List */
.top-shops-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.top-shop-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

.top-shop-item:last-child {
  border-bottom: none;
}

.shop-rank {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.top-shop-item:first-child .shop-rank {
  background: #fef3c7;
  color: #d97706;
}

.shop-name {
  flex: 1;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-badge {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.shop-sold {
  color: #94a3b8;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Price Compare Bars */
.price-compare-bar {
  position: relative;
  height: 24px;
  background: #f1f5f9;
  border-radius: 4px;
  margin: 0.5rem 0;
  overflow: hidden;
}

.price-compare-bar .price-compare-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
}

.price-compare-bar.market .price-compare-fill {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.price-compare-label {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #1e293b;
  font-weight: 500;
}

/* Price Range Visualization */
.price-range-viz {
  padding: 2rem 0;
}

.price-range-bar {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  border-radius: 4px;
  margin: 3rem 0;
}

.price-marker {
  position: absolute;
  top: -2.5rem;
  transform: translateX(-50%);
  text-align: center;
}

.price-marker.min {
  left: 0;
  transform: translateX(0);
  text-align: left;
}

.price-marker.max {
  left: 100%;
  transform: translateX(-100%);
  text-align: right;
}

.marker-value {
  display: block;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
}

.marker-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.no-products {
  color: #64748b;
  font-style: italic;
  padding: 2rem;
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .product-line-grid {
    grid-template-columns: 1fr;
  }

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

/* Brands & Shops Grid */
.brands-shops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.brands-shops-grid .content-section {
  margin-bottom: 0;
}

.badge-top-rated {
  background: #fef3c7;
  color: #d97706;
}

.badge-official {
  background: #dbeafe;
  color: #2563eb;
}

@media (max-width: 768px) {
  .brands-shops-grid {
    grid-template-columns: 1fr;
  }
}

