/*
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.   ***************/

.product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
    /* Đảm bảo luôn chiếm 2 dòng để đều khung */
    line-height: 1.4em;
    font-weight: bold;
}

.product-title a {
    display: block;
}

.add-to-cart-button {
    text-align: center;
}

/* Blog Post Styling */
.post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
    line-height: 1.3em;
}

.from_the_blog_excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3em;
    line-height: 1.5em;
}

.box-blog-post .is-divider {
    display: none;
}

/* Sidebar Widget Title Styling */
.widget-area .widget-title,
span.widget-title.shop-sidebar {
    display: block;
    width: 100%;
    color: #fff;
    background: #FF9900;
    padding-left: 15px;
    line-height: 40px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.widget-area .widget-title span,
span.widget-title.shop-sidebar {
    color: #fff !important;
}

.widget-area .is-divider,
#shop-sidebar .is-divider {
    display: none !important;
}

/* Recent Posts Widget Title Styling */
.flatsome_recent_posts .flex-col.flex-grow a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    min-height: 2.8em;
    font-weight: 500;
}

/* Fix Sub-menu Alignment */
ul.nav-dropdown {
    padding-left: 0 !important;
}

.nav-dropdown>li {
    padding: 0 !important;
    margin: 0 !important;
}

.nav-dropdown>li>a {
    padding: 10px 15px !important;
    display: block !important;
    text-indent: 0 !important;
    margin-left: 0 !important;
    /* Ghi đè margin-left: -15px của Flatsome */
}

.nav-dropdown>li:before {
    display: none !important;
}










@media only screen and (max-width: 48em) {

    /*************** ADD MOBILE ONLY CSS HERE  ***************/
    .add-to-cart-button .button {
        padding-left: 5px !important;
        padding-right: 5px !important;
        font-size: 0.85em !important;
        white-space: nowrap !important;
        width: 100%;
    }

    /* Related Posts Mobile List Style */
    .related-posts-row .related-post-col {
        padding-top: 5px;
        padding-bottom: 5px;
        border-bottom: 1px solid #ececec;
    }

    .related-posts-row .related-post-col:last-child {
        border-bottom: none;
    }

    .related-posts-row .related-post-col .post-title {
        min-height: auto;
        /* Tự động theo nội dung trên mobile nếu cần */
        font-size: 0.9em;
        margin-bottom: 0;
    }
}

/* Newsletter Form BEM Styling - RESET & CUSTOM */
.xc-newsletter {
    width: 100%;
}

.xc-newsletter .wpcf7-form-control-wrap {
    display: block;
    /* Đè lại mặc định của CF7 */
}

.xc-newsletter__inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.xc-newsletter__input-wrapper {
    flex-grow: 1;
}

/* Reset toàn bộ input mặc định của Flatsome */
input.xc-newsletter__input[type="email"] {
    display: block;
    width: 100% !important;
    height: 48px !important;
    border: 1px solid #ddd !important;
    padding: 0 15px !important;
    margin: 0 !important;
    background-color: #fff !important;
    font-size: 0.95em !important;
    color: #333 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 !important;
    transition: border-color 0.3s, box-shadow 0.3s;
}


input.xc-newsletter__input[type="email"]:focus {
    outline: none !important;
    box-shadow: 0 0 5px rgba(220, 0, 33, 0.2) !important;
    border-color: #dc0021 !important;
    background-color: #fff !important;
}

.xc-newsletter__button-wrapper {
    flex-shrink: 0;
}

/* Reset toàn bộ button mặc định của Flatsome */
input.xc-newsletter__submit[type="submit"] {
    display: inline-block;
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 25px !important;
    margin: 0 !important;
    background-color: #dc0021 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    cursor: pointer !important;
    transition: background-color 0.3s, opacity 0.3s !important;
    box-shadow: none !important;
    text-shadow: none !important;
    min-height: auto !important;
    position: static !important;
    /* Loại bỏ position relative có thể gây lệch */
}

input.xc-newsletter__submit[type="submit"]:hover {
    background-color: #b3001b !important;
    opacity: 1 !important;
    color: #fff !important;
    box-shadow: none !important;
}

@media (max-width: 849px) {
    .xc-newsletter__inner {
        flex-wrap: wrap;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .xc-newsletter__input-wrapper,
    .xc-newsletter__button-wrapper {
        width: 100%;
    }

    input.xc-newsletter__input[type="email"] {
        border: 1px solid #ddd !important;
        border-radius: 0 !important;
        margin-bottom: 10px !important;
        background: #fff !important;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    }

    input.xc-newsletter__submit[type="submit"] {
        width: 100% !important;
        border-radius: 0 !important;
    }
}

/* Box Dich Vu Styling */
.box-dich-vu {
    background-color: #fff !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-radius: 8px;
    /* Thêm bo góc nhẹ cho hiện đại */
    overflow: hidden;
}

.box-dich-vu:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Padding và căn lề cho phần text bên trong Box Dich Vu */
.box-dich-vu .icon-box-text {
    padding-left: 5px;
    padding-right: 5px;
    padding-bottom: 20px;
}

.box-dich-vu .icon-box-text h3 {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
}

.box-dich-vu .icon-box-text p {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Fix khoảng cách cho icon bên trên */
.box-dich-vu .icon-box-img {
    margin-top: 20px;
}