/*
Theme Name: VHP Store
Theme URI: https://vhpmark.store
Author: VHPMark
Description: Theme review đồ gia dụng thông minh cho vhpmark.store — nhẹ, nhanh, tối ưu đọc trên điện thoại, có hộp sản phẩm, bảng so sánh, mục lục tự động và tiết lộ liên kết.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: vhpstore
*/

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1c2320;
  --muted: #5d6964;
  --line: #e3e1d9;
  --brand: #0f766e;
  --brand-ink: #0a4d48;
  --brand-soft: #e6f2f0;
  --accent: #e8590c;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e8;
  --good: #15803d;
  --bad: #b42318;
  --star: #f59e0b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(28, 35, 32, .05), 0 6px 20px rgba(28, 35, 32, .06);
  --wrap: 1160px;
  --read: 720px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { line-height: 1.3; margin: 1.6em 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.2vw, 40px); margin-top: .2em; }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 20px; }
p { margin: 0 0 1.1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; margin-top: -3px; }
.site-header .brand { white-space: nowrap; min-width: 0; }
@media (max-width: 420px) { .site-header .brand small { display: none; } .site-header .wrap { gap: 10px; } }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-cat > a { background: var(--brand-soft); color: var(--brand-ink); }
.header-search { display: flex; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }
.search-panel { display: none; border-top: 1px solid var(--line); background: var(--surface); }
.search-panel.open { display: block; }
.search-panel .wrap { padding-top: 14px; padding-bottom: 14px; }

.search-form { display: flex; gap: 8px; width: 100%; }
.search-form input[type=search] {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
}
.search-form button { height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.search-form button:hover { background: var(--brand-ink); }

@media (max-width: 1120px) {
  .nav-toggle { display: grid; }
  .main-nav { position: fixed; inset: 64px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { padding: 12px; font-size: 16px; }
  .header-search { margin-left: auto; }
}

/* ---------- Hero (home) ---------- */
.hero { padding: 56px 0 36px; }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; }
.eyebrow svg { width: 15px; height: 15px; flex: none; }
svg { flex: none; }
.hero h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.12; margin: 16px 0 14px; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 34em; }
.hero .search-form { max-width: 520px; margin-top: 22px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.hero-card h2 { font-size: 15px; margin: 0 0 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.trust-list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.5; }
.trust-list b { display: block; font-size: 16px; }
.trust-list span { color: var(--muted); }
.trust-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.trust-ico svg { width: 19px; height: 19px; }
@media (max-width: 860px) { .hero { padding-top: 32px; } .hero-inner { grid-template-columns: 1fr; gap: 26px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.chips a:hover { border-color: var(--brand); color: var(--brand-ink); }
.chips .count { font-size: 12px; color: var(--muted); }

/* ---------- Sections & cards ---------- */
.section { padding: 28px 0 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 24px; }
.section-head a { font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; gap: 16px; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-thumb { aspect-ratio: 16/10; background: var(--brand-soft); overflow: hidden; display: block; }
.card-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--brand); background: radial-gradient(120% 120% at 0% 0%, #d7ece8 0%, var(--brand-soft) 50%, #f3ece1 100%); }
.thumb-fallback svg { width: 46px; height: 46px; opacity: .8; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); text-decoration: none; }
.card-title { font-size: 18px; line-height: 1.4; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand-ink); }
.card-excerpt { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; font-size: 13px; color: var(--muted); display: flex; gap: 12px; }

.card--feature { grid-column: span 2; flex-direction: row; }
.card--feature .card-thumb { flex: 1.1; aspect-ratio: auto; min-height: 280px; }
.card--feature .card-body { flex: 1; padding: 26px; justify-content: center; }
.card--feature .card-title { font-size: 26px; }
@media (max-width: 960px) { .card--feature { grid-column: span 2; } }
@media (max-width: 600px) { .card--feature { grid-column: auto; flex-direction: column; } .card--feature .card-thumb { min-height: 0; aspect-ratio: 16/10; } .card--feature .card-title { font-size: 20px; } .card--feature .card-body { padding: 16px 18px 18px; } }

.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); }
.empty-state b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }

