/*
Theme Name: TopViet Pro
Theme URI: https://topviet.pro
Author: TopViet Team
Description: Nền tảng xếp hạng, toplist và bình chọn uy tín tại Việt Nam. Theme được thiết kế dành riêng cho TopViet.pro với đầy đủ tính năng: Toplist, Địa điểm, Khu vực, Bình chọn, Đề cử và Bảng xếp hạng.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: topviet
Tags: toplist, ranking, vietnam, places, reviews
*/

/* ============================================================
   TOPVIET PRO - CSS DESIGN SYSTEM
   Brand: #E8272A (đỏ chủ đạo), #FF6B35 (cam accent)
   Neutral: #1A1A1A, #333, #666, #999, #DDD, #F5F5F5, #FFF
   ============================================================ */

:root {
  /* Brand Colors */
  --tv-red:        #E8272A;
  --tv-red-dark:   #C41E21;
  --tv-red-light:  #FF4144;
  --tv-orange:     #FF6B35;
  --tv-gold:       #F5A623;
  --tv-gold-dark:  #D4891A;

  /* Rank Colors */
  --rank-1: #E8272A;
  --rank-2: #FF8C00;
  --rank-3: #F5A623;
  --rank-4: #666;
  --rank-5: #666;

  /* Neutrals */
  --tv-dark:       #1A1A1A;
  --tv-text:       #333333;
  --tv-text-muted: #666666;
  --tv-text-light: #999999;
  --tv-border:     #E0E0E0;
  --tv-border-light: #F0F0F0;
  --tv-bg:         #F5F5F5;
  --tv-bg-card:    #FFFFFF;
  --tv-white:      #FFFFFF;

  /* Typography */
  --font-primary:  'Be Vietnam Pro', 'Roboto', sans-serif;
  --font-size-xs:  12px;
  --font-size-sm:  13px;
  --font-size-base:14px;
  --font-size-md:  15px;
  --font-size-lg:  16px;
  --font-size-xl:  18px;
  --font-size-2xl: 22px;
  --font-size-3xl: 28px;
  --font-size-4xl: 36px;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 48px;

  /* Border Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 2px 8px rgba(0,0,0,.10);
  --shadow-lg:  0 4px 20px rgba(0,0,0,.12);
  --shadow-xl:  0 8px 32px rgba(0,0,0,.15);

  /* Transitions */
  --transition: .2s ease;

  /* Layout */
  --container-width: 1200px;
  --sidebar-width:   300px;
  --header-height:   60px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  color: var(--tv-text);
  background: var(--tv-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tv-red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--tv-red-dark); }

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

ul, ol { list-style: none; }

button { cursor: pointer; font-family: var(--font-primary); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: var(--font-size-3xl); font-weight: 700; line-height: 1.3; }
h2 { font-size: var(--font-size-2xl); font-weight: 700; line-height: 1.35; }
h3 { font-size: var(--font-size-xl); font-weight: 600; line-height: 1.4; }
h4 { font-size: var(--font-size-lg); font-weight: 600; }
h5, h6 { font-size: var(--font-size-base); font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.tv-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.tv-layout-main {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}

.tv-layout-main .tv-content { min-width: 0; }
.tv-layout-main .tv-sidebar { width: var(--sidebar-width); }

@media (max-width: 1024px) {
  .tv-layout-main { grid-template-columns: 1fr; }
  .tv-layout-main .tv-sidebar { width: 100%; }
}

/* ============================================================
   HEADER
   ============================================================ */
.tv-header {
  background: var(--tv-white);
  border-bottom: 1px solid var(--tv-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.tv-header-inner {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: var(--space-xl);
}

/* Logo */
.tv-logo { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }
.tv-logo-text { font-size: 22px; font-weight: 800; color: var(--tv-red); letter-spacing: -0.5px; }
.tv-logo-text span { color: var(--tv-text-muted); font-weight: 400; font-size: 11px; vertical-align: super; }

/* Search Bar */
.tv-header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.tv-header-search input {
  width: 100%;
  height: 38px;
  border: 1.5px solid var(--tv-border);
  border-radius: var(--radius-full);
  padding: 0 50px 0 var(--space-lg);
  font-size: var(--font-size-base);
  color: var(--tv-text);
  transition: border-color var(--transition);
  outline: none;
}
.tv-header-search input:focus { border-color: var(--tv-red); }
.tv-header-search input::placeholder { color: var(--tv-text-light); }
.tv-search-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 38px;
  width: 44px;
  background: var(--tv-red);
  border: none;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  color: var(--tv-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.tv-search-btn:hover { background: var(--tv-red-dark); }

/* Header Actions */
.tv-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-left: auto;
  flex-shrink: 0;
}

.tv-btn-binh-chon {
  display: flex; align-items: center; gap: 6px;
  color: var(--tv-text); font-size: var(--font-size-sm); font-weight: 500;
}
.tv-btn-binh-chon svg { color: var(--tv-red); }

.tv-btn-de-cu {
  display: flex; align-items: center; gap: 6px;
  color: var(--tv-text); font-size: var(--font-size-sm); font-weight: 500;
}
.tv-btn-de-cu svg { color: var(--tv-gold); }

.tv-btn-notify {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--tv-border);
  background: var(--tv-white);
  display: flex; align-items: center; justify-content: center;
  color: var(--tv-text-muted);
  transition: all var(--transition);
}
.tv-btn-notify:hover { border-color: var(--tv-red); color: var(--tv-red); }

.tv-btn-login {
  padding: 7px 18px;
  border: 1.5px solid var(--tv-border);
  border-radius: var(--radius-full);
  background: var(--tv-white);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--tv-text);
  transition: all var(--transition);
}
.tv-btn-login:hover { border-color: var(--tv-red); color: var(--tv-red); }

.tv-btn-register {
  padding: 7px 18px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--tv-red);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--tv-white);
  transition: background var(--transition);
}
.tv-btn-register:hover { background: var(--tv-red-dark); }

