
/* =========================
   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 {
        display: none !important;
    }

    .flickity-prev-next-button.previous::before,
    .flickity-prev-next-button.next::before {
        display: none !important;
    }

    .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: 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;
    }
}
