/* ── CSS VARIABLES ── */
:root {
    --red         : #E53935;
    --red-dark    : #E53935;
    --red-light   : #fdf0ed;
    --black       : #1a1a1a;
    --black-soft  : #2c2c2c;
    --gray-dark   : #3d3d3d;
    --gray-mid    : #666666;
    --gray-light  : #999999;
    --gray-border : #e8e4e0;
    --gray-bg     : #f7f6f4;
    --white       : #ffffff;
    --footer-bg   : #393536;
    --footer-dark : #E53935;
    --font        : 'Roboto', 'Segoe UI', Arial, sans-serif;
    --radius      : 6px;
    --shadow-sm   : 0 1px 4px rgba(0,0,0,0.07);
    --shadow-md   : 0 3px 14px rgba(0,0,0,0.10);
    --shadow-lg   : 0 6px 28px rgba(0,0,0,0.13);
    --max-w       : 1200px;
    --side-pad    : 16px;
}

/* ── 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 — trắng, sạch, chuyên nghiệp
   ============================================================ */
header {
    background : var(--white);
    border-bottom: 2.5px solid var(--red);
    position   : sticky;
    top        : 0;
    z-index    : 400;
    box-shadow : 0 2px 12px rgba(0,0,0,0.07);
}

.header-inner {
    max-width  : var(--max-w);
    margin     : 0 auto;
    padding    : 0 var(--side-pad);
    height     : 68px;
    display    : flex;
    align-items: center;
    gap        : 20px;
    background : var(--white);
}

/* ── Logo ── */
.logo {
    flex-shrink: 0;
    display    : flex;
    align-items: center;
}

.logo-img {
    height    : 70px;
    width     : auto;
    object-fit: contain;
}

/* ── Search ── */
.search-box {
    flex         : 1;
    max-width    : 520px;
    display      : flex;
    align-items  : stretch;
    height       : 40px;
    border-radius: 8px;
    overflow     : hidden;
    border       : 2px solid var(--gray-border);
    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(191,55,29,0.12);
}

.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.35;
    flex-shrink: 0;
    object-fit : contain;
}

.search-box input {
    flex      : 1;
    border    : none;
    outline   : none;
    font-size : 13.5px;
    color     : var(--black);
    background: transparent;
    min-width : 0;
}

