/* =====================================================================
   TỜI ĐIỆN — toidien.com
   Phong cách công nghiệp: góc vuông, đỏ / trắng / đen
   Giữ nguyên tên class của bản cũ để không phải sửa HTML
   ===================================================================== */

/* ── CSS VARIABLES ── */
:root {
    --red         : #e02020;
    --red-dark    : #b81414;
    --red-light   : #fdeeee;
    --black       : #141414;
    --black-soft  : #262626;
    --gray-dark   : #3a3a3a;
    --gray-mid    : #666666;
    --gray-light  : #9a9a9a;
    --gray-border : #e3e3e3;
    --gray-bg     : #f4f4f4;
    --white       : #ffffff;
    --footer-bg   : #141414;
    --footer-dark : #e02020;
    --font        : 'Roboto', 'Segoe UI', Arial, sans-serif;
    --radius      : 2px;
    --shadow-sm   : 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md   : 0 4px 14px rgba(0,0,0,0.12);
    --shadow-lg   : 0 8px 28px rgba(0,0,0,0.16);
    --max-w       : 1300px;
    --side-pad    : 16px;

    /* Header desktop: đỏ (top bar) / trắng (logo + menu + tìm kiếm) / đen (danh mục) */
    --hd-promo : 36px;   /* chiều cao top bar đỏ */
    --hd-main  : 72px;   /* chiều cao hàng trắng, cũng là mốc dính của thanh đen */
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family : var(--font);
    font-size   : 14px;
    line-height : 1.65;
    background  : var(--white);
    color       : var(--black);
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: inline-block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ============================================================
   HEADER (desktop) — 3 tầng: ĐỎ / TRẮNG / ĐEN
   1) Đỏ   : top bar khuyến mãi + liên hệ (cuộn đi khi kéo xuống)
   2) Trắng: logo + menu (Trang chủ, Giới thiệu...) + tìm kiếm  (dính trên cùng)
   3) Đen  : danh mục sản phẩm hàng ngang (.category-bar, dính ngay dưới hàng trắng)
   ============================================================ */
.site-header {
    position  : sticky;
    top       : calc(var(--hd-promo) * -1);
    z-index   : 400;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
}
.hd-wrap {
    max-width  : var(--max-w);
    margin     : 0 auto;
    padding    : 0 var(--side-pad);
    height     : 100%;
    display    : flex;
    align-items: center;
    gap        : 16px;
}

/* ── Tầng 1 (ĐỎ): top bar ── */
.hd-promo { height: var(--hd-promo); background: var(--red); }
.hd-promo .hd-wrap { justify-content: space-between; }
.hd-promo-msg { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hd-promo-msg span {
    font-size    : 13.5px;
    font-weight  : 700;
    font-style   : italic;
    color        : var(--white);
    white-space  : nowrap;
    overflow     : hidden;
    text-overflow: ellipsis;
}
.hd-promo-btn {
    background    : var(--white);
    color         : var(--red);
    font-size     : 11px;
    font-weight   : 800;
    letter-spacing: .03em;
    padding       : 4px 14px;
    border-radius : 30px;
    white-space   : nowrap;
    transition    : background .18s, color .18s;
}
.hd-promo-btn:hover { background: var(--black); color: var(--white); }
.hd-promo-right { display: flex; align-items: center; gap: 12px; font-size: 13px; white-space: nowrap; }
.hd-promo-right a { color: var(--white); font-weight: 500; transition: opacity .15s; }
.hd-promo-right a:hover { opacity: .8; }
.hd-promo-right .sep { color: rgba(255,255,255,0.45); }

/* Mạng xã hội (icon trắng, nằm ở top bar đỏ) */
.hd-social { display: flex; align-items: center; gap: 12px; margin-left: 4px; }
.hd-social a { display: flex; color: var(--white); transition: opacity .15s, transform .15s; }
.hd-social a:hover { opacity: .85; transform: translateY(-1px); }
.hd-social svg { width: 17px; height: 17px; fill: currentColor; }
.hd-social .zl-text { fill: var(--red); }

/* ── Tầng 2 (TRẮNG): logo + menu + tìm kiếm ── */
.hd-main { height: var(--hd-main); background: var(--white); border-bottom: 1px solid var(--gray-border); }

.logo { flex-shrink: 0; display: flex; align-items: center; }
.logo-img { height: 52px; width: auto; object-fit: contain; }

.hd-nav { display: flex; align-self: center; align-items: center; margin-left: 6px; }
.nav-icon { width: 16px; height: 16px; object-fit: contain; display: block; }
.nav-link {
    display    : inline-flex;
    align-items: center;
    height     : 36px;
    padding    : 0 14px;
    color      : #333;
    font-size  : 14px;
    font-weight: 600;
    white-space: nowrap;
    position   : relative;
    transition : color .18s;
}
.nav-link::after {
    content   : '';
    position  : absolute;
    left      : 14px;
    right     : 14px;
    bottom    : 0;
    height    : 3px;
    background: var(--red);
    transform : scaleX(0);
    transition: transform .2s ease;
}
.nav-link:hover { color: var(--red); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--red); font-weight: 700; }

