/* VP arcontactus — clone kieu nhanhoa (arcontactus widget), icon giu PNG cua Vinh Phat */
#button-contact-vr { display: none !important; }

#arcontactus { opacity: 0; transition: 0.2s opacity; }
#arcontactus * { box-sizing: border-box; }
#arcontactus.active { opacity: 1; }

#arcontactus.arcontactus-message {
    z-index: 99998;
    right: 20px;
    bottom: 38px;
    position: fixed !important;
    height: 60px;
    width: 60px;
}

#arcontactus .arcontactus-message-button {
    width: 60px;
    height: 60px;
    position: absolute;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-radius: 50px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: background 0.4s ease, box-shadow 0.3s ease;
}

/* 3 Che do linh hoat: 1 Do (SDT) - 2 Xanh (Zalo) - 3 Xanh la (Chat bot) */
#arcontactus .arcontactus-message-button.mode-phone {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}
#arcontactus .arcontactus-message-button.mode-zalo {
    background: linear-gradient(135deg, #0088ff 0%, #0055d4 100%);
}
#arcontactus .arcontactus-message-button.mode-chat {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

#arcontactus .arcontactus-message-button .pulsation {
    width: 60px;
    height: 60px;
    background-color: rgba(220, 38, 38, 0.28);
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    pointer-events: none;
    transform: scale(1);
    animation: vp-arcontactus-pulse 2.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    transition: background-color 0.4s ease;
}
#arcontactus .arcontactus-message-button.mode-phone .pulsation {
    background-color: rgba(220, 38, 38, 0.28);
}
#arcontactus .arcontactus-message-button.mode-zalo .pulsation {
    background-color: rgba(0, 136, 255, 0.28);
}
#arcontactus .arcontactus-message-button.mode-chat .pulsation {
    background-color: rgba(16, 185, 129, 0.28);
}
#arcontactus .pulsation:nth-of-type(2n) { animation-delay: 0.75s; }
#arcontactus .pulsation.stop { animation: none !important; opacity: 0 !important; }

/* Slides icon ben trong nut */
#arcontactus .arcu-slides {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#arcontactus.menu-opened .arcu-slides {
    opacity: 0;
    transform: scale(0.6);
}

/* Slide mac dinh */
#arcontactus .arcu-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

/* Slide tong quat */
#arcontactus .arcu-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

/* 1. Icon Chat bot: Hien thang len tai cho (Fade in + Scale nhe tu giua) */
#arcontactus .arcu-slide.msg-item-chat {
    transform: scale(0.7) translateY(2px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#arcontactus .arcu-slide.msg-item-chat.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* 2. Icon GOI DIEN & ZALO: Chuyen dong luot muot tu phai sang trai (khong overshot, khong giat) */
#arcontactus .arcu-slide.msg-item-phone,
#arcontactus .arcu-slide.msg-item-zalo {
    transform: translateX(42px);
    opacity: 0;
    transition: none;
}
#arcontactus .arcu-slide.msg-item-phone.active,
#arcontactus .arcu-slide.msg-item-zalo.active {
    animation: arcuSlideRightToLeft 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