.how { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 40px; padding: 40px 0; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.how-grid h3 { margin: 10px 0 6px; font-size: 18px; }
.how-grid p { color: var(--muted); font-size: 15px; margin: 0; }
.how-num { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
@media (max-width: 760px) { .how-grid { grid-template-columns: 1fr; } }

/* ---------- Archive ---------- */
.page-head { padding: 34px 0 10px; }
.page-head h1 { margin: 6px 0 8px; }
.page-head p { color: var(--muted); max-width: 46em; }
.pagination { display: flex; justify-content: center; gap: 6px; margin: 36px 0 10px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 42px; height: 42px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Single ---------- */
.breadcrumbs { font-size: 14px; color: var(--muted); padding: 22px 0 0; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs span[aria-hidden] { margin: 0 6px; opacity: .6; }

.article-layout { display: grid; grid-template-columns: minmax(0, var(--read)) 300px; gap: 48px; justify-content: center; padding: 10px 0 40px; }
@media (max-width: 1060px) { .article-layout { grid-template-columns: minmax(0, var(--read)); } .article-aside { display: none; } }
.article-header { margin: 14px 0 22px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin: 0 0 26px; border: 1px solid var(--line); background: #fff; }
.article-cover img { width: 100%; max-height: 440px; object-fit: contain; }

.disclosure { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border: 1px solid #f8d4bd; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; line-height: 1.55; color: #6b3410; margin: 0 0 26px; }
.disclosure svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.disclosure a { color: inherit; font-weight: 600; }

.entry { font-size: 18px; }
.entry > * + h2 { padding-top: 6px; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry li { margin: .3em 0; }
.entry blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand); color: var(--muted); }
.entry figure { margin: 1.6em 0; }
.entry figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.entry img { border-radius: var(--radius-sm); }
.entry table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.4em 0; }
.entry :where(table) th, .entry :where(table) td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry :where(table) th { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 1.4em 0; background: var(--surface); }
.table-scroll table { margin: 0; min-width: 560px; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 28px; font-size: 15px; }
.toc summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.toc[open] summary::after { content: "–"; }
.toc ol { margin: 12px 0 0; padding-left: 1.2em; }
.toc li { margin: .35em 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.article-aside .toc { position: sticky; top: 88px; }
.article-aside .toc summary::after { content: none; }
@media (min-width: 1061px) { .toc-mobile { display: none; } }

/* ---------- Product box ---------- */
.product-box { display: grid; grid-template-columns: 200px 1fr; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 1.8em 0; box-shadow: var(--shadow); position: relative; }
.product-box .pb-media { border-radius: var(--radius-sm); overflow: hidden; background: var(--brand-soft); aspect-ratio: 1; display: grid; place-items: center; }
.product-box .pb-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.product-box .pb-badge { position: absolute; top: -12px; left: 20px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.product-box .pb-name { font-size: 20px; margin: 0 0 6px; line-height: 1.35; }
.product-box .pb-price { font-size: 15px; color: var(--muted); margin: 0 0 10px; }
.product-box .pb-price b { color: var(--accent); font-size: 20px; }
.product-box .pb-desc { font-size: 16px; }
.product-box .pb-desc > :last-child { margin-bottom: 0; }
.product-box .pb-cta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.product-box .pb-note { font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .product-box { grid-template-columns: 1fr; padding: 18px; } .product-box .pb-media { max-width: 220px; margin: 0 auto; } }

.btn-buy, .entry a.btn-buy, .wp-block-button.is-style-buy .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink) !important;
  font-weight: 700; font-size: 16px; padding: 12px 20px; border-radius: 12px; text-decoration: none; line-height: 1.2;
  box-shadow: 0 2px 0 #b8460a;
}
.btn-buy:hover { filter: brightness(1.05); }
.btn-buy svg { width: 18px; height: 18px; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.4em 0; }
.pros-cons > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 16px; }
.pros-cons h4 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.pros-cons .pros h4 { color: var(--good); }
.pros-cons .cons h4 { color: var(--bad); }
.pros-cons ul { list-style: none; padding: 0; margin: 0; }
.pros-cons li { padding-left: 24px; position: relative; margin: .4em 0; }
.pros-cons .pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.pros-cons .cons li::before { content: "–"; position: absolute; left: 2px; color: var(--bad); font-weight: 700; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }

.verdict { background: var(--brand-soft); border-radius: var(--radius); padding: 18px 20px; margin: 1.8em 0; border-left: 5px solid var(--brand); }
.verdict > :first-child { margin-top: 0; }
.verdict > :last-child { margin-bottom: 0; }

.compare-table .col-pick { background: var(--brand-soft); }

/* ---------- Aside / related ---------- */
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-size: 15px; margin-bottom: 20px; }
.aside-card h3 { margin: 0 0 10px; font-size: 16px; }
.related { border-top: 1px solid var(--line); padding: 30px 0 10px; }
.related h2 { margin: 0 0 18px; font-size: 22px; }

.author-box { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 34px 0 0; font-size: 15px; color: var(--muted); }
.author-box b { color: var(--ink); display: block; }

/* ---------- Page ---------- */
.page-content { max-width: var(--read); margin: 0 auto; padding: 10px 0 50px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 50px; background: #16201d; color: #c9d3cf; font-size: 15px; }
.site-footer a { color: #e8efec; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 44px 0 28px; }
.footer-grid h3 { color: #fff; font-size: 15px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .06em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand small { color: #9fb0aa; }
.footer-note { border-top: 1px solid #2a3632; padding: 18px 0 26px; font-size: 13px; color: #9fb0aa; line-height: 1.6; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

.to-top { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); display: none; place-items: center; color: var(--ink); z-index: 40; cursor: pointer; }
.to-top.show { display: grid; }

/* WordPress core helpers */
.alignwide { max-width: 1000px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 14px; color: var(--muted); }
