/* ==========================================================================
   Tây Bắc Store — theme dùng chung cho phía client.
   Nạp SAU bootstrap CDN để thắng các giá trị mặc định (màu link, font...).
   ========================================================================== */

:root {
    /* Màu thương hiệu: xanh rừng + nâu mắc khén trên nền kem */
    --c-primary: #2e7d32;
    --c-primary-700: #1b5e20;
    --c-primary-900: #173f1c;
    --c-primary-50: #eef6ee;
    --c-accent: #b5651d;
    --c-accent-50: #fbf1e6;
    --c-sale: #d64533;

    --c-bg: #f7f4ec;
    --c-surface: #ffffff;
    --c-surface-alt: #fbf9f4;
    --c-border: #e8e2d4;
    --c-ink: #1f2a22;
    --c-ink-2: #3f4a42;
    --c-muted: #737c74;

    --font-body: 'Be Vietnam Pro', 'Segoe UI', Roboto, Arial, sans-serif;
    --font-heading: 'Lora', Georgia, 'Times New Roman', serif;

    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(31, 42, 34, 0.05), 0 2px 8px rgba(31, 42, 34, 0.04);
    --shadow: 0 6px 20px rgba(31, 42, 34, 0.08);
    --shadow-lg: 0 16px 40px rgba(31, 42, 34, 0.14);
}

/* ---------- Base ---------- */
html body,
body #site,
body #container,
body #main-content-wp {
    background-color: var(--c-bg) !important;
}
body {
    font-family: var(--font-body);
    color: var(--c-ink);
    -webkit-font-smoothing: antialiased;
}
/* CSS cũ gán font Roboto cho từng phần tử; đưa tất cả về font thương hiệu (trừ icon). */
#site :is(p, a, span, li, td, th, label, input, button, select, textarea, div, strong, small, em, h1, h2, h3, h4, h5, h6):not(.fa),
.client-chat-panel :is(div, span, input, button):not(.fa),
.swal2-popup {
    font-family: var(--font-body) !important;
}
/* :not(.fa) để specificity cao hơn rule font nội dung phía trên */
#site :is(h1, h2, h3, .section-title, .section-premium-title, .page-title):not(.fa) {
    font-family: var(--font-heading) !important;
}
a { color: var(--c-primary); }
a:hover, a:focus { color: var(--c-primary-700); }
::selection { background: #cfe5cf; }

:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* Bootstrap về màu thương hiệu */
.btn-primary, .btn-success {
    background-color: var(--c-primary); background-image: none; border-color: var(--c-primary); color: #fff; text-shadow: none;
}
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus,
.btn-primary:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled):active {
    background-color: var(--c-primary-700); border-color: var(--c-primary-700); color: #fff;
}
.btn-outline-primary, .btn-outline-success { color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline-primary:hover, .btn-outline-success:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.text-primary { color: var(--c-primary) !important; }
.form-control:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}
.page-link { color: var(--c-primary); }
.page-item.active .page-link { background-color: var(--c-primary); border-color: var(--c-primary); }

