/* Design tokens measured from the reference layout (Material 3 palette). Dark follows the OS, like the reference. */
:root {
    color-scheme: light dark;
    --font: "Google Sans Flex", Roboto, Arial, sans-serif;
    --on-surface: light-dark(#1f1f1f, #e3e3e3);
    --on-surface-var: light-dark(#444746, #c4c7c5);
    --outline: light-dark(#747775, #8e918f);
    --outline-var: light-dark(#c4c7c5, #444746);
    --primary: light-dark(#0b57d0, #a8c7fa);
    --on-primary: light-dark(#fff, #062e6f);
    --page: light-dark(#fff, #1b1b1b);
    --surface: light-dark(#fff, #131314);
    --surface-dim: light-dark(#f8fafd, #1b1b1b);
    --surface-band: light-dark(#e9eef6, #282a2c);
    --tonal: light-dark(#c2e7ff, #004a77);
    --on-tonal: light-dark(#004a77, #c2e7ff);
    --secondary: light-dark(#d3e3fd, #0842a0);
    --highlight: #f5e2ad;
    --footer: light-dark(#f0f4f9, #1e1f20);
    --inverse: light-dark(#303030, #e3e3e3);
    --on-inverse: light-dark(#f2f2f2, #303030);
    --inverse-primary: light-dark(#a8c7fa, #0b57d0);
}
/* The header's sun/moon button pins a scheme (data-theme, set in header.php) */
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
.xh-theme-dark, :root[data-theme=dark] .xh-theme-light { display: none; }
:root[data-theme=dark] .xh-theme-dark { display: block; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme=light]) .xh-theme-light { display: none; }
    :root:not([data-theme=light]) .xh-theme-dark { display: block; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 400 14px/20px var(--font); color: var(--on-surface); background: var(--page); }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.material-symbols-outlined { font-size: 24px; line-height: 1; }

/* Buttons */
.xh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px; border: 0; border-radius: 100px; font-size: 14px; font-weight: 500; background: none; white-space: nowrap; }
.xh-btn .material-symbols-outlined { font-size: 18px; }
.xh-btn-filled { background: var(--primary); color: var(--on-primary); }
.xh-btn-filled:hover { box-shadow: 0 1px 3px rgba(0,0,0,.3); background: color-mix(in srgb, var(--primary) 92%, var(--on-primary)); }
.xh-btn-tonal { height: 32px; padding: 0 24px 0 16px; background: var(--tonal); color: var(--on-tonal); }
.xh-btn-outlined { padding: 0 24px 0 16px; border: 1px solid var(--outline); color: var(--primary); }
.xh-btn-outlined:hover, .xh-btn-text:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.xh-btn-text { padding: 0 12px; color: var(--inverse-primary); }
.xh-icon-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--on-surface-var); }
.xh-icon-btn:hover { background: color-mix(in srgb, var(--on-surface-var) 8%, transparent); }

/* Header */
.xh-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; height: var(--header-h, 64px); padding: 0 8px 0 12px; background: var(--surface); border-bottom: 1px solid var(--outline-var); }
.xh-logo { display: flex; align-items: center; gap: 6px; margin: 0 24px 0 4px; white-space: nowrap; font-size: 22px; color: var(--on-surface-var); }
.xh-logo .material-symbols-outlined { color: var(--primary); font-size: 28px; }
.xh-logo { min-width: 0; }
.xh-logo-name { overflow: hidden; text-overflow: ellipsis; }
.xh-logo img { width: auto; height: 40px; }
.xh-logo-s img { height: 28px; }
.xh-logo-l img { height: 52px; }
/* Header options (Đầu trang): menu position, ☰ hidden on desktop, not sticky, highlighted button, notice bar */
.xh-nav-center .xh-nav, .xh-nav-right .xh-nav { flex: 1; }
.xh-nav-center .xh-tabs { justify-content: center; }
.xh-nav-right .xh-tabs { justify-content: flex-end; margin-right: 16px; }
.xh-header.is-static { position: relative; }
.xh-header-cta { margin-right: 8px; }
.xh-notice { display: block; margin: 0; padding: 8px 24px; background: var(--primary); color: var(--on-primary); text-align: center; font-size: 14px; line-height: 20px; }
a.xh-notice:hover { text-decoration: underline; }
@media (min-width: 1024px) {
    .no-burger [data-toggle-drawer] { display: none; }
    .no-burger .xh-logo { margin-left: 12px; }
}
.xh-tabs { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; }
.xh-tabs a { position: relative; display: flex; align-items: center; height: var(--header-h, 64px); padding: 0 8px; font-size: 16px; font-weight: 500; color: var(--on-surface-var); }
.xh-tabs a { transition: color .2s; }
/* Hover: a soft pill behind the word + the underline grows from the middle. The current page keeps a full underline. */
.xh-tabs a::before { content: ""; position: absolute; inset: 12px -4px; border-radius: 20px; background: currentColor; opacity: 0; transition: opacity .2s; }
.xh-tabs a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); transform: scaleX(0); transition: transform .3s cubic-bezier(.2, 0, 0, 1); }
.xh-tabs a:hover, .xh-tabs .current-menu-item a { color: var(--on-surface); }
.xh-tabs a:hover::before { opacity: .08; }
.xh-tabs a:hover::after { transform: scaleX(.5); }
.xh-tabs .current-menu-item a::after { transform: none; }
.xh-tabs a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 8px; }
.xh-header-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.xh-select { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--on-surface-var); }
.xh-select select { appearance: none; min-width: 128px; height: 40px; padding: 0 32px 0 12px; border: 0; background: none; font-size: 16px; cursor: pointer; }
.xh-select::after { content: "arrow_drop_down"; font-family: "Material Symbols Outlined"; font-size: 24px; position: absolute; right: 4px; pointer-events: none; }
/* Header language picker: just the globe icon, the real <select> sits invisibly on top of it */
.xh-header .xh-select { justify-content: center; cursor: pointer; }
.xh-header .xh-select::after { display: none; }
.xh-header .xh-select select { position: absolute; inset: 0; min-width: 0; opacity: 0; }
/* Drawer (menu ☰). Big targets and 18px text for older eyes/fingers; slide + stagger motion for the younger look. */
.xh-burger { transition: background .2s; }
.xh-burger .material-symbols-outlined { transition: transform .3s cubic-bezier(.2, 0, 0, 1); }
.xh-burger[aria-expanded="true"] { background: var(--secondary); }
.xh-burger[aria-expanded="true"] .material-symbols-outlined { transform: rotate(180deg); }
.xh-burger-text { display: none; }
.xh-scrim { position: fixed; z-index: 18; inset: var(--drawer-top, 64px) 0 0; background: rgb(0 0 0 / .4); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.xh-drawer { position: fixed; z-index: 19; top: var(--drawer-top, 64px); left: 0; bottom: 0; width: min(320px, 85vw); padding: 12px; overflow-y: auto; background: var(--surface); border-radius: 0 16px 16px 0; box-shadow: 0 8px 24px rgb(0 0 0 / .2);
    transform: translateX(-100%); visibility: hidden; transition: transform .35s cubic-bezier(.2, 0, 0, 1), visibility 0s .35s; }
.xh-drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.xh-scrim:has(+ .is-open) { opacity: 1; visibility: visible; transition-delay: 0s; }
html:has(.xh-drawer.is-open) { overflow: hidden; } /* the page behind doesn't scroll while the menu is open */
.xh-drawer .xh-tabs { flex-direction: column; gap: 4px; }
.xh-drawer li { opacity: 0; transform: translateX(-16px); transition: opacity .25s, transform .35s cubic-bezier(.2, 0, 0, 1); }
.xh-drawer.is-open li { opacity: 1; transform: none; transition-delay: calc(80ms + var(--i, 0) * 40ms); }
.xh-drawer .xh-tabs a { justify-content: space-between; height: 56px; padding: 0 16px 0 20px; border-radius: 28px; font-size: 18px; transition: background .2s, color .2s; }
.xh-drawer .xh-tabs a::before { display: none; }
.xh-drawer .xh-tabs a::after { content: "chevron_right"; position: static; height: auto; background: none; transform: translateX(-6px); opacity: 0; font: 24px/1 "Material Symbols Outlined"; color: var(--primary); transition: opacity .2s, transform .3s cubic-bezier(.2, 0, 0, 1); }
.xh-drawer .xh-tabs a:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.xh-drawer .xh-tabs a:active { background: color-mix(in srgb, var(--on-surface) 14%, transparent); }
.xh-drawer .xh-tabs a:hover::after, .xh-drawer .current-menu-item a::after { opacity: 1; transform: none; }
.xh-drawer .current-menu-item a { background: var(--secondary); color: var(--on-tonal); font-weight: 700; }

/* Hero — mobile first. The search straddles the bottom edge so it never covers the banner. */
:root { --hero-search: 52px; }
.xh-hero { position: relative; z-index: 1; background: var(--surface-dim); touch-action: pan-y; user-select: none; } /* pan-y: vertical scroll stays native, horizontal swipes change slides */
.xh-hero-media { position: absolute; inset: 0; overflow: hidden; pointer-events: none; } /* no image drag, so a mouse swipe works too */
.xh-hero-media > * { position: absolute; opacity: 0; transition: opacity .6s; }
.xh-hero-media > .is-active { opacity: 1; }
.xh-hero.is-swiping .xh-hero-media > * { transition: none; }
.xh-hero-banner, .xh-hero-banner img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xh-hero-chart { left: -1%; top: 10px; width: 102%; height: calc(100% - 22px); }
.xh-hero-chart path { stroke: var(--c); stroke-width: 4; vector-effect: non-scaling-stroke; transition: stroke .6s, fill-opacity .6s; }
.xh-hero-chart.is-ghost { opacity: .7; }
.xh-hero-chart.is-ghost2 { opacity: .4; }
.xh-hero-chart:is(.is-ghost, .is-ghost2) path { fill-opacity: 0; stroke: color-mix(in srgb, var(--on-surface-var) 40%, transparent); }
.xh-hero-chart.is-active path { animation: xh-reveal 1.6s ease-out; }
@keyframes xh-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.xh-hero-inner { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: max(200px, 23vw); max-width: 576px; margin: 0 auto; padding: 40px 16px 0; } /* 23vw ≈ the 1920×440 banner ratio */
.xh-hero-title { margin: 0 40px 32px; font-size: 28px; line-height: 36px; font-weight: 400; color: var(--on-surface-var); }
.xh-hero-title mark { display: table; padding: 0 5px; margin-left: -5px; font-weight: 700; color: #1f1f1f; background: linear-gradient(var(--highlight), var(--highlight)) no-repeat; animation: xh-sweep .2s linear .3s backwards; }
@keyframes xh-sweep { from { background-size: 0 100%; opacity: 0; transform: translateX(-20px); } }
.xh-search { display: flex; align-items: center; height: var(--hero-search); margin-bottom: calc(var(--hero-search) / -2); padding: 0 6px 0 20px; background: var(--surface); border: 1px solid var(--outline-var); border-radius: calc(var(--hero-search) / 2); box-shadow: 0 1px 3px rgba(32,33,36,.2); }
.xh-search:focus-within { box-shadow: 0 1px 6px rgba(32,33,36,.28); border-color: transparent; }
.xh-search-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--c); transition: background .4s; }
.xh-search input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 0; outline: 0; font-size: 16px; background: none; user-select: text; }
.xh-search input::placeholder { color: var(--on-surface); overflow: hidden; text-overflow: ellipsis; }
.xh-search input::-webkit-search-cancel-button { display: none; }
.xh-search .xh-btn { padding: 0 16px; }
.xh-hero + .xh-why { padding-top: calc(var(--hero-search) / 2 + 20px); }
/* Dots and pause are hidden but keep running: their progress animation is the slide timer.
   Keyboard users still reach them; they show while focused. */
.xh-hero-foot { position: absolute; top: 12px; right: 16px; display: flex; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); font-size: 12px; color: var(--outline); }
.xh-hero-foot:focus-within { width: auto; height: auto; padding: 6px 12px; clip-path: none; background: var(--surface); border-radius: 16px; }
.xh-hero-foot > span { display: none; }
.xh-dots { display: flex; align-items: center; gap: 8px; }
.xh-dots button:not(.xh-pause) { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--c); transition: width .25s ease; }
.xh-dots button.is-active { width: 48px; background: var(--outline-var); }
.xh-dots button i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--c); }
.xh-dots button.is-active i { animation: xh-progress var(--interval) linear forwards; }
.xh-hero:is(.is-paused, :has(.xh-search:focus-within)) .xh-dots i { animation-play-state: paused; } /* also hold still while the visitor types */
@keyframes xh-progress { to { width: 100%; } }
.xh-pause { display: grid; margin-left: 16px; padding: 0; border: 0; background: none; color: var(--outline); }
@media (min-width: 1024px) {
    :root { --hero-search: 66px; }
    .xh-hero { height: 440px; }
    .xh-hero-chart { top: 40px; height: 400px; }
    .xh-hero-inner { height: 100%; min-height: 0; max-width: 1010px; padding: 0 24px; }
    .xh-hero-title { position: absolute; top: 112px; width: 280px; margin: 0; font-size: 36px; line-height: 44px; font-weight: 500; }
    .xh-search { width: 544px; max-width: calc(100% - 366px); margin-left: 366px; padding: 0 12px 0 26px; } /* beside the title */
    .xh-hero.is-untitled .xh-search { width: auto; max-width: none; margin-left: 0; }
    .xh-search input { padding: 0 16px; font-size: 24px; }
    .xh-search .xh-btn { padding: 0 24px; }
}

/* Why trending */
.xh-why { background: var(--surface-band); padding: 24px 0; min-height: 192px; }
.xh-why-panel { max-width: 1030px; margin: 0 auto; padding: 0 24px; }
.xh-why-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.xh-why-head h2 { padding-left: 16px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--on-surface-var); }
.xh-news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xh-news-card { display: flex; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--outline-var); border-radius: 24px 8px; }
.xh-news-card:hover { box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.xh-news-card > img, .xh-news-card > .xh-thumb-ph { width: 64px; height: 64px; flex: none; border-radius: 16px 4px; object-fit: cover; }
.xh-news-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 20px; }
.xh-news-card small { display: block; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--on-surface-var); }