/* Navigation */
.tv-nav {
  background: var(--tv-white);
  border-bottom: 1px solid var(--tv-border-light);
}
.tv-nav-inner {
  display: flex;
  align-items: center;
  height: 46px;
  gap: 0;
}
.tv-nav a {
  display: flex; align-items: center; gap: 5px;
  padding: 0 var(--space-lg);
  height: 46px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--tv-text);
  border-bottom: 2.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.tv-nav a:hover,
.tv-nav a.active {
  color: var(--tv-red);
  border-bottom-color: var(--tv-red);
}
.tv-nav .has-dropdown { position: relative; }
.tv-nav .has-dropdown > a::after { content: ' ▾'; font-size: 10px; }
.tv-nav .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--tv-white);
  border: 1px solid var(--tv-border);
  border-radius: var(--radius-md);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 200;
}
.tv-nav .has-dropdown:hover .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.tv-nav .dropdown a {
  height: 40px; border-bottom: none;
  border-bottom: 1px solid var(--tv-border-light);
  padding: 0 var(--space-lg);
}
.tv-nav .dropdown a:last-child { border-bottom: none; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.tv-breadcrumb {
  padding: var(--space-md) 0;
  font-size: var(--font-size-sm);
  color: var(--tv-text-muted);
}
.tv-breadcrumb a { color: var(--tv-text-muted); }
.tv-breadcrumb a:hover { color: var(--tv-red); }
.tv-breadcrumb span { color: var(--tv-red); font-weight: 500; }
.tv-breadcrumb .sep { margin: 0 6px; }

/* ============================================================
   CARDS
   ============================================================ */
.tv-card {
  background: var(--tv-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.tv-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Toplist Card */
.tv-toplist-card { display: flex; flex-direction: column; }
.tv-toplist-card .tv-card-img {
  position: relative;
  padding-top: 62%;
  overflow: hidden;
}
.tv-toplist-card .tv-card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.tv-toplist-card:hover .tv-card-img img { transform: scale(1.05); }
.tv-card-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--tv-red);
  color: var(--tv-white);
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  z-index: 1;
}
.tv-toplist-card .tv-card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tv-toplist-card .tv-card-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--tv-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tv-card-category-tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(232,39,42,.08);
  color: var(--tv-red);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
}
.tv-card-meta {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--tv-text-muted);
  margin-top: auto;
}
.tv-card-meta svg { width: 13px; height: 13px; }

/* Grid 4 cols */
.tv-toplist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 960px) { .tv-toplist-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tv-toplist-grid { grid-template-columns: 1fr; } }

/* Grid 5 cols for region cities */
.tv-region-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}
@media (max-width: 960px) { .tv-region-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .tv-region-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.tv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
}
.tv-section-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--tv-dark);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.tv-section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--tv-red);
  border-radius: 2px;
}
.tv-see-all {
  font-size: var(--font-size-sm);
  color: var(--tv-red);
  font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.tv-see-all:hover { color: var(--tv-red-dark); }

/* ============================================================
   SIDEBAR CARDS
   ============================================================ */
.tv-sidebar-card {
  background: var(--tv-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
}
.tv-sidebar-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--tv-dark);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1.5px solid var(--tv-border-light);
}

/* Top Search List */
.tv-top-search-list { display: flex; flex-direction: column; gap: 6px; }
.tv-top-search-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 6px 0;
  border-bottom: 1px solid var(--tv-border-light);
  font-size: var(--font-size-sm);
}
.tv-top-search-item:last-child { border-bottom: none; }
.tv-rank-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.tv-rank-num.r1 { background: var(--rank-1); color: white; }
.tv-rank-num.r2 { background: var(--rank-2); color: white; }
.tv-rank-num.r3 { background: var(--rank-3); color: white; }
.tv-rank-num.r4, .tv-rank-num.r5 { background: var(--tv-border); color: var(--tv-text-muted); }
.tv-top-search-item a { flex: 1; color: var(--tv-text); }
.tv-top-search-item a:hover { color: var(--tv-red); }
.tv-top-search-views { font-size: 11px; color: var(--tv-text-muted); }

