/* =============================================================
   SHOP/P2 — LỚP BỐ CỤC (header, menu, khối sản phẩm, footer)
   Dựng lại bố cục cũ trên nền Bootstrap 5 + font Inter.
   Thay thế hoàn toàn bộ CSS cũ: main.css, responsive.css, custom.css,
   bootstrap 3, animate.css, icon-fonts.css.
   Nạp SAU shop-p2-theme.css.
   ============================================================= */

/* Màu chuẩn của mẫu: hồng sen #e93066.
   Mọi sắc độ khác đều dẫn xuất từ màu này để cả trang cùng một tông. */
:root {
    --p2-accent: #e93066;
    --p2-accent-dark: #c92f5c;
    --p2-accent-soft: #fdeef3;
    --p2-accent-light: #ff9dba;
    --p2-hover: #e93066;
    --p2-heading: #4c3b42;
    --p2-text: #5b5b5b;
    --p2-line: #e6e6e6;
    --p2-topbar-bg: #e93066;
    --p2-topbar-fg: #ffffff;
    --p2-footer-bg: #d83287;
    --p2-gold: #e93066;
    --p2-gold-dark: #c92f5c;
    --p2-rose: #e93066;
    --p2-ink: #4a4a4a;
    --p2-bg: #fff;
    --bs-primary: #e93066;
    --bs-primary-rgb: 234,69,117;
}

/* Nút Bootstrap dùng biến riêng nên phải ánh xạ lại sang màu chuẩn */
.shop-p2-body .btn-primary {
    --bs-btn-bg: var(--p2-accent);
    --bs-btn-border-color: var(--p2-accent);
    --bs-btn-hover-bg: var(--p2-accent-dark);
    --bs-btn-hover-border-color: var(--p2-accent-dark);
    --bs-btn-active-bg: var(--p2-accent-dark);
    --bs-btn-active-border-color: var(--p2-accent-dark);
    --bs-btn-disabled-bg: var(--p2-accent);
    --bs-btn-disabled-border-color: var(--p2-accent);
}

.shop-p2-body .btn-outline-primary {
    --bs-btn-color: var(--p2-accent);
    --bs-btn-border-color: var(--p2-accent);
    --bs-btn-hover-bg: var(--p2-accent);
    --bs-btn-hover-border-color: var(--p2-accent);
    --bs-btn-active-bg: var(--p2-accent-dark);
    --bs-btn-active-border-color: var(--p2-accent-dark);
}

body.shop-p2-body {
    background: #fff;
    color: var(--p2-text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100%;
}

html {
    height: 100%;
    /* Luôn giữ cột scrollbar — mở popup không đổi chiều ngang (hết giật trái) */
    overflow-y: scroll;
}

/* Sticky footer: nội dung ngắn (hay gặp sau khi thoát DevTools mobile → PC)
   thì footer vẫn dính đáy viewport, không để dải trắng dưới footer. */
body.shop-p2-body,
body.shop-p2-body > form,
#wrapper,
.w1 {
    min-height: 100%;
}

body.shop-p2-body > form,
#wrapper,
.w1 {
    display: flex;
    flex-direction: column;
}

.w1 {
    flex: 1 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
}

.p2-main {
    flex: 1 0 auto;
    width: 100%;
}

#mt-footer {
    flex-shrink: 0;
    margin-bottom: 0;
}

.shop-p2-body .container {
    max-width: 1230px;
}

/* Dưới 1230px container chạy sát mép nên cần thêm lề an toàn hai bên */
@media (max-width: 1229.98px) {
    .shop-p2-body .container {
        padding-right: 16px;
        padding-left: 16px;
    }
}

.shop-p2-body h1,
.shop-p2-body h2,
.shop-p2-body h3,
.shop-p2-body h4,
.shop-p2-body .heading {
    color: var(--p2-heading);
}

/* ===================== HEADER ===================== */
#mt-header {
    position: relative;
    z-index: 100;
    background: #fff;
}

.mt-top-bar {
    position: relative;
    /* Nền gốc mẫu P2 (hồng sen) — giữ tông như trước */
    background: linear-gradient(341deg, #eb2784 30%, var(--p2-footer-bg) 45%, #f80fa8 100%);
    color: #fff;
    font-size: 13px;
    /* Gọn hơn một chút so với bản cũ, vẫn chừa chỗ sóng */
    padding: 6px 0 20px;
}

    /* Che khe anti-alias 1px (vạch đen) mép hồng → sóng */
    .mt-top-bar:after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        height: 2px;
        background: #fff;
        pointer-events: none;
    }

    .mt-top-bar > .container {
        position: relative;
        z-index: 2;
    }

    .mt-top-bar .container > .row {
        align-items: center;
        min-height: 36px;
    }

/* Sóng đáy thanh trên — path/biên độ như trước */
.p2-topbar-wave {
    position: absolute;
    right: 0;
    bottom: -2px;
    left: 0;
    z-index: 1;
    height: clamp(16px, 1.9vw, 24px);
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
}

    .p2-topbar-wave svg {
        position: absolute;
        bottom: 0;
        left: 0;
        display: block;
        width: 200%;
        height: 100%;
        animation: p2FooterWaveDrift 32s linear infinite;
    }

    .p2-topbar-wave path {
        fill: #fff;
        stroke: #fff;
        stroke-width: 1.5;
        shape-rendering: geometricPrecision;
    }

@media (prefers-reduced-motion: reduce) {
    .p2-topbar-wave svg {
        animation: none !important;
    }
}

    .mt-top-bar a {
        color: var(--p2-topbar-fg);
    }

        .mt-top-bar a:hover {
            color: #ffe0ea;
        }

    .mt-top-bar .tel,
    .mt-top-bar #mail {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-right: 22px;
        color: var(--p2-topbar-fg);
    }

        .mt-top-bar .tel i,
        .mt-top-bar #mail i {
            color: rgba(255,255,255,.82);
        }

/* Account + giỏ hàng — 1 hàng gọn, phải thanh trên */
.mt-top-bar .mt-sh-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

/* Top bar: nút account gọn, khớp giỏ tròn nhỏ */
.mt-top-bar .mt-auth-btn {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
}

.mt-top-bar .mt-auth-btn--account.is-logged-in {
    min-height: 30px;
    padding: 2px 10px 2px 2px;
    font-size: 11px;
}

.mt-top-bar .mt-sh-cart {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.mt-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: transparent;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.mt-auth-btn:hover,
.mt-auth-btn:focus {
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
}

/* Guest: nút Đăng nhập như trước — nền trong suốt, viền/chữ trắng */
.mt-top-bar .mt-auth-btn--account:not(.is-logged-in) {
    background: transparent;
    border: 1px solid rgb(255 255 255 / 29%);
    color: #fff !important;
}

.mt-top-bar .mt-auth-btn--account:not(.is-logged-in):hover,
.mt-top-bar .mt-auth-btn--account:not(.is-logged-in):focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
    color: #fff !important;
}

/* Đã login: cùng nền với nút Đăng nhập (trong suốt + viền trắng), avatar sát mép trái */
.mt-auth-btn--account.is-logged-in {
    background: transparent;
    border: 1px solid rgb(255 255 255 / 29%);
    color: #fff !important;
    max-width: 148px;
    min-height: 30px;
    padding: 2px 10px 2px 2px;
    gap: 6px;
    box-shadow: none;
}

.mt-auth-btn--account.is-logged-in:hover,
.mt-auth-btn--account.is-logged-in:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
    color: #fff !important;
    box-shadow: none;
}

.mt-auth-btn--account .ola-cauth-header-avatar {
    width: 26px;
    height: 26px;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: none;
    flex-shrink: 0;
    box-shadow: none;
}

.mt-auth-btn--account .ola-cauth-header-avatar.is-visible {
    display: block;
}

.mt-auth-btn--account.is-logged-in.has-avatar {
    padding-left: 2px;
}

.mt-auth-btn--account #olaHeaderAccountLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.mt-auth-btn--account .ola-cauth-header-icon {
    font-size: 12px;
}

/* Giỏ hàng tròn nhỏ gọn — tông hồng sen P2 */
.mt-cart-btn,
.mt-cart-btn--icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    border: none;
    background: var(--p2-accent);
    color: #fff !important;
    font-size: 0;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(233, 48, 102, 0.28);
    transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}

.mt-cart-btn:hover,
.mt-cart-btn:focus,
.mt-cart-btn--icon:hover,
.mt-cart-btn--icon:focus {
    background: var(--p2-accent-dark);
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(201, 47, 92, 0.35);
}

.mt-cart-btn:active,
.mt-cart-btn--icon:active {
    transform: scale(.96);
}