/* Sections */
.xh-section { max-width: 1072px; margin: 0 auto; padding: 88px 24px 0; }
.xh-section:last-of-type { padding-bottom: 120px; }
.xh-section-title { position: relative; text-align: center; font-size: 32px; line-height: 40px; font-weight: 500; color: var(--on-surface-var); }
/* Decorative blob: two rounded squares, one turned 45deg, read as a soft 8-lobed badge */
.xh-section-title::before, .xh-section-title::after { content: ""; position: absolute; z-index: -1; left: 50%; top: -20px; width: 56px; height: 56px; margin-left: -28px; background: var(--secondary); border-radius: 18px; }
.xh-section-title::after { transform: rotate(45deg); }
.xh-section-sub { max-width: 1024px; margin: 0 auto; padding: 24px 24px 32px; text-align: center; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--on-surface-var); }
.xh-center { display: flex; justify-content: center; margin: 24px 0 40px; }

/* Cards */
.xh-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--outline-var); border-radius: 32px; color: var(--on-surface); transition: box-shadow .2s; }
.xh-card:hover { box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15); }
.xh-card-media { position: relative; display: block; overflow: hidden; }
.xh-card-media img, .xh-thumb-ph { width: 100%; height: 100%; object-fit: cover; }
/* Product shot: whole product visible in any frame shape. White in dark mode too, to blend with white-background photos */
.xh-card-media img.is-contain { object-fit: contain; padding: 12px; background: #fff; }
.xh-thumb-ph { display: grid; place-items: center; background: var(--ph); color: rgba(0,0,0,.45); }
.xh-card-lg .xh-thumb-ph .material-symbols-outlined { font-size: 72px; }
.xh-card-title { display: block; }

.xh-card-lg { flex: 0 0 448px; height: 514px; scroll-snap-align: start; }
.xh-card-lg .xh-card-media { height: 256px; flex: none; }
.xh-card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.xh-card-lg .xh-card-title { font-size: 24px; line-height: 32px; margin-bottom: 8px; }
.xh-card-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 20px; }
.xh-card-link { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-left: 8px; font-size: 14px; font-weight: 500; color: var(--primary); }
.xh-card-link .material-symbols-outlined { font-size: 20px; }