/* ============================================================
   RANKING TABLE
   ============================================================ */
.tv-ranking-table { width: 100%; }
.tv-ranking-table-header {
  display: flex; align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--tv-bg);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--tv-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.tv-ranking-row {
  display: flex; align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--tv-border-light);
  transition: background var(--transition);
  gap: var(--space-md);
}
.tv-ranking-row:hover { background: rgba(232,39,42,.03); }
.tv-ranking-row:last-child { border-bottom: none; }
.tv-ranking-num {
  width: 28px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--tv-text-muted);
  flex-shrink: 0;
}
.tv-ranking-num.top1 { color: var(--rank-1); }
.tv-ranking-num.top2 { color: var(--rank-2); }
.tv-ranking-num.top3 { color: var(--rank-3); }
.tv-ranking-name { flex: 1; font-size: var(--font-size-sm); font-weight: 500; color: var(--tv-text); }
.tv-ranking-name a { color: var(--tv-text); }
.tv-ranking-name a:hover { color: var(--tv-red); }
.tv-ranking-cat { font-size: var(--font-size-xs); color: var(--tv-text-muted); }
.tv-ranking-views { font-size: var(--font-size-xs); color: var(--tv-text-muted); text-align: right; }

/* Tab pills for ranking */
.tv-tabs {
  display: flex; gap: 4px;
  border-bottom: 1.5px solid var(--tv-border);
  margin-bottom: var(--space-lg);
}
.tv-tab {
  padding: 8px var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--tv-text-muted);
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1.5px;
}
.tv-tab.active, .tv-tab:hover {
  color: var(--tv-red);
  border-bottom-color: var(--tv-red);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.tv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.tv-btn-primary { background: var(--tv-red); color: var(--tv-white); }
.tv-btn-primary:hover { background: var(--tv-red-dark); color: var(--tv-white); }
.tv-btn-outline { background: var(--tv-white); color: var(--tv-red); border: 1.5px solid var(--tv-red); }
.tv-btn-outline:hover { background: var(--tv-red); color: var(--tv-white); }
.tv-btn-ghost { background: var(--tv-bg); color: var(--tv-text); border: 1.5px solid var(--tv-border); }
.tv-btn-ghost:hover { border-color: var(--tv-red); color: var(--tv-red); }
.tv-btn-sm { padding: 6px 14px; font-size: var(--font-size-xs); }
.tv-btn-lg { padding: 12px 28px; font-size: var(--font-size-md); }

/* ============================================================
   STAR RATING
   ============================================================ */
.tv-stars { display: flex; align-items: center; gap: 3px; }
.tv-star { color: #FFC107; font-size: 13px; }
.tv-star.empty { color: var(--tv-border); }
.tv-rating-count { font-size: var(--font-size-xs); color: var(--tv-text-muted); margin-left: 4px; }

/* ============================================================
   SCORE BADGE
   ============================================================ */
.tv-score {
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(135deg, #E8272A, #FF4144);
  color: white;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 64px;
  text-align: center;
}
.tv-score-num { font-size: 24px; font-weight: 800; line-height: 1; }
.tv-score-label { font-size: 10px; font-weight: 500; opacity: .85; margin-top: 2px; }
.tv-score-label.rat-tot { color: #fff; }

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.tv-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  background: var(--tv-bg);
  color: var(--tv-text-muted);
  border: 1px solid var(--tv-border);
}
.tv-tag-primary { background: rgba(232,39,42,.08); color: var(--tv-red); border-color: rgba(232,39,42,.2); }
.tv-tag-green { background: rgba(39,174,96,.08); color: #27AE60; border-color: rgba(39,174,96,.2); }

/* ============================================================
   PAGINATION
   ============================================================ */
.tv-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: var(--space-2xl) 0;
}
.tv-page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--tv-border);
  background: var(--tv-white);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--tv-text);
  cursor: pointer;
  transition: all var(--transition);
}
.tv-page-btn:hover, .tv-page-btn.active {
  background: var(--tv-red);
  border-color: var(--tv-red);
  color: var(--tv-white);
}

/* ============================================================
   FOOTER
   ============================================================ */