@keyframes arcuSlideRightToLeft {
    0% {
        opacity: 0;
        transform: translateX(42px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

#arcontactus .arcu-slide img,
#arcontactus .arcu-slide .arcu-chat-svg svg {
    display: block;
    width: 24px;
    height: 24px;
    margin: 0 auto 3px;
    filter: brightness(0) invert(1);
}
#arcontactus .arcu-slide p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "URWDIN", sans-serif;
    color: #fff;
    font-weight: 700;
    font-size: 10px;
    line-height: 11px;
    margin: 0;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Hieu ung rung chuong SĐT chuan cadance (chi rung rieng ong nghe dien thoai, chu GOI DIEN dung yen vung vang) */
#arcontactus .arcu-slide.msg-item-phone.active img,
#arcontactus .arcu-slide.msg-item-phone.active svg {
    transform-origin: 50% 50%;
    animation: vp-phone-ring 2.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

/* Hieu ung tho nhe phong em ai cho Zalo va Chat bot */
#arcontactus .arcu-slide.msg-item-zalo.active img,
#arcontactus .arcu-slide.msg-item-chat.active svg {
    transform-origin: 50% 50%;
    animation: vp-pulse-gentle 2.4s ease-in-out infinite;
}

@keyframes vp-phone-ring {
    0%, 100%, 55% { transform: rotate(0) scale(1); }
    8%, 24% { transform: rotate(-13deg) scale(1.08); }
    16%, 32% { transform: rotate(13deg) scale(1.08); }
    40% { transform: rotate(-6deg) scale(1.04); }
    48% { transform: rotate(6deg) scale(1.02); }
}
@keyframes vp-pulse-gentle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); }
}
@keyframes vp-bounce-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Nut dong menu khi mo */
#arcontactus .arcontactus-close {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
}
#arcontactus .arcontactus-close svg {
    width: 16px;
    height: 16px;
    transform: rotate(180deg) scale(0);
    transition: ease-in 0.15s all;
    display: block;
}
#arcontactus.menu-opened .arcontactus-close svg {
    transform: rotate(0deg) scale(1);
    pointer-events: auto;
}

/* Menu Popup danh sach kenh */
#arcontactus .arcontactus-prompt,
#arcontactus .messangers-block {
    background: center no-repeat #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    width: 235px;
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
    box-sizing: border-box;
    border-radius: 10px;
    transform-origin: 80% 105%;
    transform: scale(0);
    transition: ease-out 0.15s all;
    z-index: 10000;
}
#arcontactus .arcontactus-prompt:before,
#arcontactus .messangers-block:before {
    position: absolute;
    bottom: -7px;
    right: 25px;
    display: inline-block !important;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    border-left: 8px solid transparent;
    content: "";
}
#arcontactus .arcontactus-prompt.show-messageners-block,
#arcontactus .messangers-block.show-messageners-block { transform: scale(1); }

/* Bong bong loi chao (prompt) */
#arcontactus .arcontactus-prompt {
    color: #4b5563;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "URWDIN", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    width: auto;
    bottom: 12px;
    right: 76px;
    white-space: nowrap;
    padding: 10px 18px 12px;
    transform-origin: 90% 50%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
#arcontactus .arcontactus-prompt:before {
    border-right: 8px solid transparent;
    border-top: 8px solid transparent;
    border-left: 8px solid #fff;
    border-bottom: 8px solid transparent;
    bottom: 16px;
    right: -15px;
}
#arcontactus .arcontactus-prompt.active { transform: scale(1); }
#arcontactus .arcontactus-prompt .arcontactus-prompt-close {
    position: absolute;
    right: 6px;
    top: 6px;
    cursor: pointer;
    z-index: 100;
    height: 14px;
    width: 14px;
    padding: 2px;
    opacity: 0.6;
}
#arcontactus .arcontactus-prompt .arcontactus-prompt-close:hover { opacity: 1; }
#arcontactus .arcontactus-prompt .arcontactus-prompt-close svg { height: 10px; width: 10px; display: block; }
#arcontactus .arcontactus-prompt .arcontactus-prompt-typing {
    border-radius: 10px;
    display: inline-block;
    left: 3px;
    padding: 0;
    position: relative;
    top: 4px;
    width: 50px;
}
#arcontactus .arcontactus-prompt .arcontactus-prompt-typing > div {
    position: relative;
    float: left;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    background: #ccc;
    margin: 0 2px;
    animation: vp-arcontactus-updown 2s infinite;
}
#arcontactus .arcontactus-prompt .arcontactus-prompt-typing > div:nth-child(2) { animation-delay: 0.1s; }
#arcontactus .arcontactus-prompt .arcontactus-prompt-typing > div:nth-child(3) { animation-delay: 0.2s; }