.xh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1024px; margin: 0 auto; }
.xh-card-sm { min-height: 234px; }
.xh-card-sm .xh-card-media { height: 136px; flex: none; }
.xh-card-sm .xh-thumb-ph .material-symbols-outlined { font-size: 56px; }
.xh-card-sm .xh-card-title { padding: 16px 16px 8px; font-size: 16px; line-height: 24px; font-weight: 500; }
.xh-grid + .xh-grid { margin-top: 40px; }
.xh-price { display: block; margin-bottom: 8px; font-size: 18px; line-height: 24px; font-weight: 500; }
.xh-price del { margin-right: 4px; font-size: .8em; font-weight: 400; color: var(--on-surface-var); }
.xh-price ins { text-decoration: none; color: light-dark(#b3261e, #f2b8b5); }
.xh-card-sm .xh-price { padding: 0 16px 16px; margin: 0; font-size: 15px; }
.xh-play { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 48px !important; color: var(--surface); font-variation-settings: "FILL" 1; filter: drop-shadow(0 1px 4px rgb(0 0 0 / .4)); transition: transform .2s; }
/* ▶ stays above the hover preview and grows over the picture: that area plays the video, the text opens the page */
[data-yt] .xh-card-media:hover .xh-play { transform: translate(-50%, -50%) scale(1.2); }
/* "Rê chuột mới phát" rows on a mouse: the hover preview already shows there's a video, so no ▶ over the product photo.
   Touch screens and reduced-motion get no preview, so they keep the ▶ as the only hint. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    :not([data-autoplay]) > [data-yt] .xh-play { display: none; }
}
.xh-card-sm .xh-thumb-ph:has(+ .xh-play) .material-symbols-outlined { display: none; }
/* Hover preview: clicks pass through to the card; fades in once loaded to hide YouTube's black first frame */
.xh-card-preview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; opacity: 0; transition: opacity .3s .3s; }
.xh-card-preview.is-ready { opacity: 1; }
/* ponytail: 16:9 only, YouTube Shorts show letterboxed */
.xh-video { padding: 0; border: 0; width: min(960px, 92vw, 150vh); aspect-ratio: 16 / 9; background: #000; overflow: visible; }
.xh-video::backdrop { background: rgb(0 0 0 / .8); }
.xh-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.xh-video-close { position: absolute; right: 0; bottom: 100%; padding: 8px 0; border: 0; background: none; color: #fff; font-size: 32px !important; cursor: pointer; }

/* Carousel */
.xh-carousel { position: relative; }
.xh-carousel-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 88%, transparent); }
.xh-carousel-track::-webkit-scrollbar { display: none; }
.xh-carousel-btn { position: absolute; z-index: 2; top: 229px; display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--surface-band); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 6px 2px rgba(0,0,0,.15); }
.xh-carousel-btn.is-next { right: -4px; }
.xh-carousel-btn.is-prev { left: -28px; }
.xh-carousel-btn[hidden] { display: none; }