.tv-footer {
  background: var(--tv-dark);
  color: #ccc;
  padding: var(--space-4xl) 0 var(--space-xl);
  margin-top: var(--space-4xl);
}
.tv-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}
@media (max-width: 960px) { .tv-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .tv-footer-grid { grid-template-columns: 1fr; } }
.tv-footer-logo { font-size: 24px; font-weight: 800; color: var(--tv-red); margin-bottom: var(--space-md); }
.tv-footer p { font-size: var(--font-size-sm); line-height: 1.7; color: #999; }
.tv-footer-title { font-size: var(--font-size-base); font-weight: 700; color: var(--tv-white); margin-bottom: var(--space-md); }
.tv-footer ul { display: flex; flex-direction: column; gap: 8px; }
.tv-footer ul li a { font-size: var(--font-size-sm); color: #999; transition: color var(--transition); }
.tv-footer ul li a:hover { color: var(--tv-red); }
.tv-footer-newsletter input {
  width: 100%; height: 40px;
  border: 1px solid #444;
  border-radius: var(--radius-sm);
  background: #2a2a2a;
  color: var(--tv-white);
  padding: 0 var(--space-md);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-sm);
  outline: none;
}
.tv-footer-newsletter input::placeholder { color: #666; }
.tv-footer-newsletter input:focus { border-color: var(--tv-red); }
.tv-footer-newsletter .tv-btn-primary { width: 100%; }
.tv-footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: #666;
}
.tv-social-links { display: flex; gap: var(--space-md); }
.tv-social-links a {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #2a2a2a;
  display: flex; align-items: center; justify-content: center;
  color: #999;
  font-size: 14px;
  transition: all var(--transition);
}
.tv-social-links a:hover { background: var(--tv-red); color: white; }

/* ============================================================
   HOMEPAGE SPECIFIC
   ============================================================ */
/* Hero Slider */
.tv-hero {
  background: var(--tv-dark);
  position: relative;
  overflow: hidden;
}
.tv-hero-slide {
  min-height: 380px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
}
.tv-hero-content {
  padding: var(--space-4xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.tv-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tv-red);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  width: fit-content;
}
.tv-hero-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--tv-white);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}
.tv-hero-desc {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,.7);
  max-width: 480px;
  margin-bottom: var(--space-xl);
}
.tv-hero-side {
  background: rgba(0,0,0,.4);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.tv-hero-side-item {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.tv-hero-side-item:hover, .tv-hero-side-item.active {
  background: rgba(255,255,255,.1);
}
.tv-hero-side-rank {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.tv-hero-side-rank.r1 { background: var(--tv-red); }
.tv-hero-side-text { flex: 1; min-width: 0; }
.tv-hero-side-title {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: rgba(255,255,255,.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tv-hero-side-views {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}
/* Hero dots */
.tv-hero-dots {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.tv-hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all var(--transition);
}
.tv-hero-dot.active { background: white; width: 24px; border-radius: 4px; }

/* Trending sidebar */
.tv-trending-item {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  padding: 6px 0;
  border-bottom: 1px solid var(--tv-border-light);
}
.tv-trending-item:last-child { border-bottom: none; }
.tv-trending-rank { font-size: var(--font-size-xs); font-weight: 700; color: var(--tv-red); min-width: 14px; }
.tv-trending-text { font-size: var(--font-size-xs); color: var(--tv-text); flex: 1; }
.tv-trending-text a { color: var(--tv-text); }
.tv-trending-text a:hover { color: var(--tv-red); }
.tv-trending-views { font-size: 11px; color: var(--tv-text-muted); }

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.tv-category-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: var(--space-3xl);
  min-height: 160px;
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  position: relative;
}
.tv-category-icon-big {
  width: 70px; height: 70px;
  border-radius: var(--radius-lg);
  background: var(--tv-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}
.tv-category-info h1 {
  color: var(--tv-white);
  font-size: var(--font-size-3xl);
  margin-bottom: 6px;
}
.tv-category-info p { color: rgba(255,255,255,.7); font-size: var(--font-size-sm); }
.tv-category-stats {
  display: flex; gap: var(--space-2xl); margin-top: var(--space-md);
}
.tv-category-stat { font-size: var(--font-size-sm); color: rgba(255,255,255,.7); display: flex; align-items: center; gap: 6px; }
.tv-category-stat strong { color: white; }

/* Sub-category tabs with icons */
.tv-sub-cat-tabs {
  display: flex; gap: var(--space-xl);
  border-bottom: 1.5px solid var(--tv-border);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
}
.tv-sub-cat-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: var(--space-md) var(--space-sm);
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  margin-bottom: -1.5px;
  min-width: 72px;
}
.tv-sub-cat-tab:hover, .tv-sub-cat-tab.active { border-bottom-color: var(--tv-red); }
.tv-sub-cat-tab:hover .tv-sub-cat-icon, .tv-sub-cat-tab.active .tv-sub-cat-icon { background: rgba(232,39,42,.1); }
.tv-sub-cat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--tv-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: background var(--transition);
}
.tv-sub-cat-label { font-size: var(--font-size-xs); font-weight: 500; color: var(--tv-text-muted); }
.tv-sub-cat-tab.active .tv-sub-cat-label { color: var(--tv-red); font-weight: 600; }

/* Filter sidebar for category */
.tv-filter-group { margin-bottom: var(--space-xl); }
.tv-filter-label { font-size: var(--font-size-sm); font-weight: 600; color: var(--tv-dark); margin-bottom: var(--space-sm); }
.tv-filter-checkbox { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: 8px; cursor: pointer; }
.tv-filter-checkbox input[type=checkbox] { accent-color: var(--tv-red); width: 15px; height: 15px; }
.tv-filter-checkbox label { font-size: var(--font-size-sm); color: var(--tv-text); cursor: pointer; }
.tv-filter-radio { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: 8px; cursor: pointer; }
.tv-filter-radio input[type=radio] { accent-color: var(--tv-red); width: 15px; height: 15px; }
.tv-filter-select {
  width: 100%;
  height: 38px;
  border: 1.5px solid var(--tv-border);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--tv-text);
  background: var(--tv-white);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ============================================================
   TOPLIST DETAIL PAGE
   ============================================================ */
.tv-toplist-hero {
  background: var(--tv-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}
.tv-toplist-hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}
.tv-toplist-hero-body { padding: var(--space-2xl); }
.tv-toplist-badge-num {
  display: inline-block;
  background: var(--tv-red);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}
.tv-toplist-hero-title { font-size: var(--font-size-3xl); font-weight: 800; margin-bottom: var(--space-md); }
.tv-toplist-hero-desc { font-size: var(--font-size-md); color: var(--tv-text-muted); margin-bottom: var(--space-lg); }
.tv-toplist-hero-meta {
  display: flex; align-items: center; gap: var(--space-xl);
  font-size: var(--font-size-sm);
  color: var(--tv-text-muted);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--tv-border-light);
  flex-wrap: wrap;
}
.tv-toplist-hero-meta svg { width: 15px; height: 15px; }
.tv-share-btns { display: flex; gap: var(--space-sm); }
.tv-share-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; transition: opacity var(--transition);
}
.tv-share-btn:hover { opacity: .8; }
.tv-share-fb { background: #1877F2; }
.tv-share-zalo { background: #0068FF; }
.tv-share-mess { background: #00B2FF; }
.tv-share-link { background: var(--tv-text-muted); }

/* Table of contents */
.tv-toc {
  background: var(--tv-bg);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
}
.tv-toc-title { font-size: var(--font-size-sm); font-weight: 700; margin-bottom: var(--space-md); }
.tv-toc-list { display: flex; flex-direction: column; gap: 6px; }
.tv-toc-item {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--tv-text);
  padding: 4px 0;
}
.tv-toc-item:hover { color: var(--tv-red); }
.tv-toc-num { font-weight: 700; color: var(--tv-red); min-width: 20px; }

/* Place item in toplist */
.tv-place-item {
  background: var(--tv-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}
.tv-place-item-header {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 0;
}
.tv-place-item-imgs { position: relative; }
.tv-place-item-main-img {
  width: 280px; height: 200px;
  object-fit: cover;
}
.tv-place-item-rank-badge {
  position: absolute;
  top: 0; left: 0;
  width: 44px; height: 44px;
  background: var(--tv-red);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: 800;
}
.tv-place-item-rank-badge.r2 { background: var(--tv-orange); }
.tv-place-item-rank-badge.r3 { background: var(--tv-gold); }
.tv-place-item-body {
  padding: var(--space-lg) var(--space-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tv-place-name { font-size: var(--font-size-xl); font-weight: 700; margin-bottom: 6px; }
.tv-place-name a { color: var(--tv-dark); }
.tv-place-name a:hover { color: var(--tv-red); }
.tv-place-address {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--tv-text-muted);
  margin-bottom: var(--space-sm);
}
.tv-place-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--space-md); }
.tv-place-desc { font-size: var(--font-size-sm); color: var(--tv-text-muted); margin-bottom: var(--space-md); }
.tv-place-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px var(--space-lg);
}
.tv-place-detail-item {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--tv-text-muted);
}
.tv-place-detail-icon { flex-shrink: 0; }
.tv-place-item-score-col {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  border-left: 1px solid var(--tv-border-light);
  min-width: 110px;
}
.tv-place-item-actions {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--tv-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--tv-bg);
}
/* Review snippet */
.tv-review-snippet {
  display: flex; align-items: flex-start; gap: var(--space-md);
  background: rgba(245,166,35,.06);
  border-left: 3px solid var(--tv-gold);
  padding: var(--space-md);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--font-size-sm);
  color: var(--tv-text-muted);
  font-style: italic;
  margin: var(--space-md) 0;
}
.tv-reviewer-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}