/* Cac muc trong popup menu */
#arcontactus .messanger {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0;
    cursor: pointer;
    width: 100%;
    padding: 8px 20px 8px 60px;
    position: relative;
    min-height: 54px;
    text-decoration: none;
}
#arcontactus .messanger:hover { background-color: #f3f4f6; }
#arcontactus .messanger span {
    position: absolute;
    left: 10px;
    top: 50%;
    margin-top: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
}
#arcontactus .messanger.msg-item-zalo span { background: linear-gradient(135deg, #0088ff 0%, #0055d4 100%); }
#arcontactus .messanger.msg-item-chat span { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
#arcontactus .messanger span img,
#arcontactus .messanger span svg {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0) invert(1);
}
#arcontactus .messanger p {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "URWDIN", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

@keyframes vp-arcontactus-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { opacity: 0.2; }
    100% { transform: scale(1.6); opacity: 0; }
}
@keyframes vp-arcontactus-updown {
    0%, 100%, 43% { transform: translate(0, 0); }
    25%, 35% { transform: translate(0, -10px); }
}


/* Khung Chat Bot tu van 24/7 */
#vp-chatbot-modal {
    position: fixed;
    bottom: 105px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 30px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
    z-index: 100000;
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: vp-chat-pop .25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #e5e7eb;
}
#vp-chatbot-modal.active {
    display: flex;
}
@keyframes vp-chat-pop {
    0% { opacity: 0; transform: scale(0.88) translateY(18px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.vp-chat-header {
    background: linear-gradient(135deg, #0d3a22 0%, #15803d 100%);
    color: #fff;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vp-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vp-chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #c59b27;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d3a22;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.vp-chat-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.vp-chat-status {
    font-size: 11px;
    color: #86efac;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}
.vp-chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}
.vp-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background .2s ease;
}
.vp-chat-close:hover {
    background: rgba(255, 255, 255, 0.35);
}
.vp-chat-body {
    padding: 14px;
    max-height: 360px;
    overflow-y: auto;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.vp-chat-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 90%;
}
.vp-chat-msg.bot {
    align-self: flex-start;
}
.vp-chat-msg.user {
    align-self: flex-end;
}
.vp-chat-bubble {
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}
.vp-chat-msg.bot .vp-chat-bubble {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}
.vp-chat-msg.user .vp-chat-bubble {
    background: #0d3a22;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.vp-chat-chips {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 4px;
}
.vp-chat-chip {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 12.5px;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
    transition: all .15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}
.vp-chat-chip:hover, .vp-chat-chip:active {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #15803d;
    transform: translateX(3px);
}
.vp-chat-footer {
    padding: 10px 14px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}
.vp-chat-footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s ease;
}
.vp-chat-footer-btn.zalo {
    background: #0088ff;
    color: #fff;
}
.vp-chat-footer-btn.phone {
    background: #dc2626;
    color: #fff;
}

@media (max-width: 600px) {
    #arcontactus.arcontactus-message {
        bottom: 16px !important;
        right: 12px !important;
        width: 44px !important;
        height: 44px !important;
    }
    #arcontactus .arcontactus-message-button {
        width: 44px !important;
        height: 44px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    #arcontactus .arcontactus-message-button .pulsation {
        display: none !important; /* Tat vong song nhap nhay tren mobile de khoi roi mat */
    }

    /* Chỉnh chữ và icon trong nút xoay vòng cân đối */
    #arcontactus .arcu-slide img,
    #arcontactus .arcu-slide .arcu-chat-svg svg {
        width: 18px !important;
        height: 18px !important;
        margin: 0 auto 1px !important;
    }
    #arcontactus .arcu-slide p {
        font-size: 8px !important;
        line-height: 9px !important;
        letter-spacing: 0px !important;
        transform: scale(0.9);
    }

    /* An bong bong chat tu bung tren mobile de khong che khuat noi dung */
    #arcontactus .arcontactus-prompt {
        display: none !important;
    }

    /* Khắc phục menu 3 icon gắn khít với nút bấm không bị hở */
    #arcontactus .messangers-block {
        bottom: 52px !important;
        right: 0 !important;
        width: 210px !important;
        max-width: calc(100vw - 24px) !important;
        padding: 6px 0 !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22) !important;
    }
    #arcontactus .messangers-block:before {
        bottom: -7px !important;
        right: 17px !important;
    }
    #arcontactus .messanger {
        min-height: 42px !important;
        padding: 5px 10px 5px 44px !important;
    }
    #arcontactus .messanger span {
        width: 28px !important;
        height: 28px !important;
        left: 8px !important;
        margin-top: -14px !important;
    }
    #arcontactus .messanger span img,
    #arcontactus .messanger span svg {
        width: 15px !important;
        height: 15px !important;
    }
    #arcontactus .messanger p {
        font-size: 12.5px !important;
    }

    /* Modal chatbot tren mobile */
    #vp-chatbot-modal {
        bottom: 68px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-width: none !important;
        max-height: 78vh !important;
    }
}