/* Footer */
.xh-footer { padding: 0 max(24px, calc((100% - 1720px) / 2)); background: var(--footer); font-size: 13px; color: var(--on-surface-var); }
.xh-footer ul { margin: 0; padding: 0; list-style: none; }
/* Top row: shop info + link columns, only printed when filled in */
.xh-footer-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding: 48px 64px 40px 104px; border-bottom: 1px solid var(--outline-var); font-size: 14px; line-height: 20px; }
.xh-footer-title { margin: 0 0 16px; font: 500 16px/24px var(--font); color: var(--on-surface); }
.xh-footer-col ul, .xh-footer-info { display: grid; gap: 12px; }
.xh-footer-info li { display: flex; gap: 8px; }
.xh-footer-info .material-symbols-outlined { font-size: 18px; line-height: 20px; }
.xh-footer .xh-social { display: flex; gap: 8px; margin-top: 20px; }
.xh-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); color: var(--on-surface); }
.xh-social svg { width: 20px; height: 20px; fill: currentColor; }
.xh-footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 128px; padding: 24px 0; }
.xh-footer .xh-footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-left: 104px; }
.xh-footer a:hover { text-decoration: underline; }
.xh-footer-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-right: 64px; }
.xh-footer-right a { display: inline-flex; align-items: center; gap: 8px; }