/* ---------- Nút dùng chung ---------- */
.btn-brand,
.btn-brand-outline,
.btn-brand-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-brand { background: var(--c-primary); color: #fff !important; }
.btn-brand:hover, .btn-brand:focus-visible { background: var(--c-primary-700); box-shadow: 0 6px 16px rgba(46, 125, 50, 0.28); }
.btn-brand-outline { background: transparent; color: var(--c-primary) !important; border-color: var(--c-primary); }
.btn-brand-outline:hover, .btn-brand-outline:focus-visible { background: var(--c-primary); color: #fff !important; }
.btn-brand-light { background: rgba(255, 255, 255, 0.14); color: #fff !important; border-color: rgba(255, 255, 255, 0.7); }
.btn-brand-light:hover, .btn-brand-light:focus-visible { background: #fff; color: var(--c-primary-900) !important; }

/* ---------- Khối section & tiêu đề (thay cho dải xanh cũ) ---------- */
#main-content-wp .section,
.sidebar .section {
    background-color: var(--c-surface) !important;
    border: 1px solid var(--c-border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
    margin-bottom: 24px !important;
    overflow: hidden !important;
}
#main-content-wp .section-head .section-title,
.sidebar .section-head .section-title {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 !important;
    padding: 18px 20px 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--c-primary-900) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
#main-content-wp .section-head .section-title::before,
.sidebar .section-head .section-title::before {
    content: '';
    flex: 0 0 4px;
    height: 20px;
    border-radius: 2px;
    background: var(--c-accent);
}
.sidebar .section-head .section-title { justify-content: flex-start !important; font-size: 17px !important; cursor: default; }
.sidebar .sidebar-toggle .fa { display: none; margin-left: auto; }
.section-detail { padding: 16px 20px 20px; }

/* Sidebar: danh mục & bán chạy */
#category-product-wp .list-item > li > a {
    display: block;
    padding: 9px 4px;
    color: var(--c-ink-2) !important;
    font-size: 14px;
    border-bottom: 1px dashed var(--c-border);
    transition: color 0.2s, padding-left 0.2s;
}
#category-product-wp .list-item > li:last-child > a { border-bottom: 0; }
#category-product-wp .list-item > li > a:hover { color: var(--c-primary) !important; padding-left: 8px; }
.sidebar #banner-wp { display: none; }

@media screen and (max-width: 991px) {
    html body .sidebar .section-head .sidebar-toggle {
        min-height: 52px;
        padding: 14px 16px !important;
        background: var(--c-surface) !important;
        color: var(--c-primary-900) !important;
        font-size: 15px !important;
        cursor: pointer;
    }
    html body .sidebar .sidebar-toggle .fa { display: inline-block; color: var(--c-muted); }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header { position: relative; z-index: 100; background: var(--c-surface); box-shadow: 0 1px 0 var(--c-border); }

.hdr-topbar { background: var(--c-primary-900); color: #dfeadf; font-size: 13px; }
.hdr-topbar .wp-inner { display: flex; align-items: center; justify-content: space-between; min-height: 36px; gap: 16px; }
.hdr-topbar .fa { margin-right: 6px; color: #9fcf9f; }
.hdr-topbar a { color: #fff !important; font-weight: 600; }
.hdr-topbar a:hover { color: #cfe8cf !important; }

.hdr-main .wp-inner { display: flex; align-items: center; gap: 28px; min-height: 76px; }

.hdr-logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; text-decoration: none !important; }
.hdr-logo img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--c-primary-50), 0 0 0 3px var(--c-primary); }
.hdr-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
#site .hdr-logo__text strong { color: var(--c-primary-900); font-family: var(--font-heading) !important; font-size: 23px; font-weight: 700; letter-spacing: 0.3px; }
.hdr-logo__text small { color: var(--c-accent); font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }

.hdr-search { position: relative; flex: 1 1 auto; max-width: 560px; }
.hdr-search form { display: flex; align-items: stretch; height: 46px; margin: 0; border: 1.5px solid var(--c-border); border-radius: 999px; background: var(--c-surface-alt); transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s; }
.hdr-search form:focus-within { border-color: var(--c-primary); background: #fff; box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12); }
.hdr-search input#s { flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0 8px 0 20px; border: 0; background: transparent; color: var(--c-ink); font-size: 14px; outline: none; }
.hdr-search input#s::placeholder { color: #9aa29b; }
.hdr-search button#sm-s { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; margin: 4px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--c-primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
.hdr-search button#sm-s:hover { background: var(--c-primary-700); }
.hdr-search ul#seach { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1000; max-height: 400px; margin: 0; padding: 6px 0; overflow-y: auto; list-style: none; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.hdr-search ul#seach:empty { display: none; }
.search-item + .search-item { border-top: 1px solid #f1eee6; }
.search-item-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none !important; transition: background-color 0.15s; }
.search-item-link:hover { background: var(--c-surface-alt); }
.search-item-img { flex: 0 0 44px; width: 44px; height: 44px; }
.search-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.search-item-info { flex: 1; min-width: 0; }
.search-item-name { margin: 0 0 3px; color: var(--c-ink); font-size: 14px; font-weight: 600; line-height: 1.35; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-item-price { color: var(--c-primary); font-size: 14px; font-weight: 700; }

.hdr-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.hdr-action { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border-radius: 999px; background: transparent; border: 0; color: var(--c-ink-2) !important; font-size: 14px; font-weight: 500; text-decoration: none !important; transition: background-color 0.2s, color 0.2s; }
.hdr-action:hover, .hdr-action:focus-visible, .hdr-account .show > .hdr-action { background: var(--c-primary-50); color: var(--c-primary-900) !important; }
.hdr-action .fa { font-size: 18px; color: var(--c-primary); }
.hdr-action__label { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.hdr-action__label small { color: var(--c-muted); font-size: 11px; }
.hdr-action__label strong { max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 600; }
.hdr-account .dropdown-toggle::after { display: none; }
.hdr-account .hdr-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--c-primary-50); }
.hdr-account .dropdown-menu { min-width: 200px; margin-top: 8px; padding: 6px; border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.hdr-account .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--c-ink-2); font-size: 14px; }
.hdr-account .dropdown-item .fa { width: 16px; color: var(--c-muted); text-align: center; }
.hdr-account .dropdown-item:hover, .hdr-account .dropdown-item:focus { background: var(--c-primary-50); color: var(--c-primary-900); }

.hdr-cart { position: relative; width: 46px; height: 46px; padding: 0; justify-content: center; background: var(--c-primary-50); }
.hdr-cart .fa { font-size: 19px; }
.hdr-cart:hover .fa { color: var(--c-primary-900); }
.hdr-cart span#num { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--c-accent); box-shadow: 0 0 0 2px #fff; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.hdr-cart span#num:empty { display: none; }

.hdr-menu-btn { display: none; width: 44px; height: 44px; padding: 0; justify-content: center; border: 1px solid var(--c-border); }
.hdr-menu-btn .fa { color: var(--c-ink); }

.hdr-nav { border-top: 1px solid var(--c-border); }
.hdr-nav__list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.hdr-nav__list a { position: relative; display: block; padding: 13px 16px; color: var(--c-ink-2) !important; font-size: 15px; font-weight: 500; text-decoration: none !important; transition: color 0.2s; }
.hdr-nav__list a::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--c-primary); transform: scaleX(0); transition: transform 0.2s; }
.hdr-nav__list a:hover { color: var(--c-primary) !important; }
.hdr-nav__list a:hover::after, .hdr-nav__list a.is-active::after { transform: scaleX(1); }
.hdr-nav__list a.is-active { color: var(--c-primary-900) !important; font-weight: 700; }

@media screen and (max-width: 991px) {
    .hdr-topbar { font-size: 12px; }
    .hdr-topbar .hdr-topbar__tagline { display: none; }
    .hdr-topbar .wp-inner { justify-content: center; min-height: 32px; }
    .hdr-main .wp-inner { flex-wrap: wrap; gap: 8px 10px; min-height: 0; padding-top: 10px; padding-bottom: 12px; }
    .hdr-menu-btn { display: inline-flex; order: 1; }
    .hdr-logo { order: 2; flex: 1 1 auto; min-width: 0; }
    .hdr-logo img { width: 38px; height: 38px; }
    .hdr-logo__text strong { font-size: 20px; }
    .hdr-logo__text small { font-size: 10px; letter-spacing: 1.2px; }
    .hdr-actions { order: 3; gap: 4px; }
    .hdr-search { order: 4; flex: 0 0 100%; max-width: none; }
    .hdr-search form { height: 44px; }
    .hdr-search button#sm-s { padding: 0 14px; }
    .hdr-search button#sm-s .hdr-search__label { display: none; }
    .hdr-action { padding: 6px; }
    .hdr-action__label, .hdr-register { display: none !important; }
    .hdr-action--account { width: 44px; justify-content: center; }

    .hdr-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--c-border); box-shadow: var(--shadow-lg); }
    .site-header.mobile-menu-open .hdr-nav { display: block; }
    .hdr-nav .wp-inner { padding-top: 6px; padding-bottom: 10px; }
    .hdr-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .hdr-nav__list a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid #f1eee6; }
    .hdr-nav__list li:last-child a { border-bottom: 0; }
    .hdr-nav__list a::after { display: none; }
    .hdr-nav__list a.is-active { color: var(--c-primary) !important; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { margin-top: 0; background: var(--c-primary-900); color: #c9d8ca; font-size: 14px; }
.site-footer a { color: #c9d8ca !important; text-decoration: none !important; transition: color 0.2s; }
.site-footer a:hover { color: #fff !important; }
.ftr-main { padding: 56px 0 36px; }
.ftr-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.25fr; gap: 40px; }
#site .ftr-brand .hdr-logo__text strong { color: #fff; }
.ftr-brand .hdr-logo__text small { color: #e6b98a; }
.ftr-brand p { margin: 16px 0 18px; line-height: 1.7; }
.ftr-title { margin: 6px 0 18px; color: #fff; font-family: var(--font-body) !important; font-size: 15px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.ftr-list { margin: 0; padding: 0; list-style: none; }
.ftr-list li { display: flex; gap: 10px; margin-bottom: 12px; line-height: 1.55; }
.ftr-list .fa { flex: 0 0 16px; margin-top: 3px; color: #8fc28f; text-align: center; }
.ftr-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.ftr-pay span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; color: #eef5ee; font-size: 12px; font-weight: 600; }
.ftr-pay .fa { color: #e6b98a; }
.ftr-news p { margin: 0 0 14px; line-height: 1.7; }
.ftr-news form { display: flex; height: 46px; margin: 0; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.ftr-news input { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0 14px; border: 0; background: transparent; color: #fff; font-size: 14px; outline: none; }
.ftr-news input::placeholder { color: #a9bcaa; }
.ftr-news button { flex: 0 0 38px; width: 38px; border: 0; border-radius: 50%; background: var(--c-accent); color: #fff; cursor: pointer; transition: filter 0.2s; }
.ftr-news button:hover { filter: brightness(1.1); }
.ftr-bottom { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); color: #9fb3a0; font-size: 13px; text-align: center; }
.ftr-bottom p { margin: 0; }

@media screen and (max-width: 991px) {
    .ftr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}
@media screen and (max-width: 640px) {
    .ftr-main { padding: 36px 0 20px; }
    .ftr-grid { grid-template-columns: 1fr; gap: 24px; }
    .ftr-policy { display: none; }
}

/* ---------- Nút nổi: lên đầu trang & trợ lý AI ---------- */
body #btn-top {
    position: fixed;
    right: 28px;
    bottom: 92px;
    z-index: 999;
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--c-border);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow);
    color: var(--c-primary-900);
    font-size: 16px;
    line-height: 42px;
    text-align: center;
    cursor: pointer;
}
body #btn-top:hover { background: var(--c-primary-50); }

.client-chat-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--c-primary);
    box-shadow: 0 8px 22px rgba(46, 125, 50, 0.4);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}
.client-chat-toggle:hover { background: var(--c-primary-700); transform: translateY(-2px); }
.client-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: 360px;
    height: 520px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--c-primary-900); color: #fff; }
.chat-head__avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); font-size: 16px; }
.chat-head__title { flex: 1; line-height: 1.25; }
.chat-head__title strong { display: block; font-size: 15px; }
.chat-head__title small { color: #b9d3ba; font-size: 12px; }
.chat-head__close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.chat-head__close:hover { background: rgba(255, 255, 255, 0.14); }
.chat-body { flex: 1; padding: 16px; overflow-y: auto; background: var(--c-surface-alt); }
.chat-msg { display: flex; margin-bottom: 10px; }
.chat-msg--user { justify-content: flex-end; }
.chat-bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg--bot .chat-bubble { border: 1px solid var(--c-border); border-bottom-left-radius: 4px; background: #fff; color: var(--c-ink); }
.chat-msg--user .chat-bubble { border-bottom-right-radius: 4px; background: var(--c-primary); color: #fff; }
.chat-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--c-border); background: #fff; }
.chat-foot input { flex: 1; min-width: 0; height: 42px; padding: 0 16px; border: 1.5px solid var(--c-border); border-radius: 999px; outline: none; font-size: 14px; }
.chat-foot input:focus { border-color: var(--c-primary); }
.chat-foot button { flex: 0 0 42px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--c-primary); color: #fff; cursor: pointer; }
.chat-foot button:hover { background: var(--c-primary-700); }

@media screen and (max-width: 991px) {
    html body .client-chat-toggle { right: 16px !important; bottom: 16px !important; width: 50px; height: 50px; }
    html body .client-chat-panel { right: 12px !important; bottom: 78px !important; }
    body #btn-top { right: 21px; bottom: 76px; }
}

/* ==========================================================================
   TRANG CHỦ
   ========================================================================== */
.home-page { padding-top: 24px !important; }
.home-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--c-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

/* Hero */
.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 440px;
    padding: 56px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--c-primary-900);
    background-position: center 60%;
    background-size: cover;
    isolation: isolate;
}
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(16, 36, 20, 0.88) 0%, rgba(16, 36, 20, 0.62) 45%, rgba(16, 36, 20, 0.05) 80%);
}
.home-hero__content { max-width: 560px; color: #fff; }
.home-hero .home-eyebrow { color: #f0c38f; }
.home-hero__title {
    margin: 0 0 16px;
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
}
.home-hero__desc { margin: 0 0 28px; color: #dde7de; font-size: 16px; line-height: 1.7; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cam kết */
.home-perks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 20px 0 48px;
    padding: 0;
    list-style: none;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.home-perks li { display: flex; align-items: center; gap: 14px; padding: 20px 22px; }
.home-perks li + li { border-left: 1px solid var(--c-border); }
.home-perks__icon {
    display: inline-flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--c-primary-50);
    color: var(--c-primary);
    font-size: 19px;
}
.home-perks strong { display: block; color: var(--c-ink); font-size: 15px; font-weight: 600; line-height: 1.35; }
.home-perks small { display: block; color: var(--c-muted); font-size: 13px; line-height: 1.4; }

/* Khối nội dung */
.home-block { margin-bottom: 52px; }
.home-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 20px;
}
.home-block__title { margin: 0; color: var(--c-primary-900); font-size: 28px; font-weight: 700; line-height: 1.25; }
.home-block__more { color: var(--c-primary) !important; font-size: 14px; font-weight: 600; white-space: nowrap; }
.home-block__more .fa { margin-left: 4px; transition: transform 0.2s; }
.home-block__more:hover .fa { transform: translateX(3px); }
.home-block .product-sort { margin: 0; }

/* Danh mục */
.home-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.home-cat {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--c-primary-900);
    text-decoration: none !important;
}
.home-cat img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.home-cat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(12, 28, 15, 0.85) 100%); }
.home-cat:hover img { transform: scale(1.06); }
.home-cat__info { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: #fff; }
#site .home-cat__info strong { display: block; font-family: var(--font-heading) !important; font-size: 19px; font-weight: 700; line-height: 1.3; }
.home-cat__info small { display: block; margin-top: 2px; color: #e2ebe3; font-size: 13px; }
.home-cat__info small .fa { margin-left: 4px; transition: transform 0.2s; }
.home-cat:hover .home-cat__info small .fa { transform: translateX(3px); }

/* Câu chuyện */
.home-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    margin-bottom: 52px;
    padding: 28px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
}
.home-story__media { aspect-ratio: 5 / 4; overflow: hidden; border-radius: var(--radius); }
.home-story__media img { width: 100%; height: 100%; object-fit: cover; }
.home-story__content { padding-right: 20px; }
.home-story__content .home-block__title { margin-bottom: 14px; }
.home-story__content p { margin: 0 0 18px; color: var(--c-ink-2); font-size: 15px; line-height: 1.75; }
.home-story__points { margin: 0 0 24px; padding: 0; list-style: none; }
.home-story__points li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--c-ink); font-weight: 500; }
.home-story__points .fa {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-primary-50);
    color: var(--c-primary);
    font-size: 11px;
}