.mt-cart-btn > i,
.mt-cart-btn--icon > i {
    font-size: 14px;
    line-height: 1;
}

.mt-cart-btn .mt-cart-btn__text,
.mt-cart-btn--icon .mt-cart-btn__text {
    display: none !important;
}

.mt-cart-btn .p2-cart-badge,
.mt-cart-btn--icon .p2-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 50%;
    background: #fff;
    color: var(--p2-accent-dark);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

/* Có sản phẩm trong giỏ — nhịp nhẹ để thu hút chú ý */
.mt-cart-btn.has-items,
.mt-cart-btn--icon.has-items {
    animation: p2CartIdlePulse 2.4s ease-in-out infinite;
}

.mt-cart-btn.has-items .p2-cart-badge,
.mt-cart-btn--icon.has-items .p2-cart-badge {
    background: #fff5f8;
    color: var(--p2-accent-dark);
    box-shadow: 0 0 0 2px rgba(233, 48, 102, 0.22), 0 1px 4px rgba(233, 48, 102, 0.25);
}

/* Vừa thêm SP — nảy mạnh một lần */
.mt-cart-btn.ola-cart-bump,
.mt-cart-btn--icon.ola-cart-bump {
    animation: p2CartBump .55s cubic-bezier(.22, 1.2, .36, 1);
}

.mt-cart-btn.ola-cart-bump .p2-cart-badge,
.mt-cart-btn--icon.ola-cart-bump .p2-cart-badge {
    animation: p2CartBadgePop .55s ease;
}

@keyframes p2CartIdlePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(233, 48, 102, 0.28); transform: scale(1); }
    50% { box-shadow: 0 4px 14px rgba(233, 48, 102, 0.42); transform: scale(1.04); }
}

@keyframes p2CartBump {
    0% { transform: scale(1); }
    35% { transform: scale(1.18); }
    70% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

@keyframes p2CartBadgePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .mt-cart-btn.has-items,
    .mt-cart-btn--icon.has-items,
    .mt-cart-btn.ola-cart-bump,
    .mt-cart-btn--icon.ola-cart-bump,
    .mt-cart-btn.ola-cart-bump .p2-cart-badge,
    .mt-cart-btn--icon.ola-cart-bump .p2-cart-badge {
        animation: none !important;
    }
}

/* Top bar hồng: nút trắng + icon hồng để nổi trên nền */
.mt-top-bar .mt-cart-btn,
.mt-top-bar .mt-cart-btn--icon {
    width: 30px;
    height: 30px;
    min-height: 30px;
    background: #e2e8f0;
    color: var(--p2-accent) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.mt-top-bar .mt-cart-btn.has-items,
.mt-top-bar .mt-cart-btn--icon.has-items {
    animation: p2CartIdlePulseTop 2.4s ease-in-out infinite;
}

@keyframes p2CartIdlePulseTop {
    0%, 100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); transform: scale(1); }
    50% { box-shadow: 0 3px 12px rgba(233, 48, 102, 0.35); transform: scale(1.05); }
}

.mt-top-bar .mt-cart-btn:hover,
.mt-top-bar .mt-cart-btn:focus,
.mt-top-bar .mt-cart-btn--icon:hover,
.mt-top-bar .mt-cart-btn--icon:focus {
    background: var(--p2-accent-soft);
    color: var(--p2-accent-dark) !important;
}

.mt-top-bar .mt-cart-btn > i,
.mt-top-bar .mt-cart-btn--icon > i {
    font-size: 13px;
}

.mt-top-bar .mt-cart-btn .p2-cart-badge,
.mt-top-bar .mt-cart-btn--icon .p2-cart-badge {
    background: var(--p2-accent-dark);
    color: #fff;
    box-shadow: 0 0 0 1.5px #fff;
}

/* Thanh menu trắng: vòng hồng sen */
.mt-bottom-bar .mt-cart-btn,
.mt-bottom-bar .mt-cart-btn--icon {
    width: 34px;
    height: 34px;
    min-height: 34px;
    background: var(--p2-accent);
    color: #fff !important;
}

.mt-bottom-bar .mt-cart-btn:hover,
.mt-bottom-bar .mt-cart-btn:focus,
.mt-bottom-bar .mt-cart-btn--icon:hover,
.mt-bottom-bar .mt-cart-btn--icon:focus {
    background: var(--p2-accent-dark);
    color: #fff !important;
}

.mt-bottom-bar .mt-cart-btn .p2-cart-badge,
.mt-bottom-bar .mt-cart-btn--icon .p2-cart-badge {
    background: #fff;
    color: var(--p2-accent-dark);
    box-shadow: 0 0 0 1.5px #fff;
}

/* Thanh dưới: logo trái — menu — ô tìm — icon */
.mt-bottom-bar {
    position: relative;
    border-bottom: 1px solid var(--p2-line);
    background: #fff;
}

/* Cuộn xuống: thanh menu bám đỉnh. Spacer = paddingBottom do shop-p2-ui.js (tránh CLS). */
#mt-header.is-sticky .mt-bottom-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,.13);
    /* Không animate translateY — gây giật khi F5/scroll */
}

.mt-bottom-bar .mt-sh-cart {
    order: 5;
    margin-left: 4px;
}

    .mt-bottom-bar .container > .row > [class*="col-"] {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 62px;
    }

/* Thứ tự hiển thị: logo — menu — ô tìm — icon — giỏ hàng (khác thứ tự trong HTML) */
.mt-logo {
    order: 1;
    margin-right: auto;
}

#nav {
    order: 2;
}

.mt-icon-list {
    order: 4;
}

    .mt-logo a,
    .mt-logo .chuhaimau {
        display: inline-flex;
        align-items: center;
        font-weight: 800;
        font-size: 23px;
        line-height: 1.2;
        letter-spacing: .3px;
        text-transform: uppercase;
        color: var(--p2-heading);
        white-space: nowrap;
    }

        .mt-logo a:hover {
            color: var(--p2-accent);
        }

    .mt-logo img {
        display: block;
        width: auto;
        height: 56px;
        max-width: 240px;
        object-fit: contain;
    }

.mt-icon-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .mt-icon-list > li > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        color: #555;
        font-size: 17px;
    }

        .mt-icon-list > li > a:hover {
            background: #f4f4f4;
            color: var(--p2-accent);
        }

.bar-opener {
    flex-direction: column;
}

.bar-opener .bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    background: #555;
}

.bar-opener .bar.small {
    width: 14px;
}

.p2-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--p2-hover);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* ===================== MENU ===================== */
#nav > ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav > ul > li {
    position: relative;
}

    #nav > ul > li > a {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 12px 11px;
        color: #4a4a4a;
        font-size: 16px;
        font-weight: 600;
        line-height: 1;
        text-transform: uppercase;
        white-space: nowrap;
    }

        #nav > ul > li > a i {
            font-size: 12px;
            line-height: 1;
        }

        #nav > ul > li > a:hover,
        #nav > ul > li:hover > a {
            color: var(--p2-hover);
        }

/* Menu con — hiện khi rê chuột, canh giữa theo mục cha (JS bù lề khi sát mép màn hình) */
#nav .mt-dropmenu,
#nav .s-drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding-top: 6px;
}

#nav > ul > li:hover > .mt-dropmenu,
#nav > ul > li:hover > .s-drop,
#nav > ul > li.is-open > .mt-dropmenu,
#nav > ul > li.is-open > .s-drop {
    display: block;
}

#mt-header.p2-mega-lock .mt-bottom-bar,
#mt-header.p2-mega-lock .mt-top-bar,
#mt-header.p2-mega-lock .mt-logo img {
    transition: none !important;
}

#nav .mt-frame {
    /* Số cột do code-behind cân bằng theo chiều cao nhóm */
    --p2-mega-cols: 3;
    box-sizing: border-box;
    width: calc(var(--p2-mega-cols) * 210px + 48px);
    max-width: min(960px, 94vw);
    overflow: visible;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .1);
    padding: 16px 18px 14px;
}

#nav .mt-f-box {
    display: grid;
    grid-template-columns: repeat(var(--p2-mega-cols), minmax(0, 1fr));
    gap: 8px 22px;
    align-items: start;
}

#nav .mt-col,
#nav .mt-col-3 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#nav .sub-dropcont {
    padding: 0;
}

    #nav .sub-dropcont .title {
        display: block;
        margin: 0 0 6px;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(0, 0, 0, .06);
        font-size: 13.5px;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: .02em;
        text-transform: uppercase;
    }

        #nav .sub-dropcont .title a {
            color: #2f2f2f;
        }

            #nav .sub-dropcont .title a:hover {
                color: var(--p2-hover);
            }

