/* ==========================================================
   Cartback – main stylesheet
   ========================================================== */
:root {
	--c-primary: #077a4c;
	--c-primary-600: #06683f;
	--c-primary-50: #e8f6ef;
	--c-primary-100: #cdeedd;
	--c-accent: #ff6b1a;
	--c-accent-50: #fff1e8;
	--c-ink: #0f1d17;
	--c-text: #2b3a33;
	--c-muted: #5e6e66;
	--c-line: #e3e9e6;
	--c-bg: #ffffff;
	--c-bg-alt: #f5f8f6;
	--c-danger: #c62828;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow-sm: 0 1px 2px rgba(15, 29, 23, .06), 0 1px 3px rgba(15, 29, 23, .08);
	--shadow: 0 10px 30px -12px rgba(15, 29, 23, .18);
	--shadow-lg: 0 24px 60px -20px rgba(7, 122, 76, .35);
	--font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--container: 1200px;
	--header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-600); }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3, .h3 { font-size: 1.15rem; }
.h4 { font-size: 1.05rem; font-weight: 700; color: var(--c-ink); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.small { font-size: .875rem; }
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-sm { padding-block: 32px 56px; }
.section-alt { background: var(--c-bg-alt); }
.card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid transparent; font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(7, 122, 76, .55); }
.btn-primary:hover { background: var(--c-primary-600); color: #fff; }
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--c-ink); border-color: var(--c-line); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-light { background: #fff; color: var(--c-primary); }
.btn-light:hover { background: var(--c-primary-50); color: var(--c-primary-600); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .9rem; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--c-line); }
.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; } }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 36px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-nav .menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--c-ink); font-weight: 500; text-decoration: none; white-space: nowrap; }
.site-nav .current-menu-item > a, .site-nav .current_page_parent > a { font-weight: 600; }
.nav-actions .btn { white-space: nowrap; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a { background: var(--c-primary-50); color: var(--c-primary); }
.nav-actions { display: flex; gap: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; color: var(--c-ink); cursor: pointer; border-radius: 8px; }
.nav-toggle-close { display: none; }
@media (min-width: 1081px) and (max-width: 1200px) { .site-nav { gap: 12px; } .site-nav .menu a { padding: 8px 9px; font-size: .95rem; } }
@media (max-width: 1080px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s; margin: 0; }
	.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
	.nav-open .nav-toggle-open { display: none; }
	.nav-open .nav-toggle-close { display: inline; }
	.site-nav .menu { flex-direction: column; }
	.site-nav .menu a { padding: 12px; font-size: 1.05rem; }
	.nav-actions .btn { flex: 1; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(32px, 6vw, 72px); background: radial-gradient(1200px 500px at 85% -10%, var(--c-primary-100), transparent 60%), radial-gradient(800px 400px at -10% 110%, var(--c-accent-50), transparent 60%), #fff; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px; background: var(--c-primary-50); color: var(--c-primary); font-size: .85rem; font-weight: 600; }
.hl { color: var(--c-primary); background: linear-gradient(transparent 62%, #ffd9bf 62%); }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: var(--c-muted); max-width: 60ch; }
.hero-points { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--c-ink); }
.hero-points .icon { color: var(--c-primary); }
.store-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.store-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--c-bg-alt); color: var(--c-ink); border: 1px solid var(--c-line); }
.store-shopee { background: #fff1ec; color: #c2410c; border-color: #ffd8c8; }
.store-lazada { background: #eef0ff; color: #3730a3; border-color: #d7dbff; }
.store-tiki { background: #e8f3ff; color: #0b57c2; border-color: #cfe4ff; }
.store-tiktok-shop { background: #f1f1f3; color: #111; border-color: #dedee3; }

/* ---------- Chatbot ---------- */
.chatbot { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; height: 520px; max-height: 80vh; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: linear-gradient(135deg, var(--c-primary), #0aa267); color: #fff; }
.chat-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.chat-name { margin: 0; font-weight: 700; line-height: 1.2; }
.chat-status { margin: 0; font-size: .8rem; opacity: .92; display: flex; align-items: center; gap: 6px; }
.chat-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #7dffb8; box-shadow: 0 0 0 3px rgba(125, 255, 184, .3); }
.chat-close { margin-left: auto; background: rgba(255, 255, 255, .15); border: 0; color: #fff; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #f8fbf9; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: .94rem; line-height: 1.5; white-space: pre-line; word-wrap: break-word; overflow-wrap: anywhere; animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-bot { align-self: flex-start; background: #fff; border: 1px solid var(--c-line); border-bottom-left-radius: 4px; color: var(--c-ink); }
.msg-user { align-self: flex-end; background: var(--c-primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-typing { display: inline-flex; gap: 4px; }
.msg-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--c-muted); animation: blink 1s infinite; }
.msg-typing span:nth-child(2) { animation-delay: .15s; } .msg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.link-card { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--c-primary-50); border: 1px solid var(--c-primary-100); white-space: normal; }
.link-card .rate { display: block; font-weight: 700; color: var(--c-primary); margin-bottom: 8px; }
.link-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.link-card .btn { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.link-card .warn { margin: 8px 0 0; font-size: .82rem; color: #8a4b00; }
.msg-products { display: grid; gap: 8px; margin-top: 8px; white-space: normal; }
.mini-product { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--c-line); background: #fff; text-decoration: none; color: var(--c-ink); }
.mini-product img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.mini-product strong { display: block; font-size: .86rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-product span { font-size: .8rem; color: var(--c-primary); font-weight: 600; }
.chat-quick { display: flex; gap: 8px; padding: 10px 14px 0; overflow-x: auto; scrollbar-width: none; background: #fff; }
.chat-quick::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--c-line); background: #fff; color: var(--c-ink); font: 500 .85rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: .15s; }
.chip:hover, .chip.is-active { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-50); }
.chat-form { position: relative; display: flex; align-items: center; gap: 6px; margin: 10px 14px 6px; padding: 6px 6px 6px 40px; border: 1.5px solid var(--c-line); border-radius: 999px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.chat-form:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-50); }
.chat-input-icon { position: absolute; left: 14px; color: var(--c-muted); }
.chat-form input { flex: 1; min-width: 0; border: 0; outline: 0; font: 400 1rem var(--font); padding: 8px 4px; background: transparent; color: var(--c-ink); }
.chat-paste { border: 0; background: var(--c-bg-alt); color: var(--c-ink); font: 600 .82rem var(--font); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.chat-send { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--c-primary); color: #fff; cursor: pointer; flex-shrink: 0; }
.chat-send:hover { background: var(--c-primary-600); }
.chat-send[disabled] { opacity: .5; }
.chat-note { margin: 0; padding: 0 16px 12px; font-size: .75rem; color: var(--c-muted); text-align: center; }
.chat-note a { color: inherit; }

.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--c-primary); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); cursor: pointer; transition: transform .15s; }
.chat-fab:hover { transform: scale(1.06); }
.chat-popup { position: fixed; right: 20px; bottom: 92px; z-index: 61; width: min(400px, calc(100vw - 32px)); }
.chat-popup .chatbot { height: min(560px, calc(100vh - 140px)); }
@media (max-width: 520px) { .chat-popup { right: 16px; left: 16px; width: auto; bottom: 88px; } }

/* ---------- Sections ---------- */
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head p:last-child { color: var(--c-muted); }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; max-width: none; text-align: left; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } .steps-guide { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding: 28px 24px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.step > .icon { color: var(--c-primary); margin-bottom: 14px; }
.step-num { position: absolute; top: 18px; right: 20px; font-size: 2.6rem; font-weight: 800; color: var(--c-primary-50); line-height: 1; }
.step p { color: var(--c-muted); margin: 0; }

.features { display: grid; gap: 20px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--c-line); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--c-primary-50); color: var(--c-primary); margin-bottom: 14px; }
.feature p { color: var(--c-muted); margin: 0; }

.guide-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) { .guide-grid { grid-template-columns: 1.2fr 1fr; } }
.checklist { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { flex-shrink: 0; color: #fff; background: var(--c-primary); border-radius: 50%; padding: 3px; margin-top: 2px; }
.phone-mock { display: flex; justify-content: center; }
.phone { width: 300px; padding: 22px 16px; border-radius: 36px; background: #fff; border: 10px solid var(--c-ink); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 10px 14px; border-radius: 16px; font-size: .88rem; max-width: 85%; }
.bubble-user { align-self: flex-end; background: var(--c-primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble-bot { background: var(--c-bg-alt); color: var(--c-ink); border-bottom-left-radius: 4px; }
.bubble-cta { background: var(--c-accent); color: #fff; font-weight: 700; }
.wallet-mini { margin-top: 8px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, var(--c-ink), #1e3a2f); color: #fff; display: grid; }
.wallet-mini span { font-size: .78rem; opacity: .75; } .wallet-mini strong { font-size: 1.4rem; } .wallet-mini em { font-size: .78rem; font-style: normal; color: #ffd28a; }

.faq { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; padding: 0 20px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; color: var(--c-ink); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--c-primary); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--c-muted); padding-bottom: 6px; }

.cta-band { background: linear-gradient(120deg, var(--c-primary), #0aa267 60%, #12b886); color: #fff; padding-block: 56px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; opacity: .92; }

/* ---------- Products ---------- */
.product-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-thumb { position: relative; display: block; aspect-ratio: 1; background: var(--c-bg-alt); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; color: #b8c6bf; background: var(--c-bg-alt); }
.badge-off { position: absolute; top: 10px; left: 10px; background: var(--c-accent); color: #fff; font-weight: 700; font-size: .78rem; padding: 4px 8px; border-radius: 8px; }
.badge-lg { font-size: 1rem; padding: 6px 12px; top: 16px; left: 16px; }
.product-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 16px; flex: 1; }
.product-body .store-tag { align-self: flex-start; }
.product-title { font-size: .92rem; font-weight: 600; line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-title a { color: var(--c-ink); text-decoration: none; }
.product-title a::after { content: ""; position: absolute; inset: 0; }
.product-card { position: relative; }
.price { margin: auto 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price strong { color: var(--c-accent); font-size: 1.05rem; }
.price del { color: var(--c-muted); font-size: .82rem; }
.cashback-pill { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 0; padding: 3px 10px; border-radius: 999px; background: var(--c-primary-50); color: var(--c-primary); font-size: .8rem; font-weight: 600; }

.page-hero { padding-block: 28px 32px; background: linear-gradient(180deg, var(--c-primary-50), #fff); border-bottom: 1px solid var(--c-line); }
.page-hero-sm h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; font-size: .85rem; color: var(--c-muted); }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; }
.breadcrumbs a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-primary); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--c-ink); display: inline-block; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; margin-bottom: 16px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.field { position: relative; display: flex; align-items: center; }
.field-grow { flex: 1 1 240px; }
.field .icon { position: absolute; left: 12px; color: var(--c-muted); }
.field input, .field select, .form input, .search-form input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--c-line); border-radius: var(--radius-sm); font: 400 1rem var(--font); color: var(--c-ink); background: #fff; }
.field-grow input { padding-left: 38px; }
.field input:focus, .field select:focus, .form input:focus, .search-form input:focus { outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-50); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }

.info-strip { display: flex; gap: 12px; align-items: flex-start; margin-top: 40px; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--c-bg-alt); color: var(--c-muted); font-size: .9rem; }
.info-strip .icon { flex-shrink: 0; color: var(--c-primary); }
.info-strip p { margin: 0; }
.empty { text-align: center; padding: 40px 24px; color: var(--c-muted); }

.pagination, .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--c-line); color: var(--c-ink); text-decoration: none; }
.page-numbers.current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* Product detail */
.product-detail { display: grid; gap: 32px; margin-top: 8px; }
@media (min-width: 900px) { .product-detail { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } }
.pd-media { position: relative; border-radius: 24px; overflow: hidden; background: var(--c-bg-alt); border: 1px solid var(--c-line); aspect-ratio: 1; }
.pd-media img { width: 100%; height: 100%; object-fit: contain; }
.pd-title { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-top: 10px; }
.pd-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pd-price strong { font-size: 2rem; color: var(--c-accent); }
.pd-price del { color: var(--c-muted); }
.cashback-box { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin: 16px 0 20px; border-radius: var(--radius); background: var(--c-primary-50); border: 1px dashed var(--c-primary); }
.cashback-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--c-primary); color: #fff; flex-shrink: 0; }
.cb-label { margin: 0; font-size: .85rem; color: var(--c-muted); }
.cb-value { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--c-primary); }
.notice-login { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: .9rem; color: #8a4b00; background: #fff7ec; padding: 10px 14px; border-radius: 10px; }
.notice-login .icon { flex-shrink: 0; }
.pd-steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: .92rem; }
.pd-steps li { display: flex; gap: 10px; align-items: center; }
.pd-steps span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-bg-alt); font-weight: 700; color: var(--c-primary); font-size: .8rem; flex-shrink: 0; }
.pd-content-grid { display: grid; gap: 24px; margin-top: 48px; }
@media (min-width: 900px) { .pd-content-grid { grid-template-columns: 2fr 1fr; } }
.pd-aside { align-self: start; }

/* ---------- Blog & content ---------- */
.post-grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-thumb { display: block; aspect-ratio: 16/10; background: var(--c-primary-50); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb .img-placeholder { color: var(--c-primary); background: linear-gradient(135deg, var(--c-primary-50), var(--c-accent-50)); }
.post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-cat { position: relative; z-index: 1; align-self: flex-start; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-accent); text-decoration: none; margin-bottom: 6px; }
.post-title { font-size: 1.1rem; margin-bottom: 8px; }
.post-title a { color: var(--c-ink); text-decoration: none; }
.post-title a::after { content: ""; position: absolute; inset: 0; }
.post-excerpt { color: var(--c-muted); font-size: .94rem; }
.post-meta { margin: auto 0 0; font-size: .82rem; color: var(--c-muted); }

.article-head { padding-top: 28px; }
.article-head h1 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); margin-top: 8px; }
.article-cover { margin: 24px auto; } .article-cover img { border-radius: var(--radius); width: 100%; }
.entry-content { font-size: 1.06rem; line-height: 1.8; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content img { border-radius: 12px; }
.entry-content blockquote { margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--c-primary); background: var(--c-primary-50); border-radius: 0 12px 12px 0; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--c-line); padding: 8px 12px; text-align: left; }
.article-foot { padding-bottom: 48px; }
.cta-inline { display: flex; align-items: center; gap: 16px; margin: 32px 0 16px; flex-wrap: wrap; background: var(--c-primary-50); border-color: var(--c-primary-100); }
.cta-inline > .icon { color: var(--c-primary); }
.cta-inline > div { flex: 1 1 240px; } .cta-inline p { margin: 0; color: var(--c-muted); }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; border-radius: 999px; background: var(--c-bg-alt); font-size: .85rem; text-decoration: none; color: var(--c-text); }
.post-navigation .nav-links { justify-content: space-between; }
.post-navigation a { display: block; padding: 14px 18px; border: 1px solid var(--c-line); border-radius: 12px; text-decoration: none; max-width: 360px; }
.nav-sub { display: block; font-size: .8rem; color: var(--c-muted); } .nav-title { color: var(--c-ink); font-weight: 600; }