/* Nut cuon len dau trang (goc trai) — phong cach Vinh Phat: xanh la dam + vang hoang kim */
#scroll-top-left {
    left: 20px !important;
    right: auto !important;
    bottom: 38px !important;
    width: 54px !important;
    height: 54px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    /* Trang thai an: truot xuong + mo dan; chi hien khi scroll > 400px */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(16px) scale(0.85) !important;
    transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1),
                opacity 0.25s ease,
                visibility 0.25s ease,
                box-shadow 0.25s ease,
                background 0.25s ease !important;
}
#scroll-top-left.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}
#scroll-top-left:hover {
    transform: translateY(-3px) scale(1.06) !important;
}
#scroll-top-left:active {
    transform: translateY(-1px) scale(0.97) !important;
}
#scroll-top-left:focus-visible {
    outline: 3px solid #daa520 !important;
    outline-offset: 3px !important;
}
/* Mui ten trang o giua, noi tren vong tien trinh */
#scroll-top-left svg.stl-arrow {
    width: 22px !important;
    height: 22px !important;
    position: relative !important;
    z-index: 2 !important;
}
/* Vong tien trinh om sat vien nut */
#scroll-top-left svg.stl-ring {
    position: absolute !important;
    top: -1px !important;
    left: -1px !important;
    width: calc(100% + 2px) !important;
    height: calc(100% + 2px) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}
@media (max-width: 600px) {
    #scroll-top-left {
        left: 14px !important;
        bottom: 18px !important;
        width: 46px !important;
        height: 46px !important;
    }
    #scroll-top-left svg.stl-arrow {
        width: 19px !important;
        height: 19px !important;
    }
}

#arcontactus .arcu-slide .arcu-chat-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
#arcontactus .arcu-slide .arcu-chat-svg svg {
    transform: translateX(-0.8px); /* Can chinh quang hoc de than hop thoai va 3 cham nam chinh giua 100% */
}
/* Bang mau nut cuon: nen xanh la dam chuyen sac, vong tien trinh vang hoang kim, mui ten trang */
#scroll-top-left {
    background: linear-gradient(150deg, #1e5631 0%, #134611 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 6px 18px rgba(19, 70, 17, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
#scroll-top-left:hover {
    background: linear-gradient(150deg, #24703f 0%, #1a5a2a 100%) !important;
    box-shadow: 0 12px 28px rgba(19, 70, 17, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}
#scroll-top-left svg.stl-arrow {
    color: #ffffff !important;
    stroke: #ffffff !important;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.30));
}
#scroll-top-left svg.stl-ring circle.stl-track {
    stroke: rgba(255, 255, 255, 0.22) !important;
}
#scroll-top-left svg.stl-ring circle.stl-fill {
    stroke: #daa520 !important;
    filter: drop-shadow(0 0 3px rgba(218, 165, 32, 0.65));
    transition: stroke-dashoffset 0.1s linear;
}

