/* ============================================================
   Thời Trang Top — giao diện theo đúng template wireframe
   muadepre-thoi-trang-top (hub.html + cluster-template.html)
   Token màu/chữ lấy từ 04-design-tokens.json.
   Font display: Noto Serif (thay DM Serif Display vì lỗi dấu
   tiếng Việt — xem README).
   ============================================================ */
/* Bảng màu "berry & blush" — tông thời trang nữ trendy (thay navy/honey
   của tokens gốc theo yêu cầu; cấu trúc component vẫn theo wireframe). */
:root {
  --primary: #7E2A47;        /* berry đậm — heading, logo, CTA */
  --primary-dark: #63203A;
  --accent: #D98CA4;         /* rose — badge, highlight */
  --accent-dark: #C97690;
  --accent-soft: #F9E7ED;    /* blush nhạt — nền disclosure, card nổi bật */
  --gold: #D4A64A;           /* vàng đồng — sao rating, top pick */
  --gold-dark: #B08532;
  --danger: #A23B3B;
  --danger-soft: #F5E3E3;
  --success: #4A7C59;
  --success-soft: #E1EDE4;
  --page-bg: #FDF9F7;        /* ivory phớt hồng */
  --card: #FFFFFF;
  --muted-bg: #F7EEF0;       /* blush xám nhẹ */
  --text: #26191F;
  --text-secondary: #6F5D66;
  --text-muted: #A08D97;
  --border: #ECDFE4;
  --border-strong: #D6C3CB;
  --font-display: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 760px;
  --container-wide: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  padding-bottom: 80px; /* chừa chỗ cho sticky CTA */
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font-family: inherit; font-size: inherit; }

.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header.site {
  background: var(--card);
  border-bottom: 0.5px solid var(--border);
  padding: 18px 0;
  position: sticky; top: 0; z-index: 50;
}
header.site .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { width: 34px; height: 34px; display: block; }
.logo-mark { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--primary); white-space: nowrap; }
.logo-mark b { color: var(--accent); font-weight: 400; }
.logo-tag { font-size: 12px; color: var(--text-muted); border-left: 0.5px solid var(--border); padding-left: 10px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav a { color: var(--text-secondary); }
.nav a:hover { color: var(--primary); }
@media (max-width: 640px) {
  .nav { display: none; }
  .logo-tag { display: none; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--muted-bg);
  padding: 12px 0;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  border-bottom: 0.5px solid var(--border);
}
.breadcrumb i { font-size: 12px; margin: 0 6px; opacity: 0.6; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb .current { color: var(--primary); font-weight: 500; }

/* ---------- Hero (hub) ---------- */
section.hero {
  padding: 64px 0 52px;
  text-align: center;
  background: linear-gradient(120deg, #F7EEF0, #FBF1EC, #F6E7EE, #F7EEF0);
  background-size: 300% 300%;
  animation: heroShift 16s ease infinite;
}
@keyframes heroShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--primary), var(--accent-dark) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.article-badge {
  display: inline-block;
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 46px;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  max-width: 780px;
  margin-left: auto; margin-right: auto;
}
.hero .sub { font-size: 17px; color: var(--text-secondary); max-width: 620px; margin: 0 auto 32px; }
.hero .sub strong { color: var(--primary); font-weight: 500; }
.hero-search { display: flex; gap: 8px; max-width: 480px; margin: 0 auto; }
.hero-search input {
  flex: 1; min-width: 0;
  padding: 14px 18px;
  border: 0.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--card);
  font-size: 14px;
}
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 140, 164, 0.28); }
.hero-search button {
  padding: 14px 28px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 6px;
  font-weight: 500; cursor: pointer; transition: 220ms;
}
.hero-search button:hover { background: var(--primary-dark); }

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--card);
  border-bottom: 0.5px solid var(--border);
  padding: 18px 0;
}
.trust-bar .items { display: flex; justify-content: center; align-items: center; gap: 40px; font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; }
.trust-bar .item { display: flex; align-items: center; gap: 6px; }
.trust-bar .item i { color: var(--accent); font-size: 16px; }
.trust-bar strong { color: var(--primary); font-weight: 500; }

