/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

/* Custom CSS for box-khuyen-mai to match xc-section-title */
.box-khuyen-mai {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto 20px auto !important;
    width: 100%;
    border-bottom: none;
    padding: 0 !important;
}

/* Lines on both sides of the title */
.box-khuyen-mai::before,
.box-khuyen-mai::after {
    content: "";
    flex: 1;
    height: 2px;
    background-color: rgba(0,0,0,0.1);
}

.box-khuyen-mai .icon-box-img {
    margin: 0 15px 0 15px !important;
    width: auto !important;
}

.box-khuyen-mai .icon-box-img img {
    margin-bottom: 0 !important;
}

.box-khuyen-mai .icon-box-text {
    flex: 0 1 auto;
    padding: 0 15px 0 0 !important;
}

.box-khuyen-mai h5 {
    font-size: 24px;
    color: rgb(103, 165, 90);
    font-weight: 700;
    margin-bottom: 0;
    text-transform: uppercase;
}

@media (max-width: 549px) {
    .box-khuyen-mai h5 {
        font-size: 16px;
    }
    /* Make section title match the smaller size */
    .xc-section-title .section-title-main,
    .xc-section-title h2 {
        font-size: 16px !important;
    }
    /* Slightly reduce spacing on mobile to prevent wrapping */
    .box-khuyen-mai .icon-box-img {
        margin: 0 10px 0 10px !important;
    }
    .box-khuyen-mai .icon-box-img img {
        width: 30px !important; /* Make icon slightly smaller on mobile */
        height: auto;
    }
}

/* Custom CSS for Blog Post Boxes */
.box-blog-post {
    border: 1px solid #eaeaea;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.box-blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Fix image border radius to match box */
.box-blog-post .box-image,
.box-blog-post .image-cover {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

/* Ensure equal height behavior in flex cols */
.post-item .col-inner {
    height: 100%;
}

/* Title always 2 lines */
.box-blog-post .post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 2.8em; /* 2 lines exactly */
    margin-bottom: 10px;
}

/* Excerpt always 2 lines */
.box-blog-post .from_the_blog_excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    height: 3em; /* 2 lines exactly */
    margin-bottom: 0;
}

/* Hide divider */
.box-blog-post .is-divider {
    display: none !important;
}

/* Floating Contact List CSS */
.xc-contact-list {
    position: fixed;
    left: 13px;
    background: #fff;
    border-radius: 5px;
    width: auto;
    z-index: 150;
    bottom: 80px;
    padding: 10px 0;
    border: 1px solid #f2f2f2;
}

.xc-contact-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.xc-contact-list ul li {
    list-style: none !important;
    margin-bottom: 0;
}

.xc-contact-list ul > li a {
    border: none;
    padding: 3px;
    display: block;
    border-radius: 5px;
    text-align: center;
    font-size: 10px;
    line-height: 15px;
    color: #515151;
    font-weight: 700;
    max-width: 72.19px;
    max-height: 54px;
    text-decoration: none;
}

.xc-contact-list ul > li a i {
    width: 33px;
    height: 33px;
    display: block;
    margin: auto;
}

.xc-contact-list ul > li a i.xc-icon-map {
    background: url('assets/img/map.jpg') no-repeat center;
    background-size: contain;
    width: 36px;
    height: 36px;
}

.xc-contact-list ul > li a i.xc-icon-zalo {
    background: url('assets/img/zalo.jpg') no-repeat center;
    background-size: contain;
    width: 36px;
    height: 36px;
}

.xc-contact-list ul > li a i.xc-icon-messenger {
    background: url('assets/img/messenger.jpg') no-repeat center;
    background-size: contain;
    width: 36px;
    height: 36px;
}

.xc-contact-list ul > li a i.xc-icon-sms {
    background: url('assets/img/sms.jpg') no-repeat center;
    background-size: contain;
    width: 38px;
    height: 36px;
}

.xc-contact-list ul > li a i.xc-icon-phone {
    background: url('assets/img/phone.gif') no-repeat center;
    background-size: contain;
}

/* Hide Phone and SMS on Desktop */
.xc-contact-list .xc-item-phone,
.xc-contact-list .xc-item-sms {
    display: none !important;
}

/* Mobile overrides */
@media only screen and (max-width: 600px) {
    .xc-contact-list .xc-item-phone,
    .xc-contact-list .xc-item-sms {
        display: block !important;
    }

    .xc-contact-list {
        background: white;
        width: 100%;
        border-radius: 0;
        color: #fff;
        height: 60px;
        line-height: 50px;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 999;
        padding: 5px;
        margin: 0;
        box-shadow: 0 4px 10px 0 rgba(0,0,0,0.1);
        border: none;
    }

    .xc-contact-list ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
    }

    .xc-contact-list li {
        width: 20%;
        height: 50px;
        position: relative;
    }

    .xc-contact-list ul > li a {
        padding: 0;
        margin: 0 auto;
        max-width: none;
    }

    .xc-contact-list li .button {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        color: inherit !important;
    }

    /* Phone Call Button Animation */
    .xc-contact-list li .button .phone_animation {
        position: absolute;
        top: -16px;
        left: 50%;
        transform: translate(-50%, 0);
        width: 50px;
        height: 50px;
        border-radius: 100%;
        background: #6cb917;
        border: 2px solid white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }

    .xc-contact-list ul li .button .phone_animation i {
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
    }

    .xc-contact-list ul li .button .btn_phone_txt {
        position: relative;
        top: 35px;
        font-size: 11px;
        font-weight: bold;
        text-transform: none;
        color: #515151;
        line-height: 1;
        display: block;
    }
}

/* Override entry-content padding */
.entry-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Product Title always 2 lines and larger */
.product-small .product-title,
.product-small .woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 2.8em; /* Exact 2 lines height */
}

.product-small .product-title a,
.product-small .woocommerce-loop-product__title a {
    font-size: 16px !important;
    font-weight: 500;
}

/* Product Box Styling (like blog posts) */
.product-small .box {
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.product-small .box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-small .box-image,
.product-small .image-zoom {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

/* Footer Contact List */
.xc-footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.xc-footer-contact-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}
.xc-footer-contact-list li i {
    color: rgb(103, 165, 90);
    margin-right: 10px;
    margin-top: 4px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.xc-footer-contact-list li a {
    color: inherit;
    transition: color 0.3s;
}
.xc-footer-contact-list li a:hover {
    color: rgb(103, 165, 90);
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/
    .product-small .product-title a,
    .product-small .woocommerce-loop-product__title a {
        font-size: 14px !important;
    }
}