@media (max-width: 768px) {
  .tv-place-item-header { grid-template-columns: 1fr; }
  .tv-place-item-main-img { width: 100%; height: 200px; }
  .tv-place-item-score-col { flex-direction: row; border-left: none; border-top: 1px solid var(--tv-border-light); min-width: auto; }
}

/* ============================================================
   PLACE DETAIL PAGE
   ============================================================ */
.tv-place-detail-hero {
  background: var(--tv-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}
.tv-place-gallery { position: relative; }
.tv-place-hero-img { width: 100%; max-height: 420px; object-fit: cover; }
.tv-place-gallery-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.tv-place-gallery-nav.prev { left: var(--space-md); }
.tv-place-gallery-nav.next { right: var(--space-md); }
.tv-place-detail-body { padding: var(--space-2xl); }
.tv-place-detail-title {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: var(--font-size-3xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}
.tv-verified-icon { color: var(--tv-red); }

/* Place detail info grid */
.tv-place-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--tv-border-light);
  border-bottom: 1px solid var(--tv-border-light);
}
@media (max-width: 640px) { .tv-place-info-grid { grid-template-columns: 1fr 1fr; } }
.tv-place-info-item { display: flex; align-items: flex-start; gap: var(--space-sm); }
.tv-place-info-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: rgba(232,39,42,.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--tv-red);
}
.tv-place-info-label { font-size: 11px; color: var(--tv-text-muted); }
.tv-place-info-value { font-size: var(--font-size-sm); font-weight: 500; color: var(--tv-dark); }