#nav .sub-drop ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav .sub-drop a {
    display: block;
    padding: 3px 0;
    color: #6a6a6a;
    font-size: 14px;
    line-height: 1.45;
    border-radius: 4px;
    transition: color .15s ease, background .15s ease;
}

    #nav .sub-drop li > a:hover {
        color: var(--p2-hover);
        background: transparent;
    }

#nav .sub-drop .is-mega-extra,
#nav .s-drop .is-mega-extra {
    display: none;
}

#nav .sub-drop.is-expanded .is-mega-extra,
#nav .s-drop.is-expanded .is-mega-extra {
    display: list-item;
}

#nav .mt-mega-more,
#nav .s-drop > .mt-mega-more {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 2px 8px;
    border: 1px solid rgba(228, 65, 111, .4);
    border-radius: 999px;
    background: #fff5f8;
    color: var(--p2-rose, #e4416f);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

#nav .s-drop > .mt-mega-more {
    margin: 4px 16px 8px;
}

    #nav .mt-mega-more:hover,
    #nav .mt-mega-more:focus {
        background: var(--p2-rose, #e4416f);
        border-color: var(--p2-rose, #e4416f);
        color: #fff;
        text-decoration: none;
        outline: none;
    }

    #nav .sub-drop.is-expanded > .mt-mega-more,
    #nav .s-drop.is-expanded > .mt-mega-more {
        background: #fff;
        border-color: rgba(0, 0, 0, .14);
        color: #777;
        font-weight: 500;
    }

/* Menu 2 cấp: danh sách dọc gọn, tự co theo tên mục dài nhất */
#nav .s-drop ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    width: max-content;
    min-width: 220px;
    max-width: min(340px, 90vw);
    max-height: 72vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(0,0,0,.13);
}

#nav .s-drop a {
    display: block;
    padding: 7px 16px;
    color: #555;
    font-size: 14px;
}

    #nav .s-drop a:hover {
        background: var(--p2-accent-soft);
        color: var(--p2-accent);
    }

.mt-mdropover,
.mt-side-over {
    display: none;
}

/* Điện thoại: thu gọn thanh trên, giỏ hàng thành nút tròn đủ lớn để chạm */
@media (max-width: 767.98px) {
    .mt-top-bar {
        padding: 6px 0 15px;
        font-size: 12px;
    }

        .mt-top-bar .tel,
        .mt-top-bar #mail {
            margin-right: 0;
            max-width: 100%;
        }

        .mt-top-bar #mail {
            display: none;
        }

    .mt-logo img {
        height: 38px;
        max-width: 160px;
    }
}

/* Mobile/tablet: giỏ hàng nằm cố định cạnh nút menu, dạng icon tròn có chấm số.
   Trước đây nút nhảy từ thanh hồng xuống thanh trắng khi cuộn, gây giật mắt. */
@media (max-width: 991.98px) {
    .mt-top-bar .mt-sh-cart {
        display: none;
    }

    .mt-top-bar .mt-sh-actions {
        justify-content: center;
        width: 100%;
        padding: 2px 0 0;
        flex-wrap: nowrap;
    }

    .mt-auth-btn {
        min-height: 28px;
        padding: 0 8px;
        font-size: 10.5px;
    }

    .mt-auth-btn--account.is-logged-in {
        max-width: 120px;
    }

    .mt-top-bar .container > .row > [class*="col-"]:first-child {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    .mt-top-bar .container > .row > [class*="col-"]:last-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Thứ tự chạm quen tay: logo — giỏ hàng — tìm kiếm — nút menu ngoài cùng phải */
    .mt-bottom-bar .mt-sh-cart {
        order: 4;
        margin-left: 0;
    }

    .mt-icon-list {
        order: 5;
        gap: 2px;
    }

        /* Nút menu nằm ngoài cùng phải cho khớp hướng ngăn trượt mở ra */
        .mt-icon-list > li:first-child {
            order: 2;
        }

        .mt-icon-list > li > a {
            width: 40px;
            height: 40px;
        }

    .mt-bottom-bar .mt-cart-btn,
    .mt-bottom-bar .mt-cart-btn--icon {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
    }

        .mt-bottom-bar .mt-cart-btn > i,
        .mt-bottom-bar .mt-cart-btn--icon > i {
            font-size: 14px;
        }
}

/* Phần đầu ngăn menu và lớp phủ chỉ dùng cho mobile */
.p2-nav-head,
.p2-nav-backdrop,
.p2-nav-toggle {
    display: none;
}

/* Menu trên mobile: ngăn trượt từ phải, phủ mờ nền, mỗi mục đủ lớn để chạm */
@media (max-width: 991.98px) {
    .mt-bottom-bar .container > .row > [class*="col-"] {
        min-height: 56px;
    }

    .p2-nav-backdrop {
        position: fixed;
        inset: 0;
        /* Thấp hơn .mt-bottom-bar khi mở — nếu để 1090 ở đây sẽ đè cả #nav
           vì #nav nằm bên trong .mt-bottom-bar (cùng stacking context cha). */
        z-index: 1;
        display: block;
        background: rgba(24, 12, 18, .5);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s ease, visibility .25s ease;
    }

        .p2-nav-backdrop.is-shown {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

    #nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        display: block;
        flex: none;
        width: min(84vw, 330px);
        background: #fff;
        box-shadow: -8px 0 26px rgba(0,0,0,.18);
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        transition: transform .28s ease, visibility .28s ease;
    }

        #nav.open {
            transform: none;
            visibility: visible;
            pointer-events: auto;
        }

    .p2-nav-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 10px 12px 18px;
        background: var(--p2-accent);
        color: #fff;
    }

    .p2-nav-title {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .5px;
        text-transform: uppercase;
    }

    .p2-nav-close {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(255,255,255,.18);
        color: #fff;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
    }

        .p2-nav-close:active {
            background: rgba(255,255,255,.32);
        }

    #nav > ul {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

        #nav > ul > li {
            position: relative;
            border-bottom: 1px solid #f1eef0;
        }

            #nav > ul > li > a {
                display: flex;
                align-items: center;
                min-height: 52px;
                padding: 12px 56px 12px 18px;
                font-size: 14px;
                font-weight: 600;
                line-height: 1.35;
            }

                /* Mũi tên trong link chỉ để trang trí ở desktop; mobile dùng nút riêng */
                #nav > ul > li > a > .fa-angle-down {
                    display: none;
                }

    /* Nút mở cấp con tách khỏi link: chạm chữ là vào trang, chạm mũi tên là xổ menu */
    .p2-nav-toggle {
        position: absolute;
        top: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 52px;
        padding: 0;
        border: 0;
        border-left: 1px solid #f1eef0a1;
        background: transparent;
        color: #9a9297;
        cursor: pointer;
    }

        .p2-nav-toggle:before {
            content: "";
            display: block;
            width: 8px;
            height: 8px;
            margin-top: -3px;
            border-right: 2px solid currentColor;
            border-bottom: 2px solid currentColor;
            transform: rotate(45deg);
            transition: transform .2s ease;
        }

    #nav > ul > li.open > .p2-nav-toggle {
        color: var(--p2-accent);
    }

        #nav > ul > li.open > .p2-nav-toggle:before {
            margin-top: 3px;
            transform: rotate(-135deg);
        }

    #nav .mt-dropmenu,
    #nav .s-drop {
        position: static;
        left: auto;
        margin-left: 0 !important;
        padding: 0;
        transform: none;
        background: #faf8f9;
    }

    #nav .mt-f-box {
        display: block;
    }

    #nav .mt-frame,
    #nav .s-drop ul {
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: none;
        overflow: visible;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    #nav .s-drop a {
        padding: 12px 18px 12px 32px;
        border-top: 1px solid #efecee;
        font-size: 13.5px;
    }

    #nav .sub-dropcont {
        padding: 0;
    }

        #nav .sub-dropcont .title {
            margin: 0;
            padding: 0;
            border-bottom: 0;
        }

            #nav .sub-dropcont .title a {
                display: block;
                padding: 12px 18px 12px 32px;
                border-top: 1px solid #efecee;
            }

    #nav .sub-drop {
        padding-left: 0;
    }

        #nav .sub-drop a {
            padding: 10px 18px 10px 46px;
            border-top: 1px solid #f4f2f3;
            font-size: 13px;
        }

    #nav > ul > li:hover > .mt-dropmenu,
    #nav > ul > li:hover > .s-drop {
        display: none;
    }

    #nav > ul > li.open > .mt-dropmenu,
    #nav > ul > li.open > .s-drop {
        display: block;
    }

    /* Khoá cuộn nền khi ngăn menu đang mở */
    body.p2-nav-open {
        overflow: hidden;
    }

        /* Nâng cả header + thanh menu lên trên lớp phủ (backdrop là anh em của
           .mt-bottom-bar, không phải anh em của #nav). */
        body.p2-nav-open #mt-header {
            position: relative;
            z-index: 1200;
        }

        body.p2-nav-open .mt-bottom-bar {
            position: relative;
            z-index: 2;
        }

        /* Các widget nổi dùng z-index rất cao nên phải tạm ẩn, nếu không chúng
           vẫn nằm đè lên lớp phủ và người dùng bấm nhầm khi menu đang mở. */
        body.p2-nav-open .OLA_float_bar,
        body.p2-nav-open .ola-sw,
        body.p2-nav-open .ep-root {
            visibility: hidden;
        }
}