@media screen and (max-width: 991px) {
    .home-hero { min-height: 360px; padding: 40px 32px; }
    .home-hero__title { font-size: 32px; }
    .home-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-perks li:nth-child(3) { border-left: 0; }
    .home-perks li:nth-child(n + 3) { border-top: 1px solid var(--c-border); }
    .home-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .home-story { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
    .home-story__content { padding-right: 0; }
    .home-block { margin-bottom: 40px; }
}
@media screen and (max-width: 640px) {
    .home-page { padding-top: 12px !important; }
    .home-hero { min-height: 0; padding: 32px 22px; border-radius: var(--radius); background-position: center; }
    .home-hero::before { background: linear-gradient(180deg, rgba(16, 36, 20, 0.55) 0%, rgba(16, 36, 20, 0.85) 100%); }
    .home-hero__title { font-size: 26px; }
    .home-hero__desc { margin-bottom: 20px; font-size: 14px; }
    .home-hero__actions > * { flex: 1 1 auto; }
    .home-perks { margin: 14px 0 32px; }
    .home-perks li { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
    .home-perks__icon { flex-basis: 38px; width: 38px; height: 38px; font-size: 16px; }
    .home-perks strong { font-size: 14px; }
    .home-perks small { font-size: 12px; }
    .home-block { margin-bottom: 32px; }
    .home-block__head { align-items: flex-start; flex-direction: column; margin-bottom: 14px; }
    .home-block__head:not(:has(.product-sort)) { flex-direction: row; align-items: flex-end; }
    .home-block__title { font-size: 22px; }
    .home-block .product-sort { width: 100%; }
    .home-cats { gap: 10px; }
    .home-cat__info { left: 12px; right: 12px; bottom: 10px; }
    .home-cat__info strong { font-size: 15px; }
    .home-cat__info small { font-size: 12px; }
    .home-story { padding: 14px; }
}

/* ---------- Bố cục chung các trang con ---------- */
/* Footer luôn ở đáy kể cả trang ít nội dung */
body #container { display: flex; flex-direction: column; min-height: 100vh; }
body #container > #main-content-wp { flex: 1 0 auto; }
body #container > .site-footer { flex-shrink: 0; }
/* Bỏ tấm nền trắng vuông góc phía sau các thẻ ở trang bài viết / giới thiệu / liên hệ */
.detail-blog-page .main-content { background: transparent !important; padding: 0 !important; }
/* Breadcrumb */
#breadcrumb-wp .list-item li a, #breadcrumb-wp .list-item li { color: var(--c-muted) !important; font-size: 14px; }
#breadcrumb-wp .list-item li a:hover { color: var(--c-primary) !important; }
#breadcrumb-wp .list-item li:last-child a { color: var(--c-ink) !important; font-weight: 500; }

/* ---------- Trang danh sách / danh mục sản phẩm: thanh công cụ ---------- */
#site .premium-toolbar {
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 0;
    padding: 20px 20px 4px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
#site .premium-toolbar .section-title {
    margin: 0;
    color: var(--c-primary-900);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
#site .premium-toolbar h6 { color: var(--c-ink) !important; font-size: 17px !important; font-weight: 500; }
#site .premium-toolbar .filter-wp { flex-wrap: wrap; gap: 12px 16px; }
#site .premium-toolbar .desc { color: var(--c-muted); font-size: 14px; }
#site .premium-toolbar select {
    height: 40px;
    min-height: 40px;
    padding: 0 36px 0 16px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background-color: var(--c-surface-alt);
    color: var(--c-ink-2);
    font-size: 14px;
}
#site .premium-toolbar select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12); }
#site .premium-toolbar button {
    height: 40px;
    min-height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--c-primary);
    color: #fff;
    transform: none;
}
#site .premium-toolbar button:hover { background: var(--c-primary-700); transform: none; }
#site #list-product-wp > .section-detail { padding-top: 12px; }