/* Score breakdown */
.tv-score-breakdown { display: flex; flex-direction: column; gap: var(--space-sm); }
.tv-score-bar-row {
  display: flex; align-items: center; gap: var(--space-md);
  font-size: var(--font-size-sm);
}
.tv-score-bar-label { min-width: 130px; color: var(--tv-text-muted); }
.tv-score-bar-track {
  flex: 1; height: 6px;
  background: var(--tv-border);
  border-radius: 3px;
  overflow: hidden;
}
.tv-score-bar-fill { height: 100%; background: var(--tv-red); border-radius: 3px; }
.tv-score-bar-val { min-width: 30px; text-align: right; font-weight: 600; font-size: var(--font-size-sm); }

/* Reviews */
.tv-review-card {
  background: var(--tv-bg);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}
.tv-review-header {
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.tv-review-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.tv-review-author { font-weight: 600; font-size: var(--font-size-sm); }
.tv-review-role { font-size: 11px; color: var(--tv-text-muted); }
.tv-review-date { font-size: 11px; color: var(--tv-text-muted); margin-left: auto; }
.tv-review-text { font-size: var(--font-size-sm); color: var(--tv-text); line-height: 1.7; }
.tv-review-helpful {
  display: flex; align-items: center; gap: var(--space-md);
  margin-top: var(--space-md);
  font-size: var(--font-size-xs);
  color: var(--tv-text-muted);
}
.tv-review-helpful button {
  display: flex; align-items: center; gap: 4px;
  background: none; border: 1px solid var(--tv-border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  color: var(--tv-text-muted);
  transition: all var(--transition);
}
.tv-review-helpful button:hover { border-color: var(--tv-red); color: var(--tv-red); }

/* Menu section */
.tv-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}
@media (max-width: 768px) { .tv-menu-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .tv-menu-grid { grid-template-columns: repeat(2, 1fr); } }
.tv-menu-item { text-align: center; }
.tv-menu-item-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}
.tv-menu-item-name { font-size: var(--font-size-xs); font-weight: 500; color: var(--tv-text); }
.tv-menu-item-price { font-size: var(--font-size-xs); color: var(--tv-red); font-weight: 600; }

/* ============================================================
   SEARCH RESULTS PAGE
   ============================================================ */
.tv-search-header {
  margin-bottom: var(--space-xl);
}
.tv-search-header h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: 4px;
}
.tv-search-header h1 em { color: var(--tv-red); font-style: normal; }
.tv-search-count { font-size: var(--font-size-sm); color: var(--tv-text-muted); }

.tv-search-filter-bar {
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}
.tv-sort-select {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--tv-text);
  background: var(--tv-white);
  border: 1.5px solid var(--tv-border);
  border-radius: var(--radius-full);
  padding: 6px var(--space-lg);
  cursor: pointer;
  position: relative;
}