.search-box input::placeholder { color: #bbb; }

.search-btn {
    display        : flex;
    align-items    : center;
    justify-content: center;
    gap            : 6px;
    background     : rgb(51, 51, 51);
    border         : none;
    padding        : 0 20px;
    font-size      : 13px;
    font-weight    : 700;
    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(--red-dark); }

/* ── Nav ── */
nav {
    display    : flex;
    align-items: center;
    gap        : 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-link {
    display        : inline-flex;
    flex-direction : column;
    align-items    : center;
    justify-content: center;
    gap            : 3px;
    color          : var(--black);
    background     : transparent;
    padding        : 6px 12px;
    border-radius  : var(--radius);
    font-size      : 11px;
    font-weight    : 700;
    white-space    : nowrap;
    border         : 2px solid transparent;
    transition     : background .18s, color .18s, border-color .18s;
    line-height    : 1.2;
    min-width      : 62px;
    position       : relative;
    border         : 1px solid rgb(177, 177, 177);
}

.nav-icon {
    width     : 18px;
    height    : 18px;
    object-fit: contain;
    display   : block;
}

.nav-link .nav-icon { filter: none; transition: filter .18s; }
.nav-link:hover .nav-icon { filter: none; }
.nav-link.active .nav-icon { filter: brightness(0) invert(1); }

.nav-link:hover {
    background  : var(--red-light);
    color       : var(--red);
    border-color: rgba(191,55,29,0.15);
}

.nav-link.active {
    background  : var(--red);
    color       : var(--white);
    border-color: var(--red);
}

.cart-badge {
    position     : absolute;
    top          : 2px;
    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;
}

.nav-link.active .cart-badge { background: var(--white); color: var(--red); }

@media (max-width: 768px) {
    header:not(.mobile-header) { display: none; }
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */
.mobile-header         { display: none; }
.mobile-drawer         { display: none; }
.mobile-drawer-overlay { display: none; }

@media (max-width: 768px) {

    .mobile-header {
        display        : flex;
        align-items    : center;
        justify-content: space-between;
        padding        : 0 10px;
        height         : 58px;
        background     : var(--white);
        border-bottom  : 2.5px solid var(--red);
        box-shadow     : 0 2px 8px rgba(0,0,0,0.07);
        position       : sticky;
        top            : 0;
        z-index        : 900;
        gap            : 10px;
    }

    .mobile-header .mh-logo img {
        height    : 36px;
        display   : block;
        object-fit: contain;
    }

    .mobile-header .mh-search {
        flex         : 1;
        display      : flex !important;
        align-items  : center;
        background   : var(--white) !important;
        border       : 2px solid var(--gray-border);
        border-radius: var(--radius);
        overflow     : hidden;
        height       : 36px;
        margin       : 0;
        padding      : 0;
        transition   : border-color .2s;
    }

    .mobile-header .mh-search:focus-within {
        border-color: var(--red);
    }

    .mobile-header .mh-search input {
        flex      : 1;
        border    : none !important;
        background: var(--white) !important;
        padding   : 0 10px;
        font-size : 13px !important;
        outline   : none !important;
        color     : var(--black) !important;
        min-width : 0;
        font-family: var(--font);
        height    : 100%;
        box-shadow: none !important;
        -webkit-appearance: none;
    }

    .mobile-header .mh-search input::placeholder { color: #bbb !important; opacity: 1; }

    .mobile-header .mh-search button {
        background     : var(--red) !important;
        border         : none;
        height         : 36px;
        width          : 40px;
        cursor         : pointer;
        display        : flex;
        align-items    : center;
        justify-content: center;
        flex-shrink    : 0;
        transition     : background .18s;
        padding        : 0;
    }

    .mobile-header .mh-search button:hover { background: var(--red-dark) !important; }

    .mobile-header .mh-search button img {
        width     : 17px;
        height    : 17px;
        object-fit: contain;
        display   : block;
    }

    .mobile-header .mh-hamburger {
        background    : none;
        border        : none;
        cursor        : pointer;
        padding       : 6px;
        display       : flex;
        flex-direction: column;
        gap           : 5px;
        flex-shrink   : 0;
    }

    .mobile-header .mh-hamburger span {
        display      : block;
        width        : 24px;
        height       : 2.5px;
        background   : var(--red);
        border-radius: 2px;
        transition   : all 0.25s ease;
    }

    .mobile-header .mh-hamburger.is-open span:nth-child(1) { transform: translateY(7.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(-7.5px) rotate(-45deg); }

    /* Overlay */
    .mobile-drawer-overlay {
        display       : block;
        position      : fixed;
        inset         : 0;
        background    : rgba(0,0,0,0.45);
        z-index       : 910;
        opacity       : 0;
        pointer-events: none;
        transition    : opacity 0.25s ease;
    }

    .mobile-drawer-overlay.is-open { opacity: 1; pointer-events: all; }

    /* Drawer */
    .mobile-drawer {
        display       : flex;
        flex-direction: column;
        position      : fixed;
        top           : 0;
        right         : 0;
        bottom        : 0;
        width         : 100%;
        background    : var(--white);
        z-index       : 920;
        transform     : translateX(100%);
        transition    : transform 0.28s cubic-bezier(.4,0,.2,1);
        overflow-y    : auto;
    }

    .mobile-drawer.is-open { transform: translateX(0); }

    .mobile-drawer .md-top {
        display        : flex;
        align-items    : center;
        justify-content: space-between;
        padding        : 0 16px;
        height         : 54px;
        border-bottom  : 2.5px solid var(--red);
        background     : var(--red);
        flex-shrink    : 0;
    }

    .mobile-drawer .md-title {
        font-size     : 13px;
        font-weight   : 800;
        color         : var(--white);
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    .mobile-drawer .md-close {
        background: none;
        border    : none;
        font-size : 22px;
        cursor    : pointer;
        color     : var(--white);
        line-height: 1;
        padding   : 6px 8px;
        transition: opacity .15s;
    }

    .mobile-drawer .md-close:hover { opacity: 0.75; }

    .mobile-drawer nav {
        display       : flex;
        flex-direction: column;
        padding       : 0;
        width         : 100%;
    }

    .mobile-drawer nav a {
        display      : flex;
        align-items  : center;
        gap          : 14px;
        padding      : 16px 20px;
        font-size    : 15px;
        font-weight  : 600;
        color        : var(--black);
        border-bottom: 1px solid var(--gray-border);
        transition   : background .15s, color .15s;
        font-family  : var(--font);
        width        : 100%;
        box-sizing   : border-box;
    }

    .mobile-drawer nav a:last-child { border-bottom: none; }

    .mobile-drawer nav a:hover {
        background: var(--red-light);
        color     : var(--red);
    }

    .mobile-drawer nav a.active {
        color       : var(--red-dark);
        background  : var(--red-light);
        border-left : 4px solid var(--red);
        padding-left: 16px;
        font-weight : 700;
    }

    .mobile-drawer nav a img.nav-icon {
        width     : 22px;
        height    : 22px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .mobile-drawer .md-footer {
        margin-top: auto;
        padding   : 16px 20px;
        font-size : 12px;
        color     : var(--gray-light);
        border-top: 1px solid var(--gray-border);
        text-align: center;
        flex-shrink: 0;
    }
}

/* ============================================================
   CATEGORY BAR — dưới header, màu đỏ chủ đạo
   ============================================================ */
.category-bar {
    background: var(--red);
    position  : sticky;
    top       : 70px;
    z-index   : 350;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(191,55,29,0.18);
}

.category-bar.bar-hidden { transform: translateY(calc(-100% - 3px)); }

.category-bar > div,
.category-bar .sidebar {
    max-width: var(--max-w);
    margin   : 0 auto;
    padding  : 0 var(--side-pad);
}

.category-bar ul,
ul.menu-level-0 {
    display        : flex !important;
    flex-direction : row !important;
    flex-wrap      : nowrap !important;
    list-style     : none;
    margin         : 0;
    padding        : 0;
    overflow-x     : auto;
    scrollbar-width: none;
    justify-content: center;
}

.category-bar ul::-webkit-scrollbar,
ul.menu-level-0::-webkit-scrollbar { display: none; }

.category-bar li,
ul.menu-level-0 .menu-item {
    display    : inline-flex;
    align-items: stretch;
    flex-shrink: 0;
}

.category-bar a,
ul.menu-level-0 .menu-link {
    display        : flex;
    align-items    : center;
    gap            : 6px;
    padding        : 9px 16px;
    font-size      : 13px;
    font-weight    : 600;
    color          : rgba(255,255,255,0.92);
    white-space    : nowrap;
    text-decoration: none;
    letter-spacing : 0.01em;
    position       : relative;
    transition     : color .18s, background .18s;
    border-radius  : 0;
    border-right   : 1px solid rgba(255,255,255,0.18);
}

/* Bỏ border cuối cùng */
.category-bar li:last-child a,
ul.menu-level-0 .menu-item:last-child .menu-link {
    border-right: none;
}

/* Icon trong category bar — trắng */
.category-bar a img,
.category-bar a svg,
ul.menu-level-0 .menu-link img,
ul.menu-level-0 .menu-link svg {
    filter    : brightness(0) invert(1);
    opacity   : 0.88;
    width     : 16px;
    height    : 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.category-bar a::after,
ul.menu-level-0 .menu-link::after {
    content      : '';
    position     : absolute;
    bottom       : 0;
    left         : 50%;
    right        : 50%;
    height       : 3px;
    background   : var(--white);
    border-radius: 3px 3px 0 0;
    opacity      : 0;
    transition   : left .22s ease, right .22s ease, opacity .22s ease;
}

.category-bar a:hover,
ul.menu-level-0 .menu-link:hover {
    color     : var(--white);
    background: rgba(0,0,0,0.12);
}

.category-bar a:hover::after,
ul.menu-level-0 .menu-link:hover::after {
    opacity: 1;
    left   : 14%;
    right  : 14%;
}

.category-bar a.active,
ul.menu-level-0 .menu-link.active {
    color     : var(--white);
    font-weight: 700;
    background: rgba(0,0,0,0.18);
}

.category-bar a.active::after,
ul.menu-level-0 .menu-link.active::after {
    opacity      : 1;
    left         : 0;
    right        : 0;
    border-radius: 0;
}

@media (max-width: 768px) { .category-bar { display: none; } }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
    background   : var(--gray-bg);
    border-bottom: 1px solid var(--gray-border);
}

.breadcrumb {
    max-width    : var(--max-w);
    margin       : 0 auto;
    padding      : 15px var(--side-pad);
    display      : flex;
    align-items  : center;
    gap          : 6px;
    font-size    : 14px;
    color        : black;
    flex-wrap    : wrap;
    list-style   : none;
}

.breadcrumb a { color: var(--gray-mid); font-weight: 600; transition: color .15s; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }
.breadcrumb .sep { color: var(--gray-border); }
.breadcrumb li:last-child { color: var(--black); font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container,
.container.layout {
    max-width: var(--max-w);
    margin   : 0 auto;
    padding  : 8px var(--side-pad);
}

.layout-grid {
    display              : grid;
    grid-template-columns: 240px 1fr;
    gap                  : 24px;
    align-items          : start;
}

.content { width: 100%; }
.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; }
h2 { font-size: 22px; margin-bottom: 18px; }
h3 { font-size: 18px; margin-top: 24px; color: var(--gray-dark); }
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: #555; line-height: 1.8; margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 22px; margin-bottom: 14px; color: #555; 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-radius  : var(--radius);
    overflow       : hidden;
    box-shadow     : var(--shadow-sm);
}

thead { background: var(--red); color: var(--white); }

thead th {
    padding       : 11px 14px;
    font-weight   : 700;
    font-size     : 13px;
    text-align    : left;
    white-space   : nowrap;
    letter-spacing: .02em;
}

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);
    border-radius: 8px;
    overflow     : hidden;
    margin-bottom: 18px;
    box-shadow   : var(--shadow-sm);
    border       : 1px solid var(--gray-border);
}

.sidebar-widget .widget-title {
    background    : var(--red);
    color         : var(--white);
    font-size     : 11.5px;
    font-weight   : 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding       : 11px 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 #f0ece0; 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    : 9px 4px;
    font-size  : 13px;
    color      : #444;
    transition : color .15s, padding-left .15s;
}

.sidebar-widget ul li a::before {
    content    : '›';
    color      : var(--red);
    font-size  : 16px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-widget ul li a:hover { color: var(--red); padding-left: 6px; }

/* ============================================================
   FOOTER — đỏ chủ đạo, sạch và chuyên nghiệp
   ============================================================ */
.footer {
    background : var(--footer-bg);
    color      : rgba(255,255,255,0.88);
    margin-top : 56px;
    border-top : none;
    font-family: var(--font);
}

/* Dải accent vàng nhỏ trên cùng footer */
.footer::before {
    content : '';
    display : block;
    height  : 4px;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.3) 50%, #fff 100%);
    opacity : 0.25;
}

.footer-top {
    max-width  : var(--max-w);
    margin     : 0 auto;
    padding    : 48px var(--side-pad) 40px;
    display    : grid;
    grid-template-columns: 2fr 1.4fr 1fr 1fr;
    gap        : 44px;
    align-items: start;
}

.footer-col h4 {
    font-size     : 13px;
    font-weight   : 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color         : var(--white);
    margin-bottom : 18px;
    padding-bottom: 10px;
    border-bottom : 1px solid rgba(255,255,255,0.25);
    margin-top    : 0;
    line-height   : 1.4;
}

.footer-col,
.footer-col p,
.footer-col a { color: rgba(255,255,255,0.82); }

.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    : 13px;
    margin-bottom: 9px;
    line-height  : 1.55;
    color        : rgba(255,255,255,0.78);
    transition   : color .15s, padding-left .15s;
}

.footer-col a:hover { color: var(--white); padding-left: 4px; }

.footer-logo-badge {
    display        : inline-flex;
    align-items    : center;
    gap            : 10px;
    background     : rgba(0,0,0,0.18);
    padding        : 10px 16px;
    border-radius  : var(--radius);
    border         : 1.5px solid rgba(255,255,255,0.3);
    margin-bottom  : 16px;
    text-decoration: none;
    transition     : background .18s, border-color .18s;
}

.footer-logo-badge:hover {
    background  : rgba(0,0,0,0.28);
    border-color: rgba(255,255,255,0.55);
}

.footer-logo-badge img { height: 30px; width: auto; }

.footer-logo-badge span {
    font-size     : 13px;
    font-weight   : 900;
    font-style    : italic;
    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(0.7);
    transition: opacity .18s;
}

.footer-trust-badges img:hover { opacity: 1; filter: brightness(0) invert(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(0,0,0,0.18);
    border         : 1.5px solid rgba(255,255,255,0.22);
    border-radius  : var(--radius);
    color          : rgba(255,255,255,0.75);
    font-size      : 15px;
    margin-bottom  : 0 !important;
    padding-left   : 0 !important;
    transition     : background .18s, border-color .18s, color .18s;
    text-decoration: none;
}

.footer-social a:hover {
    background  : rgba(0,0,0,0.32);
    border-color: rgba(255,255,255,0.5);
    color       : var(--white);
    padding-left: 0 !important;
}

.footer-divider {
    max-width : var(--max-w);
    margin    : 0 auto;
    height    : 1px;
    background: rgba(255,255,255,0.15);
}

.footer-bottom {
    background: var(--footer-dark);
    text-align: center;
    padding   : 14px var(--side-pad);
    line-height: 1.6;
}

.footer-bottom p { color: rgba(255,255,255,0.88); font-size: 13px; }
.footer-bottom strong { color: var(--white); font-weight: 700; }
.footer-bottom a { color: rgba(255,255,255,0.75); transition: color .15s; }
.footer-bottom a:hover { color: var(--white); text-decoration: underline; }

/* ============================================================
   UTILITY
   ============================================================ */
.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            : 7px;
    padding        : 10px 22px;
    border-radius  : var(--radius);
    font-size      : 13.5px;
    font-weight    : 700;
    border         : 2px solid transparent;
    transition     : background .18s, border-color .18s, color .18s, transform .13s;
    cursor         : pointer;
    white-space    : nowrap;
}

.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }

.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(--black-soft); }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.card {
    background    : var(--white);
    border        : 1px solid var(--gray-border);
    border-radius : 8px;
    overflow      : hidden;
    box-shadow    : var(--shadow-sm);
    transition    : box-shadow .2s, transform .2s;
    display       : flex;
    flex-direction: column;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.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: 15px; font-weight: 900; color: var(--red); margin-top: auto; }
.card-price-old { font-size: 12px; color: var(--gray-light); text-decoration: line-through; }

/* ============================================================
   PCARD (product card component)
   ============================================================ */
.pcard {
    display       : flex;
    flex-direction: column;
    height        : 100%;
    border        : 1px solid #e8e8e8;
    border-radius : 12px;
    overflow      : hidden;
    background    : #fff;
    text-decoration: none;
    color         : inherit;
    transition    : box-shadow .2s ease, transform .2s ease;
    position      : relative;
}

.pcard:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.09);
    transform : translateY(-2px);
}