/* ── Search ── */
.search-box {
    flex         : 1;
    max-width    : 600px;
    margin-left  : 8px;
    display      : flex;
    align-items  : stretch;
    height       : 42px;
    border-radius: var(--radius);
    overflow     : hidden;
    border       : 2px solid var(--black);
    background   : var(--white);
    transition   : border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
    border-color: var(--red);
    box-shadow  : 0 0 0 3px rgba(224,32,32,0.15);
}
.search-inner {
    flex       : 1;
    display    : flex;
    align-items: center;
    padding    : 0 12px;
    gap        : 8px;
    background : var(--white);
}
.search-icon {
    width      : 16px;
    height     : 16px;
    opacity    : 0.4;
    flex-shrink: 0;
    object-fit : contain;
}
.search-box input {
    flex      : 1;
    border    : none;
    outline   : none;
    font-size : 14px;
    color     : var(--black);
    background: transparent;
    min-width : 0;
}
.search-box input::placeholder { color: #aaa; }
.search-btn {
    display        : flex;
    align-items    : center;
    justify-content: center;
    gap            : 6px;
    background     : var(--red);
    border         : none;
    padding        : 0 24px;
    font-size      : 13px;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .04em;
    color          : var(--white);
    flex-shrink    : 0;
    transition     : background .18s;
    white-space    : nowrap;
}
.search-btn img { width: 15px; height: 15px; object-fit: contain; }
.search-btn:hover { background: var(--black); }

/* Ô tìm kiếm trên hàng trắng: viên thuốc viền đỏ, nút chỉ có icon */
.hd-main .search-box {
    flex         : 1;
    min-width    : 180px;
    max-width    : 360px;
    margin-left  : auto;
    height       : 42px;
    border       : 2px solid var(--red);
    border-radius: 30px;
}
.hd-main .search-inner { padding: 0 6px 0 16px; }
.hd-main .search-btn { margin: 2px; padding: 0 16px; border-radius: 30px; }
.hd-main .search-btn svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2.3; stroke-linecap: round; }

/* Nút Liên hệ */
.hd-contact {
    display       : flex;
    align-items   : center;
    gap           : 8px;
    height        : 42px;
    padding       : 0 20px;
    border-radius : 30px;
    background    : var(--red);
    color         : var(--white);
    font-size     : 13px;
    font-weight   : 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space   : nowrap;
    flex-shrink   : 0;
    box-shadow    : 0 2px 6px rgba(224,32,32,0.22);
    transition    : background .18s;
}
.hd-contact svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hd-contact:hover { background: var(--black); }

/* Giỏ hàng */
.hd-cart { display: flex; align-items: center; gap: 10px; color: var(--black); font-size: 14px; font-weight: 600; flex-shrink: 0; }
.hd-cart-count {
    min-width      : 30px;
    height         : 30px;
    padding        : 0 6px;
    display        : flex;
    align-items    : center;
    justify-content: center;
    border         : 2px solid var(--red);
    border-radius  : 30px;
    color          : var(--red);
    font-weight    : 800;
    transition     : background .18s, color .18s;
}
.hd-cart:hover .hd-cart-count { background: var(--red); color: var(--white); }

.cart-badge {
    position       : absolute;
    top            : 4px;
    right          : 4px;
    background     : var(--red);
    color          : var(--white);
    font-size      : 10px;
    font-weight    : 700;
    border-radius  : 50%;
    width          : 17px;
    height         : 17px;
    display        : flex;
    align-items    : center;
    justify-content: center;
    line-height    : 1;
}

@media (max-width: 1250px) {
    .hd-cart span:first-child { display: none; }
    .nav-link { padding: 0 11px; font-size: 13.5px; }
    .nav-link::after { left: 11px; right: 11px; }
}
@media (max-width: 1100px) { .hd-social { display: none; } }
@media (max-width: 980px) {
    .hd-promo-right { display: none; }
    .hd-cart { display: none; }
    .nav-link { padding: 0 8px; font-size: 13px; }
    .nav-link::after { left: 8px; right: 8px; }
}

@media (max-width: 768px) {
    .site-header { display: none; }
}

/* ============================================================
   MOBILE HEADER — 1 HÀNG DUY NHẤT
   [ nút menu đỏ ] [ logo ] [ ô tìm kiếm co giãn ]
   Menu trượt từ bên TRÁI, có 2 tab: Menu | Danh mục
   ============================================================ */
.mobile-header         { display: none; }
.mobile-drawer         { display: none; }
.mobile-drawer-overlay { display: none; }