/* Search result item */
.tv-search-result-item {
  background: var(--tv-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  transition: box-shadow var(--transition);
}
.tv-search-result-item:hover { box-shadow: var(--shadow-md); }
.tv-search-result-img { position: relative; overflow: hidden; }
.tv-search-result-img img { width: 220px; height: 150px; object-fit: cover; transition: transform .4s; }
.tv-search-result-item:hover .tv-search-result-img img { transform: scale(1.05); }
.tv-search-result-body { padding: var(--space-lg) var(--space-xl); }
.tv-search-result-title { font-size: var(--font-size-xl); font-weight: 700; color: var(--tv-dark); margin-bottom: 6px; }
.tv-search-result-title a { color: var(--tv-dark); }
.tv-search-result-title a:hover { color: var(--tv-red); }
.tv-search-result-meta {
  display: flex; align-items: center; gap: var(--space-lg); margin-bottom: var(--space-sm);
  font-size: var(--font-size-xs); color: var(--tv-text-muted);
}
.tv-search-result-desc {
  font-size: var(--font-size-sm);
  color: var(--tv-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.tv-search-result-stats {
  display: flex; align-items: center; gap: var(--space-lg);
  font-size: var(--font-size-xs); color: var(--tv-text-muted);
}

/* Place result type */
.tv-search-place-badge {
  position: absolute; top: var(--space-sm); left: var(--space-sm);
  width: 28px; height: 28px;
  background: var(--tv-red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px;
}

@media (max-width: 640px) { .tv-search-result-item { grid-template-columns: 1fr; } }

/* Popular keywords */
.tv-keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-keyword-chip {
  padding: 5px 14px;
  background: var(--tv-bg);
  border: 1px solid var(--tv-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--tv-text);
  cursor: pointer;
  transition: all var(--transition);
}
.tv-keyword-chip:hover { background: rgba(232,39,42,.08); border-color: rgba(232,39,42,.3); color: var(--tv-red); }

/* ============================================================
   REGION PAGES
   ============================================================ */
.tv-region-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 300px;
  margin-bottom: var(--space-2xl);
}
.tv-region-hero-bg {
  position: absolute; inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
}
.tv-region-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.75) 0%, rgba(0,0,0,.3) 100%);
}
.tv-region-hero-content {
  position: relative; z-index: 2;
  padding: var(--space-3xl);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-3xl);
  align-items: center;
  min-height: 300px;
}
.tv-region-flag { font-size: var(--font-size-xl); margin-bottom: var(--space-sm); }
.tv-region-name { font-size: var(--font-size-4xl); font-weight: 800; color: white; margin-bottom: 6px; }
.tv-region-tagline { font-size: var(--font-size-sm); color: rgba(255,255,255,.7); margin-bottom: var(--space-lg); }
.tv-region-hero-stats {
  display: flex; gap: var(--space-xl);
}
.tv-region-hero-stat { text-align: center; }
.tv-region-hero-stat strong { display: block; font-size: var(--font-size-xl); font-weight: 700; color: white; }
.tv-region-hero-stat span { font-size: 11px; color: rgba(255,255,255,.6); }

/* Weather widget */
.tv-weather {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: white;
  text-align: center;
}
.tv-weather-label { font-size: 11px; opacity: .7; margin-bottom: var(--space-sm); }
.tv-weather-temp { font-size: 38px; font-weight: 800; line-height: 1; }
.tv-weather-desc { font-size: var(--font-size-xs); opacity: .8; margin: 4px 0; }
.tv-weather-range { font-size: var(--font-size-xs); opacity: .7; }
.tv-weather-detail { font-size: 11px; opacity: .6; margin-top: var(--space-sm); }

/* Stats blocks for region */
.tv-region-stats-row {
  display: flex; align-items: center; gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}
.tv-region-stat-box {
  display: flex; align-items: center; gap: var(--space-md);
  background: var(--tv-white);
  border: 1px solid var(--tv-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}
.tv-region-stat-icon { font-size: 18px; }
.tv-region-stat-label { font-size: 11px; color: var(--tv-text-muted); }
.tv-region-stat-val { font-size: var(--font-size-md); font-weight: 700; color: var(--tv-dark); }

/* Region city grid */
.tv-city-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.tv-city-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tv-city-card:hover img { transform: scale(1.08); }
.tv-city-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
}
.tv-city-card-label {
  position: absolute;
  bottom: var(--space-md); left: var(--space-md); right: var(--space-md);
  color: white;
  font-weight: 700;
  font-size: var(--font-size-md);
}
.tv-city-card-label small { display: block; font-size: 11px; font-weight: 400; opacity: .8; }

/* Quick info sidebar */
.tv-quick-info { display: flex; flex-direction: column; gap: var(--space-sm); }
.tv-quick-info-row {
  display: flex; align-items: flex-start;
  font-size: var(--font-size-sm);
  padding: 6px 0;
  border-bottom: 1px solid var(--tv-border-light);
  gap: var(--space-sm);
}
.tv-quick-info-row:last-child { border-bottom: none; }
.tv-quick-info-key { min-width: 110px; color: var(--tv-text-muted); flex-shrink: 0; }
.tv-quick-info-val { font-weight: 500; color: var(--tv-dark); }

/* ============================================================
   UTILITIES
   ============================================================ */
.tv-divider { height: 1px; background: var(--tv-border-light); margin: var(--space-xl) 0; }
.tv-text-red { color: var(--tv-red) !important; }
.tv-text-muted { color: var(--tv-text-muted) !important; }
.tv-text-sm { font-size: var(--font-size-sm) !important; }
.tv-text-xs { font-size: var(--font-size-xs) !important; }
.tv-font-bold { font-weight: 700 !important; }
.tv-mt-sm { margin-top: var(--space-sm); }
.tv-mt-md { margin-top: var(--space-md); }
.tv-mt-lg { margin-top: var(--space-lg); }
.tv-mt-xl { margin-top: var(--space-xl); }
.tv-mb-sm { margin-bottom: var(--space-sm); }
.tv-mb-md { margin-bottom: var(--space-md); }
.tv-mb-lg { margin-bottom: var(--space-lg); }
.tv-mb-xl { margin-bottom: var(--space-xl); }
.tv-flex { display: flex; }
.tv-items-center { align-items: center; }
.tv-gap-sm { gap: var(--space-sm); }
.tv-gap-md { gap: var(--space-md); }
.tv-hidden { display: none !important; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.tv-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-height: 54px; }
  .tv-header-inner { gap: var(--space-md); }
  .tv-header-search { max-width: 200px; }
  .tv-hero-slide { grid-template-columns: 1fr; }
  .tv-hero-side { display: none; }
  .tv-hero-title { font-size: var(--font-size-2xl); }
  .tv-hero-content { padding: var(--space-2xl); }
  .tv-nav { display: none; }
  .tv-region-hero-content { grid-template-columns: 1fr; }
  .tv-weather { display: none; }
  .tv-toplist-hero-title { font-size: var(--font-size-2xl); }
  .tv-footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}