.pcard-img {
    position    : relative;
    aspect-ratio: 1/1;
    overflow    : hidden;
    display     : block;
    border-bottom: 1px solid #f0f0f0;
}

.pcard-img img {
    width     : 100%;
    height    : 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

.pcard:hover .pcard-img img { transform: scale(1.04); }

.pcard-badge {
    position     : absolute;
    top          : 0;
    left         : 0;
    font-size    : 11px;
    font-weight  : 700;
    line-height  : 1;
    padding      : 6px 12px;
    z-index      : 2;
    border-radius: 0 0 10px 0;
    background   : var(--red);
    color        : var(--white);
}

.pcard-body {
    display       : flex;
    flex-direction: column;
    flex          : 1;
    padding       : 12px;
    gap           : 5px;
    text-align    : center;
    min-width     : 0;
}

.pcard-cat {
    font-size     : 10px;
    font-weight   : 700;
    color         : #565656;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}

.pcard-brand {
    font-size     : 10px;
    font-weight   : 600;
    color         : #828282;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}

.pcard-name {
    font-size             : 13px;
    font-weight           : 600;
    line-height           : 1.4;
    display               : -webkit-box;
    -webkit-line-clamp    : 2;
    -webkit-box-orient    : vertical;
    overflow              : hidden;
    min-height            : 37px;
    max-height            : 37px;
    word-break            : break-word;
}

.pcard-sku {
    font-size    : 11px;
    color        : #aaa;
    white-space  : nowrap;
    overflow     : hidden;
    text-overflow: ellipsis;
}

.pcard-price {
    margin-top     : auto;
    display        : flex;
    flex-wrap      : wrap;
    align-items    : center;
    justify-content: center;
    gap            : 5px;
}

.pcard-price-main { font-size: 16px; font-weight: 800; color: var(--red); }
.pcard-price-old  { font-size: 11px; text-decoration: line-through; color: #bbb; }
.pcard-price-contact { font-size: 17px; font-weight: 700; 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 #e0e0e0;
    border-radius: 8px;
    overflow     : hidden;
    flex-shrink  : 0;
}

.pcard-qty button {
    width     : 26px;
    height    : 32px;
    border    : none;
    background: #f5f5f5;
    color     : #333;
    font-size : 15px;
    font-weight: 700;
    cursor    : pointer;
    transition: background .15s;
    line-height: 1;
    padding   : 0;
}

.pcard-qty button:hover { background: #ebebeb; }

.pcard-qty input {
    width        : 28px;
    height       : 32px;
    border       : none;
    border-left  : 1px solid #e0e0e0;
    border-right : 1px solid #e0e0e0;
    text-align   : center;
    font-size    : 12px;
    font-weight  : 600;
    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            : 5px;
    padding        : 8px;
    border         : none;
    border-radius  : 8px;
    background     : rgb(66, 66, 66);
    color          : var(--white);
    font-weight    : 700;
    font-size      : 12px;
    text-decoration: none;
    cursor         : pointer;
    transition     : background .18s;
    white-space    : nowrap;
    overflow       : hidden;
    min-width      : 0;
}

.pcard-btn:hover { background: var(--red-dark); }
.pcard-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ============================================================
   SEARCH SECTION (mid-page)
   ============================================================ */
.search-section {
    background   : var(--gray-bg);
    border-bottom: 1px solid var(--gray-border);
    padding      : 20px var(--side-pad);
}

.search-section-inner {
    max-width     : 680px;
    margin        : 0 auto;
    display       : flex;
    flex-direction: column;
    align-items   : center;
    gap           : 10px;
}

.search-section-title {
    font-size     : 12px;
    font-weight   : 700;
    color         : var(--gray-light);
    text-transform: uppercase;
    letter-spacing: .12em;
}

.search-section .search-box { width: 100%; max-width: 100%; height: 46px; border-radius: 8px; }
.search-section .search-box input { font-size: 14px; }
.search-section .search-btn { padding: 0 26px; font-size: 14px; }

/* ============================================================
   FLOATING BUTTONS
   ============================================================ */
.float-buttons {
    position      : fixed;
    right         : 20px;
    bottom        : 120px;
    display       : flex;
    flex-direction: column;
    gap           : 12px;
    z-index       : 500;
}

.float-btn {
    width          : 52px;
    height         : 52px;
    border-radius  : 50%;
    display        : flex;
    align-items    : center;
    justify-content: center;
    background     : var(--white);
    box-shadow     : 0 3px 10px rgba(0,0,0,0.14), 0 1px 3px rgba(0,0,0,0.08);
    transition     : transform .2s ease, box-shadow .2s ease;
}

.float-btn svg { width: 38px; height: 38px; }
.float-btn img { width: 38px; height: 38px; object-fit: contain; }
.float-map   { color: #ea4335; }
.float-zalo  { color: #0068ff; }
.float-phone { color: #25d366; }
.float-btn:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(0,0,0,0.2); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position       : fixed;
    right          : 20px;
    bottom         : 20px;
    width          : 48px;
    height         : 48px;
    border-radius  : 50%;
    background     : var(--red);
    color          : var(--white);
    border         : none;
    display        : flex;
    align-items    : center;
    justify-content: center;
    box-shadow     : 0 4px 14px rgba(191,55,29,0.35);
    cursor         : pointer;
    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(--red-dark); }
.back-to-top svg { width: 22px; height: 22px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .footer-top { grid-template-columns: 1.5fr 1.2fr 1fr 1fr; gap: 28px; }
    .nav-link   { padding: 5px 9px; min-width: 52px; font-size: 11px; }
    .search-box { max-width: 360px; }
}

@media (max-width: 900px) {
    .footer-top  { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
    .layout-grid { grid-template-columns: 1fr; }
    .nav-link    { min-width: 46px; font-size: 10px; padding: 4px 7px; }
    .search-box  { max-width: 260px; }
    .logo-img    { height: 44px; }
}

@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; }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    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 36px; padding: 0; border-radius: 8px; }
    .pcard-btn svg { width: 16px; height: 16px; }
    .pcard-body { padding: 10px 8px; gap: 4px; }
    .pcard-name { font-size: 12px; min-height: 34px; max-height: 34px; }
    .pcard-price-main { font-size: 14px; }
    .pcard-price-contact { font-size: 13px; }
    .pcard-cat, .pcard-brand { font-size: 9px; }
    .pcard-sku { font-size: 10px; }
    .pcard-qty button { width: 25px; height: 30px; font-size: 13px; }
    .pcard-qty input { width: 35px; height: 30px; font-size: 11px; }
    .pcard-action { gap: 7px; justify-content: center; margin-top: 6px; }
    .pcard-badge { font-size: 10px; padding: 5px 9px; }

    .float-buttons { right: 14px; bottom: 80px; gap: 10px; }
    .float-btn     { width: 46px; height: 46px; }
    .float-btn svg,
    .float-btn img { width: 28px; height: 28px; }
    .back-to-top   { right: 14px; bottom: 16px; width: 44px; height: 44px; }
}