/* ---------- Section blocks ---------- */
section.block { padding: 48px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2, h2.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.section-head .meta { font-size: 13px; color: var(--text-muted); }
h2.section-title { margin-bottom: 24px; }

/* ---------- Pillar grid (danh mục = bộ lọc) ---------- */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pillar-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  cursor: pointer;
  transition: 220ms;
  text-align: left;
}
.pillar-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pillar-card i { font-size: 28px; color: var(--accent); margin-bottom: 12px; display: block; }
.pillar-card h3 { font-size: 16px; font-weight: 500; margin-bottom: 2px; color: var(--text); }
.pillar-card p { font-size: 13px; color: var(--text-secondary); }
.pillar-card.active { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft) 0%, var(--card) 60%); }
.pillar-card.active h3 { color: var(--primary); }

/* ---------- Disclosure ---------- */
.disclosure {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--primary);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.55;
  margin: 24px 0 8px;
}
.disclosure i { flex-shrink: 0; font-size: 18px; margin-top: 2px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; }
.sort-label { display: flex; align-items: center; gap: 8px; }
.sort-label select {
  padding: 8px 12px;
  border: 0.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.sort-label select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 140, 164, 0.28); }

/* ---------- TL;DR pick cards ---------- */
section.tldr { padding: 32px 0 8px; }
.tldr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pick-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: 220ms;
  display: flex; flex-direction: column;
}
.pick-card.best-overall { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft) 0%, var(--card) 40%); }
.pick-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pick-badge.overall { background: var(--accent); color: var(--primary); }
.pick-badge.budget { background: var(--success-soft); color: var(--success); }
.pick-badge.combo { background: var(--muted-bg); color: var(--text-secondary); }
.pick-card h4 { font-size: 15px; font-weight: 500; margin-bottom: 12px; color: var(--text); line-height: 1.4; }
.pick-card .price-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); margin-top: auto; }
.pick-card .price-row strong { color: var(--primary); font-weight: 500; }
.stars { color: var(--gold); font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.pick-card a.pick-buy {
  display: block; text-align: center;
  margin-top: 14px; padding: 10px;
  border-radius: 6px;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 500;
  transition: 220ms;
}
.pick-card a.pick-buy:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Review cards (danh sách sản phẩm) ---------- */
section.reviews { padding: 32px 0 8px; }
.review-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  transition: 220ms;
  position: relative;
}
.review-card:hover { border-color: var(--border-strong); }
.review-card.top-pick { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft) 0%, var(--card) 30%); }
.review-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.review-rank {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--accent);
  line-height: 1;
  min-width: 56px;
  font-weight: 400;
}
.review-img {
  width: 84px; height: 84px;
  background: var(--muted-bg);
  border-radius: 8px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
  flex-shrink: 0;
}
.review-img img { width: 100%; height: 100%; object-fit: cover; }
.review-title { flex: 1; min-width: 0; }
.review-title h3 { font-size: 17px; font-weight: 500; margin-bottom: 6px; line-height: 1.4; color: var(--text); }
.review-title .row { display: flex; gap: 10px; font-size: 13px; color: var(--text-secondary); align-items: center; flex-wrap: wrap; }
.review-title .price { color: var(--primary); font-weight: 500; }
.review-shop { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.review-shop i { font-size: 13px; }
.comm-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent); color: var(--primary);
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}

.pill-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 4px; }
.pill { font-size: 12px; padding: 4px 12px; border-radius: 999px; background: var(--muted-bg); color: var(--text-secondary); white-space: nowrap; }