/* Cookie bar */
.xh-cookie { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 4px 24px; background: var(--inverse); color: var(--on-inverse); }
.xh-cookie[hidden] { display: none; }

/* Single / page */
.xh-article { max-width: 760px; margin: 0 auto; padding: 48px 24px 96px; font: 400 16px/1.7 Roboto, Arial, sans-serif; }
.xh-article h1 { margin-bottom: 24px; font: 500 32px/40px var(--font); }
.xh-article img { border-radius: 24px; height: auto; }
/* Tables in descriptions/posts (spec sheets): bordered rows, shaded header, sideways scroll on phones instead of squashing.
   ponytail: only block-editor tables (wrapped in <figure>) scroll; a bare classic-editor table just wraps its text */
.xh-content figure.wp-block-table { margin: 24px 0; overflow-x: auto; }
.xh-content table { width: 100%; margin: 24px 0; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.xh-content figure.wp-block-table table { margin: 0; }
.xh-content :is(th, td) { padding: 10px 14px; border: 1px solid var(--outline-var); text-align: left; vertical-align: top; }
.xh-content th, .xh-content thead td { background: var(--surface-band); font-weight: 500; }
.xh-content tbody tr:nth-child(even) { background: var(--surface-dim); }
/* Captions under images/tables/videos: centered like in the editor (core only centers them via its optional theme.css) */
.xh-content .wp-element-caption { margin-top: 8px; color: var(--on-surface-var); font-size: 14px; text-align: center; }
/* Product photos: one big frame (fixed shape, so switching photos doesn't jump the page) + clickable thumbnails */
.xh-gallery-main { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.xh-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xh-gallery-thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid var(--outline-var); border-radius: 12px; overflow: hidden; background: #fff; }
.xh-gallery-thumbs button[aria-pressed="true"] { border-color: var(--primary); }
.xh-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
/* grid, not flex-wrap: call + Zalo stay on one row; on phones they split the width and long text wraps inside the button */
.xh-buy { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 12px; margin: 24px 0 32px; }
.xh-buy .xh-price { grid-column: 1 / -1; margin: 0; font: 500 28px/36px var(--font); }
.xh-buy .xh-btn { align-self: stretch; min-height: 40px; height: auto; padding: 8px 20px; white-space: normal; text-align: center; }
@media (max-width: 719px) { .xh-buy { grid-template-columns: 1fr 1fr; } .xh-buy .xh-btn { padding: 8px 12px; } }
/* Product page layouts (Kiểu trang sản phẩm). "stack" keeps the plain one-column article above; so do phones and products without photos.
   Left/right: photos in a narrower column that follows the reader (sticky), text column holds title, price and the whole description, so no gap under the buttons. */
@media (min-width: 720px) {
    .xh-pd-left, .xh-pd-right { max-width: 1200px; }
    .xh-pd-left:has(.xh-gallery), .xh-pd-right:has(.xh-gallery) {
        display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto 1fr; column-gap: 48px; align-items: start;
        grid-template-areas: "g t" "g b" "g c";
    }
    .xh-pd-right:has(.xh-gallery) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "t g" "b g" "c g"; }
    .xh-product h1 { grid-area: t; }
    .xh-product .xh-gallery { grid-area: g; }
    /* only the two-column layouts: in "stack" a sticky photo would slide over the description */
    .xh-pd-left .xh-gallery, .xh-pd-right .xh-gallery { position: sticky; top: calc(var(--header-h, 64px) + 24px); }
    .xh-product .xh-buy { grid-area: b; }
    .xh-product .xh-content { grid-area: c; }
    .xh-pd-left .xh-buy, .xh-pd-right .xh-buy { margin-top: 0; }
}
/* Search results & archives: products as a card grid, posts/pages as a readable list */
.xh-results { padding-top: 40px; }
.xh-results-form { display: flex; align-items: center; max-width: 720px; height: 56px; margin: 0 auto; padding: 0 8px 0 20px; background: var(--surface); border: 1px solid var(--outline-var); border-radius: 28px; }
.xh-results-form:focus-within { box-shadow: 0 1px 6px rgba(32,33,36,.28); border-color: transparent; }
.xh-results-form > .material-symbols-outlined { color: var(--on-surface-var); }
.xh-results-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 0; outline: 0; font-size: 18px; background: none; color: var(--on-surface); }
.xh-results-title { max-width: 1024px; margin: 32px auto 0; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--on-surface-var); }
.xh-results-head { max-width: 1024px; margin: 32px auto 16px; padding-bottom: 8px; border-bottom: 1px solid var(--outline-var); font-size: 22px; line-height: 28px; font-weight: 500; }
.xh-section-title + .xh-results-grid, .xh-section-title + .xh-results-list { margin-top: 40px; }
.xh-results-list { max-width: 1024px; margin: 0 auto; }
.xh-row { display: flex; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--outline-var); color: var(--on-surface); }
.xh-row-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.xh-row-title { font-size: 18px; line-height: 26px; font-weight: 500; }
.xh-row:hover .xh-row-title { color: var(--primary); text-decoration: underline; }
.xh-row-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 20px; color: var(--on-surface-var); }
.xh-row-date { font-size: 13px; color: var(--on-surface-var); }
.xh-row-media { flex: none; width: 160px; height: 96px; overflow: hidden; border-radius: 12px; }
.xh-row-media img { width: 100%; height: 100%; object-fit: cover; }

