/* =========================
   CUSTOM DYNAMIC HEADER MENU
========================= */

.header-wrapper,
.header-main,
.header-inner,
.header-nav,
.nav,
.nav > li {
    overflow: visible !important;
}

.header-main .logo a {
    color: #28c995 !important;
    display: inline-flex;
    align-items: center;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none !important;
    text-transform: uppercase;
}

.header-main .logo a:hover {
    color: #28c995 !important;
}

@media (min-width: 769px) {
    .product-small .box-image {
        position: relative;
        overflow: hidden;
    }

    .product-small .image-tools.grid-tools {
        top: auto !important;
        right: 0 !important;
        bottom: 12px !important;
        left: 0 !important;
        width: 100% !important;
        padding: 0 13px !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    .product-small .box-image:hover .image-tools.grid-tools,
    .product-small .image-fade_in_back:hover .image-tools.grid-tools {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .product-small .add-to-cart-grid {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .product-small .image-tools .cart-icon {
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        height: 42px !important;
        border-radius: 6px !important;
        transform-origin: center center !important;
        transition: transform 0.18s ease, background-color 0.18s ease !important;
        will-change: transform;
    }

    .product-small .image-tools .cart-icon::before {
        font-size: 12px !important;
        letter-spacing: 0 !important;
    }

    .product-small .add-to-cart-grid:hover .cart-icon,
    .product-small .image-tools .cart-icon:hover {
        transform: scale(1.05) !important;
    }
}

/* menu chÃ­nh */
ul.custom-header-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;

    gap: 34px;

    margin: 0;
    padding: 0;

    list-style: none;
    white-space: nowrap;
}

/* item */
ul.custom-header-menu > li.menu-item {
    position: relative;

    display: flex;
    align-items: center;

    margin: 0;
    padding: 26px 0;
}

/* link */
ul.custom-header-menu .menu-item-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    position: relative;

    color: #666;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;

    text-decoration: none !important;
    letter-spacing: 0;

    transition: color .2s ease;
}

/* hover */
ul.custom-header-menu .menu-item:hover > .menu-item-link,
ul.custom-header-menu .menu-item.current-menu-item > .menu-item-link {
    color: #000;
}

/* underline */
ul.custom-header-menu .menu-item-link::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -22px;

    width: 100%;
    height: 2px;

    background: #111;

    transform: scaleX(0);
    transform-origin: left;

    transition: transform .2s ease;
}

ul.custom-header-menu .menu-item:hover > .menu-item-link::after,
ul.custom-header-menu .menu-item.current-menu-item > .menu-item-link::after {
    transform: scaleX(1);
}

/* Header menu hover: no animation, 1px border only */
ul.custom-header-menu .menu-item-link,
ul.custom-header-menu .menu-dropdown-content,
ul.custom-header-menu .menu-dropdown-content a {
    transition: none !important;
}

ul.custom-header-menu .menu-item-link::after,
ul.custom-header-menu .menu-label::after {
    height: 1px !important;
    transform: none !important;
    transition: none !important;
    display: none !important;
}

ul.custom-header-menu .menu-item:hover > .menu-item-link .menu-label::after,
ul.custom-header-menu .menu-item.current-menu-item > .menu-item-link .menu-label::after {
    display: block !important;
}

ul.custom-header-menu .menu-item-link::after {
    display: none;
}

ul.custom-header-menu .menu-label {
    position: relative;
    display: inline-flex;
    align-items: center;
}

ul.custom-header-menu .menu-label::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -22px;
    width: 100%;
    height: 2px;
    background: #111;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

ul.custom-header-menu .menu-item:hover > .menu-item-link .menu-label::after,
ul.custom-header-menu .menu-item.current-menu-item > .menu-item-link .menu-label::after {
    transform: scaleX(1);
}

/* =========================
   SVG ARROW
========================= */

ul.custom-header-menu .arrow-icon {
    width: 10px;
    height: 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #666;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;

    transform: none !important;
}