@media screen and (max-width: 640px) {
    #site .premium-toolbar { flex-direction: column; align-items: stretch; padding: 16px 14px 0; }
    #site .premium-toolbar .section-title { font-size: 21px; text-align: left; }
    #site .premium-toolbar .filter-wp { justify-content: space-between; }
    #site .premium-toolbar .form-filter { flex: 1 1 100%; }
    #site .premium-toolbar .form-filter form { display: flex; width: 100%; }
    #site .premium-toolbar select { flex: 1 1 auto; min-width: 0; }
    #site .premium-toolbar button { flex: 0 0 auto; }
    #site #list-product-wp > .section-detail { padding: 12px 14px 16px !important; }
}

/* ---------- Vá xung đột với CSS cũ ---------- */
/* Breadcrumb dạng .section (giỏ hàng, thanh toán, QR) không hiển thị thành card trắng full-width */
#main-content-wp #breadcrumb-wp.section {
    margin-bottom: 8px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
#main-content-wp #breadcrumb-wp.section .section-detail { padding: 0; background: transparent; box-shadow: none; border: 0; }
/* Radio / checkbox theo màu thương hiệu */
#site input[type="radio"], #site input[type="checkbox"] { accent-color: var(--c-primary); }
/* Tiêu đề cột footer dùng font nội dung */
#site .site-footer .ftr-title { font-family: var(--font-body) !important; }

