/*
Theme Name: Flatsome Child
Theme URI: https://flatsome3.uxthemes.com/
Description: Child theme for Flatsome.
Author: Site Administrator
Template: flatsome
Version: 1.0.0
Text Domain: flatsome-child
*/

/* Add custom CSS below. */








.header-nav-main.nav-box > li.active > a , .header-nav-main.nav > li > a:hover {  transform: skewX(-15deg);}

/* Thẻ sản phẩm Flatsome */
.product-small.box {
    --card-accent: #24784c;

    overflow: hidden;
    height: 100%;
    background: #fff;
    border: 1px solid #e6ede8;
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(24, 58, 36, .05);
    transition: transform .25s ease,
                box-shadow .25s ease,
                border-color .25s ease;
}

/* Khung ảnh: giữ hiệu ứng đổi ảnh của Flatsome */
.product-small.box .box-image {
    width: 100%;
    margin: 0;
    background: #fff;
    border-radius: 0;
}

.product-small.box .box-image > div:first-child > a {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.product-small.box .box-image > div:first-child > a > img {
    width: 100%;
    height: 100%;
    padding: 18px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
}

.product-small.box .box-image > div:first-child > a > img:first-child {
    position: relative;
    display: block;
}

.product-small.box .box-image > div:first-child > a > img.back-image {
    position: absolute;
    inset: 0;
}

/* Nội dung */
.product-small.box .box-text-products {
    padding: 18px 20px 22px;
    border-top: 1px solid #f0f3f1;
    text-align: left;
}

.product-small.box .product-cat {
    margin: 0 0 8px;
    color: var(--card-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 1px;
    opacity: 1;
}

.product-small.box .product-title {
    margin: 0;
}

.product-small.box .product-title a {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3em;
    color: #213b2b;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color .2s ease;
}

.product-small.box .product-title a:hover {
    color: var(--card-accent);
}

/* Giá, nếu sản phẩm có giá */
.product-small.box .price {
    display: block;
    margin-top: 12px;
    color: var(--card-accent);
    font-size: 16px;
    font-weight: 700;
}

.product-small.box .price del {
    margin-right: 6px;
    color: #87928b;
    font-size: 13px;
    font-weight: 400;
}

/* Quick View */
.product-small.box .image-tools.grid-tools {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
}

.product-small.box .quick-view {
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--card-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .6px;
    text-decoration: none;
    opacity: 1;
    transition: background .2s ease;
}

.product-small.box .quick-view:hover {
    background: #185c38;
}

/* Điều hướng bằng bàn phím */
.product-small.box a:focus-visible {
    outline: 3px solid var(--card-accent);
    outline-offset: -3px;
}

/* Hiệu ứng trên thiết bị dùng chuột */
@media (hover: hover) {
    .product-small.box:hover {
        transform: translateY(-5px);
        border-color: #b9d5c3;
        box-shadow: 0 14px 30px rgba(24, 58, 36, .12);
    }
}

/* Điện thoại */
@media (max-width: 549px) {
    .product-small.box {
        border-radius: 12px;
    }

    .product-small.box .box-image > div:first-child > a > img {
        padding: 10px;
    }

    .product-small.box .box-text-products {
        padding: 13px 12px 16px;
    }

    .product-small.box .product-cat {
        font-size: 10px;
        letter-spacing: .5px;
    }

    .product-small.box .product-title a {
        font-size: 14px;
    }
}

/* Giảm chuyển động theo cài đặt thiết bị */
@media (prefers-reduced-motion: reduce) {
    .product-small.box,
    .product-small.box * {
        transition: none !important;
        animation: none !important;
    }

    .product-small.box:hover {
        transform: none;
    }
}


/* Khung danh mục */
#woocommerce_product_categories-3 {
    --category-green: #24784c;

    overflow: hidden;
    padding: 0;
    background: #fff;
    border: 1px solid #e3ece6;
    border-radius: 16px;
    box-shadow: 0 5px 24px rgba(25, 65, 40, .06);
}

/* Tiêu đề */
#woocommerce_product_categories-3 .widget-title {
    display: block;
    margin: 0;
    padding: 18px 20px;
    background: var(--category-green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 1.2px;
}

#woocommerce_product_categories-3 .is-divider {
    display: none;
}

/* Danh sách */
#woocommerce_product_categories-3 .product-categories {
    margin: 0;
    padding: 10px;
    list-style: none;
}

#woocommerce_product_categories-3 .product-categories > li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    transition: background .2s ease;
}

/* Tên danh mục */
#woocommerce_product_categories-3 .product-categories > li > a {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 0;
    color: #34483b;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: color .2s ease;
}

/* Chấm nhỏ trước danh mục */
#woocommerce_product_categories-3 .product-categories > li > a::before {
    content: "";
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b8cdbf;
    transition: background .2s ease;
}

/* Số lượng sản phẩm */
#woocommerce_product_categories-3 .count {
    flex-shrink: 0;
    min-width: 34px;
    padding: 3px 7px;
    border-radius: 20px;
    background: #f0f5f2;
    color: #617969;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    opacity: 1;
}

/* Hover và danh mục đang chọn */
#woocommerce_product_categories-3 .product-categories > li:hover,
#woocommerce_product_categories-3 .product-categories > li:focus-within,
#woocommerce_product_categories-3 .product-categories > li.current-cat {
    background: #edf6ef;
}

#woocommerce_product_categories-3 .product-categories > li:hover > a,
#woocommerce_product_categories-3 .product-categories > li.current-cat > a {
    color: var(--category-green);
}

#woocommerce_product_categories-3 .product-categories > li.current-cat > a {
    font-weight: 700;
}

#woocommerce_product_categories-3 .product-categories > li:hover > a::before,
#woocommerce_product_categories-3 .product-categories > li.current-cat > a::before {
    background: var(--category-green);
}

#woocommerce_product_categories-3 .product-categories > li.current-cat > .count {
    background: var(--category-green);
    color: #fff;
}

/* Điều hướng bằng bàn phím */
#woocommerce_product_categories-3 a:focus-visible {
    outline: 2px solid var(--category-green);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    #woocommerce_product_categories-3 * {
        transition: none !important;
    }
}