/* ===================== Ô TÌM KIẾM ===================== */
.p2-search {
    order: 3;
    position: relative;
    flex: 0 0 auto;
}

.p2-search__box {
    display: flex;
    align-items: stretch;
    width: 236px;
    height: 36px;
    border: 1px solid #e6e0e3;
    border-radius: 50px;
    background: #f6f4f5;
    overflow: hidden;
    transition: width .25s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

    .p2-search__box:hover,
    .p2-search__box:focus-within {
        width: 290px;
        border-color: var(--p2-accent);
        background: #fff;
        box-shadow: 0 0 0 2px rgba(234,69,117,.12);
    }

.p2-search__icon {
    display: flex;
    align-items: center;
    padding-left: 13px;
    color: #9b9098;
    font-size: 13px;
}

.p2-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 6px 0 16px;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #33272d;
}

    .p2-search__input::placeholder {
        color: #a79ba2;
    }

.p2-search__clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a79ba2;
    font-size: 13px;
    cursor: pointer;
}

.p2-search__box.has-text .p2-search__clear {
    display: flex;
}

.p2-search__clear:hover {
    color: var(--p2-accent);
}

.p2-search__go {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    padding: 0;
    border: 0;
    border-left: 1px solid #e6e0e3;
    background: transparent;
    color: #6b5f66;
    font-size: 13px;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

    .p2-search__go:hover {
        background: var(--p2-accent-soft);
        color: var(--p2-accent);
    }

/* Bảng gợi ý nhanh */
.p2-search__panel {
    display: none;
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 350;
    width: min(430px, 92vw);
    max-height: 68vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(0,0,0,.17);
}

    .p2-search__panel.is-shown {
        display: block;
    }

.p2-ts-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 13px;
    border-bottom: 1px solid #f4f0f2;
    color: #3c3339;
}

    .p2-ts-item:last-child {
        border-bottom: 0;
    }

    .p2-ts-item:hover,
    .p2-ts-item.active {
        background: var(--p2-accent-soft);
        color: #3c3339;
    }

.p2-ts-item__img {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 6px;
}

.p2-ts-item__body {
    min-width: 0;
    flex: 1 1 auto;
}

.p2-ts-item__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.p2-ts-item__price {
    margin-top: 3px;
    color: var(--p2-accent);
    font-size: 13px;
    font-weight: 700;
}

    .p2-ts-item__price del {
        margin-left: 6px;
        color: #a0989c;
        font-size: 12px;
        font-weight: 400;
    }

.p2-ts-all {
    display: block;
    position: sticky;
    bottom: 0;
    padding: 10px 13px;
    border-top: 1px solid var(--p2-line);
    background: #faf7f8;
    color: var(--p2-accent-dark);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

    .p2-ts-all:hover {
        background: var(--p2-accent-soft);
        color: var(--p2-accent-dark);
    }

.p2-ts-empty,
.p2-ts-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 13px;
    color: #8d8388;
    font-size: 13px;
}

/* Dưới 1200px: ô tìm thu về nút kính lúp, bấm mới xổ ra dưới thanh menu */
@media (max-width: 1199.98px) {
    .p2-search {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 340;
        padding: 11px 12px;
        background: #fff;
        border-top: 1px solid var(--p2-line);
        box-shadow: 0 14px 24px rgba(0,0,0,.09);
    }

        .p2-search.is-open {
            display: block;
        }

    .p2-search__box,
    .p2-search__box:hover,
    .p2-search__box:focus-within {
        width: 100%;
        height: 40px;
    }

    .p2-search__panel {
        position: static;
        width: auto;
        margin-top: 9px;
        max-height: 60vh;
        box-shadow: none;
    }
}

@media (min-width: 1200px) {
    .p2-search-toggle-item {
        display: none;
    }

    /* Sticky: icon tròn; chỉ bung khi .is-expanded (mở bằng click) */
    #mt-header.is-sticky .p2-search,
    #mt-header.is-sticky .mt-bottom-bar .mt-sh-cart {
        display: flex;
        align-items: center;
        align-self: center;
    }

    #mt-header.is-sticky .p2-search__box {
        width: 34px;
        height: 34px;
        min-height: 34px;
        justify-content: center;
        border: 1px solid var(--p2-line);
        border-radius: 50%;
        background: #f6f4f5;
        box-shadow: none;
        overflow: hidden;
        /* Không animate width circle↔pill (nhìn chậm/méo); mở/đóng tức thì */
        transition: none;
    }

    #mt-header.is-sticky .p2-search.is-expanded .p2-search__box {
        width: 236px;
        border-radius: 50px;
        border-color: var(--p2-line);
        background: #f6f4f5;
        transition: none;
    }

    #mt-header.is-sticky .p2-search__input {
        flex: 0 0 0;
        width: 0;
        min-width: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
        transition: none;
    }

    #mt-header.is-sticky .p2-search.is-expanded .p2-search__input {
        flex: 1 1 auto;
        width: auto;
        padding: 0 6px 0 14px;
        opacity: 1;
        pointer-events: auto;
        transition: none;
    }

    #mt-header.is-sticky .p2-search__clear {
        display: none !important;
    }

    #mt-header.is-sticky .p2-search.is-expanded .p2-search__box.has-text .p2-search__clear {
        display: flex !important;
    }

    #mt-header.is-sticky .p2-search__go {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border-left: 0;
        border-radius: 50%;
        background: transparent;
        color: #6b5f66;
        font-size: 14px;
        transition: none;
    }

    #mt-header.is-sticky .p2-search.is-expanded .p2-search__go {
        border-left: 1px solid #e6e0e3;
        border-radius: 0;
        color: #6b5f66;
    }

        #mt-header.is-sticky .p2-search.is-expanded .p2-search__box:focus-within {
            border-color: var(--p2-accent);
            background: #fff;
        }
}

/* ===================== BANNER TRANG CHỦ ===================== */
.banner-slider-new {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

    .banner-slider-new .slides {
        position: relative;
        width: 100%;
        height: 100%;
    }

    .banner-slider-new .slide {
        position: absolute;
        inset: 0;
        display: block;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0;
        transform: scale(1.04);
        transition: opacity .8s ease, transform .8s ease;
        text-decoration: none;
        color: inherit;
        cursor: default;
    }

        .banner-slider-new a.slide {
            cursor: pointer;
        }

        .banner-slider-new .slide picture {
            position: absolute;
            inset: 0;
            display: block;
            width: 100%;
            height: 100%;
        }

        .banner-slider-new .slide img {
            position: absolute;
            inset: 0;
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            border: 0;
        }

        .banner-slider-new .slide.active {
            opacity: 1;
            transform: scale(1);
            z-index: 2;
        }

    .banner-slider-new .nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: rgba(0,0,0,.32);
        color: #fff;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        user-select: none;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease, background .3s ease;
        z-index: 10;
    }

        .banner-slider-new .nav-btn i {
            display: block;
            line-height: 1;
            pointer-events: none;
        }

    .banner-slider-new:hover .nav-btn {
        opacity: 1;
        pointer-events: auto;
    }

    .banner-slider-new .nav-btn:hover {
        background: rgba(0,0,0,.6);
    }

    .banner-slider-new .prev {
        left: 18px;
    }

    .banner-slider-new .next {
        right: 18px;
    }

    .banner-slider-new .dots {
        position: absolute;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 9px;
        z-index: 3;
    }

        .banner-slider-new .dots span {
            width: 11px;
            height: 11px;
            border: 2px solid transparent;
            border-radius: 50%;
            background: rgba(255,255,255,.6);
            cursor: pointer;
        }

            .banner-slider-new .dots span.active {
                background: var(--p2-accent);
                border-color: #fff;
            }

/* Ảnh banner thường là khổ rất ngang (2000x650). Nếu ép chiều cao cố định trên
   máy hẹp thì cover cắt mất hai bên, chữ trong ảnh bị mất. Giữ đúng tỉ lệ ảnh. */
@media (max-width: 992px) {
    .banner-slider-new {
        height: auto;
        min-height: 180px;
        aspect-ratio: 2000 / 650;
    }
}