/* Responsive — breakpoints and sizes measured on the reference at 900/650/412px */
@media (max-width: 1023px) {
    .xh-nav { display: none; }
    .xh-burger { display: inline-flex; gap: 4px; width: auto; height: 40px; margin-right: 8px; padding: 0 14px 0 10px; border-radius: 20px; font-size: 15px; font-weight: 500; }
    .xh-burger-text { display: inline; }
    .xh-logo { margin-right: 8px; }

    .xh-news { grid-template-columns: repeat(2, 1fr); }
    .xh-section { padding-top: 72px; }
    .xh-section-title { font-size: 24px; line-height: 32px; }

    /* Rows bleed to the viewport edge and scroll sideways */
    .xh-carousel, .xh-grid { margin: 0 -24px; }
    .xh-carousel-track { padding: 0 24px; scroll-padding: 0 24px; mask-image: none; }
    .xh-carousel-btn { display: none; }
    .xh-card-lg { flex: 0 0 326px; height: 448px; }
    .xh-card-lg .xh-card-media { height: 208px; }
    .xh-card-lg .xh-card-title { font-size: 20px; line-height: 28px; }
    .xh-grid { display: flex; justify-content: safe center; gap: 10px; max-width: none; padding: 0 24px; overflow-x: auto; scrollbar-width: none; }
    .xh-card-sm { flex: 0 0 158px; min-height: 168px; }
    .xh-card-sm .xh-card-media { height: 88px; }
    .xh-card-sm .xh-card-title { padding: 4px 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .xh-card-sm .xh-thumb-ph .material-symbols-outlined { font-size: 40px; }
    /* Results wrap into 2 columns instead of scrolling sideways: visitors compare many products here */
    .xh-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; padding: 0; }
    .xh-results-grid .xh-card-sm .xh-card-media { height: 136px; }
    .xh-results .xh-row-media { width: 96px; height: 72px; }

    .xh-footer-bottom { flex-direction: column; align-items: flex-start; }
    .xh-footer-top { padding: 32px 0; }
    .xh-footer .xh-footer-links, .xh-footer-right { padding: 0; }
}
@media (max-width: 719px) {
    .xh-news { grid-template-columns: 1fr; }
    .xh-why-panel { padding: 0 24px; }
    .xh-why { padding-top: 16px; }
    .xh-why-head h2 { font-size: 14px; line-height: 20px; }
    .xh-section-sub + .xh-grid + .xh-center { display: none; }
    .xh-center + .xh-grid, .xh-grid + .xh-grid { margin-top: 18px; }
    .xh-cookie { flex-direction: column; align-items: flex-start; padding: 12px 24px; }
}
@media (max-width: 599px) {
    :root { --header-h: 56px; }
    .xh-header { padding: 0 4px; }
    .xh-logo { margin-left: 0; font-size: 20px; }
    .xh-logo img { max-height: 40px; }
    .xh-logo:has(img) .xh-logo-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* phones: the logo image alone, name kept for screen readers */
    .xh-header-cta { width: 40px; padding: 0; } /* icon only; the text stays for screen readers */
    .xh-cta-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 480px) {
    .xh-footer-right { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .xh-drawer, .xh-drawer li, .xh-scrim, .xh-burger .material-symbols-outlined, .xh-tabs a::after { transition-duration: 0s !important; transition-delay: 0s !important; } /* ponytail: !important so it beats every per-state delay above */
    .xh-hero-chart.is-active path, .xh-hero-title mark { animation: none; }
    .xh-hero-banner[data-no-still] { display: none; }
}