@media (max-width: 480px) {
  .tv-btn-binh-chon, .tv-btn-de-cu, .tv-btn-notify { display: none; }
  .tv-footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FIX v3 – Các lỗi visual từ screenshots
   ============================================================ */

/* Hero slider – fix grid hiển thị đúng */
.tv-hero { position: relative; overflow: hidden; }
.tv-hero-slide {
    min-height: 380px;
    position: relative;
}
.tv-hero-slide[style*="grid"] {
    display: grid !important;
    grid-template-columns: 1fr 300px;
}

/* Hero side panel */
.tv-hero-side {
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 2;
}

/* Toplist card – fix body display */
.tv-toplist-card .tv-card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: var(--space-md) !important;
    flex: 1 !important;
}
.tv-toplist-card .tv-card-title { font-size: 14px !important; }
.tv-toplist-card .tv-card-title a { color: var(--tv-dark) !important; }
.tv-toplist-card .tv-card-title a:hover { color: var(--tv-red) !important; }

/* Card image – position fix */
.tv-toplist-card .tv-card-img {
    display: block;
    position: relative;
    padding-top: 62%;
    overflow: hidden;
    background: var(--tv-bg);
}
.tv-toplist-card .tv-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.tv-toplist-card:hover .tv-card-img img { transform: scale(1.05); }
.tv-toplist-card .tv-card-img > div {
    position: absolute !important;
    inset: 0 !important;
}

/* Category tag */
.tv-card-category-tag {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(232,39,42,.1);
    color: var(--tv-red);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

/* Card meta */
.tv-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--tv-text-muted);
}
.tv-card-meta i { font-size: 11px; }

/* BXH ranking rows – thumbnail fix */
.tv-ranking-row {
    display: flex !important;
    align-items: center !important;
    gap: var(--space-md) !important;
    padding: 10px var(--space-md) !important;
    border-bottom: 1px solid var(--tv-border-light) !important;
    transition: background var(--transition) !important;
}
.tv-ranking-row:hover { background: rgba(232,39,42,.03) !important; }

/* Sidebar bình chọn cards */
.tv-sidebar-card .tv-vote-item {
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--tv-border);
}
.tv-sidebar-card .tv-vote-img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}
.tv-sidebar-card .tv-vote-placeholder {
    width: 100%;
    height: 90px;
    background: linear-gradient(135deg, var(--tv-red), #FF4144);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* Section title bar left */
.tv-section-title {
    position: relative;
    padding-left: 14px;
}
.tv-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--tv-red);
    border-radius: 2px;
}

/* Xu hướng list */
.tv-trending-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--tv-border-light);
    font-size: 13px;
}
.tv-trending-item:last-child { border-bottom: none; }
.tv-trending-rank {
    font-size: 13px;
    font-weight: 800;
    color: var(--tv-red);
    min-width: 18px;
    line-height: 1.5;
}
.tv-trending-text { flex: 1; }
.tv-trending-text a { color: var(--tv-text); line-height: 1.4; }
.tv-trending-text a:hover { color: var(--tv-red); }
.tv-trending-views {
    font-size: 11px;
    color: var(--tv-text-muted);
    white-space: nowrap;
}

/* Tabs – pill style */
.tv-tab {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tv-text-muted);
    background: transparent;
    border: 1.5px solid var(--tv-border);
    cursor: pointer;
    transition: all var(--transition);
}
.tv-tab.active,
.tv-tab:hover {
    background: var(--tv-red);
    color: #fff;
    border-color: var(--tv-red);
}

/* BXH tabs trong homepage */
.tv-card .tv-tab {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 4px;
}

/* Section header */
.tv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}
.tv-see-all {
    font-size: 13px;
    color: var(--tv-red);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.tv-see-all:hover { text-decoration: underline; color: var(--tv-red-dark); }

/* Footer fix */
.tv-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

/* Danh mục grid icon box hover */
@media (max-width: 960px) {
    .tv-hero-slide[style*="grid"] { grid-template-columns: 1fr !important; }
    .tv-hero-side { display: none !important; }
    .tv-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    .tv-footer-grid { grid-template-columns: 1fr; }
}

/* Sidebar card titles */
.tv-sidebar-title {
    font-size: 14px !important;
    font-weight: 700;
    color: var(--tv-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1.5px solid var(--tv-border-light);
    display: block;
}