@media (max-width: 576px) {
    .banner-slider-new {
        min-height: 0;
    }

        .banner-slider-new .nav-btn {
            width: 34px;
            height: 34px;
            font-size: 15px;
            opacity: 1;
            pointer-events: auto;
        }

        .banner-slider-new .prev {
            left: 10px;
        }

        .banner-slider-new .next {
            right: 10px;
        }

        .banner-slider-new .dots {
            bottom: 8px;
        }

            .banner-slider-new .dots span {
                width: 8px;
                height: 8px;
            }
}

/* ===================== KHỐI GIỚI THIỆU (ảnh + nội dung) ===================== */
.p2-intro {
    padding: 38px 0 10px;
}

    .p2-intro + .p2-intro {
        padding-top: 12px;
    }

.p2-intro__row {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 40px;
    align-items: center;
}

.p2-intro.is-reverse .p2-intro__row {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

    .p2-intro.is-reverse .p2-intro__media {
        order: 2;
    }

.p2-intro__media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f2eef0;
    box-shadow: 0 12px 30px rgba(76, 20, 45, .10);
    aspect-ratio: 4 / 3;
}

    .p2-intro__media.is-video {
        aspect-ratio: 16 / 9;
    }

    .p2-intro__media img,
    .p2-intro__media iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        object-fit: cover;
        display: block;
    }

.p2-intro__body {
    padding: 4px 0;
}

.p2-intro__eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--p2-accent);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.p2-intro__title {
    margin: 0 0 14px;
    color: var(--p2-heading);
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
}

.p2-intro__desc {
    margin: 0 0 22px;
    color: var(--p2-text);
    font-size: 15px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p2-intro__btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 26px;
    border-radius: 999px;
    background: var(--p2-accent);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s linear, transform .2s linear;
}

    .p2-intro__btn:hover {
        background: var(--p2-accent-dark);
        transform: translateY(-2px);
    }

    .p2-intro__btn i {
        font-size: 12px;
    }