.guide-layout { display: grid; gap: 32px; margin-top: 48px; }
@media (min-width: 992px) { .guide-layout { grid-template-columns: 1.4fr 1fr; } .guide-chat { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }

.search-form { display: flex; gap: 8px; max-width: 520px; margin: 16px 0; }
.center .search-form { margin-inline: auto; }
.search-list { list-style: none; padding: 0; display: grid; gap: 16px; }
.search-list li { padding: 18px 20px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.big-404 { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; margin: 0; color: var(--c-primary-100); }

/* Wallet */
.wallet-stats { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 720px) { .wallet-stats { grid-template-columns: 1.4fr 1fr 1fr; } }
.stat { padding: 20px; border-radius: var(--radius); border: 1px solid var(--c-line); background: #fff; display: grid; gap: 4px; }
.stat span { color: var(--c-muted); font-size: .9rem; } .stat strong { font-size: 1.5rem; color: var(--c-ink); }
.stat-main { background: linear-gradient(135deg, var(--c-primary), #0aa267); border: 0; } .stat-main span, .stat-main strong { color: #fff; } .stat-main strong { font-size: 2rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.table th { background: var(--c-bg-alt); text-align: left; font-weight: 600; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-pending { background: #fff4e0; color: #8a4b00; } .badge-approved { background: var(--c-primary-50); color: var(--c-primary); } .badge-rejected { background: #fdecec; color: var(--c-danger); }
.form-grid { display: grid; gap: 12px; } @media (min-width: 720px) { .form-grid { grid-template-columns: repeat(3, 1fr); } }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--c-ink); }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 16px; background: var(--c-bg-alt); }
.alert-success { background: var(--c-primary-50); color: var(--c-primary-600); } .alert-error { background: #fdecec; color: var(--c-danger); }
.wallet-guest { text-align: center; max-width: 560px; margin: 0 auto; } .wallet-guest > .icon { margin: 0 auto 12px; color: var(--c-primary); } .wallet-guest .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: #0c1712; color: #b9c7c0; padding-top: 56px; font-size: .94rem; }
.site-footer a { color: #dfe8e3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 40px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-brand p { margin-top: 14px; max-width: 40ch; }
.footer-title { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-col .menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 20px 28px; font-size: .84rem; }
.footer-bottom p { margin: 0 0 8px; }
.disclosure { color: #9fb1a8; }

/* WP core */
.alignwide { max-width: 1100px; } .alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--c-muted); text-align: center; }
.comment-list { list-style: none; padding: 0; }

@media print { .site-header, .site-footer, .chat-fab, .chat-popup, .chatbot { display: none !important; } }

/* Grid children must be allowed to shrink (prevents horizontal overflow on mobile) */
.hero-grid > *, .guide-layout > *, .guide-grid > *, .pd-content-grid > *, .product-detail > * { min-width: 0; }
.entry-content > :first-child { margin-top: 0; }

/* Mobile menu position under the WP admin bar */
@media (max-width: 1080px) { .admin-bar .site-nav { top: calc(var(--header-h) + 32px); } }
@media (max-width: 782px) { .admin-bar .site-nav { top: calc(var(--header-h) + 46px); } }

/* ==========================================================
   Account: đăng ký / đăng nhập / hồ sơ / thành viên
   ========================================================== */
.account-page { padding-block: 32px 64px; background: linear-gradient(180deg, var(--c-primary-50), #fff 320px); min-height: 60vh; }
.account-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 20px; }
.auth-wrap { display: grid; gap: 32px; max-width: 980px; margin: 16px auto 0; align-items: center; }
@media (min-width: 900px) { .auth-wrap { grid-template-columns: 1.1fr 1fr; } }
.auth-card { padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); border-radius: 24px; }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head h2 { margin: 12px 0 4px; font-size: 1.6rem; }
.auth-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--c-primary-50); color: var(--c-primary); }
.auth-aside h3 { font-size: 1.25rem; }
.auth-aside .checklist { margin: 16px 0 0; }
@media (max-width: 899px) { .auth-aside { display: none; } }
.auth-switch { text-align: center; margin: 20px 0 0; color: var(--c-muted); }
.auth-sent { text-align: center; padding: 8px 0; }
.auth-sent > .icon { margin: 0 auto 12px; color: var(--c-primary); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; font-size: .9rem; flex-wrap: wrap; }
.auth-row .check { margin: 0; }

.form p { margin: 0 0 16px; }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--c-ink); }
.form label abbr { color: var(--c-danger); text-decoration: none; }
.form input:not([type=checkbox]), .form select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--c-line); border-radius: var(--radius-sm); font: 400 1rem var(--font); color: var(--c-ink); background: #fff; }
.form input:disabled { background: var(--c-bg-alt); color: var(--c-muted); }
.form input:focus, .form select:focus { outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-50); }
.form .check { display: flex; gap: 10px; align-items: flex-start; }
.form .check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--c-primary); flex-shrink: 0; }
.form .check label { font-weight: 400; margin: 0; font-size: .92rem; color: var(--c-text); }
.hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--c-muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 64px !important; }
.pass-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--c-bg-alt); color: var(--c-ink); font: 600 .8rem var(--font); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-info { background: #eef5ff; color: #0b57c2; }

.profile-wrap { max-width: 820px; }
.progress-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 20px; flex-wrap: wrap; }
.progress-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); font-size: .88rem; color: var(--c-muted); }
.progress-steps span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c-bg-alt); font-size: .75rem; font-weight: 700; }
.progress-steps .done { color: var(--c-primary); } .progress-steps .done span { background: var(--c-primary); color: #fff; }
.progress-steps .active { color: var(--c-ink); border-color: var(--c-primary); font-weight: 600; } .progress-steps .active span { background: var(--c-accent); color: #fff; }
.profile-form fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.profile-form legend { font-weight: 700; font-size: 1.05rem; color: var(--c-ink); margin-bottom: 14px; padding-top: 8px; }
.profile-form fieldset + fieldset { margin-top: 12px; padding-top: 4px; }
.profile-form legend { display: flex; align-items: center; gap: 10px; width: 100%; }
.profile-form legend::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--c-primary); }
.form-grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.member { display: grid; gap: 20px; }
.member-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.member-avatar { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), #12b886); color: #fff; font-size: 1.5rem; font-weight: 800; flex-shrink: 0; }
.member-id { flex: 1 1 220px; min-width: 0; } .member-id h2 { margin: 0; font-size: 1.3rem; } .member-id p { margin: 2px 0 0; font-size: .88rem; }
.member-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.member-stats { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 992px) { .member-stats { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.member-stats .stat strong { font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.member-stats .stat em { font-style: normal; font-size: .8rem; color: var(--c-muted); }
.member-stats .stat-main a { color: #fff; font-weight: 600; font-size: .9rem; }
.c-pending { color: #b45309 !important; }
@media (max-width: 991px) { .member-stats .stat-main { grid-column: span 2; } }
.member-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 992px) { .member-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
.member-side { display: grid; gap: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.table .num { text-align: right; white-space: nowrap; }
.orders-table code { font-size: .82rem; background: var(--c-bg-alt); padding: 2px 6px; border-radius: 6px; }
@media (max-width: 640px) {
	.orders-table { min-width: 0; }
	.orders-table thead { display: none; }
	.orders-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
	.orders-table td { border: 0; padding: 2px 0; text-align: left !important; }
	.orders-table td::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .03em; }
}
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .92rem; }
.info-list dt { color: var(--c-muted); } .info-list dd { margin: 0; color: var(--c-ink); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.withdraw-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .88rem; }
.withdraw-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--c-line); }
.mt { margin-top: 20px; }

/* ==========================================================
   Trợ lý mua sắm – thẻ sản phẩm trong khung chat
   ========================================================== */
.hero-chat .chatbot { height: 600px; }
.msg-wide { max-width: 100%; width: 100%; white-space: normal; }
.chat-cards-wrap { position: relative; margin: 10px -4px 0; }
.chat-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 4px 8px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.chat-card { flex: 0 0 196px; scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.is-compact .chat-card { flex-basis: 176px; }
.chat-card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-bg-alt); }
.chat-card-media img { width: 100%; height: 100%; object-fit: cover; }
.chat-card-media .badge-off { top: 8px; left: 8px; }
.chat-card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px; flex: 1; }
.chat-card-body .store-tag { align-self: flex-start; font-size: .7rem; padding: 2px 8px; }
.chat-card-title { margin: 0; font-size: .84rem; font-weight: 600; line-height: 1.35; color: var(--c-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.chat-card-price { margin: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.chat-card-price strong { color: var(--c-accent); font-size: .98rem; }
.chat-card-price del { color: var(--c-muted); font-size: .74rem; }
.chat-card-cb { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--c-primary-50); border: 1px dashed var(--c-primary); }
.chat-card-cb span { font-size: .72rem; color: var(--c-primary-600); font-weight: 500; }
.chat-card-cb strong { font-size: .9rem; color: var(--c-primary); }
.chat-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; padding-top: 4px; }
.chat-card-actions .btn { min-height: 36px; padding: 6px 8px; font-size: .78rem; border-radius: 10px; }
.cards-nav { position: absolute; top: 34%; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--c-line); background: #fff; color: var(--c-ink); font-size: 1.3rem; line-height: 1; box-shadow: var(--shadow); cursor: pointer; display: none; }
.cards-prev { left: -6px; } .cards-next { right: -6px; }
@media (hover: hover) and (min-width: 640px) { .cards-nav { display: grid; place-items: center; } }
.chat-more { display: inline-block; margin-top: 4px; font-size: .85rem; font-weight: 600; }
.chat-hint { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #fff7ec; color: #8a4b00; font-size: .8rem; }
.chat-quick { flex-wrap: nowrap; padding-bottom: 2px; }
.chat-quick[hidden] { display: none; }
.mock-card { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--c-line); border-radius: 12px; background: #fff; font-size: .8rem; }
.mock-img { width: 52px; height: 52px; border-radius: 8px; background: linear-gradient(135deg, var(--c-primary-100), var(--c-accent-50)); flex-shrink: 0; }
.mock-card b { display: block; color: var(--c-ink); } .mock-card em { font-style: normal; color: var(--c-accent); font-weight: 700; margin-right: 6px; } .mock-card i { font-style: normal; color: var(--c-primary); font-weight: 600; }
.chat-log { position: relative; }