/* hover khÃ´ng xoay */
ul.custom-header-menu .menu-item:hover .arrow-icon {
    color: #000;
    transform: none !important;
}

ul.custom-header-menu .arrow-icon svg {
    display: block;
    width: 10px;
    height: 8px;
}

/* =========================
   DROPDOWN
========================= */

ul.custom-header-menu .menu-dropdown-content {
    position: absolute;
    top: 100%;
    left: -18px;
    z-index: 99999;

    min-width: 340px;

    margin: 0;
    padding: 10px 0;

    list-style: none;

    background: #fff;

    border: none;
    border-radius: 0 !important;

    overflow: hidden;

    box-shadow: 0 16px 40px rgba(0,0,0,.08);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .18s ease,
        visibility .18s ease;
}

/* hiá»‡n dropdown */
ul.custom-header-menu .menu-item.has-dropdown:hover > .menu-dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* item dropdown */
ul.custom-header-menu .menu-dropdown-content li {
    margin: 0;
    padding: 0;
}

/* link dropdown */
ul.custom-header-menu .menu-dropdown-content a {
    display: flex;
    align-items: center;

    padding: 28px 22px;

    color: #222;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;

    text-decoration: none !important;

    transition: .15s ease;
}

/* divider */
ul.custom-header-menu .menu-dropdown-content li + li a {
    border-top: 1px solid #efefef;
}

/* hover dropdown */
ul.custom-header-menu .menu-dropdown-content a:hover {
    background: #fff;
    color: #000;
}

/* active */
ul.custom-header-menu .menu-item-link[aria-current="page"],
ul.custom-header-menu .menu-dropdown-content a[aria-current="page"] {
    color: #000;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 849px) {

    ul.custom-header-menu {
        gap: 18px;

        max-width: 100%;

        overflow-x: auto;
        overflow-y: visible;

        scrollbar-width: none;
    }

    ul.custom-header-menu::-webkit-scrollbar {
        display: none;
    }

    ul.custom-header-menu > li.menu-item {
        padding: 18px 0;
    }

    ul.custom-header-menu .menu-item-link {
        font-size: 14px;
    }

    ul.custom-header-menu .menu-dropdown-content {
        min-width: 240px;
    }

    ul.custom-header-menu .menu-dropdown-content a {
        padding: 22px 18px;
        font-size: 16px;
    }

}


/* =========================
   NÃšT PREV / NEXT TRÃ’N
   - Nhá» hÆ¡n
   - DÃ¹ng kÃ½ tá»± â† vÃ  â†’
   - margin left/right = -30px
   - Bá» margin-top: -10% máº·c Ä‘á»‹nh cá»§a Flatsome
========================= */

/* Bá» margin-top máº·c Ä‘á»‹nh cá»§a Flatsome */
.slider-nav-push:not(.slider-nav-reveal) .flickity-prev-next-button {
    margin-top: 0 !important;
}

/* NÃºt trÃ²n */
.flickity-prev-next-button {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    opacity: 1 !important;
    transition: none !important;
}

/* Hover giá»¯ nguyÃªn */
.flickity-prev-next-button:hover,
.flickity-prev-next-button:focus {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10) !important;
    opacity: 1 !important;
}

/* áº¨n SVG máº·c Ä‘á»‹nh */
.flickity-prev-next-button svg {
    display: none !important;
}

/* MÅ©i tÃªn trÃ¡i */
.flickity-prev-next-button.previous::before {
    content: "â†";
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    color: #000000;
}

/* MÅ©i tÃªn pháº£i */
.flickity-prev-next-button.next::before {
    content: "â†’";
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    color: #000000;
}

/* Vá»‹ trÃ­ nÃºt Previous */
.slider-nav-outside.slider-nav-circle .previous {
    margin-right: -30px !important;
}