/* ---------- Yếu tố CTR: % giảm, giá gốc, đã bán, badge shop ---------- */
.discount-badge {
  position: absolute; top: 4px; left: 4px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px;
  line-height: 1.6; z-index: 2;
}
.review-img .img-hover {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.review-card:hover .review-img .img-hover { opacity: 1; }
.price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.price-line .price { font-size: 19px; font-weight: 700; color: var(--primary); }
.price-old { color: var(--text-muted); text-decoration: line-through; font-size: 12.5px; font-weight: 400; white-space: nowrap; }
.off-chip {
  background: var(--danger-soft); color: var(--danger);
  font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.review-title .row .hot { display: inline-flex; align-items: center; gap: 3px; color: var(--danger); font-weight: 500; }
.review-title .row .hot i { font-size: 14px; }
.review-title .row .dim { color: var(--text-muted); font-weight: 400; }
.review-title .row { gap: 12px; }
.shop-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 0 6px; border-radius: 3px;
  margin-left: 6px; line-height: 1.7;
  vertical-align: 1px;
}
.shop-badge.mall { background: #D0011B; color: #fff; }
.shop-badge.pref { background: #EE4D2D; color: #fff; }

.cta-shopee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: 220ms;
  margin-top: 10px;
}
.cta-shopee:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

/* ---------- Load more ---------- */
.more-count { text-align: center; font-size: 13px; color: var(--text-muted); padding: 4px 0 12px; font-style: italic; }
.load-more-wrap { text-align: center; padding: 0 0 16px; }
.btn-more {
  padding: 13px 32px;
  background: var(--card); color: var(--primary);
  border: 0.5px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: 220ms;
}
.btn-more:hover { background: var(--muted-bg); border-color: var(--accent); }
.btn-more[hidden] { display: none; }

.empty { text-align: center; color: var(--text-secondary); padding: 40px 0; font-size: 15px; }

/* ---------- Bảng so sánh ---------- */
section.compare { padding: 32px 0 8px; }
.compare-table-wrap { overflow-x: auto; border: 0.5px solid var(--border); border-radius: 12px; background: var(--card); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
.compare-table th, .compare-table td { text-align: left; padding: 12px 16px; border-bottom: 0.5px solid var(--border); white-space: nowrap; }
.compare-table td.pri { font-weight: 500; white-space: normal; min-width: 220px; }
.compare-table thead th { background: var(--muted-bg); font-weight: 500; color: var(--primary); font-size: 13px; letter-spacing: 0.02em; }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .best { color: var(--gold); font-weight: 500; }
.compare-table .best-tag { color: var(--gold-dark); font-weight: 500; font-size: 12px; }
.compare-table a.buy-link { color: var(--primary); font-weight: 500; }
.compare-table a.buy-link:hover { color: var(--accent); }

/* ---------- FAQ ---------- */
section.faq { padding: 32px 0 24px; }
.faq-item {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  user-select: none;
}
.faq-q:hover { background: var(--muted-bg); }
.faq-q i { color: var(--text-muted); transition: 220ms; flex-shrink: 0; }
.faq-item.open .faq-q i { transform: rotate(180deg); color: var(--accent); }
.faq-a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  transition: max-height 320ms ease-out, padding 220ms;
}
.faq-item.open .faq-a { padding: 0 20px 18px; max-height: 400px; }

/* ---------- Related (danh mục khác) ---------- */
section.related { background: var(--muted-bg); padding: 48px 0; margin-top: 24px; }
section.related h2 { text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.related-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: 220ms;
  display: block;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card h4 { font-size: 15px; font-weight: 500; margin-bottom: 6px; color: var(--text); line-height: 1.4; }
.related-card .meta { font-size: 12px; color: var(--text-muted); }

/* ---------- Featured clusters (hub, kiểu feat-row của hub.html) ---------- */
section.featured { background: var(--muted-bg); padding: 48px 0; margin-top: 32px; }
.feat-badge {
  display: inline-block;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.feat-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: 220ms;
}
.feat-row:hover { padding-left: 8px; }
.feat-row:last-child { border-bottom: none; }
.feat-rank { font-family: var(--font-display); font-size: 40px; color: var(--accent); min-width: 60px; line-height: 1; }
.feat-body { flex: 1; min-width: 0; }
.feat-body h4 { font-size: 18px; font-weight: 500; margin-bottom: 4px; color: var(--text); }
.feat-body .meta { font-size: 12px; color: var(--text-muted); letter-spacing: 0.02em; }
.feat-row i.arrow { font-size: 22px; color: var(--primary); }
@media (max-width: 720px) {
  .feat-rank { font-size: 32px; min-width: 44px; }
  .feat-body h4 { font-size: 16px; }
}

/* ---------- Cluster landing (article header kiểu cluster-template) ---------- */
article.cluster { padding: 48px 0 16px; }
article.cluster h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 24px;
}
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-meta i { font-size: 14px; color: var(--accent); }
article.cluster .disclosure { margin: 0; }

/* GEO/AEO — câu trả lời trực tiếp 40-60 từ (theo 01-PLAN.md) */
.quick-answer {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  margin: 24px 0 8px;
}
.quick-answer h2 { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--primary); margin-bottom: 8px; }
.quick-answer p { font-size: 14px; color: var(--text-secondary); }
.quick-answer strong { color: var(--primary); font-weight: 500; }
@media (max-width: 720px) {
  article.cluster h1 { font-size: 28px; }
}

/* ---------- Footer ---------- */
footer.site {
  background: var(--card);
  border-top: 0.5px solid var(--border);
  padding: 32px 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}
footer.site strong { color: var(--text-secondary); font-weight: 500; }
footer.site .credit { margin-top: 12px; padding-top: 12px; border-top: 0.5px solid var(--border); }
footer.site .credit strong { color: var(--primary); }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-top: 0.5px solid var(--border);
  padding: 12px 24px;
  box-shadow: 0 -4px 12px rgba(126, 42, 71, 0.10);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sticky-cta[hidden] { display: none; }
.sticky-cta .info { font-size: 13px; color: var(--text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-cta .info strong { color: var(--primary); font-weight: 500; }
.sticky-cta a.sc-buy {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 12px 24px;
  background: var(--accent); color: var(--primary);
  border-radius: 6px;
  font-weight: 500; font-size: 14px;
  white-space: nowrap;
  transition: 220ms;
}
.sticky-cta a.sc-buy:hover { background: var(--accent-dark); color: var(--primary); }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  section.hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 32px; }
  .hero .sub { font-size: 15px; }
  section.block { padding: 36px 0 4px; }
  .section-head h2, h2.section-title { font-size: 22px; }
  .trust-bar .items { gap: 18px; font-size: 12px; }
  .review-head { flex-wrap: wrap; }
  .review-rank { font-size: 30px; min-width: 40px; }
  .review-title h3 { font-size: 15px; }
  .review-img { width: 72px; height: 72px; }
  .compare-table { font-size: 13px; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
  .sticky-cta .info { font-size: 12px; }
}
@media (max-width: 480px) {
  .sticky-cta .info { display: none; }
  .sticky-cta { justify-content: center; }
}

/* ============================================================
   HIỆU ỨNG CHUYỂN ĐỘNG MƯỢT (micro-interactions + scroll reveal)
   ============================================================ */

/* Cuộn mượt cho anchor nav */
html { scroll-behavior: smooth; }

/* Reveal khi cuộn tới (JS gắn class .in qua IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* Header đổ bóng nhẹ khi cuộn */
header.site { transition: box-shadow 0.3s var(--ease); }
header.site.scrolled { box-shadow: 0 6px 24px rgba(126, 42, 71, 0.10); }

/* Card sản phẩm: nâng + đổ bóng hồng + zoom ảnh */
.review-card { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease); }
.review-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(126, 42, 71, 0.10);
}
.review-img { position: relative; }
.review-img img { transition: transform 0.6s var(--ease); }
.review-card:hover .review-img img { transform: scale(1.08); }
.review-card:hover .review-rank { transform: scale(1.06); }
.review-rank { transition: transform 0.35s var(--ease); }

