/*
Theme Name: 2LOCK
Theme URI: https://2lock.vn
Author: 2LOCK
Description: Theme WordPress cho thương hiệu gia dụng Hàn Quốc 2LOCK: catalog sản phẩm (CRUD trong admin), tin tức, cảm nhận khách hàng và form đăng ký đại lý.
Version: 1.3.6
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: 2lock
*/
/* Bố cục: dải ngang toàn chiều rộng, nội dung trong khung 1200px; hero chia đôi chữ/hình, catalog dạng lưới lọc theo danh mục. */
:root {
  --bg: #FAF8F5;
  --surface: #F2ECE5;
  --card-bg: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #6B6560;
  --line: rgba(26,26,26,.09);
  --line-strong: rgba(26,26,26,.2);
  --accent: #E1262D;
  --accent-hover: #C21C23;
  --on-accent: #FFFFFF;
  --label: #A88A66;
  --hero-bg: #F2ECE5;
  --header-bg: rgba(250,248,245,.94);
  --tile: #FFFFFF;
  --tile-ink: #A88A66;
  --deep-bg: #111111;
  --deep-ink: #F5F2EE;
  --deep-muted: #A8A29C;
  --deep-line: rgba(245,242,238,.14);
  --deep-accent: #C9AD8C;
  --form-bg: #FAF8F5;
  --focus-ring: rgba(225,38,45,.18);
  --error: #B3261E;
  --call-bg: #E1262D;
  --f-display: 'Be Vietnam Pro', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Be Vietnam Pro', 'Helvetica Neue', Arial, sans-serif;
  --f-logo: 'Be Vietnam Pro', sans-serif;
  --wrap: 1200px;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 300; line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 16px; padding-right: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band { padding-top: 88px; padding-bottom: 88px; padding-block: clamp(56px, 9vw, 120px); }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--label); font-weight: 600; }
.sec-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 46px); }
.sec-head p { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: var(--radius); font: 600 15px/1 var(--f-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--accent-hover); }
.btn-line { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--header-bg); }
.site-header { -webkit-backdrop-filter: blur(12px); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.logo { font-family: var(--f-logo); font-size: 24px; font-weight: 600; letter-spacing: 0; text-decoration: none; text-transform: none; }
.logo span { color: var(--accent); }
.logo img { height: 22px; width: auto; display: block; }
.site-footer .logo img { height: 20px; }
.nav { display: flex; align-items: center; gap: 30px; white-space: nowrap; }
.nav a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .btn { min-height: 40px; padding: 0 18px; font-size: 14px; color: var(--on-accent); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); color: var(--ink); border-radius: var(--radius); height: 40px; padding: 0 14px; font: 600 14px var(--f-body); cursor: pointer; }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav .btn { margin-top: 16px; border-bottom: 0; }
}

/* Hero */
.hero { background: var(--hero-bg); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding-block: clamp(56px, 8vw, 104px); }
.hero-text { display: grid; gap: 24px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); }
.hero-lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-facts div { display: grid; gap: 2px; }
.hero-facts b { font-family: var(--f-display); font-size: 24px; font-weight: 300; color: var(--ink); }
.hero-facts small { font-size: 13px; color: var(--muted); }
.hero-art { justify-self: center; width: 100%; max-width: 480px; aspect-ratio: 1; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-art.photo { aspect-ratio: 4 / 5; max-width: 520px; border-radius: var(--radius); overflow: hidden; }
.hero-art.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-media { margin-top: 32px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; }
.story-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { max-width: 320px; order: -1; } }

/* Câu chuyện */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.story-body { display: grid; gap: 18px; color: var(--muted); font-size: 17px; max-width: 60ch; min-width: 0; }
.story-body p:first-child { color: var(--ink); font-size: 20px; line-height: 1.55; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 64px; }
.pillar { background: var(--bg); padding: 32px 28px; display: grid; gap: 10px; align-content: start; }
.pillar h3 { font-size: 21px; }
.pillar p { color: var(--muted); font-size: 15px; }
.pillar .mark { width: 28px; height: 2px; background: var(--accent); }
@media (max-width: 820px) { .story-grid, .pillars { grid-template-columns: 1fr; } }

/* Mẫu mới */
.new-band { background: var(--surface); }
.new-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .new-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .new-grid { grid-template-columns: 1fr; } }