/* Vá»‹ trÃ­ nÃºt Next */
.slider-nav-outside.slider-nav-circle .next {
    margin-left: -30px !important;
}

/* Disabled */
.flickity-prev-next-button:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed;
}

/* Mobile */
@media (max-width: 768px) {
    .flickity-prev-next-button {
        width: 38px !important;
        height: 38px !important;
    }

    .flickity-prev-next-button.previous::before,
    .flickity-prev-next-button.next::before {
        font-size: 18px;
    }

    .slider-nav-outside.slider-nav-circle .previous {
        margin-right: -20px !important;
    }

    .slider-nav-outside.slider-nav-circle .next {
        margin-left: -20px !important;
    }
}


.product-small .badge-container{ 
    margin: 10px;
    right: 0 !important;
    left: auto !important;
}
.product-small .badge-container .badge-square {
    height: 1.8em;
}
.product-small .badge-container .badge-square .badge-inner{
    background-color: rgb(220 59 59);
    padding: 5px;
}



/* ==========================================
   FLATSOME PRODUCT CARD - ADD TO CART BUTTON
   - NÃºt nhá» hÆ¡n
   - CÃ³ khoáº£ng cÃ¡ch vá»›i Ä‘Ã¡y áº£nh
   - áº¨n View Cart
========================================== */

/* áº¨n link View Cart sau khi thÃªm giá» hÃ ng */
a.added_to_cart {
    display: none !important;
}

.product-small .box-text .add-to-cart-button {
    display: none !important;
}

/* VÃ¹ng chá»©a nÃºt Add to Cart */
.product-small .image-tools.grid-tools {
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    bottom: 14px !important; /* cÃ¡ch Ä‘Ã¡y áº£nh */
}

/* Hover sáº£n pháº©m thÃ¬ hiá»‡n nÃºt */
.product-small:hover .image-tools.grid-tools {
    opacity: 1;
    visibility: visible;
}

/* Link Add to Cart */
.product-small .add-to-cart-grid {
    display: block !important;
    width: 100% !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
}

/* Cart Icon */
.product-small .image-tools .cart-icon {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 !important;

    width: 100% !important;
    height: 46px !important; /* nhá» hÆ¡n */
    box-sizing: border-box !important;

    border-radius: 8px !important;
    background: #27c48f !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 0 !important; /* áº©n dáº¥u + */
}

/* áº¨n dáº¥u + máº·c Ä‘á»‹nh */
.product-small .image-tools .cart-icon strong {
    display: none !important;
}

/* Chá»¯ ADD TO CART */
.product-small .image-tools .cart-icon::before {
    content: "ADD TO CART";
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    letter-spacing: 0.4px;
}

/* Hover nÃºt */
.product-small .image-tools .cart-icon:hover {
    background: #22b883 !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
}

/* Mobile */
@media (max-width: 768px) {
    /* Mobile luÃ´n hiá»‡n nÃºt */
    .product-small .image-tools.grid-tools {
        opacity: 1;
        visibility: visible;
        bottom: 10px !important;
    }

    .product-small .add-to-cart-grid {
        padding: 0 10px !important;
    }

    .product-small .image-tools .cart-icon {
        height: 42px !important;
        border-radius: 6px !important;
    }

    .product-small .image-tools .cart-icon::before {
        font-size: 12px;
    }
}

@media (min-width: 769px) {
    .product-small .box-image {
        position: relative;
        overflow: hidden;
    }

    .product-small .image-tools.grid-tools {
        top: auto !important;
        right: 0 !important;
        bottom: 14px !important;
        left: 0 !important;
        width: 100% !important;
        padding: 0 14px !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    .product-small .box-image:hover .image-tools.grid-tools,
    .product-small .image-fade_in_back:hover .image-tools.grid-tools {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .product-small .add-to-cart-grid {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .product-small .image-tools .cart-icon {
        position: static !important;
        inset: auto !important;
        width: 100% !important;
    }
}