/* ===== Footer "DANH MỤC THU MUA" — 2 cột theo bề rộng cột (suy từ lưới trang chủ) =====
   Hàng footer có 3 cột (5+3+4=12). Cột danh mục gốc là large-3 (~250-300px):
   chia 2 cột trong bề rộng đó thì tiêu đề dài wrap 2-4 dòng -> xấu.
   => Desktop: chia đều 3 cột footer thành 1/3 (nới cột danh mục ~1/3) rồi mới
      tách 2 cột cho rộng rãi; Tablet / desktop hẹp: 1 cột cho gọn; Mobile full-width: 2 cột. */
ul.vp-footer-danhmuc {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    columns: 1;
    font-size: 13.5px;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}
ul.vp-footer-danhmuc > li {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    list-style: none !important;
    margin: 0 0 9px !important;
    padding: 0 !important;
    line-height: 1.5;
}
ul.vp-footer-danhmuc > li > a {
    display: inline-block;
}
ul.vp-footer-danhmuc > li::before {
    content: none !important;
}

/* Tieu de footer: gach vang ::before/::after la position:absolute
   -> < h3 > phai la hop neo (relative) de 2 vach gang theo chu de, giong het nhau
   ca 3 cot (truoc do neu c2 < col-inner > doi hop, vach ngan bi cat con ~5px). */
#footer .col h3 {
    position: relative;
}
/* Vach vang neo theo DAY h3 thay vi top:40px cung: tau heading xuong 2 dong
   (iPad/tablet hep) top:40px danh vao giua dong 2 -> de len chu de.
   bottom:-17px = h3 tam (h=27)... dong cuoi +13px y nhu ban goc 1 dong. */
#footer .col h3::after,
#footer .col h3::before {
    top: auto !important;
    bottom: -17px !important;
}

/* Cột "DANH MỤC THU MUA" trong footer: .col-inner gốc bị width:100% + margin-left:20px
   -> đẩy nội dung tràn 10px ra ngoài cột (hở ở tablet, đè cột bên cạnh ở desktop).
   Chuyển margin-left thành padding-left để không phá bề rộng. */
#footer .col:has(ul.vp-footer-danhmuc) > .col-inner {
    box-sizing: border-box !important;
}
@media (min-width:550px) {
    #footer .col:has(ul.vp-footer-danhmuc) > .col-inner {
        margin-left: 0 !important;
        padding-left: 20px !important;
    }
}

/* Mobile nhỏ (<=374px): 1 cột cho gọn, không wrap xấu.
   Mobile vừa (375-549px, cột full-width đủ rộng): 2 cột. */
@media (min-width:375px) and (max-width:549px) {
    ul.vp-footer-danhmuc { columns: 2; column-gap: 24px; }
}

/* Tablet (550-1023px): cột danh mục NARROW (~147-330px, Flatsome xếp medium-8+medium-4
   cạnh nhau) -> 2 cột con phá vỡ layout (nội dung toả ngoài khung). Giữ 1 cột. */

/* Wrap cụm dài ("Thu mua phế liệu hợp kim") cân đối: nếu xuống dòng thì chia
   gần đều 2 dòng thay vì rơi 1 từ lẻ xuống. Browser cũ bỏ qua vô hại. */
ul.vp-footer-danhmuc > li { text-wrap: balance; }

/* Desktop rộng (>=1024px): chia đều 3 cột footer thành 1/3 để cột danh mục đủ rộng,
   rồi tách 2 cột thoải mái cho danh mục (không đè/nới cột bằng selector lan rộng). */
@media (min-width:1024px) {
    #footer .row:has(ul.vp-footer-danhmuc) > .col {
        flex: 0 0 33.3333% !important;
        max-width: 33.3333% !important;
        width: 33.3333% !important;
    }
    ul.vp-footer-danhmuc { columns: 2; column-gap: 30px; }
}