/* Thẻ sản phẩm */
.card { display: grid; grid-template-rows: auto 1fr; background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 1 / 1; background: var(--tile); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb.has-img { background: #fff; }
.thumb .code { font-family: var(--f-display); font-size: clamp(28px, 3.2vw, 40px); color: var(--tile-ink); letter-spacing: .04em; }
.thumb .ph { position: absolute; bottom: 10px; right: 12px; font-size: 11px; color: var(--tile-ink); opacity: .7; letter-spacing: .08em; text-transform: uppercase; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: calc(var(--radius) / 2); }
.card-body { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 6px; padding: 20px 20px 22px; min-width: 0; }
.card-code { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sw { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 3px 10px; font: 500 12px var(--f-body); cursor: pointer; }
.sw[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.price.contact { font-family: var(--f-body); font-size: 15px; font-weight: 600; color: var(--muted); }
.card-cat { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.card h3 { font-size: 20px; }
.card-desc { font-size: 14px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font-family: var(--f-display); font-size: 21px; font-weight: 300; font-variant-numeric: tabular-nums; color: var(--ink); }
.price s { display: block; font-family: var(--f-body); font-size: 13px; color: var(--muted); font-weight: 400; }
.ask { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.ask:hover { text-decoration: underline; }

/* Catalog */
.cat-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search:not(body) { position: relative; flex: 1 1 260px; max-width: 360px; }
.search:not(body) input { width: 100%; min-height: 44px; padding: 0 14px 0 40px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card-bg); color: var(--ink); font: 15px var(--f-body); }
.search:not(body) input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-ring); }
.search:not(body) svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--muted); }
.price .vat { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 2px; }
.result-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { grid-column: 1 / -1; padding: 48px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.open-pd:not(.thumb) { all: unset; cursor: pointer; display: block; }
.thumb.open-pd { border: 0; padding: 0; margin: 0; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.open-pd:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card h3 .open-pd:hover { text-decoration: underline; text-underline-offset: 3px; }
.thumb.fit-cover img { object-fit: cover; }
.sw.more { border-style: dashed; }

/* Chi tiết sản phẩm */
.pd { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 90; background: rgba(17,17,17,.55); display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.pd-box { position: relative; width: min(920px, 100%); max-height: 100%; overflow: auto; background: var(--card-bg); border-radius: var(--radius); display: grid; grid-template-columns: 1.1fr 1fr; }
.pd-img { background: #fff; aspect-ratio: 1; display: grid; place-items: center; min-width: 0; }
.pd-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-info { padding: clamp(22px, 4vw, 40px); display: grid; gap: 12px; align-content: start; min-width: 0; }
.pd-info h3 { font-size: clamp(24px, 3vw, 32px); }
.pd-info .swatches { margin-top: 0; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pd-actions .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.pd-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; z-index: 1; }
.pd-note { font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .pd-box { grid-template-columns: 1fr; } .pd-img { aspect-ratio: 4 / 3; } }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 32px; scrollbar-width: thin; }
.tab { flex: none; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 10px 18px; font: 500 14px var(--f-body); cursor: pointer; transition: all .2s; }
.tab:hover { color: var(--ink); border-color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tab small { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1080px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) { .cat-grid { grid-template-columns: 1fr 1fr; gap: 14px; } .card-body { padding: 16px; } .card h3 { font-size: 17px; } .price { font-size: 18px; } }
@media (max-width: 340px) { .cat-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .card-foot { flex-direction: column; align-items: flex-start; gap: 6px; } .thumb .code { font-size: 22px; } }
.price-note { margin-top: 28px; font-size: 13px; color: var(--muted); }

/* Tin tức */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
/* Tin nổi bật (ô lớn bên trái) chỉ khi có từ 4 bài; 1–3 bài chia đều, không để trống cột */
.news-grid:has(> :nth-child(4)) { grid-template-columns: 1.3fr 1fr 1fr; }
.news-grid:has(> :nth-child(4)) > :first-child { grid-row: span 2; grid-template-rows: 1fr auto; }
.news-grid:has(> :nth-child(4)) > :first-child .post-media { aspect-ratio: auto; min-height: 260px; }
.news-grid:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-grid:not(:has(> :nth-child(2))) { grid-template-columns: minmax(0, 760px); }
@media (max-width: 960px) { .news-grid, .news-grid:has(> :nth-child(4)) { grid-template-columns: 1fr 1fr; } .news-grid:has(> :nth-child(3)) > :first-child { grid-column: 1 / -1; grid-row: auto; grid-template-rows: auto 1fr; } .news-grid > :first-child .post-media { aspect-ratio: 16 / 9; min-height: 0; } }
@media (max-width: 600px) { .news-grid, .news-grid:has(> :nth-child(4)), .news-grid:not(:has(> :nth-child(3))) { grid-template-columns: 1fr; } }
.post { display: grid; grid-template-rows: auto 1fr; background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.post-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-media .play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; }
.post-media .play::after { content: ""; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.post-body { display: grid; gap: 8px; align-content: start; padding: 20px 22px 24px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.chip { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: var(--surface); color: var(--ink); }
.chip.pin { background: var(--accent); color: var(--on-accent); }
.post h3 { font-size: 20px; }
.post p { font-size: 14px; color: var(--muted); }
.sample-note { margin-top: 20px; font-size: 13px; color: var(--muted); border-left: 2px solid var(--label); padding-left: 12px; }

/* Feedback */
.reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .reviews { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .reviews { gap: 12px; } .review-body { padding: 14px; } .review q { font-size: 14px; } }
.review { display: grid; grid-template-rows: auto 1fr; background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.review-photo { aspect-ratio: 1; background: var(--surface); display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }
.review-photo img { width: 100%; height: 100%; object-fit: cover; }
.review-body { display: grid; gap: 8px; align-content: start; padding: 18px 18px 20px; }
.stars { color: #E8A33D; letter-spacing: 2px; font-size: 14px; }
.review q { font-size: 15px; line-height: 1.55; quotes: "“" "”"; }
.review small { color: var(--muted); font-size: 12px; }

/* Đại lý */
.dealer-band { background: var(--deep-bg); color: var(--deep-ink); }
.dealer-band .eyebrow { color: var(--deep-accent); }
.dealer-band .sec-head p, .dealer-band .muted { color: var(--deep-muted); }
.dealer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.dealer-grid > * { min-width: 0; }
.perks { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--deep-line); }
.perks li { padding: 18px 0; border-bottom: 1px solid var(--deep-line); display: grid; gap: 4px; }
.perks b { font-family: var(--f-display); font-weight: 300; font-size: 19px; }
.perks span { color: var(--deep-muted); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 36px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; font-size: 14px; color: var(--deep-muted); display: grid; gap: 6px; }
.steps li::before { content: "Bước " counter(s); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--deep-accent); font-weight: 700; }
@media (max-width: 860px) { .dealer-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr 1fr; } }
.form { background: var(--form-bg); color: var(--ink); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; gap: 16px; }
.form h3 { font-size: 26px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; font: 15px var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: calc(var(--radius) / 1.5); padding: 12px 14px; min-height: 48px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.err { color: var(--error); font-size: 13px; min-height: 1em; }
.done { display: grid; gap: 10px; padding: 20px; border: 1px solid var(--accent); border-radius: var(--radius); }
.done b { font-family: var(--f-display); font-size: 20px; font-weight: 300; }
.done p { font-size: 14px; color: var(--muted); }

/* Facebook */
.fb-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.fb-band h2 { font-size: clamp(26px, 3.4vw, 38px); max-width: 620px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px; padding-bottom: calc(48px + 80px); font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Nút nổi */
.float { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70; display: grid; gap: 10px; }
.float a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.22); transition: transform .2s; position: relative; }
.float a:hover { transform: scale(1.06); }
.float a::after { content: attr(data-label); position: absolute; right: 62px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: #1b1b1b; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.float a:hover::after, .float a:focus-visible::after { opacity: 1; }
.f-zalo { background: #0068FF; color: #fff; font: 700 13px/1 Arial, sans-serif; }
.f-fb { background: #1877F2; color: #fff; }
.f-call { background: var(--call-bg); color: #fff; }
.f-call::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--call-bg); animation: ring 2s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.float svg { width: 24px; height: 24px; fill: currentColor; }

/* ===== Bổ sung cho WordPress ===== */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.nav ul { list-style: none; margin: 0; padding: 0; display: contents; }
.nav li { display: contents; }
.post { text-decoration: none; color: inherit; }
.post h3 a { text-decoration: none; }
.post h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-head { background: var(--hero-bg); padding-block: clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: clamp(32px, 4.6vw, 52px); }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 640px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
.entry { max-width: 760px; margin: 0 auto; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.entry-cover { margin: 32px 0; border-radius: var(--radius); overflow: hidden; }
.entry-cover img { width: 100%; height: auto; display: block; }
.entry-content { font-size: 17px; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 30px; margin-top: 1.6em; }
.entry-content h3 { font-size: 23px; margin-top: 1.4em; }
.entry-content img { max-width: 100%; height: auto; border-radius: calc(var(--radius) / 1.5); }
.entry-content a { color: var(--accent); }
.entry-content blockquote { border-left: 2px solid var(--accent); margin-left: 0; padding-left: 18px; color: var(--muted); }
.entry-content .video-embed { position: relative; aspect-ratio: 16/9; }
.entry-content .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.alignwide { max-width: 1000px; } .aligncenter { margin-inline: auto; display: block; }
.pagination { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; font-size: 14px; }
.pagination .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs a.tab { text-decoration: none; }
.sp-single { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.sp-single .pd-img { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sp-single .pd-info { padding: 0; }
.sp-single h1 { font-size: clamp(28px, 3.6vw, 42px); }
.sp-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sp-gallery button { width: 72px; height: 72px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.sp-gallery button[aria-pressed="true"] { border-color: var(--ink); }
.sp-gallery img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 820px) { .sp-single { grid-template-columns: 1fr; } }
.related { margin-top: 80px; }
.form .done[hidden] { display: none; }
.notfound { text-align: center; display: grid; gap: 18px; justify-items: center; }


/* =====================================================================
   RESPONSIVE & TƯƠNG THÍCH TRÌNH DUYỆT
   Điện thoại 280–480px · máy tính bảng 600–1024px · laptop/PC 1024–1920px
   · màn 2K/4K & Smart TV (phóng to theo tỉ lệ) · Chrome, Safari iOS/macOS,
   Firefox, Edge, Samsung Internet, Cốc Cốc, trình duyệt TV (Tizen/webOS).
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
@supports (overflow-x: clip) { body { overflow-x: clip; } }
img, svg, video, iframe { max-width: 100%; }
a, button, .tab, .sw { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.card h3, .card-desc, .card-code, .post h3, .post p, .entry-content, .pd-info, .story-body { overflow-wrap: break-word; word-wrap: break-word; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--line-strong); padding: 8px 12px; }
.entry-content pre { overflow-x: auto; white-space: pre; }
.entry-content iframe, .entry-content video, .wp-caption { max-width: 100%; }
.edit-link a { font-size: 13px; color: var(--accent); }

/* Thanh quản trị WordPress khi đã đăng nhập */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Thiết bị cảm ứng: bỏ hiệu ứng hover bị "dính" */
@media (hover: none) {
  .card:hover { transform: none; border-color: var(--line); }
  .float a:hover { transform: none; }
  .float a::after { display: none; }
}

/* Header & menu */
@media (min-width: 961px) and (max-width: 1180px) { .nav { gap: 20px; } .nav a { font-size: 13.5px; } }
@media (max-width: 960px) {
  .site-header .wrap { min-height: 64px; }
  .nav { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: 0 18px 36px rgba(0,0,0,.08); white-space: normal; }
  .nav .btn { min-height: 48px; font-size: 15px; }
}

/* Hero */
@media (min-width: 641px) and (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1.1fr .9fr; gap: 28px; }
  .hero-art, .hero-art.photo { order: 0; max-width: none; }
  .hero-lead { font-size: 16px; }
  .hero-facts { gap: 18px 24px; }
}
@media (max-width: 640px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; padding-bottom: 48px; }
  .hero-art, .hero-art.photo { order: 2; max-width: none; width: 100%; aspect-ratio: 4 / 3; }
  .hero h1 { font-size: 34px; font-size: clamp(28px, 9vw, 44px); }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 140px; }
  .hero-facts { gap: 14px 22px; margin-top: 12px; padding-top: 18px; }
  .hero-facts b { font-size: 19px; }
  .sec-head { margin-bottom: 28px; }
  .sec-head h2 { font-size: 28px; font-size: clamp(26px, 7.4vw, 34px); }
  .story-body { font-size: 16px; }
  .story-body p:first-child { font-size: 18px; }
  .story-media { margin-top: 20px; }
  .pillars { margin-top: 40px; }
  .pillar { padding: 22px 20px; }
}

/* Mẫu mới: 3 cột trên máy tính bảng (tránh lẻ 1 thẻ), 1 cột trên điện thoại như mẫu gốc */
@media (max-width: 960px) { .new-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

/* Catalog */
.tabs { -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.tab { scroll-snap-align: start; }
@media (hover: none) { .tabs { scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } }
@media (max-width: 700px) {
  .cat-tools { gap: 8px; }
  .search:not(body) { max-width: none; flex-basis: 100%; }
  .search:not(body) input, .field input, .field select, .field textarea { font-size: 16px; } /* iOS không tự phóng to khi gõ */
  .tabs { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; margin-bottom: 22px; }
  .tab { padding: 8px 14px; font-size: 13px; }
}
@media (max-width: 480px) {
  .cat-grid { gap: 10px; }
  .card-body { padding: 12px 12px 14px; gap: 4px; }
  .card h3 { font-size: 15px; line-height: 1.3; }
  .card-cat { font-size: 10.5px; letter-spacing: .04em; }
  .card-desc { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .card-foot { margin-top: 8px; padding-top: 10px; }
  .price { font-size: 16px; }
  .price .vat { font-size: 10px; }
  .sw { padding: 3px 8px; font-size: 11px; }
  .badge { top: 8px; left: 8px; padding: 4px 8px; font-size: 10px; }
}
@media (max-width: 340px) { .card-desc { -webkit-line-clamp: 4; } }

/* Popup chi tiết sản phẩm: dạng bottom sheet trên điện thoại */
@media (max-width: 720px) {
  .pd { place-items: end center; align-items: end; padding: 0; padding-top: env(safe-area-inset-top, 0px); }
  .pd-box { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .pd-close { position: -webkit-sticky; position: sticky; top: 10px; justify-self: end; margin: 10px 10px -50px 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
  .pd-img { aspect-ratio: auto; height: 36vh; height: 36svh; max-height: 340px; }
  .pd-info { padding: 20px 18px 24px; gap: 10px; }
  .pd-actions .btn { flex: 1 1 140px; }
}
@media (max-width: 720px) and (max-height: 520px) { .pd-img { height: 52vh; } }

/* Tin tức, cảm nhận */
@media (max-width: 600px) {
  .post-body { padding: 16px 16px 20px; }
  .news-grid, .blog-grid { gap: 16px; }
  .reviews { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) { .reviews { grid-template-columns: 1fr; } }

/* Đại lý & form */
@media (max-width: 600px) {
  .form { padding: 22px 18px; }
  .perks b { font-size: 17px; }
  .steps { margin-top: 28px; }
}
@media (max-width: 360px) { .steps { grid-template-columns: 1fr; } }
.fb-band .btn { flex: none; }

/* Trang con */
@media (max-width: 600px) {
  .page-head { padding-top: 32px; padding-bottom: 32px; }
  .page-head h1, .sp-single h1 { font-size: 28px; font-size: clamp(26px, 7.6vw, 34px); }
  .entry-content { font-size: 16px; }
  .entry-content h2 { font-size: 24px; }
  .related { margin-top: 56px; }
  .pagination .page-numbers { min-width: 38px; height: 38px; }
}

/* Điện thoại xoay ngang / màn thấp */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: relative; top: 0; }
  .hero .wrap { padding-top: 28px; padding-bottom: 36px; }
  .hero-art, .hero-art.photo { max-height: 70vh; }
}

/* Màn hình lớn, 2K, 4K, Smart TV: phóng to toàn trang theo tỉ lệ để cân đối */
@media (min-width: 1600px) { :root { --wrap: 1320px; } }
@media (min-width: 1900px) { html { zoom: 1.15; } }
@media (min-width: 2400px) { html { zoom: 1.45; } }
@media (min-width: 3000px) { html { zoom: 1.8; } }
@media (min-width: 3600px) { html { zoom: 2.1; } }

/* Trình duyệt cũ (Safari < 15, Chrome < 88, trình duyệt TV đời cũ): không có aspect-ratio / inset */
@supports not (aspect-ratio: 1 / 1) {
  .thumb, .pd-img { height: 0; padding-bottom: 100%; }
  .post-media { height: 0; padding-bottom: 56.25%; }
  .story-media { position: relative; height: 0; padding-bottom: 75%; }
  .hero-art.photo { position: relative; height: 0; padding-bottom: 125%; }
  .review-photo { position: relative; height: 0; padding-bottom: 100%; }
  .thumb img, .pd-img img, .post-media img, .story-media img, .hero-art.photo img, .review-photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
  .pd-img { position: relative; }
  .thumb .code { position: absolute; top: 50%; left: 0; right: 0; text-align: center; transform: translateY(-50%); }
  .post-media .play { top: 0; right: 0; bottom: 0; left: 0; }
  body::before { top: 0; left: 0; right: 0; }
}
@supports not (padding-block: 1px) {
  .hero .wrap { padding-top: 72px; padding-bottom: 72px; }
}

/* In ấn */
@media print {
  .site-header, .float, .pd, .dealer-band form, .fb-band, .tabs, .cat-tools { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { break-inside: avoid; }
}

/* Tinh chỉnh nút trên màn nhỏ */
.btn { white-space: nowrap; }
@media (max-width: 640px) { .btn { padding: 0 18px; } }
@media (max-width: 380px) {
  .hero-actions .btn { flex-basis: 100%; }
}

/* Nút menu mobile: biểu tượng 3 gạch mảnh, chuyển thành ✕ khi mở */
.menu-btn { width: 44px; height: 44px; padding: 0; margin-right: -10px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); justify-content: center; transition: background .2s; }
.menu-btn:hover { background: var(--surface); }
.menu-icon, .menu-icon::before, .menu-icon::after, .menu-icon span { display: block; width: 22px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .28s ease, opacity .2s ease; }
.menu-icon { position: relative; background: transparent; }
.menu-icon span { position: absolute; top: 0; left: 0; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; width: 15px; }
.menu-btn[aria-expanded="true"] .menu-icon span { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { width: 22px; transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) {
  .nav { animation: tl-drop .22s ease; }
  .nav a:not(.btn) { color: var(--ink); font-size: 17px; padding: 15px 0; }
  body.menu-open { overflow: hidden; }
  body.menu-open::after { content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; background: rgba(17,17,17,.28); }
}
@keyframes tl-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) {
  body.menu-open .float { display: none; }
  body.menu-open::after { top: 64px; }
  .admin-bar.menu-open::after { top: 110px; }
}

/* =========================== SLIDE TRANG CHỦ =========================== */
.hero-slider { position: relative; padding: 0; background: var(--hero-bg); }
.hs-track { display: grid; }
.hs-slide { grid-area: 1 / 1; background: var(--slide-bg, var(--hero-bg)); opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.hs-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slider .hs-title { font-size: 52px; font-size: clamp(40px, 6.4vw, 76px); }
.hs-slide .hero-text > * { transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .8s; }
.hs-slide:not(.is-active) .hero-text > * { opacity: 0; transform: translateY(14px); }
.hs-slide.is-active .hero-text > :nth-child(2) { transition-delay: .06s; }
.hs-slide.is-active .hero-text > :nth-child(3) { transition-delay: .12s; }
.hs-slide.is-active .hero-text > :nth-child(4) { transition-delay: .18s; }
.hs-slide .hero-art picture { display: block; width: 100%; height: 100%; }
.hs-slide .hero-art img { transition: transform 7s ease; }
.hs-slide.is-active .hero-art img { transform: scale(1.04); }
.hero-art.fit-contain { background: #fff; }
.hero-art.fit-contain img { object-fit: contain !important; padding: 6%; }
a.hero-art { display: block; }
.hero-slider.is-multi .hs-slide .wrap { padding-bottom: 104px; padding-bottom: clamp(88px, 10vw, 128px); }

.hs-nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: none; padding-bottom: 28px; padding-bottom: clamp(20px, 3vw, 40px); }
.hs-nav .wrap { display: flex; align-items: center; gap: 10px; }
.hs-nav button { pointer-events: auto; }
.hs-arrow, .hs-pause { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255,255,255,.6); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; padding: 0; }
.hs-arrow:hover, .hs-pause:hover { background: #fff; border-color: var(--ink); }
.hs-arrow svg, .hs-pause svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hs-pause { margin-left: auto; width: 36px; height: 36px; }
.hs-pause .i-play { display: none; fill: currentColor; stroke: none; }
.hs-pause[aria-pressed="true"] .i-play { display: block; }
.hs-pause[aria-pressed="true"] .i-pause { display: none; }
.hs-dots { display: flex; gap: 6px; align-items: center; padding: 0 6px; }
.hs-dot { width: 34px; height: 34px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.hs-dot span { display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.hs-dot span::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 0; background: var(--accent); }
.hs-dot[aria-selected="true"] span { background: rgba(26,26,26,.18); }
.hs-dot[aria-selected="true"] span::after { width: 100%; }
.hero-slider.is-playing .hs-dot[aria-selected="true"] span::after { width: 0; animation: hs-progress var(--hs-dur, 6s) linear forwards; }
.hero-slider.is-paused .hs-dot[aria-selected="true"] span::after { animation-play-state: paused; }
@keyframes hs-progress { from { width: 0; } to { width: 100%; } }

@media (max-width: 900px) {
  .hero-slider .hs-title { font-size: 40px; font-size: clamp(30px, 6vw, 48px); }
}
@media (max-width: 640px) {
  .hero-slider .hs-title { font-size: 34px; font-size: clamp(28px, 9vw, 44px); }
  .hero-slider.is-multi .hs-slide .wrap { padding-bottom: 84px; }
  .hs-nav { padding-bottom: 22px; }
  .hs-arrow { display: none; }
  .hs-dots { padding: 0; }
}
@media (hover: none) { .hs-arrow:hover, .hs-pause:hover { background: rgba(255,255,255,.6); border-color: var(--line-strong); } }
@media (prefers-reduced-motion: reduce) {
  .hs-slide, .hs-slide .hero-text > *, .hs-slide .hero-art img { transition: none !important; transform: none !important; }
}
.hero-slider .hs-nav .wrap { display: flex; grid-template-columns: none; padding-top: 0; padding-bottom: 0; padding-block: 0; gap: 10px; }

/* ===== Tinh chỉnh thẩm mỹ mobile ===== */
@media (max-width: 640px) {
  .eyebrow { letter-spacing: .12em; font-size: 11px; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 12px; }
  .hero-facts b { font-size: 18px; }
  .hero-facts small { font-size: 11.5px; line-height: 1.35; }
}
/* Popup sản phẩm trên điện thoại: thẻ nổi bo tròn 4 góc, cách mép (tinh tế như bản cũ),
   ảnh gọn không thừa khoảng trắng, nút đóng luôn hiện */
@media (max-width: 720px) {
  .pd { place-items: center; align-items: center; padding: 12px; padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px)); }
  .pd-box { width: 100%; max-height: 100%; border-radius: 20px; padding-bottom: 0; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: tl-pop .28s cubic-bezier(.2,.8,.2,1); }
  .pd-img { height: auto; max-height: none; aspect-ratio: 4 / 3; padding: 18px 18px 0; }
  .pd-img img { max-height: 32vh; max-height: 32svh; }
  .pd-close { background: rgba(242,236,229,.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: none; }
  .pd-info { padding: 18px 20px 22px; }
  .pd-info h3 { font-size: 24px; }
}
@keyframes tl-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pd-box { animation: none; } }

/* ===== Tinh chỉnh thẻ sản phẩm & các khối trên mobile ===== */
.sw-count { display: none; }
.badge { border-radius: 999px; padding: 4px 10px; font-size: 10px; letter-spacing: .14em; box-shadow: 0 2px 8px rgba(225,38,45,.25); }
.review.no-photo { grid-template-rows: 1fr; }
.review.no-photo .review-body { padding-top: 22px; }
.review.no-photo q { font-size: 16px; }
@media (max-width: 600px) {
  /* Danh mục 2 cột: thay dãy nút màu bằng nhãn "6 lựa chọn" gọn gàng; bấm để mở popup chọn màu */
  .cat-grid .card .swatches { display: none; }
  .cat-grid .card .sw-count { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 9px 3px 6px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--muted); font: 500 11.5px/1.4 var(--f-body); cursor: pointer; }
  .cat-grid .card .sw-count i { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(#E9D9C4 0 25%, #E8B4B8 0 50%, #1A1A1A 0 75%, #CFE3EA 0); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--line-strong); }
  /* Bỏ dòng VAT lặp lại ở từng thẻ (đã có ghi chú chung dưới danh mục) */
  .card .price .vat { display: none; }
  .card-foot { align-items: center; }
  .ask { font-size: 12.5px; }
  .card { border-radius: 16px; }
  .card:active { transform: scale(.985); }
  /* Cảm nhận khách hàng */
  .review { border-radius: 16px; }
  .review-body { padding: 14px 14px 16px; }
  /* Tin tức: tiêu đề gọn hơn */
  .post h3 { font-size: 18px; line-height: 1.3; }
  .news-grid > :first-child h3 { font-size: 21px; }
  /* Form đại lý */
  .form h3 { font-size: 24px; }
  .field input, .field select, .field textarea { border-radius: 12px; }
  .site-footer .wrap { gap: 26px; }
}
@media (max-width: 420px) { .card-foot { flex-direction: row; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 4px 8px; } }
.reviews { align-items: start; }

/* Nút liên hệ nổi (giữ kiểu mẫu gốc: 3 nút tròn Zalo / Messenger / Gọi) – tinh chỉnh */
.float a { box-shadow: 0 4px 16px rgba(0,0,0,.16); }
.f-call::before { animation-duration: 2.8s; opacity: .55; }
@keyframes ring { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
@media (max-width: 600px) {
  .float { right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; transition: opacity .3s ease, transform .3s ease; }
  .float a { width: 48px; height: 48px; }
  .float svg { width: 22px; height: 22px; }
  .f-zalo { font-size: 12px; }
  /* Ở màn hình đầu (phần slide) ẩn nút để không đè tiêu đề; cuộn xuống thì hiện */
  .float.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
}

/* Mẫu mới trên điện thoại: 1 cột như mẫu gốc */
@media (max-width: 600px) { .new-grid { grid-template-columns: 1fr; gap: 18px; } }
@media (min-width: 601px) and (max-width: 700px) { .new-grid { grid-template-columns: 1fr 1fr; } .new-grid > :nth-child(3):last-child { grid-column: 1 / -1; } }

/* Khối 3 điểm nổi bật: bo góc đồng bộ với thẻ sản phẩm */
.pillars { border-radius: 18px; overflow: hidden; background: var(--line); }
.pillar { background: var(--card-bg); }
@media (max-width: 820px) {
  .pillars { gap: 0; background: var(--card-bg); }
  .pillar + .pillar { border-top: 1px solid var(--line); }
  .pillar { padding: 24px 22px; }
}

/* Ngắt dòng thông minh: tránh 1 từ đứng trơ trọi ở dòng cuối, lề phải đều mắt hơn (vẫn căn trái) */
p, li, figcaption, blockquote, .hero-lead, .card-desc, .post p, .story-body, .entry-content, .pd-note, .perks span { text-wrap: pretty; }
h1, h2, h3, h4, .hs-title { text-wrap: balance; }

/* ===== Chữ: màu & nhịp đọc cho tiếng Việt ===== */
:root { --muted: #5C5650; --body-ink: #3D3834; }
.story-body { color: var(--body-ink); font-size: 17px; line-height: 1.8; }
.story-body p:first-child { color: #24201D; font-size: 20px; line-height: 1.6; font-weight: 400; }
.story-body p + p { margin-top: 2px; }
.entry-content { color: #2F2B28; font-size: 17px; line-height: 1.85; }
.entry-content p, .entry-content li { max-width: 68ch; }
.hero-lead { color: var(--body-ink); line-height: 1.7; }
.card-desc, .post p, .pillar p, .sec-head p { line-height: 1.7; }
body { text-rendering: optimizeLegibility; font-kerning: normal; }

/* Căn đều cho đoạn văn dài trên màn hình rộng (điện thoại vẫn căn trái) */
@media (min-width: 900px) {
  .story-body p:not(:first-child), .entry-content > p { text-align: justify; text-justify: inter-word; }
}

/* ===== Hệ khoảng cách thống nhất ===== */
:root { --sp-section: clamp(64px, 8vw, 112px); --sp-inner: clamp(44px, 5.5vw, 76px); }
.band { padding-top: var(--sp-section); padding-bottom: var(--sp-section); }
.sec-head { margin-bottom: clamp(28px, 3.6vw, 48px); }
.pillars { margin-top: clamp(40px, 5vw, 72px); }
/* Hai phần liền nhau cùng màu nền: không cộng dồn khoảng trắng, thay bằng đường kẻ mảnh */
.band:not(.new-band):not(.dealer-band):not(.fb-band):not(.band-first) + .band:not(.new-band):not(.dealer-band):not(.fb-band) { padding-top: 0; }
/* Hai phần cùng nền liền nhau: khoảng trên & dưới vạch ngăn bằng nhau (sp-inner) */
.band:not(.new-band):not(.dealer-band):not(.fb-band):not(.band-first):has(+ .band:not(.new-band):not(.dealer-band):not(.fb-band)) { padding-bottom: var(--sp-inner); }
.band:not(.new-band):not(.dealer-band):not(.fb-band):not(.band-first) + .band:not(.new-band):not(.dealer-band):not(.fb-band) > .wrap { padding-top: var(--sp-inner); position: relative; }
.band:not(.new-band):not(.dealer-band):not(.fb-band):not(.band-first) + .band:not(.new-band):not(.dealer-band):not(.fb-band) > .wrap::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--line); }
/* Dải Facebook */
.fb-band { padding-top: var(--sp-inner); padding-bottom: var(--sp-inner); }
/* Trang con: đầu trang & phần nội dung đầu tiên */
.page-head { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(36px, 4.5vw, 56px); }
.band-first { padding-top: clamp(36px, 4.5vw, 64px); }
.page-head + .band-first { padding-top: clamp(36px, 4.5vw, 56px); }
.related { margin-top: var(--sp-section); }
.entry-cover { margin: clamp(24px, 3vw, 40px) 0; }
/* Chân trang */
.site-footer { padding-top: clamp(48px, 6vw, 80px); padding-bottom: 28px; }
.site-footer .wrap { row-gap: 36px; }
.site-footer .wrap.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: clamp(36px, 4vw, 56px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; position: relative; }
.site-footer .wrap.footer-bottom::before { display: none; }
.to-top { color: var(--muted); }
@media (max-width: 600px) {
  .site-footer { padding-bottom: 96px; } /* chừa chỗ cho 3 nút liên hệ nổi */
  .site-footer .wrap.footer-bottom { flex-direction: column; }
}
.site-footer .wrap.footer-bottom { border-top: 0; }
.site-footer .wrap.footer-bottom::after { content: ""; position: absolute; top: 0; left: 16px; right: 16px; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); height: 1px; background: var(--line); }

/* =========================== CHI TIẾT BÀI VIẾT =========================== */
.single-post .entry { max-width: 720px; margin-left: auto; margin-right: auto; }
.entry-head .breadcrumb { margin-bottom: 18px; }
.entry-head .entry-meta { margin: 0 0 14px; }
.entry-title { font-size: 34px; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.15; }
.entry-lead { margin-top: 16px; font-size: 19px; line-height: 1.65; color: var(--body-ink); text-wrap: pretty; }
.entry-byline { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.single-post .entry-cover { max-width: 1040px; margin: clamp(28px, 4vw, 48px) auto; border-radius: var(--radius); overflow: hidden; }
.single-post .entry-cover img { width: 100%; height: auto; display: block; }
.entry-cover.is-video .video-embed { position: relative; aspect-ratio: 16 / 9; }
.entry-cover.is-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
/* Nội dung bài */
.entry-content > * + * { margin-top: 1.15em; }
.entry-content > h2, .entry-content > h3, .entry-content > h4 { margin-top: 1.9em; margin-bottom: -.3em; font-weight: 400; }
.entry-content h2 { font-size: 26px; font-size: clamp(22px, 2.6vw, 30px); }
.entry-content h3 { font-size: 21px; font-size: clamp(19px, 2vw, 23px); }
.entry-content h4 { font-size: 18px; font-weight: 600; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .45em; }
.entry-content li::marker { color: var(--accent); }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); font-size: 19px; line-height: 1.6; color: #24201D; font-style: normal; }
.entry-content hr { border: 0; height: 1px; background: var(--line-strong); margin: 2.2em 0; }
.entry-content figure, .entry-content .wp-caption { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .entry-content .wp-caption-text { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }
.entry-content img { border-radius: 10px; }
/* Căn ảnh của trình soạn thảo cổ điển */
.alignleft { float: left; margin: .3em 1.6em 1em 0; max-width: 50%; }
.alignright { float: right; margin: .3em 0 1em 1.6em; max-width: 50%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignnone { margin-top: 1.2em; }
.entry-content::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) { .alignleft, .alignright { float: none; max-width: 100%; margin: 1.2em 0; } }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="youtu.be"], .entry-content iframe[src*="facebook.com/plugins/video"] { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.wp-block-embed__wrapper, .entry-content .embed-youtube { position: relative; }
/* Cuối bài: thẻ, chia sẻ, kêu gọi liên hệ */
.entry-foot { margin-top: clamp(36px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.entry-tags, .entry-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.entry-tags span, .entry-share > span { margin-right: 2px; }
.entry-tags a { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); }
.entry-tags a:hover { border-color: var(--ink); }
.share-btn { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font: 500 13px var(--f-body); text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--ink); }
.share-btn.is-done { border-color: #1a7f37; color: #1a7f37; }
.entry-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 10px; padding: 22px 24px; background: var(--surface); border-radius: var(--radius); }
.entry-cta > div:first-child { display: grid; gap: 4px; max-width: 380px; }
.entry-cta b { font-weight: 600; font-size: 17px; }
.entry-cta span { font-size: 14px; color: var(--muted); }
.entry-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.entry-cta-btns .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
@media (max-width: 600px) { .entry-cta-btns, .entry-cta-btns .btn { flex: 1 1 100%; } .entry-lead { font-size: 17px; } }
.related-band .blog-grid { margin-top: 0; }
/* Bình luận (khi bật) */
.comments { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; gap: 20px; }
.comments-title, .comment-reply-title { font-size: 22px; font-weight: 400; }
.comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.comment-body { padding: 16px 18px; background: var(--card-bg); border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.comment-form { display: grid; gap: 14px; }
.comment-notes { font-size: 13px; color: var(--muted); }

/* =========================== RÀ SOÁT CHUNG =========================== */
/* Liên kết "Bỏ qua đến nội dung" hiện khi dùng bàn phím */
.screen-reader-text:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 8px; }
/* Menu: đánh dấu trang đang xem */
.nav a[aria-current="page"]:not(.btn), .nav .current-menu-item > a:not(.btn) { color: var(--ink); }
@media (min-width: 961px) { .nav a[aria-current="page"]:not(.btn) { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 8px; text-decoration-thickness: 2px; } }
/* Ảnh trong thẻ tin có cùng tỉ lệ */
.post-media img { aspect-ratio: 16 / 9; }
/* Chọn chữ theo tông thương hiệu */
::selection { background: rgba(225,38,45,.16); }
@media (max-width: 600px) { .entry-content .alignleft, .entry-content .alignright { display: block; margin-left: auto; margin-right: auto; } }

/* Hàng danh mục: căn thẳng lề với ô tìm kiếm & lưới sản phẩm, gợi ý vuốt ngang */
.tabs { scroll-padding-left: 16px; scroll-padding-right: 16px; gap: 8px; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; white-space: nowrap; }
.tab small { margin-left: 0; display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(26,26,26,.06); font-size: 11.5px; opacity: 1; color: var(--muted); }
.tab[aria-pressed="true"] small { background: rgba(255,255,255,.18); color: var(--bg); }
@media (max-width: 700px) {
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 36px; }
  .tabs.at-end { -webkit-mask-image: none; mask-image: none; }
  .tab { min-height: 38px; padding: 0 14px; }
}

/* Ảnh bìa bài viết: khung 16:9, không để ảnh vuông chiếm cả màn hình */
.single-post .entry-cover img { aspect-ratio: 16 / 9; height: auto; max-height: 600px; object-fit: cover; }
.single-post .entry-cover.is-video img { aspect-ratio: auto; max-height: none; }

/* ==========================================================
   POPUP SẢN PHẨM — 1.3.5
   Mobile: ảnh gọn, phần thông tin cuộn riêng, thanh nút (Zalo · Gọi ·
   Xem chi tiết) luôn dính đáy nên không bao giờ bị khuất.
   ========================================================== */
.pd-foot { display: grid; gap: 12px; margin-top: 6px; }
.pd-actions { margin: 0; }
.btn-zalo .ic { width: 17px; height: 17px; flex: none; }
.pd-more { justify-self: start; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.pd-more span { display: inline-block; transition: transform .2s; }
.pd-more:hover span { transform: translateX(3px); }
.pd-note { margin: 0; }
.pd .pd-info .price.contact { font-family: var(--f-body); font-size: 16px; font-weight: 500; color: var(--ink-2, var(--ink)); }

@media (max-width: 760px) {
  .pd { display: grid; place-items: center; align-items: center; padding: 12px; padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px)); }
  .pd[hidden] { display: none; }
  .pd-box { display: flex; flex-direction: column; width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: hidden; padding: 0; border-radius: 18px; background: var(--card-bg, #fff); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
  .pd-close { position: absolute; top: 10px; right: 10px; margin: 0; width: 38px; height: 38px; font-size: 20px; background: rgba(255,255,255,.88); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .pd .pd-img { flex: none; position: relative; height: auto; max-height: none; aspect-ratio: auto; padding: 12px 12px 0; background: transparent; display: block; }
  .pd .pd-img img, .pd .pd-img .ph-box { position: static; display: block; width: 100%; height: clamp(160px, 30vh, 260px); height: clamp(160px, 30svh, 260px); max-height: none; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
  .pd .pd-img img[hidden] { display: none; }
  .pd .pd-info { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 0; }
  .pd .pd-info h3 { font-size: 22px; line-height: 1.25; margin: 0; padding-right: 0; }
  .pd .pd-info .card-desc { font-size: 14px; }
  .pd .pd-info .price { font-size: 22px; }
  .pd .pd-info .price.contact { font-size: 15px; }
  .pd-foot { position: -webkit-sticky; position: sticky; bottom: 0; z-index: 1; margin: 4px -18px 0; padding: 12px 18px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); background: var(--card-bg, #fff); border-top: 1px solid var(--line); gap: 10px; }
  .pd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pd-actions .btn { width: 100%; min-height: 46px; padding: 0 10px; font-size: 13.5px; letter-spacing: .02em; flex: none; border-radius: 12px; }
  .pd-more { justify-self: center; font-size: 13px; }
}
@media (max-width: 760px) and (max-height: 560px) {
  .pd .pd-img img, .pd .pd-img .ph-box { height: 34vh; height: 34svh; min-height: 0; }
}
@media (max-width: 760px) { .pd .pd-img .ph-box { display: grid; place-content: center; justify-items: center; } }
@media (max-width: 760px) { .pd .pd-info > * { flex-shrink: 0; } }
.pd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pd-actions .btn { width: 100%; padding-inline: 14px; }
@media (max-width: 760px) { .pd-actions { grid-template-columns: 1fr 1fr; gap: 8px; } .pd-actions .btn { padding: 0 10px; } }