/* Thanh toán */
#site #customer-info-wp .section-head .section-title::before,
#site #order-review-wp .section-head .section-title::before { position: static; width: 4px; bottom: auto; left: auto; }
#site .checkout-page .section-title { background: transparent; color: var(--c-primary-900); padding: 18px 20px 4px; border-radius: 0; text-transform: none; }
#site .checkout-page .section-detail { border: 0; box-shadow: none; border-radius: 0; margin-bottom: 0; }
#site .checkout-page .form-control { border-color: var(--c-border); border-radius: 10px; }
#site .checkout-page .form-control[readonly] { background-color: var(--c-surface-alt); }
#site .shop-table thead td { background: var(--c-surface-alt); border-bottom: 1px solid var(--c-border); color: var(--c-muted); font-size: 13px; letter-spacing: 0.4px; }
#site .shop-table tfoot td { text-transform: none; }
#site .total-price { color: var(--c-primary-900); font-weight: 800; }
#site #payment-checkout-wp { background: var(--c-surface-alt); border: 1px solid var(--c-border); }
#site #payment-checkout-wp h3, #site #payment-checkout-wp .section-title { color: var(--c-primary-900); }
#site #order-now { min-height: 54px; background: var(--c-primary); border-radius: 999px; font-size: 17px; letter-spacing: 0.3px; box-shadow: 0 6px 16px rgba(46, 125, 50, 0.25); }
#site #order-now:hover { background: var(--c-primary-700); transform: none; }
#site #order-review-wp .shop-table tfoot td, #site #order-review-wp .shop-table thead td { text-transform: none; }