@media (max-width: 991.98px) {
    .p2-intro {
        padding: 26px 0 6px;
    }

    .p2-intro__row,
    .p2-intro.is-reverse .p2-intro__row {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .p2-intro.is-reverse .p2-intro__media {
        order: 0;
    }

    .p2-intro__media {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 575.98px) {
    .p2-intro__desc {
        -webkit-line-clamp: 4;
        font-size: 14.5px;
    }
}

/* ===================== LỰA CHỌN HÀNG ĐẦU — lối tắt cuộn ngang ===================== */
.p2-hcards {
    padding: 20px 0 20px;
}

.p2-hcards__wrap {
    position: relative;
    /* Giống home-hero: không chừa mép — nút nằm trên thẻ */
    padding: 0;
}

.p2-hcards__viewport {
    overflow: hidden;
    width: 100%;
}

.p2-hcards__track {
    display: flex;
    gap: 12px;
    transition: transform .4s ease;
    transform: translateZ(0);
}

.p2-hcard {
    /* Desktop: 5 thẻ + 4 gap 12px */
    flex: 0 0 calc((100% - 48px) / 5);
    max-width: calc((100% - 48px) / 5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 10px 14px 10px 10px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--p2-heading, #222);
    box-shadow: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

a.p2-hcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(228, 65, 111, .12);
    color: var(--p2-heading, #222);
}

.p2-hcard:nth-child(5n + 1) { background: #fdeef3; }
.p2-hcard:nth-child(5n + 2) { background: #f1eef8; }
.p2-hcard:nth-child(5n + 3) { background: #eef8f3; }
.p2-hcard:nth-child(5n + 4) { background: #fff3eb; }
.p2-hcard:nth-child(5n + 5) { background: #eef6fb; }

.p2-hcard__media {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, .72);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .p2-hcard__media img {
        display: block;
        width: 100%;
        height: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        object-position: center;
        border: 0;
    }

.p2-hcard__label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Nguồn Pages — tham khảo SHOP P1 .cat-item: ảnh full, chữ overlay, không nền pastel */
.p2-hcards--pages .p2-hcards__wrap {
    /* Giống home-hero: không chừa mép — nút nằm trên ảnh */
    padding-left: 0;
    padding-right: 0;
}

.p2-hcards--pages .p2-hcards__track {
    gap: 14px;
    align-items: stretch;
}

.p2-hcards--pages .p2-hcard,
.p2-hcards--pages .p2-hcard--page,
.p2-hcards--pages .p2-hcard:nth-child(5n + 1),
.p2-hcards--pages .p2-hcard:nth-child(5n + 2),
.p2-hcards--pages .p2-hcard:nth-child(5n + 3),
.p2-hcards--pages .p2-hcard:nth-child(5n + 4),
.p2-hcards--pages .p2-hcard:nth-child(5n + 5) {
    flex: 0 0 calc((100% - 56px) / 5);
    max-width: calc((100% - 56px) / 5);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 0;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.p2-hcards--pages a.p2-hcard:hover,
.p2-hcards--pages a.p2-hcard--page:hover {
    transform: none;
    box-shadow: none;
    color: #fff;
}

.p2-hcards--pages .p2-hcard__media {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 0;
    background: #ececec;
    overflow: hidden;
}

.p2-hcards--pages .p2-hcard__media img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center;
    transition: transform .5s ease, filter .5s ease;
}

.p2-hcards--pages a.p2-hcard:hover .p2-hcard__media img,
.p2-hcards--pages a.p2-hcard--page:hover .p2-hcard__media img {
    transform: scale(1.08);
    filter: brightness(0.72);
}

.p2-hcards--pages .p2-hcard__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    flex: 0 0 auto;
    margin: 0;
    padding: 28px 14px 14px;
    text-align: left;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff !important;
    background: linear-gradient(to top, rgba(0, 0, 0, .88), transparent);
    pointer-events: none;
    -webkit-line-clamp: 2;
}

/* Categories + Pages: nút ❮❯ nhỏ, style cũ — vẫn overlay trên thẻ (không chừa mép) */
.p2-hcards__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #d5d5d5;
    background: #fff;
    color: #a8a8a8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    transition: background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}

    .p2-hcards__nav:hover {
        background: #fff;
        border-color: var(--p2-accent, #e4416f);
        color: var(--p2-accent, #e4416f);
    }

    .p2-hcards__nav:disabled {
        opacity: .35;
        cursor: default;
        pointer-events: none;
    }

    .p2-hcards__nav.prev { left: -8px; }
    .p2-hcards__nav.next { right: -8px; }

    .p2-hcards__nav i {
        pointer-events: none;
        line-height: 1;
        font-size: 11px;
    }

@media (max-width: 991.98px) {
    .p2-hcards__nav.prev { left: 4px; }
    .p2-hcards__nav.next { right: 4px; }
}

@media (max-width: 1199.98px) {
    .p2-hcard {
        flex-basis: calc((100% - 24px) / 3);
        max-width: calc((100% - 24px) / 3);
    }

    .p2-hcards--pages .p2-hcard,
    .p2-hcards--pages .p2-hcard--page,
    .p2-hcards--pages .p2-hcard:nth-child(n) {
        flex-basis: calc((100% - 42px) / 4);
        max-width: calc((100% - 42px) / 4);
        background: transparent !important;
    }
}

@media (max-width: 767.98px) {
    .p2-hcards__wrap {
        padding: 0;
    }

    .p2-hcards--pages .p2-hcards__wrap {
        padding-left: 0;
        padding-right: 0;
    }

    .p2-hcard {
        flex-basis: calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
        min-height: 64px;
        padding: 8px 10px 8px 8px;
        gap: 10px;
        border-radius: 12px;
    }

    .p2-hcard__media {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .p2-hcard__label {
        font-size: 13px;
    }

    .p2-hcards--pages .p2-hcard,
    .p2-hcards--pages .p2-hcard--page,
    .p2-hcards--pages .p2-hcard:nth-child(n) {
        flex-basis: calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
        min-height: 0;
        padding: 0;
        gap: 0;
        background: transparent !important;
    }

    .p2-hcards--pages .p2-hcard__media {
        flex-basis: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        border-radius: 0;
    }

    .p2-hcards--pages .p2-hcard__label {
        font-size: 12px;
        padding: 22px 12px 12px;
    }

    .p2-hcards__nav {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

        .p2-hcards__nav i {
            font-size: 10px;
        }

    .p2-hcards__nav.prev { left: 4px; }
    .p2-hcards__nav.next { right: 4px; }
}

@media (max-width: 419.98px) {
    .p2-hcard {
        flex-basis: 78%;
        max-width: 78%;
    }

    .p2-hcards--pages .p2-hcard,
    .p2-hcards--pages .p2-hcard--page {
        flex-basis: 72%;
        max-width: 72%;
    }
}

/* ===================== KHỐI SẢN PHẨM TRANG CHỦ ===================== */
.mt-bestseller {
    position: relative;
    padding: 36px 0 20px;
}

.mt-bestseller.p2-ftabs {
    padding-top: 36px;
}

.bg-grey {
    background: #f7f7f5;
}

.mt-bestseller .mt-heading .heading {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .4px;
    color: var(--p2-heading);
}

/* Khối tab gộp 3 cờ sản phẩm: thanh chọn dạng viên thuốc, mỗi lần chỉ hiện 1 hàng
   sản phẩm nên tiết kiệm được chiều cao so với 3 khối rời trước đây. */
.p2-ftabs__nav {
    display: inline-flex;
    max-width: 100%;
    margin: 0 auto 22px;
    padding: 5px;
    border-radius: 999px;
    background: #eceef3;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .p2-ftabs__nav::-webkit-scrollbar {
        display: none;
    }

.p2-ftabs__pill {
    flex: 0 0 auto;
    border: 0;
    padding: 10px 26px;
    border-radius: 999px;
    background: transparent;
    color: #7b8494;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

    .p2-ftabs__pill:hover {
        color: #ea4575;
    }

    .p2-ftabs__pill.is-active {
        background: #fff;
        color: #ea4575;
        box-shadow: 0 4px 12px rgba(23, 32, 51, .12);
    }

    .p2-ftabs__pill:focus-visible {
        outline: 2px solid #ea4575;
        outline-offset: 2px;
    }

.p2-ftabs__pane {
    display: none;
}

    .p2-ftabs__pane.is-active {
        display: block;
    }

/* Màn hẹp: giữ một hàng và cho cuộn ngang. Xếp pill xuống dòng sẽ cao hơn cả
   phần chiều cao vừa tiết kiệm được, nên chỉ làm mờ mép phải để báo còn tab. */
@media (max-width: 767.98px) {
    /* Điện thoại: ba nút chia đều bề ngang, chữ tự xuống dòng. Trước đây thanh
       này phải cuộn ngang nên tab thứ ba luôn bị cắt mất một nửa. */
    .p2-ftabs__nav {
        display: flex;
        width: 100%;
        margin-bottom: 16px;
        padding: 4px;
        border-radius: 16px;
        overflow: visible;
    }

    .p2-ftabs__pill {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 6px;
        border-radius: 13px;
        font-size: 11px;
        letter-spacing: 0;
        line-height: 1.3;
        white-space: normal;
    }
}

.mt-producttabs {
    position: relative;
    padding: 26px 0 10px;
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}

    .mt-producttabs .producttabs {
        display: flex;
        flex-wrap: wrap;
        gap: 18px;
        list-style: none;
        margin: 0 0 18px;
        padding: 0;
        text-align: left;
    }

        .mt-producttabs .producttabs a {
            display: inline-block;
            color: var(--p2-heading);
            font-size: 17px;
            font-weight: 700;
            text-transform: uppercase;
        }

            .mt-producttabs .producttabs a:hover,
            .mt-producttabs .producttabs a.active:hover {
                color: var(--p2-hover);
            }

/* Bù lại khoảng đệm của từng ô để mép thẻ trùng đúng mép nội dung của container */
.bestseller-slider,
.tabs-slider {
    margin-right: -8px;
    margin-left: -8px;
}

    .bestseller-slider .slide,
    .tabs-slider .slide {
        padding: 0 8px;
    }

/* Trước khi Slick chạy: giữ đúng số cột, ẩn phần dư — tránh xếp dọc rồi nhảy ngang. */
.bestseller-slider:not(.slick-initialized),
.tabs-slider:not(.slick-initialized) {
    display: flex;
    overflow: hidden;
}

    .bestseller-slider:not(.slick-initialized) .slide,
    .tabs-slider:not(.slick-initialized) .slide {
        flex: 0 0 25%;
        max-width: 25%;
        box-sizing: border-box;
    }

@media (max-width: 991.98px) {
    .bestseller-slider:not(.slick-initialized) .slide,
    .tabs-slider:not(.slick-initialized) .slide {
        flex-basis: 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 767.98px) {
    .bestseller-slider:not(.slick-initialized) .slide,
    .tabs-slider:not(.slick-initialized) .slide {
        flex-basis: 50%;
        max-width: 50%;
    }
}

/* Nút chuyển của slider — hình tròn, mũi tên luôn nằm giữa */
.slick-prev,
.slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d5d5d5;
    border-radius: 50%;
    background: #fff;
    color: #a8a8a8;
    font-size: 0;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
    z-index: 5;
}

    .slick-prev:hover,
    .slick-next:hover {
        border-color: var(--p2-accent);
        color: var(--p2-accent);
    }

    .slick-prev:before,
    .slick-next:before {
        content: "";
        display: block;
        width: 9px;
        height: 9px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
    }

    .slick-prev:before {
        transform: rotate(-135deg);
        margin-left: 3px;
    }

    .slick-next:before {
        transform: rotate(45deg);
        margin-right: 3px;
    }

/* Khối theo cờ: nút lớn hai bên, canh giữa theo ảnh sản phẩm chứ không phải
   giữa cả thẻ (JS đặt biến --p2-arrow-y), nếu thiếu biến thì lùi về 50%. */
.mt-bestseller .slick-prev,
.mt-bestseller .slick-next {
    top: var(--p2-arrow-y, 50%);
    width: 44px;
    height: 44px;
}

.mt-bestseller .slick-prev {
    left: -54px;
}

.mt-bestseller .slick-next {
    right: -54px;
}

/* Khối theo danh mục: nút nhỏ góc phải trên, canh đúng mép nội dung */
.mt-producttabs .slick-prev,
.mt-producttabs .slick-next {
    top: -48px;
    transform: none;
    width: 34px;
    height: 34px;
}

.mt-producttabs .slick-prev {
    left: auto;
    right: 50px;
}

.mt-producttabs .slick-next {
    right: 8px;
}

/* Hẹp hơn 1350px thì không còn chỗ đặt nút ngoài lưới: đưa vào trong, nền trắng
   mờ để vẫn đọc được ảnh bên dưới và không lệch khỏi mép thẻ. */
@media (max-width: 1349.98px) {
    .mt-bestseller .slick-prev,
    .mt-bestseller .slick-next {
        background: rgba(255,255,255,.94);
        border-color: rgba(0,0,0,.06);
        box-shadow: 0 3px 12px rgba(0,0,0,.16);
    }

    .mt-bestseller .slick-prev {
        left: 10px;
    }

    .mt-bestseller .slick-next {
        right: 10px;
    }
}

/* Điện thoại: một thang padding dọc chung cho mọi khối để nhịp trang đều nhau,
   và nút chuyển slider đủ lớn để chạm. */
@media (max-width: 767.98px) {
    .p2-intro {
        padding: 20px 0 4px;
    }

    .p2-hcards {
        padding: 20px 0 24px;
    }

    .mt-bestseller {
        padding: 28px 0 14px;
    }

    .mt-bestseller.p2-ftabs {
        padding-top: 28px;
    }

    .mt-producttabs {
        padding: 18px 0 6px;
    }

    .mt-bestseller .slick-prev,
    .mt-bestseller .slick-next {
        width: 40px;
        height: 40px;
    }

    .mt-producttabs .slick-prev,
    .mt-producttabs .slick-next {
        top: -44px;
        width: 32px;
        height: 32px;
    }

    .mt-producttabs .slick-prev {
        right: 46px;
    }
}

/* Thẻ sản phẩm — bổ sung cho phần đã có trong shop-p2-theme.css */
.mt-product1 .b2,
.mt-product1 .b3 {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f4f4f4;
}

    .mt-product1 .b2 img,
    .mt-product1 .b3 img {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
        display: block;
    }

.mt-product1 .txt {
    text-align: center;
}

/* Giới hạn 2 dòng để mọi thẻ cùng chiều cao, giá nằm thẳng hàng nhau */
.mt-product1 .title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 38px;
    font-size: 13px;
    line-height: 19px;
    font-weight: 600;
}

.mt-product1 .price {
    color: var(--p2-accent);
    font-size: 16px;
    font-weight: 700;
}

.mt-product1 del.off {
    margin-left: 6px;
    color: #9a9a9a;
    font-size: 13px;
    font-weight: 400;
}

.mt-product1 .caption,
.mt-product1 .caption .off {
    background: var(--p2-hover);
    color: #fff;
}

.p2-outstock-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    padding: 2px 8px;
    border-radius: 3px;
    background: #6c757d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ===================== FOOTER ===================== */
#mt-footer {
    position: relative;
    margin-top: 26px;
    margin-bottom: 0;
    overflow: hidden;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: linear-gradient(165deg, #ff278e 0%, var(--p2-footer-bg) 45%, #f80f87 100%);
}

    /* Che khe anti-alias 1px (vạch xám/đen) ngay mép nối thân trang → sóng */
    #mt-footer:before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        z-index: 3;
        height: 2px;
        background: #fff;
        pointer-events: none;
    }

/* Dải sóng nối thân trang xuống footer, hai lớp trôi ngược chiều cho mềm mắt */
.p2-footer-wave {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: -2px;
    line-height: 0;
    transform: scaleY(-1);
}

.p2-footer-wave-base {
    display: block;
    width: 100%;
    height: clamp(42px, 5.5vw, 70px);
    vertical-align: bottom;
}

    .p2-footer-wave-base path {
        fill: #fff;
        shape-rendering: geometricPrecision;
    }

.p2-footer-wave-anim {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(42px, 5.5vw, 70px);
    overflow: hidden;
    pointer-events: none;
}

    .p2-footer-wave-anim svg {
        position: absolute;
        bottom: 0;
        left: 0;
        display: block;
        width: 200%;
        height: 100%;
        animation: p2FooterWaveDrift 16s linear infinite;
    }

.p2-footer-wave-anim--2 svg {
    animation: p2FooterWaveDrift 24s linear infinite reverse;
}

@keyframes p2FooterWaveDrift {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .p2-footer-wave-anim svg {
        animation: none !important;
    }
}

.footer-holder {
    position: relative;
    z-index: 1;
    background: transparent;
    color: #fff;
    padding: 12px 0 0px;
}

    .footer-holder a {
        color: #fff;
        text-decoration: none !important;
    }

        .footer-holder a:hover,
        .footer-holder a:focus {
            color: #fff;
            text-decoration: none !important;
        }

.footer-holder .f-widget-heading {
    display: block;
    margin: 0 0 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    overflow: visible;
    white-space: normal;
}
.footer-holder .f-widget-heading--brand {
    font-size: 20px;
    letter-spacing: 0.4px;
    line-height: 1.25;
    word-break: break-word;
}

/* Cột phải: MXH + QR căn giữa, QR ~90% ngang hàng icon */
.footer-holder .p2-footer-col-connect .f-widget-connect {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cột footer: 5 + 5 + 2 (công ty | thông tin+NH | MXH+QR) */
@media (min-width: 576px) {
    .footer-holder .p2-footer-main--no-map .p2-footer-col-company {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    .footer-holder .p2-footer-main--no-map .p2-footer-col-info {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    .footer-holder .p2-footer-main--no-map .p2-footer-col-connect {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
}

/* BANK_INFO — cùng kiểu heading + list chấm như cột Thông tin */
.footer-holder .f-widget-info .p2-footer-bank-heading {
    margin-top: 18px;
    margin-bottom: 8px;
}
.footer-holder .f-widget-info .p2-footer-bank-nav {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}
.footer-holder .f-widget-info .p2-footer-bank-line {
    display: block;
    color: rgba(255, 255, 255, 0.94);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    word-break: break-word;
}
.footer-holder .f-widget-info .p2-footer-bank-line__k {
    font-weight: 600;
    margin-right: 4px;
}
.footer-holder .f-widget-info .p2-footer-bank-line__strong {
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Thông tin 2 cột link; bank heading+list full width dưới cùng */
.footer-holder .f-widget-info--split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    column-gap: 10px;
    align-items: start;
}
.footer-holder .f-widget-info--split > .f-widget-heading:not(.p2-footer-bank-heading) {
    grid-column: 1 / -1;
}
.footer-holder .f-widget-info--split .p2-footer-info-cols {
    display: contents;
}
.footer-holder .f-widget-info--split .p2-footer-info-cols__col:first-child {
    grid-column: 1;
    grid-row: 2;
}
.footer-holder .f-widget-info--split .p2-footer-info-cols__col:last-child {
    grid-column: 2;
    grid-row: 2;
}
.footer-holder .f-widget-info--split > .p2-footer-bank-heading {
    grid-column: 1 / -1;
    grid-row: 3;
}
.footer-holder .f-widget-info--split > .p2-footer-bank-nav {
    grid-column: 1 / -1;
    grid-row: 4;
}

/* Liên hệ công ty — icon tròn nhỏ, căn hàng với chữ */
.footer-holder .p2-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 9px;
    color: #fff;
    font-size: 13.5px;
    line-height: 1.4;
    max-width: 100%;
}
.footer-holder .p2-footer-contact li > span:last-child,
.footer-holder .p2-footer-contact address {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding-top: 0;
    line-height: 20px;
}
.footer-holder .p2-footer-contact address {
    display: block;
    margin: 0;
    font-style: normal;
}
.footer-holder .p2-footer-contact a {
    color: #fff;
    text-decoration: none !important;
    font-weight: 400;
    transition: font-weight 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.footer-holder .p2-footer-contact a:hover,
.footer-holder .p2-footer-contact a:focus {
    color: #fff;
    font-weight: 700;
    text-decoration: none !important;
}
.footer-holder .p2-footer-contact__sep {
    margin: 0 3px;
    opacity: 0.65;
    line-height: 20px;
}
.footer-holder .p2-footer-contact__ico {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    color: #fff;
    margin-top: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.footer-holder .p2-footer-contact__ico i {
    margin: 0 !important;
    line-height: 1;
}
.footer-holder .p2-footer-contact__ico--map { background: #f59e0b; }
.footer-holder .p2-footer-contact__ico--phone { background: #22c55e; }
.footer-holder .p2-footer-contact__ico--mail { background: #38bdf8; }
.footer-holder .p2-footer-contact__ico--web { background: #a78bfa; }
.footer-holder .p2-footer-contact__ico--branch { background: #fb7185; }
.footer-holder .p2-footer-contact__ico--tax { background: #fbbf24; }
.footer-holder .p2-footer-contact__ico--license { background: #34d399; }
.footer-holder .p2-footer-contact__ico--bank { background: #60a5fa; }

/* SĐT + website nổi bật */
.footer-holder .p2-footer-contact__phones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    line-height: 20px;
}
.footer-holder .p2-footer-contact__chip {
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    padding: 2px 9px;
    border-radius: 999px;
    text-decoration: none !important;
    vertical-align: middle;
}
.footer-holder .p2-footer-contact__chip--phone {
    color: #fff !important;
    background: rgba(34, 197, 94, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.footer-holder .p2-footer-contact__chip--web {
    color: #fff !important;
    background: rgba(167, 139, 250, 0.32);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.footer-holder .p2-footer-contact__chip:hover,
.footer-holder .p2-footer-contact__chip:focus {
    font-weight: 800;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.22);
}

.footer-holder .p2-footer-contact__html {
    display: block;
    color: rgba(255, 255, 255, 0.96);
    word-break: break-word;
    line-height: 1.4;
}
.footer-holder .p2-footer-contact__html p,
.footer-holder .p2-footer-contact__html div {
    margin: 0 0 4px;
    line-height: 1.4;
}
.footer-holder .p2-footer-contact__html p:last-child,
.footer-holder .p2-footer-contact__html div:last-child {
    margin-bottom: 0;
}
.footer-holder .p2-footer-contact__html a {
    color: #fff;
    text-decoration: none !important;
}
.footer-holder .p2-footer-contact__html a:hover,
.footer-holder .p2-footer-contact__html a:focus {
    font-weight: 700;
    text-decoration: none !important;
}
.footer-holder .p2-footer-contact__html img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.footer-holder .p2-footer-contact__branch-label {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 20px;
}
.footer-holder .p2-footer-contact__branch .p2-footer-contact__html > p:first-child,
.footer-holder .p2-footer-contact__branch .p2-footer-contact__html > div:first-child {
    margin-top: 0;
}

/* Chống chữ cột Thông tin tràn sang Kết nối (khi không map / có QR) */
.footer-holder .row > [class*="col-"] {
    min-width: 0;
}
.footer-holder .f-widget-info,
.footer-holder .f-widget-connect {
    max-width: 100%;
    overflow: visible;
}
.footer-holder .f-widget-info .p2-footer-info-cols {
    overflow: hidden;
    max-width: 100%;
}

/* Thông tin — 2 cột gọn trong cột Bootstrap */
.footer-holder .p2-footer-info-cols {
    display: block;
    max-width: 100%;
}
/* Split: contents để bank nằm dưới cột link trái (grid cha) */
.footer-holder .f-widget-info--split .p2-footer-info-cols {
    display: contents;
}
.footer-holder .f-widget-info--split .p2-footer-info-cols__col {
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}
.footer-holder .f-widget-info .f-widget-nav li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 0 0 8px;
    padding: 0 0 0 14px;
    line-height: 1.4;
    max-width: 100%;
}
.footer-holder .f-widget-info .f-widget-nav li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.footer-holder .f-widget-info .f-widget-nav a {
    display: block;
    color: rgba(255, 255, 255, 0.94);
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 400;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    transition: color 0.15s ease, font-weight 0.15s ease;
}
.footer-holder .f-widget-info .f-widget-nav a:hover,
.footer-holder .f-widget-info .f-widget-nav a:focus {
    color: #fff;
    font-weight: 700;
    text-decoration: none !important;
}
.footer-holder .f-widget-info .f-widget-nav li:hover::before {
    background: #fff;
}

/* QR cột phải — nền trắng + padding vừa, rộng ~90% hàng icon, căn giữa */
.footer-holder .p2-footer-col-connect .p2-footer-qr {
    width: 90%;
    max-width: 90%;
    margin: 8px auto 0;
    display: flex;
    justify-content: center;
}
.footer-holder .p2-footer-col-connect .p2-footer-qr__link {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 12px;
    margin: 0;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    line-height: 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.footer-holder .p2-footer-col-connect .p2-footer-qr__link svg,
.footer-holder .p2-footer-col-connect .p2-footer-qr__link img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    background: #fff;
}

/* Footer social icons — mỗi mạng 1 kiểu */
.footer-holder .p2-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 4px;
}
.footer-holder .p2-footer-social__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 15px;
    line-height: 1;
    opacity: 1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, filter 0.2s ease;
}
.footer-holder .p2-footer-social__btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    color: #fff !important;
    opacity: 1 !important;
}
.footer-holder .p2-footer-social__label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}
.footer-holder .p2-footer-social__label--oa {
    font-size: 10px;
}
.footer-holder .p2-footer-social__btn--facebook { background: #1877f2; }
.footer-holder .p2-footer-social__btn--fanpage { background: #0866ff; }
.footer-holder .p2-footer-social__btn--zalo { background: #0068ff; }
.footer-holder .p2-footer-social__btn--zalo-oa { background: #004bb5; }
.footer-holder .p2-footer-social__btn--youtube { background: #ff0000; }
.footer-holder .p2-footer-social__btn--tiktok { background: #010101; }
.footer-holder .p2-footer-social__btn--instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.footer-holder .p2-footer-social__btn--other { background: #64748b; }

/* Footer QR (map đã tắt ở Master — không còn CSS iframe map) */
.footer-holder .p2-footer-qr {
    margin-top: 4px;
}
.footer-holder .p2-footer-qr__link {
    display: inline-block;
    width: 168px;
    height: 168px;
    padding: 8px;
    background: #fff;
    border-radius: 12px;
    transition: transform 0.25s ease;
}
.footer-holder .p2-footer-qr__link:hover {
    transform: scale(1.04);
}
.footer-holder .p2-footer-qr__link svg,
.footer-holder .p2-footer-qr__link img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Từ khóa — ngay dưới 3 cột (gọn) */
.footer-holder .p2-footer-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 6px;
    margin: 8px 0 0;
    padding: 8px 0 0;
    border-top: 0px solid rgba(255, 255, 255, 0.18);
}
.footer-holder .p2-footer-keywords__tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

/* DesignedBy — dải mỏng sát đáy footer */
.footer-holder .p2-footer-designed {
    margin-top: 10px;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
}
.footer-holder .p2-footer-designed__text {
    margin: 0;
    color: rgb(255 255 255 / 43%);
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

/* Giảm đệm cột footer để khối hồng thấp hơn */
.footer-holder .mt-paddingbottomsm {
    padding-bottom: 10px !important;
}
.footer-holder .p2-footer-col-connect .p2-footer-social {
    width: 100%;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}
.footer-holder .p2-footer-col-connect .p2-footer-social__btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.f-widget-about ul,
.f-widget-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .f-widget-about li,
    .f-widget-nav li {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 8px;
        font-size: 13.5px;
    }

    .f-widget-about li i,
    .f-widget-nav li i {
        margin-top: 3px;
        color: rgba(255,255,255,.88);
    }

.mt-paddingbottomsm {
    padding-bottom: 22px;
}

/* ===================== TIỆN ÍCH CHUNG ===================== */
.truncate-h {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ===================== ĐỐI TÁC TRANG CHỦ (tham chiếu Showroom) ===================== */
.p2-partners {
    margin: 40px 0 8px;
    padding: 8px 0 4px;
    content-visibility: auto;
    contain-intrinsic-size: auto 280px;
}

.p2-partners__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 22px;
    padding: 0 min(4vw, 20px);
}

.p2-partners__kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--p2-accent);
}

.p2-partners__title {
    margin: 0 0 10px;
    /* Đồng bộ ~22px với LỰA CHỌN HÀNG ĐẦU / khối sản phẩm */
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--p2-heading);
    letter-spacing: .2px;
    transition: opacity .55s ease;
}

    .p2-partners__title.is-fading {
        opacity: .28;
    }

.p2-partners__type-wrap {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    color: var(--p2-heading);
}

.p2-partners__type-measure {
    visibility: hidden;
    pointer-events: none;
    white-space: pre;
}

.p2-partners__typed-row {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    white-space: pre;
    color: var(--p2-heading);
}

.p2-partners__type {
    color: var(--p2-heading);
}

.p2-partners__rest {
    transition: opacity .55s ease;
}

    .p2-partners__rest.is-waiting {
        opacity: 0;
        pointer-events: none;
    }

.p2-partners__caret {
    display: inline-block;
    flex: none;
    width: .09em;
    height: .85em;
    margin-left: 2px;
    background: var(--p2-accent);
    border-radius: 1px;
    animation: p2PartnersCaretBlink 1.05s steps(1, end) infinite;
    transition: opacity .3s ease;
}

    .p2-partners__caret.is-done {
        opacity: 0;
        animation: none;
    }

@keyframes p2PartnersCaretBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.p2-partners__accent {
    color: var(--p2-accent);
    background-image: linear-gradient(110deg, #ea4575 0%, #d83287 36%, #ffd0e2 46%, #f48fb1 50%, #ffe3f0 54%, #d83287 64%, #ea4575 100%);
    background-size: 300% 100%;
    background-position: 120% center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

    .p2-partners__accent.is-ready {
        animation: p2PartnersAccentShine 7s ease-in-out infinite;
    }

@keyframes p2PartnersAccentShine {
    0%, 58% { background-position: 120% center; }
    78%, 100% { background-position: -20% center; }
}

.p2-partners__desc {
    margin: 0 auto;
    max-width: 540px;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

.p2-partners__marquee {
    position: relative;
    overflow: hidden;
    padding: 6px 0 10px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.p2-partners__track {
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    will-change: transform;
    animation: p2PartnersScroll 36s linear infinite;
}

.p2-partners__marquee:hover .p2-partners__track {
    animation-play-state: paused;
}

.p2-partners__marquee.is-static .p2-partners__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 min(4vw, 20px);
}

@keyframes p2PartnersScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.p2-partners__card {
    flex: 0 0 auto;
    width: 148px;
    height: 72px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

    .p2-partners__card:hover {
        border-color: rgba(234, 69, 117, .4);
        box-shadow: 0 8px 20px rgba(234, 69, 117, .12);
        transform: translateY(-2px);
    }

.p2-partners__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 12px 16px;
    text-decoration: none;
    box-sizing: border-box;
}

.p2-partners__link--static {
    cursor: default;
}

.p2-partners__logo {
    display: block;
    max-width: 100%;
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .78;
    transition: filter .25s, opacity .25s;
}

.p2-partners__card:hover .p2-partners__logo {
    filter: grayscale(0%);
    opacity: 1;
}

@media (max-width: 767.98px) {
    .p2-partners__title {
        font-size: 18px;
    }

    .p2-partners__desc {
        font-size: 13.5px;
    }
}

@media (max-width: 640px) {
    .p2-partners {
        margin-top: 28px;
    }

    .p2-partners__card {
        width: 128px;
        height: 64px;
    }

    .p2-partners__logo {
        max-height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .p2-partners__track {
        animation: none !important;
    }

    .p2-partners__caret {
        display: none !important;
    }

    .p2-partners__typed-row {
        position: static !important;
    }

    .p2-partners__type-measure {
        display: none !important;
    }

    .p2-partners__rest.is-waiting {
        opacity: 1 !important;
    }

    .p2-partners__title.is-fading {
        opacity: 1 !important;
    }

    .p2-partners__accent {
        animation: none !important;
        background: none !important;
        -webkit-text-fill-color: var(--p2-accent) !important;
        color: var(--p2-accent) !important;
    }
}

/* Home popup: /Public/SHOP/P2/style/css/ola-home-popup.css (#olaEventPopup) */