@media (max-width: 768px) {

    .mobile-header {
        display      : flex;
        flex-wrap    : nowrap;
        align-items  : center;
        gap          : 8px;
        padding      : 8px 10px;
        background   : var(--white);
        border-bottom: 3px solid var(--red);
        box-shadow   : 0 2px 8px rgba(0,0,0,0.10);
        position     : sticky;
        top          : 0;
        z-index      : 900;
    }

    /* Nút menu (hamburger) */
    .mobile-header .mh-hamburger {
        width          : 42px;
        height         : 42px;
        background     : var(--red);
        border         : none;
        border-radius  : 8px;
        display        : flex;
        flex-direction : column;
        align-items    : center;
        justify-content: center;
        gap            : 4px;
        padding        : 0;
        flex-shrink    : 0;
    }
    .mobile-header .mh-hamburger span {
        display      : block;
        width        : 20px;
        height       : 2.5px;
        background   : var(--white);
        border-radius: 2px;
        transition   : all .25s ease;
    }
    .mobile-header .mh-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .mobile-header .mh-hamburger.is-open span:nth-child(2) { opacity: 0; }
    .mobile-header .mh-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    /* Logo: giữ nguyên kích thước, không bị ô tìm kiếm ép */
    .mobile-header .mh-logo { flex: 0 0 auto; display: flex; align-items: center; }
    .mobile-header .mh-logo img { height: 32px; width: auto; display: block; object-fit: contain; }

    /* Ô tìm kiếm: chiếm phần còn lại của hàng */
    .mobile-header .mh-search {
        flex         : 1 1 0;
        min-width    : 0;
        display      : flex !important;
        align-items  : stretch;
        background   : var(--white) !important;
        border       : 2px solid var(--red);
        border-radius: 30px;
        overflow     : hidden;
        height       : 40px;
        margin       : 0;
        padding      : 0;
        transition   : border-color .2s, box-shadow .2s;
    }
    .mobile-header .mh-search:focus-within {
        border-color: var(--black);
        box-shadow  : 0 0 0 3px rgba(224,32,32,0.12);
    }

    /* font 16px để iPhone không tự phóng to khi bấm vào ô */
    .mobile-header .mh-search input {
        flex      : 1;
        min-width : 0;
        border    : none !important;
        background: var(--white) !important;
        padding   : 0 4px 0 14px;
        font-size : 16px !important;
        outline   : none !important;
        color     : var(--black) !important;
        font-family: var(--font);
        height    : 100%;
        box-shadow: none !important;
        -webkit-appearance: none;
    }
    .mobile-header .mh-search input::placeholder { color: #aaa !important; opacity: 1; }

    /* Nút tìm: chỉ icon kính lúp cho gọn */
    .mobile-header .mh-search button,
    .mobile-header .mh-search .search-btn {
        background   : var(--red) !important;
        border       : none;
        height       : auto;
        margin       : 2px;
        padding      : 0 12px;
        border-radius: 30px;
        flex-shrink  : 0;
    }
    .mobile-header .mh-search .search-btn svg {
        width       : 18px;
        height      : 18px;
        stroke      : #fff;
        fill        : none;
        stroke-width: 2.4;
        stroke-linecap: round;
    }

    /* Overlay */
    .mobile-drawer-overlay {
        display       : block;
        position      : fixed;
        inset         : 0;
        background    : rgba(0,0,0,0.55);
        z-index       : 910;
        opacity       : 0;
        pointer-events: none;
        transition    : opacity .25s ease;
    }
    .mobile-drawer-overlay.is-open { opacity: 1; pointer-events: all; }

    /* Drawer trượt từ trái: cột dọc = [thanh đen] [2 tab] [nội dung cuộn] [footer] */
    .mobile-drawer {
        display       : flex;
        flex-direction: column;
        position      : fixed;
        top           : 0;
        left          : 0;
        bottom        : 0;
        width         : 86%;
        max-width     : 340px;
        background    : var(--white);
        z-index       : 920;
        transform     : translateX(-100%);
        transition    : transform .28s cubic-bezier(.4,0,.2,1);
        overflow      : hidden;
        box-shadow    : 6px 0 24px rgba(0,0,0,0.25);
    }
    .mobile-drawer.is-open { transform: translateX(0); }

    .mobile-drawer .md-top {
        display        : flex;
        align-items    : center;
        justify-content: space-between;
        padding        : 0 12px 0 18px;
        height         : 56px;
        background     : var(--black);
        border-bottom  : 3px solid var(--red);
        flex-shrink    : 0;
    }
    .mobile-drawer .md-title {
        font-size     : 14px;
        font-weight   : 800;
        color         : var(--white);
        text-transform: uppercase;
        letter-spacing: .12em;
    }
    .mobile-drawer .md-close {
        width      : 36px;
        height     : 36px;
        background : var(--red);
        border     : none;
        border-radius: 8px;
        font-size  : 18px;
        color      : var(--white);
        line-height: 1;
        transition : background .15s;
    }
    .mobile-drawer .md-close:hover { background: var(--red-dark); }

    /* ── 2 tab: Menu | Danh mục ── */
    .mobile-drawer .md-tabs {
        display      : flex;
        flex-shrink  : 0;
        background   : var(--gray-bg);
        border-bottom: 1px solid var(--gray-border);
    }
    .mobile-drawer .md-tab {
        flex          : 1;
        padding       : 14px 8px 12px;
        border        : none;
        border-bottom : 3px solid transparent;
        background    : transparent;
        font-size     : 13px;
        font-weight   : 800;
        text-transform: uppercase;
        letter-spacing: .06em;
        color         : var(--gray-mid);
        transition    : color .15s, background .15s, border-color .15s;
    }
    .mobile-drawer .md-tab.is-active {
        background  : var(--white);
        color       : var(--red);
        border-color: var(--red);
    }

    /* Vùng nội dung của 2 tab: phần này cuộn, tab ở trên đứng yên */
    .mobile-drawer .md-panels {
        flex                      : 1;
        min-height                : 0;
        overflow-y                : auto;
        overscroll-behavior       : contain;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-drawer .md-panel[hidden] { display: none; }

    /* ── Tab 1: menu của trang ── */
    .mobile-drawer nav {
        background    : transparent;
        display       : flex;
        flex-direction: column;
        height        : auto;
        overflow      : visible;
        padding       : 0;
        width         : 100%;
    }
    .mobile-drawer nav a {
        display      : flex;
        align-items  : center;
        gap          : 14px;
        padding      : 15px 18px;
        font-size    : 14px;
        font-weight  : 700;
        text-transform: uppercase;
        letter-spacing: .03em;
        color        : var(--black);
        border-bottom: 1px solid var(--gray-border);
        transition   : background .15s, color .15s;
        width        : 100%;
    }
    .mobile-drawer nav a::after {
        content    : '›';
        margin-left: auto;
        font-size  : 22px;
        line-height: 1;
        color      : var(--gray-light);
    }
    .mobile-drawer nav a:hover { background: var(--gray-bg); color: var(--red); }
    .mobile-drawer nav a.active { background: var(--red); color: var(--white); }
    .mobile-drawer nav a.active::after { color: var(--white); }
    .mobile-drawer nav a.active img.nav-icon { filter: brightness(0) invert(1); }
    .mobile-drawer nav a img.nav-icon {
        width     : 22px;
        height    : 22px;
        object-fit: contain;
        flex-shrink: 0;
        filter    : none;
        opacity   : 1;
    }

    /* ── Tab 2: danh mục sản phẩm (dạng cây, cha có nút xổ con) ── */
    .mobile-drawer .md-cat-all {
        display       : flex;
        align-items   : center;
        padding       : 14px 18px;
        font-size     : 13.5px;
        font-weight   : 800;
        text-transform: uppercase;
        letter-spacing: .04em;
        color         : var(--red);
        background    : var(--red-light);
        border-bottom : 1px solid var(--gray-border);
    }
    .mobile-drawer .md-cat-all.active { background: var(--red); color: var(--white); }

    .mobile-drawer .md-cat-list {
        list-style: none;
        margin    : 0;
        padding   : 0;
    }
    .mobile-drawer .md-cat-item {
        margin       : 0;
        border-bottom: 1px solid var(--gray-border);
    }
    .mobile-drawer .md-cat-item::marker { content: none; }
    .mobile-drawer .md-cat-row { display: flex; align-items: stretch; }
    .mobile-drawer .md-cat-link {
        flex         : 1;
        min-width    : 0;
        display      : block;
        padding      : 14px 18px;
        font-size    : 14px;
        font-weight  : 700;
        line-height  : 1.4;
        color        : var(--black);
        overflow-wrap: anywhere;
        transition   : background .15s, color .15s;
    }
    .mobile-drawer .md-cat-link:hover { background: var(--gray-bg); color: var(--red); }
    .mobile-drawer .md-cat-link.active {
        color     : var(--red);
        background: var(--red-light);
        box-shadow: inset 4px 0 0 var(--red);
    }

    /* Nút mũi tên xổ danh mục con */
    .mobile-drawer .md-cat-toggle {
        position    : relative;
        flex        : 0 0 54px;
        border      : none;
        border-left : 1px solid var(--gray-border);
        background  : transparent;
    }
    .mobile-drawer .md-cat-toggle::before {
        content     : '';
        position    : absolute;
        top         : 50%;
        left        : 50%;
        width       : 8px;
        height      : 8px;
        border-right: 2px solid var(--gray-mid);
        border-bottom: 2px solid var(--gray-mid);
        transform   : translate(-50%, -70%) rotate(45deg);
        transition  : transform .2s;
    }
    .mobile-drawer .md-cat-item.is-open > .md-cat-row > .md-cat-toggle::before {
        transform   : translate(-50%, -30%) rotate(-135deg);
        border-color: var(--red);
    }

    /* Danh mục con: ẩn, bấm mũi tên mới hiện */
    .mobile-drawer .md-cat-list .md-cat-list { display: none; background: var(--gray-bg); }
    .mobile-drawer .md-cat-item.is-open > .md-cat-list { display: block; }
    .mobile-drawer .md-cat-list .md-cat-item { border-bottom-color: #e9e9e9; }
    .mobile-drawer .md-cat-level-1 .md-cat-link { padding-left: 32px; font-size: 13.5px; font-weight: 500; }
    .mobile-drawer .md-cat-level-2 .md-cat-link { padding-left: 46px; font-size: 13px;   font-weight: 500; }
    .mobile-drawer .md-cat-level-3 .md-cat-link { padding-left: 60px; font-size: 13px;   font-weight: 500; }

    .mobile-drawer .md-cat-empty {
        padding   : 18px;
        font-size : 13px;
        color     : var(--gray-light);
        margin    : 0;
    }

    .mobile-drawer .md-footer {
        padding   : 14px 18px;
        font-size : 12px;
        color     : var(--gray-light);
        border-top: 1px solid var(--gray-border);
        flex-shrink: 0;
    }
}

/* Màn rất nhỏ (≤ 359px): thu logo lại cho ô tìm kiếm còn chỗ */
@media (max-width: 359px) {
    .mobile-header { gap: 6px; padding: 8px; }
    .mobile-header .mh-logo img { height: 26px; }
    .mobile-header .mh-hamburger { width: 38px; height: 38px; }
}

/* ============================================================
   CATEGORY BAR — tầng ĐEN: danh mục sản phẩm hàng ngang
   Dính ngay dưới hàng trắng của header.
   Chỉ hiện N danh mục đầu (xem renderMenu), nút "Xem thêm (n)"
   sẽ mở rộng ra nhiều hàng; bấm "Thu gọn" để quay lại 1 hàng.
   ============================================================ */
.category-bar {
    width     : 100%;
    background: var(--black);
    border    : 0;
    position  : sticky;
    top       : var(--hd-main);
    z-index   : 350;
    transition: transform .3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.category-bar.bar-hidden { transform: translateY(calc(-100% - 3px)); }

.category-bar > div,
.category-bar > ul,
.category-bar .sidebar {
    max-width: var(--max-w);
    margin   : 0 auto;
    padding  : 0;   /* link tự có padding 16px nên chữ thẳng hàng với logo */
}

.category-bar ul,
ul.menu-level-0 {
    display        : flex !important;
    flex-direction : row !important;
    flex-wrap      : nowrap;
    list-style     : none;
    margin         : 0;
    padding        : 0;
    overflow-x     : auto;
    scrollbar-width: none;
    justify-content: center;
    justify-content: safe center;   /* tràn thì canh trái, không bị cắt mất mục đầu */
}
.category-bar > ul { margin: 0 auto; padding: 0; }
.category-bar ul::-webkit-scrollbar,
ul.menu-level-0::-webkit-scrollbar { display: none; }

/* Đã bấm "Xem thêm": xuống dòng, hiện hết */
ul.menu-level-0.is-expanded {
    flex-wrap : wrap;
    overflow  : visible;
}

.category-bar li,
ul.menu-level-0 .menu-item {
    display    : inline-flex;
    align-items: stretch;
    flex-shrink: 0;
    margin     : 0;
}

/* Danh mục vượt giới hạn: ẩn cho đến khi bấm "Xem thêm" */
ul.menu-level-0 .menu-extra { display: none; }
ul.menu-level-0.is-expanded .menu-extra { display: inline-flex; }

.category-bar a,
ul.menu-level-0 .menu-link {
    display    : flex;
    align-items: center;
    gap        : 6px;
    padding    : 12px 16px;
    font-size  : 13px;
    font-weight: 600;
    color      : var(--white);
    white-space: nowrap;
    transition : background .18s, color .18s;
}
.category-bar a img,
.category-bar a svg,
ul.menu-level-0 .menu-link img,
ul.menu-level-0 .menu-link svg {
    width     : 16px;
    height    : 16px;
    object-fit: contain;
    flex-shrink: 0;
}
.category-bar a img,
ul.menu-level-0 .menu-link img { filter: brightness(0) invert(1); }
.category-bar a:hover,
ul.menu-level-0 .menu-link:hover { background: var(--red); color: var(--white); }
.category-bar a.active,
ul.menu-level-0 .menu-link.active { background: var(--red); color: var(--white); }

/* Nút "Xem thêm (n)" / "Thu gọn" */
ul.menu-level-0 .menu-more-btn {
    display    : flex;
    align-items: center;
    height     : 100%;
    padding    : 12px 16px;
    border     : 0;
    background : rgba(255,255,255,0.12);
    color      : var(--white);
    font-family: var(--font);
    font-size  : 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor     : pointer;
    transition : background .18s;
}
ul.menu-level-0 .menu-more-btn:hover { background: var(--red); }

@media (max-width: 768px) { .category-bar { display: none; } }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
    background   : var(--white);
    border-bottom: 1px solid var(--gray-border);
}
.breadcrumb {
    max-width  : var(--max-w);
    margin     : 0 auto;
    padding    : 12px var(--side-pad);
    display    : flex;
    align-items: center;
    gap        : 8px;
    font-size  : 13px;
    color      : var(--gray-mid);
    flex-wrap  : wrap;
    list-style : none;
}
.breadcrumb a { color: var(--gray-mid); font-weight: 500; transition: color .15s; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: var(--gray-light); }
.breadcrumb li { margin: 0; }
.breadcrumb li:last-child { color: var(--red); font-weight: 700; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container,
.container.layout {
    max-width: var(--max-w);
    margin   : 0 auto;
    padding  : 14px var(--side-pad);
}

.layout-grid {
    display              : grid;
    grid-template-columns: 260px 1fr;
    gap                  : 28px;
    align-items          : start;
}
.content { width: 100%; min-width: 0; }
.main-inner { background: var(--white); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family  : var(--font);
    font-weight  : 800;
    line-height  : 1.25;
    color        : var(--black);
    margin-bottom: .6em;
}
h1 { font-size: 28px; text-transform: uppercase; letter-spacing: .01em; }
h2 {
    font-size     : 20px;
    margin-bottom : 18px;
    padding-left  : 12px;
    border-left   : 5px solid var(--red);
    text-transform: uppercase;
}
h3 { font-size: 17px; margin-top: 24px; color: var(--black-soft); }
h4 { font-size: 15px; color: var(--gray-dark); margin-top: 16px; }
h5 { font-size: 13px; color: var(--gray-mid); font-weight: 700; }
h6 { font-size: 12px; color: var(--gray-light); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

p { font-size: 14px; color: #4a4a4a; line-height: 1.8; margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 22px; margin-bottom: 14px; color: #4a4a4a; font-size: 14px; line-height: 1.8; }
ul { list-style: disc; }
ol { list-style: decimal; }
li { margin-bottom: 5px; }
li::marker { color: var(--red); }
ul ul, ol ol, ul ol, ol ul { margin-top: 5px; margin-bottom: 5px; padding-left: 18px; }

table {
    width          : 100%;
    border-collapse: collapse;
    font-size      : 13.5px;
    color          : var(--black);
    margin-bottom  : 20px;
    background     : var(--white);
    border         : 1px solid var(--gray-border);
}
thead { background: var(--black); color: var(--white); }
thead th {
    padding       : 11px 14px;
    font-weight   : 700;
    font-size     : 12.5px;
    text-align    : left;
    white-space   : nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom : 3px solid var(--red);
}
tbody tr { border-bottom: 1px solid var(--gray-border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--gray-bg); }
tbody tr:hover { background: var(--red-light); }
tbody td { padding: 10px 14px; color: #444; vertical-align: middle; }
tfoot td {
    padding    : 10px 14px;
    font-weight: 700;
    color      : var(--black);
    border-top : 2px solid var(--red);
    background : var(--gray-bg);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
    background   : var(--white);
    margin-bottom: 20px;
    border       : 1px solid var(--gray-border);
    border-radius: var(--radius);
    overflow     : hidden;
}
.sidebar-widget .widget-title {
    background    : var(--black);
    border-left   : 5px solid var(--red);
    color         : var(--white);
    font-size     : 12px;
    font-weight   : 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding       : 12px 16px;
}
.sidebar-widget .widget-body { padding: 14px 16px; }

.sidebar-widget ul { list-style: none; padding-left: 0; margin-bottom: 0; color: inherit; }
.sidebar-widget ul li { border-bottom: 1px solid var(--gray-border); margin-bottom: 0; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li::marker { content: none; }
.sidebar-widget ul li a {
    display    : flex;
    align-items: center;
    gap        : 8px;
    padding    : 10px 16px;
    font-size  : 13.5px;
    font-weight: 500;
    color      : #333;
    transition : background .15s, color .15s, padding-left .15s;
}
.sidebar-widget ul li a::before {
    content    : '';
    width      : 6px;
    height     : 6px;
    background : var(--red);
    flex-shrink: 0;
}
.sidebar-widget ul li a:hover { background: var(--gray-bg); color: var(--red); padding-left: 20px; }

/* ============================================================
   FOOTER — nền đen, vạch đỏ trên cùng
   Hàng 1: giới thiệu (cả chiều ngang)
   Hàng 2: danh mục | chính sách | liên hệ
   ============================================================ */
.footer {
    background : var(--footer-bg);
    color      : rgba(255,255,255,0.85);
    margin-top : 56px;
    border-top : 5px solid var(--red);
    font-family: var(--font);
}

.footer-top {
    max-width            : var(--max-w);
    margin               : 0 auto;
    padding              : 44px var(--side-pad) 36px;
    display              : grid;
    grid-template-columns: repeat(3, 1fr);
    gap                  : 36px 48px;
    align-items          : start;
}
.footer-top > .footer-col:first-child {
    grid-column   : 1 / -1;
    padding-bottom: 28px;
    border-bottom : 1px solid rgba(255,255,255,0.14);
}
.footer-top > .footer-col:first-child p { max-width: 860px; }

.footer-col h4 {
    font-size     : 13px;
    font-weight   : 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color         : var(--white);
    margin        : 0 0 18px;
    padding       : 2px 0 2px 12px;
    border-left   : 4px solid var(--red);
    line-height   : 1.4;
}
.footer-col,
.footer-col p,
.footer-col a { color: rgba(255,255,255,0.8); }
.footer-col p { font-size: 13.5px; margin-bottom: 8px; }

.footer-info-row {
    display      : flex;
    align-items  : flex-start;
    gap          : 10px;
    margin-bottom: 10px;
    font-size    : 13px;
    line-height  : 1.55;
}
.footer-info-row .fi-label {
    flex-shrink: 0;
    min-width  : 90px;
    font-weight: 700;
    color      : var(--white);
    display    : flex;
    align-items: center;
    gap        : 5px;
}
.footer-info-row .fi-value { color: rgba(255,255,255,0.72); }
.footer-info-row .fi-value.highlight { color: var(--white); font-weight: 700; }

.footer-col a {
    display      : block;
    font-size    : 13.5px;
    margin-bottom: 9px;
    line-height  : 1.55;
    transition   : color .15s, padding-left .15s;
}
.footer-col a:hover { color: var(--white); padding-left: 6px; }

.footer-logo-badge {
    display        : inline-flex;
    align-items    : center;
    gap            : 10px;
    background     : rgba(255,255,255,0.06);
    padding        : 10px 16px;
    border-radius  : var(--radius);
    border         : 1px solid rgba(255,255,255,0.25);
    margin-bottom  : 16px;
    transition     : background .18s, border-color .18s;
}
.footer-logo-badge:hover { background: rgba(255,255,255,0.12); border-color: var(--red); }
.footer-logo-badge img { height: 30px; width: auto; }
.footer-logo-badge span {
    font-size     : 13px;
    font-weight   : 900;
    text-transform: uppercase;
    color         : var(--white);
    letter-spacing: .4px;
}

.footer-trust-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.footer-trust-badges img {
    height    : 36px;
    width     : auto;
    object-fit: contain;
    filter    : brightness(0) invert(1);
    opacity   : .7;
    transition: opacity .18s;
}
.footer-trust-badges img:hover { opacity: 1; }

.footer-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.footer-social a {
    display        : inline-flex;
    align-items    : center;
    justify-content: center;
    width          : 36px;
    height         : 36px;
    background     : rgba(255,255,255,0.08);
    border-radius  : var(--radius);
    color          : var(--white);
    font-size      : 15px;
    margin-bottom  : 0 !important;
    padding-left   : 0 !important;
    transition     : background .18s;
}
.footer-social a:hover { background: var(--red); padding-left: 0 !important; }

.footer-divider {
    max-width : var(--max-w);
    margin    : 0 auto;
    height    : 1px;
    background: rgba(255,255,255,0.14);
}

.footer-bottom {
    background : var(--footer-dark);
    text-align : center;
    padding    : 14px var(--side-pad);
    line-height: 1.6;
}
.footer-bottom p { color: var(--white); font-size: 13px; margin: 0; }
.footer-bottom strong { color: var(--white); font-weight: 800; }
.footer-bottom a { color: rgba(255,255,255,0.85); }
.footer-bottom a:hover { color: var(--white); text-decoration: underline; }

/* ============================================================
   UTILITY & BUTTONS
   ============================================================ */
.text-red    { color: var(--red) !important; }
.text-center { text-align: center !important; }
.text-muted  { color: var(--gray-light) !important; }

.btn {
    display        : inline-flex;
    align-items    : center;
    justify-content: center;
    gap            : 8px;
    padding        : 11px 24px;
    border-radius  : var(--radius);
    font-size      : 13px;
    font-weight    : 800;
    text-transform : uppercase;
    letter-spacing : .04em;
    border         : 2px solid transparent;
    transition     : background .18s, border-color .18s, color .18s;
    cursor         : pointer;
    white-space    : nowrap;
}
.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--black); border-color: var(--black); }
.btn-outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red); color: var(--white); }
.btn-dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark:hover { background: var(--red); border-color: var(--red); }

/* ============================================================
   CARD
   ============================================================ */
.card {
    background    : var(--white);
    border        : 1px solid var(--gray-border);
    border-radius : var(--radius);
    overflow      : hidden;
    transition    : border-color .2s, box-shadow .2s;
    display       : flex;
    flex-direction: column;
}
.card:hover { border-color: var(--red); box-shadow: var(--shadow-md); }
.card-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 14px; font-weight: 700; color: var(--black); line-height: 1.4; margin: 0; }
.card-price { font-size: 16px; font-weight: 900; color: var(--red); margin-top: auto; }
.card-price-old { font-size: 12px; color: var(--gray-light); text-decoration: line-through; }

/* ============================================================
   PCARD — thẻ sản phẩm: góc vuông, chữ căn trái, viền đỏ khi rê chuột
   ============================================================ */
.pcard {
    display       : flex;
    flex-direction: column;
    height        : 100%;
    border        : 1px solid var(--gray-border);
    border-radius : var(--radius);
    overflow      : hidden;
    background    : var(--white);
    color         : inherit;
    transition    : border-color .2s, box-shadow .2s;
    position      : relative;
}
.pcard:hover { border-color: var(--red); box-shadow: var(--shadow-md); }

.pcard-img {
    position     : relative;
    aspect-ratio : 1/1;
    overflow     : hidden;
    display      : block;
    background   : var(--white);
    border-bottom: 1px solid var(--gray-border);
}
.pcard-img img {
    width     : 100%;
    height    : 100%;
    object-fit: contain;
    transition: transform .25s ease;
}
.pcard:hover .pcard-img img { transform: scale(1.05); }

.pcard-badge {
    position      : absolute;
    top           : 10px;
    left          : 0;
    font-size     : 11px;
    font-weight   : 800;
    line-height   : 1;
    padding       : 6px 12px 6px 10px;
    z-index       : 2;
    background    : var(--red);
    color         : var(--white);
    text-transform: uppercase;
    letter-spacing: .03em;
    clip-path     : polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%);
}

.pcard-body {
    display       : flex;
    flex-direction: column;
    flex          : 1;
    padding       : 12px 14px 14px;
    gap           : 5px;
    text-align    : left;
    min-width     : 0;
}
.pcard-cat {
    font-size     : 10.5px;
    font-weight   : 700;
    color         : var(--red);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}
.pcard-brand {
    font-size     : 10.5px;
    font-weight   : 600;
    color         : var(--gray-light);
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}
.pcard-name {
    font-size         : 13.5px;
    font-weight       : 700;
    line-height       : 1.4;
    color             : var(--black);
    display           : -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow          : hidden;
    min-height        : 38px;
    max-height        : 38px;
    word-break        : break-word;
}
.pcard:hover .pcard-name { color: var(--red); }
.pcard-sku {
    font-size    : 11px;
    color        : var(--gray-light);
    white-space  : nowrap;
    overflow     : hidden;
    text-overflow: ellipsis;
}

.pcard-price {
    margin-top     : auto;
    padding-top    : 6px;
    display        : flex;
    flex-wrap      : wrap;
    align-items    : baseline;
    justify-content: flex-start;
    gap            : 8px;
}
.pcard-price-main { font-size: 17px; font-weight: 900; color: var(--red); }
.pcard-price-old  { font-size: 12px; text-decoration: line-through; color: var(--gray-light); }
.pcard-price-contact { font-size: 16px; font-weight: 800; color: var(--red); }

.pcard-action {
    margin-top : 8px;
    display    : flex;
    align-items: stretch;
    gap        : 6px;
    min-width  : 0;
}
.pcard-qty {
    display      : flex;
    align-items  : center;
    border       : 1px solid #d0d0d0;
    border-radius: var(--radius);
    overflow     : hidden;
    flex-shrink  : 0;
}
.pcard-qty button {
    width      : 26px;
    height     : 34px;
    border     : none;
    background : var(--gray-bg);
    color      : #333;
    font-size  : 15px;
    font-weight: 700;
    transition : background .15s;
    line-height: 1;
    padding    : 0;
}
.pcard-qty button:hover { background: #e4e4e4; }
.pcard-qty input {
    width        : 30px;
    height       : 34px;
    border       : none;
    border-left  : 1px solid #d0d0d0;
    border-right : 1px solid #d0d0d0;
    text-align   : center;
    font-size    : 12px;
    font-weight  : 700;
    color        : #222;
    -moz-appearance: textfield;
    padding      : 0;
}
.pcard-qty input::-webkit-outer-spin-button,
.pcard-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pcard-btn {
    flex           : 1;
    display        : flex;
    align-items    : center;
    justify-content: center;
    gap            : 6px;
    padding        : 8px;
    border         : none;
    border-radius  : var(--radius);
    background     : var(--red);
    color          : var(--white);
    font-weight    : 800;
    font-size      : 12px;
    text-transform : uppercase;
    letter-spacing : .03em;
    transition     : background .18s;
    white-space    : nowrap;
    overflow       : hidden;
    min-width      : 0;
}
.pcard-btn:hover { background: var(--black); }
.pcard-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ============================================================
   SEARCH SECTION (giữa trang)
   ============================================================ */
.search-section {
    background : var(--black);
    border-bottom: 3px solid var(--red);
    padding    : 22px var(--side-pad);
}
.search-section-inner {
    max-width     : 700px;
    margin        : 0 auto;
    display       : flex;
    flex-direction: column;
    align-items   : center;
    gap           : 10px;
}
.search-section-title {
    font-size     : 12px;
    font-weight   : 700;
    color         : rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: .14em;
}
.search-section .search-box { width: 100%; max-width: 100%; height: 46px; margin-left: 0; border-color: var(--white); }
.search-section .search-box input { font-size: 14px; }
.search-section .search-btn { padding: 0 28px; font-size: 13px; }

/* ============================================================
   NÚT NỔI — tròn trắng, rê chuột thì đổ màu dâng lên + hiện nhãn bên trái
   ============================================================ */
.float-buttons {
    position      : fixed;
    right         : 13px;
    bottom        : 110px;
    display       : flex;
    flex-direction: column;
    gap           : 12px;
    z-index       : 500;
}
.float-item { position: relative; }

.float-btn {
    position       : relative;
    overflow       : hidden;
    width          : 52px;
    height         : 52px;
    border-radius  : 50%;
    display        : flex;
    align-items    : center;
    justify-content: center;
    background     : var(--white);
    box-shadow     : 0 4px 14px rgba(0,0,0,0.18);
    transition     : box-shadow .3s ease, transform .3s ease, color .3s ease;
}
.float-btn:hover { box-shadow: 3px 4px 24px rgba(0,0,0,0.28); transform: scale(1.06); }

.float-btn .filled {
    position  : absolute;
    left      : 0;
    bottom    : 0;
    width     : 100%;
    height    : 0;
    transition: height .3s ease-in-out;
}
.float-btn:hover .filled { height: 100%; }

.float-btn img,
.float-btn svg {
    position  : relative;
    z-index   : 1;
    width     : 30px;
    height    : 30px;
    object-fit: contain;
    transition: filter .3s ease;
}
.float-btn:hover img { filter: brightness(0) invert(1); }

/* Icon mặc định màu xám; rê chuột thì nền đổ màu thương hiệu và icon thành trắng */
.float-zalo      { color: #4d4d4d; }
.float-phone     { color: #4d4d4d; }
.float-pinterest { color: #4d4d4d; }
.float-facebook  { color: #4d4d4d; }
.float-btn:hover { color: #fff; }

.float-zalo      .filled { background: #0068ff; }
.float-phone     .filled { background: #25d366; }
.float-pinterest .filled { background: #e60023; }
.float-facebook  .filled { background: #1877f2; }

.float-btn svg { width: 26px; height: 26px; transition: color .3s ease; }
.float-zalo svg,
.float-phone svg { width: 32px; height: 32px; }

/* Chữ "Zalo" trong bong bóng: trắng lúc thường, đổi sang xanh khi rê chuột */
.float-zalo svg text { fill: #fff; transition: fill .3s ease; }
.float-zalo:hover svg text { fill: #0068ff; }

/* Ống nghe trong bong bóng: trắng lúc thường, đổi sang xanh lá khi rê chuột */
.float-phone .ph-icon { fill: #fff; transition: fill .3s ease; }
.float-phone:hover .ph-icon { fill: #25d366; }

.float-tip {
    position      : absolute;
    right         : calc(100% + 12px);
    top           : 50%;
    transform     : translate(10px, -50%);
    padding       : 7px 12px;
    border-radius : 6px;
    color         : var(--white);
    font-size     : 13px;
    font-weight   : 600;
    white-space   : nowrap;
    opacity       : 0;
    visibility    : hidden;
    pointer-events: none;
    transition    : all .3s ease;
}
.float-tip::after {
    content   : '';
    position  : absolute;
    top       : 50%;
    right     : -5px;
    width     : 10px;
    height    : 10px;
    background: inherit;
    transform : translateY(-50%) rotate(45deg);
}
.float-item:hover .float-tip { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.float-item.fi-zalo      .float-tip { background: #0068ff; }
.float-item.fi-phone     .float-tip { background: #25d366; }
.float-item.fi-pinterest .float-tip { background: #e60023; }
.float-item.fi-facebook  .float-tip { background: #1877f2; }

@media (hover: none) { .float-tip { display: none; } }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position       : fixed;
    right          : 16px;
    bottom         : 20px;
    width          : 46px;
    height         : 46px;
    border-radius  : var(--radius);
    background     : var(--red);
    color          : var(--white);
    border         : none;
    display        : flex;
    align-items    : center;
    justify-content: center;
    box-shadow     : 0 4px 14px rgba(224,32,32,0.35);
    z-index        : 500;
    opacity        : 0;
    visibility     : hidden;
    transform      : translateY(15px);
    transition     : opacity .25s, transform .25s, background .18s, visibility .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--black); }
.back-to-top svg { width: 22px; height: 22px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .layout-grid { grid-template-columns: 230px 1fr; gap: 20px; }
    .footer-top { gap: 32px 32px; }
}

@media (max-width: 900px) {
    .layout-grid { grid-template-columns: 1fr; }
    .footer-top  { grid-template-columns: 1fr 1fr; }
    .footer-top > .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .layout-grid { grid-template-columns: 1fr; }
    .main-inner  { padding: 8px 6px; }
    .footer-top  { grid-template-columns: 1fr; gap: 28px; padding: 32px 16px 28px; }
    h1 { font-size: 22px; }
    h2 { font-size: 17px; }
    h3 { font-size: 15px; }
    .footer-info-row .fi-label { min-width: 76px; }
    .container, .container.layout { padding: 8px 10px; }

    .pcard-btn-text { display: none; }
    .pcard-btn { flex: 0 0 38px; padding: 0; }
    .pcard-btn svg { width: 16px; height: 16px; }
    .pcard-body { padding: 10px 10px 12px; gap: 4px; }
    .pcard-name { font-size: 12.5px; min-height: 35px; max-height: 35px; }
    .pcard-price-main { font-size: 15px; }
    .pcard-price-contact { font-size: 14px; }
    .pcard-cat, .pcard-brand { font-size: 9.5px; }
    .pcard-sku { font-size: 10px; }
    .pcard-qty button { width: 25px; height: 32px; font-size: 13px; }
    .pcard-qty input { width: 32px; height: 32px; font-size: 11px; }
    .pcard-action { gap: 6px; margin-top: 6px; }
    .pcard-badge { font-size: 10px; padding: 5px 10px 5px 8px; }

    .float-buttons { right: 10px; bottom: 84px; gap: 10px; }
    .float-btn     { width: 46px; height: 46px; }
    .float-btn svg,
    .float-btn img { width: 26px; height: 26px; }
    .back-to-top   { right: 12px; bottom: 16px; width: 42px; height: 42px; }
}

/* ============================================================
   TINH CHỈNH ĐIỆN THOẠI
   Đặt cuối file để ghi đè. Chỉ áp dụng cho màn hình nhỏ.
   (Phần header + menu mobile đã nằm ở mục MOBILE HEADER phía trên)
   ============================================================ */
@media (max-width: 768px) {
    body { -webkit-tap-highlight-color: rgba(224,32,32,0.12); }

    .mobile-drawer { overscroll-behavior: contain; }

    /* Nội dung không làm tràn ngang */
    .layout-grid { grid-template-columns: minmax(0, 1fr); }
    .content img, .content iframe, .content video { max-width: 100%; }
    .content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .content input:not([type="checkbox"]):not([type="radio"]),
    .content select,
    .content textarea { font-size: 16px; }

    /* Breadcrumb: một hàng, vuốt ngang */
    .breadcrumb { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding: 10px 12px; font-size: 12.5px; }
    .breadcrumb > * { flex-shrink: 0; }

    /* Thẻ sản phẩm */
    .pcard { border-radius: 10px; }
    .pcard-price { gap: 0 6px; }
    .pcard-action { gap: 6px; }
    .pcard-qty { border-radius: 8px; }
    .pcard-qty button { width: 24px; height: 36px; }
    .pcard-qty input { width: 28px; height: 36px; font-size: 16px; }
    .pcard-btn { flex: 1 1 38px; min-height: 38px; border-radius: 8px; }

    /* Footer: 2 cột cho gọn, link dễ bấm */
    .footer { margin-top: 24px; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding: 28px 16px 20px; }
    .footer-top > .footer-col:first-child { padding-bottom: 20px; }
    .footer-top > .footer-col:last-child { grid-column: 1 / -1; }
    .footer-col { min-width: 0; overflow-wrap: anywhere; }
    .footer-col h4 { margin-bottom: 10px; }
    .footer-col a { padding: 6px 0; margin-bottom: 0; }
    .footer-col a:hover { padding-left: 0; }
    .footer-social a { padding: 0; }
    .footer-bottom { padding: 14px 64px; }   /* chừa chỗ cho nút nổi */

    /* Nút nổi: chỉ giữ Zalo và Gọi để không che nội dung */
    .float-buttons { right: 10px; bottom: 68px; gap: 8px; }
    .float-item.fi-pinterest,
    .float-item.fi-facebook { display: none; }
    .float-btn { width: 44px; height: 44px; }
    .float-btn svg, .float-btn img { width: 24px; height: 24px; }
    .float-zalo svg,
    .float-phone svg { width: 28px; height: 28px; }
    .back-to-top { right: 12px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; }
}

/* Màn rất nhỏ (320px): ẩn ô số lượng, nút giỏ hàng rộng hết thẻ */
@media (max-width: 359px) {
    .pcard-qty { display: none; }
}