/* ---------- Sidebar: bảng xếp hạng sản phẩm bán chạy ---------- */
.bs-list { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.bs-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: var(--c-ink) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color 0.2s;
}
.bs-name:hover { color: var(--c-primary) !important; }
.bs-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 4px; }
.bs-price strong { color: var(--c-primary); font-size: 15px; font-weight: 800; }
.bs-price s { color: #9aa3a0; font-size: 12px; }
.bs-unit { color: var(--c-muted); font-size: 12px; white-space: nowrap; }

/* Hạng 1: thẻ nổi bật */
.bs-top {
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface-alt);
}
.bs-top__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.bs-top__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.bs-top:hover .bs-top__media img { transform: scale(1.05); }
.bs-top__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--c-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.bs-top__body { padding: 12px 14px 14px; }
.bs-top__body .bs-name { font-size: 15px; }
.bs-top__body .bs-price strong { font-size: 17px; }
.bs-top__body .bs-unit {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--c-accent-50);
    color: var(--c-accent);
    font-weight: 600;
}

/* Hạng 2+: danh sách gọn có số thứ hạng */
.bs-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--c-border);
}
.bs-item:last-child { border-bottom: 0; padding-bottom: 0; }
.bs-rank {
    flex: 0 0 22px;
    color: #c9c1ae;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}
.bs-item:nth-child(2) .bs-rank, .bs-item:nth-child(3) .bs-rank { color: var(--c-accent); }
.bs-item__thumb { flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border-radius: 10px; }
.bs-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.bs-item:hover .bs-item__thumb img { transform: scale(1.08); }
.bs-item__info { flex: 1 1 auto; min-width: 0; }