/* Pick card TL;DR */
.pick-card { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease); }
.pick-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(126, 42, 71, 0.10); }

/* Pillar card: icon nhún nhẹ */
.pillar-card { transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.pillar-card:hover { box-shadow: 0 10px 24px rgba(126, 42, 71, 0.08); }
.pillar-card i { transition: transform 0.3s var(--ease); }
.pillar-card:hover i { transform: translateY(-3px) scale(1.08); }

/* CTA: mũi tên trượt + hiệu ứng loáng sáng */
.cta-shopee { position: relative; overflow: hidden; }
.cta-shopee i { transition: transform 0.25s var(--ease); }
.cta-shopee:hover i { transform: translateX(4px); }
.cta-shopee::after {
  content: '';
  position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s var(--ease);
  pointer-events: none;
}
.cta-shopee:hover::after { left: 130%; }

/* Feat row: mũi tên chạy */
.feat-row .arrow { transition: transform 0.3s var(--ease); }
.feat-row:hover .arrow { transform: translateX(6px); }

/* Related card */
.related-card { transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.related-card:hover { box-shadow: 0 10px 24px rgba(126, 42, 71, 0.08); }

/* Sticky CTA trượt lên khi xuất hiện + nút nhịp nhẹ */
.sticky-cta { animation: stickyUp 0.5s var(--ease); }
@keyframes stickyUp { from { transform: translateY(100%); } to { transform: none; } }
.sticky-cta a.sc-buy { transition: transform 0.25s var(--ease), background 0.25s var(--ease); }
.sticky-cta a.sc-buy:hover { transform: translateY(-2px); }

/* Nút xem thêm */
.btn-more { transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease); }
.btn-more:hover { transform: translateY(-2px); }

/* Badge lấp lánh nhẹ cho pick "Đáng mua nhất" */
.pick-badge.overall, .article-badge {
  background-image: linear-gradient(100deg, var(--accent) 40%, #EBB3C4 50%, var(--accent) 60%);
  background-size: 200% 100%;
  animation: badgeSheen 3.5s ease infinite;
}
@keyframes badgeSheen {
  0%, 60% { background-position: 120% 0; }
  100% { background-position: -60% 0; }
}

/* Tôn trọng người dùng tắt chuyển động */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  section.hero, .pick-badge.overall, .article-badge, .sticky-cta { animation: none; }
  .review-card, .pick-card, .pillar-card, .related-card, .btn-more,
  .cta-shopee i, .review-img img, .feat-row .arrow { transition: none; }
}

/* ============================================================
   BIỂU ĐỒ XẾP HẠNG BÁN CHẠY (rank chart) — 1 series màu berry,
   độ dài cột theo MỐC "đã bán" Shopee (1k+ → 1tr+), icon huy chương
   mang thông tin hạng, hiệu ứng cột chạy khi cuộn tới.
   ============================================================ */
section.rank-chart-section { padding: 32px 0 8px; }
.rank-chart { display: flex; flex-direction: column; gap: 10px; }
.rc-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px 10px 12px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.rc-row:hover {
  transform: translateX(6px);
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(126, 42, 71, 0.10);
  color: inherit;
}
.rc-medal {
  min-width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 15px; color: var(--text-secondary);
  background: var(--muted-bg);
  flex-shrink: 0;
}
.rc-medal i { font-size: 19px; }
.rc-medal.m1 { background: linear-gradient(135deg, #F7E7B8, #E9C97E); color: #8A6A1E; }
.rc-medal.m2 { background: linear-gradient(135deg, #EFEFEF, #D9D9DC); color: #6E6E76; }
.rc-medal.m3 { background: linear-gradient(135deg, #F2DBC8, #E0B491); color: #8A5A2E; }
.rc-medal.m1 i { animation: trophyPop 2.8s var(--ease) infinite; }
@keyframes trophyPop {
  0%, 80%, 100% { transform: none; }
  86% { transform: scale(1.18) rotate(-8deg); }
  93% { transform: scale(1.08) rotate(6deg); }
}
.rc-thumb {
  width: 34px; height: 34px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; background: var(--muted-bg);
}
.rc-main { flex: 1; min-width: 0; }
.rc-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.rc-bar-wrap { height: 10px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; }
.rc-bar {
  height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent-dark));
  transition: width 1s var(--ease);
  transition-delay: var(--d, 0ms);
  position: relative;
}
.rc-row.in .rc-bar { width: var(--w, 40%); }
.rc-row.in:first-child .rc-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.45) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: barSheen 2.6s ease infinite;
  border-radius: 999px;
}
@keyframes barSheen { 0% { background-position: 150% 0; } 100% { background-position: -80% 0; } }
.rc-val { text-align: right; flex-shrink: 0; min-width: 74px; line-height: 1.35; }
.rc-val b { font-size: 13.5px; color: var(--text); display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.rc-val b i { color: var(--danger); font-size: 14px; }
.rc-val .rc-sub { font-size: 11px; color: var(--text-muted); display: block; }
.rc-go { color: var(--border-strong); font-size: 18px; transition: 0.3s var(--ease); flex-shrink: 0; }
.rc-row:hover .rc-go { color: var(--primary); transform: translateX(3px); }
.rank-chart-note { font-size: 11.5px; color: var(--text-muted); margin-top: 10px; }
@media (max-width: 640px) {
  .rc-val { min-width: 60px; }
  .rc-thumb { display: none; }
}

/* ============================================================
   CTA HIỆU ỨNG MẠNH + NÚT HOÀN TIỀN + TOAST COPY
   ============================================================ */
.cta-row { display: flex; gap: 10px; margin-top: 10px; }
.cta-row .cta-shopee { flex: 1.5; margin-top: 0; }
.cta-cashback {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 10px;
  border-radius: 6px;
  font-size: 14px; font-weight: 600;
  background: linear-gradient(120deg, #E9C97E, var(--gold) 45%, #C89838);
  background-size: 180% 100%;
  color: #4F3A10;
  white-space: nowrap;
  transition: background-position 0.4s var(--ease), transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.cta-cashback:hover {
  background-position: 90% 0;
  color: #3A2A0A;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 166, 74, 0.35);
}
.cta-cashback i { font-size: 17px; }
.cta-cashback:hover i { animation: coinFlip 0.6s var(--ease); }
@keyframes coinFlip { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }

/* CTA chính: nền gradient chuyển động khi hover */
.cta-shopee {
  background: linear-gradient(120deg, var(--primary), #9A3A5C 55%, var(--primary-dark));
  background-size: 200% 100%;
  transition: background-position 0.45s var(--ease), transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.cta-shopee:hover { background-position: 95% 0; box-shadow: 0 10px 24px rgba(126, 42, 71, 0.28); }

/* Pulse ring hút mắt cho CTA của top-pick và sticky */
@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 rgba(126, 42, 71, 0.38); }
  70% { box-shadow: 0 0 0 12px rgba(126, 42, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 42, 71, 0); }
}
.top-pick .cta-shopee { animation: ctaPulse 2.6s var(--ease) infinite; }
@keyframes ctaPulseGold {
  0% { box-shadow: 0 0 0 0 rgba(212, 166, 74, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(212, 166, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 166, 74, 0); }
}
.sticky-cta a.sc-buy { animation: ctaPulseGold 2.4s var(--ease) infinite; }
.sticky-cta a.sc-buy i { animation: nudgeX 1.8s var(--ease) infinite; }
@keyframes nudgeX { 0%, 100% { transform: none; } 50% { transform: translateX(3px); } }

/* Vệt sáng tự chạy định kỳ trên CTA top-pick (không cần hover) */
.top-pick .cta-shopee::after { animation: autoShine 4.5s ease infinite; }
@keyframes autoShine {
  0%, 62% { left: -80%; }
  86%, 100% { left: 130%; }
}

/* Nút hoàn tiền nhỏ trong sticky */
.sticky-cta a.sc-cash {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 5px;
  padding: 12px 16px;
  border-radius: 6px;
  background: linear-gradient(120deg, #E9C97E, var(--gold));
  color: #4F3A10; font-weight: 600; font-size: 13px;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.sticky-cta a.sc-cash:hover { transform: translateY(-2px); color: #3A2A0A; box-shadow: 0 6px 16px rgba(212,166,74,.35); }

/* Toast "đã copy link" */
#copy-toast {
  position: fixed;
  left: 50%; bottom: 86px;
  transform: translate(-50%, 16px);
  background: var(--text);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  max-width: min(92vw, 480px);
  text-align: center;
  line-height: 1.45;
}
#copy-toast.show { opacity: 1; transform: translate(-50%, 0); }
#copy-toast b { color: #F3D9A0; font-weight: 600; }

@media (max-width: 560px) {
  .cta-row { flex-direction: column; }
  .sticky-cta a.sc-cash span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-bar { transition: none; }
  .rc-row.in .rc-bar { width: var(--w, 40%); }
  .rc-medal.m1 i, .top-pick .cta-shopee, .sticky-cta a.sc-buy, .sticky-cta a.sc-buy i,
  .rc-row.in:first-child .rc-bar::after, .top-pick .cta-shopee::after,
  .cta-cashback:hover i { animation: none; }
}

/* ============================================================
   POPUP KẾT QUẢ TÌM KIẾM — card nhỏ cân đối: ảnh + tên + rating
   + giá/% giảm + 2 nút (Xem giá / Hoàn tiền), hiệu ứng mượt
   ============================================================ */
.hero-search { position: relative; }
.search-popup {
  position: absolute;
  top: calc(100% + 10px); left: 0; right: 0;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(126, 42, 71, 0.18);
  z-index: 70;
  text-align: left;
  overflow: hidden;
  animation: popIn 0.28s var(--ease);
  transform-origin: top center;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.sp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  font-size: 12px; color: var(--text-muted);
  background: var(--muted-bg);
  border-bottom: 0.5px solid var(--border);
}
.sp-head b { color: var(--primary); font-weight: 600; }
.sp-list { max-height: 388px; overflow-y: auto; scrollbar-width: thin; }
.sp-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--border);
  animation: spItemIn 0.35s var(--ease) both;
  transition: background 0.25s var(--ease);
}
.sp-item:hover { background: var(--accent-soft); }
.sp-item:last-child { border-bottom: none; }
@keyframes spItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
.sp-thumb {
  width: 52px; height: 52px;
  border-radius: 10px; object-fit: cover;
  background: var(--muted-bg);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}
.sp-item:hover .sp-thumb { transform: scale(1.08); }
.sp-info { flex: 1; min-width: 0; }
.sp-name {
  font-size: 12.5px; font-weight: 500; color: var(--text);
  line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); margin-top: 2px; flex-wrap: wrap; }
.sp-meta .stars { font-size: 11px; letter-spacing: 0.5px; }
.sp-meta .sp-hot { color: var(--danger); font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.sp-meta .sp-hot i { font-size: 12px; }
.sp-price { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; }
.sp-price .price { font-size: 14.5px; font-weight: 700; color: var(--primary); }
.sp-price .price-old { font-size: 11px; }
.sp-price .off-chip { font-size: 10px; padding: 0 6px; }
.sp-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.sp-buy, .sp-cash {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 11.5px; font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease), background-position 0.4s var(--ease);
}
.sp-buy {
  background: linear-gradient(120deg, var(--primary), #9A3A5C 55%, var(--primary-dark));
  background-size: 180% 100%;
  color: #fff;
}
.sp-buy:hover { color: #fff; background-position: 90% 0; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(126,42,71,.3); }
.sp-cash {
  background: linear-gradient(120deg, #E9C97E, var(--gold) 50%, #C89838);
  background-size: 180% 100%;
  color: #4F3A10;
}
.sp-cash:hover { color: #3A2A0A; background-position: 90% 0; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(212,166,74,.35); }
.sp-buy i, .sp-cash i { font-size: 13px; }
.sp-cash:hover i { animation: coinFlip 0.6s var(--ease); }
.sp-empty { padding: 22px 16px; font-size: 13px; color: var(--text-secondary); text-align: center; }
.sp-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  padding: 11px;
  background: var(--muted-bg);
  color: var(--primary);
  font-size: 12.5px; font-weight: 600;
  border: none; border-top: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.sp-all:hover { background: var(--accent-soft); }
.sp-all i { transition: transform 0.25s var(--ease); }
.sp-all:hover i { transform: translateY(2px); }
@media (max-width: 560px) {
  .sp-actions { flex-direction: row; }
  .sp-item { flex-wrap: wrap; }
  .sp-actions { width: 100%; }
  .sp-buy, .sp-cash { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .search-popup, .sp-item { animation: none; }
}
