/*
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.   ***************/
.form-flat input:not([type=submit]), .form-flat select, .form-flat textarea {
    border-radius: 5px;
}


.xem-them .tieu-de-xem-them {
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    font-size: 19px;
    color: black;
}
.xem-them ul li {
    margin-bottom: 3px;
}
.xem-them ul li a {
    font-weight: 700;
    font-size: 16px;
    color: #2a9e2f;
}
.xem-them ul li a:hover {
    text-decoration: underline;
}
.blog-single .entry-meta {
    text-transform: none;
    font-size: 14px;
    letter-spacing: 0;
    color: gray;
    border-top: 1px solid #e2e2e2;
    border-bottom: 1px solid #e2e2e2;
    padding: 10px;
    background: #f9f9f9;
}
.danh-muc {
    margin-bottom: 15px;
}
.danh-muc span.title, .the-tim-kiem span.title {
    border-radius: 4px;
    background: #126e32;
    padding: 4px 10px;
    color: white;
    margin-right: 5px;
}
.danh-muc a, .the-tim-kiem a {line-height:32px;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 4px 10px;
    background: #dedede;
    color: #464646;
}
.danh-muc a:hover, .the-tim-kiem a:hover {
    background: #6dca19;
    color: white;
}
.bai-viet-lien-quan {
    margin-top: 15px;
}
.bai-viet-lien-quan h3 {
    font-size: 19px;
    color: black;
}
.bai-viet-lien-quan ul {
    margin-bottom: 0;
    display: inline-block;
    width: 100%;
}
.bai-viet-lien-quan ul li {
    list-style: none;
    width: 25%;
    color: graytext;
    float: left;
    padding-left: 4px;
    padding-right: 5px;
}
.bai-viet-lien-quan ul li .box-image img {
    height: 120px;
    border-radius: 4px;
    object-fit: cover;
    object-position: center;
}
.bai-viet-lien-quan h4 {
    font-size: 15px;
    color: black;
    line-height: 19px;
    padding-top: 7px;
    height: 64px;
    overflow: hidden;
}
body{font-family: Arial,Helvetica,sans-serif; }
h1,h2,h3,h4,h5,h6{font-family: Arial,Helvetica,sans-serif;color:#000;font-weight:700}h1{font-size:2em}h2{font-size:1.8em}h3{font-size:1.5em}h4{font-size:1.2em}h5,h6{font-size:1em}
button.icon:not(.button), a.icon:not(.button) {
    font-family: sans-serif;
    margin-left: .25em;
    margin-right: .25em;
    font-size: 1.2em;
    display: none;
}
p.form-row-first, p.form-row-last{width:100%}
.woocommerce-billing-fields input{margin-bottom:0}
#customer_details label{font-weight: normal; font-size: 15px; color:#950303}
/* Styling Product Box */
.product-small .box {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background-color: #fff !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 0;
}
.product-small .box:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
}
.product-small .box-text-products {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 15px 15px 20px !important;
}
.product-small .box-text-products .title-wrapper {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 10px;
    text-align: left;
}
p.name.product-title a {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 42px; 
}
.product-small .box-text-products .price-wrapper {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
}
.product-small .box-text-products .price-wrapper .price {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}
.product-small .box-text-products .add-to-cart-button {
    grid-column: 2;
    grid-row: 2;
}
.product-small .box-text-products .add-to-cart-button a.add_to_cart_button {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 6px !important;
    border: 1px solid #e0c899 !important;
    background-color: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0 !important;
    min-height: 0 !important;
}
.product-small .box-text-products .add-to-cart-button a.add_to_cart_button::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background-color: #111;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}
.product-small .box-text-products .add-to-cart-button a.add_to_cart_button:hover {
    background-color: #e0c899 !important;
}
.product-small .box-text-products .add-to-cart-button a.add_to_cart_button:hover::before {
    background-color: #fff;
}
.entry-category.is-xsmall{
		display:none;
}

/* Custom Title Subcode */
.bbig-custom-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
}
.bbig-custom-title {
    font-size: 20px !important;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto !important;
}
.bbig-title-line {
    flex: 1 1 auto;
    width: 100%;
    height: 2px;
    background-color: #dcb47d; /* Màu viền tham khảo từ ảnh */
    margin: 0 15px;
}
.bbig-title-link {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #000;
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.bbig-title-link:hover {
    color: #dcb47d;
}
.bbig-title-arrow {
    margin-left: 5px;
    fill: currentColor;
    display: inline-block;
}

/* News Box Styling */
.box-blog-post {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background-color: #fff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.box-blog-post:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
}
.box-blog-post .box-image {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.box-blog-post .box-text {
    padding: 15px 20px 20px !important;
}

/* Reordering Elements with Grid */
.box-text-inner.blog-post-inner {
    display: grid;
    grid-template-columns: max-content max-content 1fr;
    align-items: center;
}
.box-text-inner.blog-post-inner .post-title {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 5px;
}
.box-text-inner.blog-post-inner .post-title a {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 45px; /* Ép luôn có không gian 2 dòng (16px * 1.4 * 2) */
}
.box-text-inner.blog-post-inner .post-meta {
    grid-column: 1;
    grid-row: 2;
    font-size: 12px;
    color: #888;
    margin: 0;
    opacity: 1 !important;
}
.box-text-inner.blog-post-inner .cat-label {
    grid-column: 2;
    grid-row: 2;
    font-size: 12px;
    color: #888;
    margin: 0;
    text-transform: none !important;
    opacity: 1 !important;
}
.box-text-inner.blog-post-inner .cat-label::before {
    content: " • ";
    margin: 0 6px;
    color: #888;
}
.box-text-inner.blog-post-inner .is-divider {
    display: none;
}
.box-text-inner.blog-post-inner .from_the_blog_excerpt {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 13px;
    color: #555;
    margin-top: 10px;
    margin-bottom: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 59px; /* Ép luôn có không gian 3 dòng (13px * 1.5 * 3) */
}

/* Category Box Shortcode */
.bbig-cat-box {
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    border-radius: 12px;
    padding: 25px 25px 0 25px;
    text-decoration: none;
    color: #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.bbig-cat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.bbig-cat-content {
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}
.bbig-cat-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #111;
    text-transform: uppercase;
    line-height: 1.2;
}
.bbig-cat-link {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
}
.bbig-cat-link svg {
    margin-left: 5px;
}
.bbig-cat-image {
    margin-top: auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.bbig-cat-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    max-height: 250px;
}

/* Auto Category Grid */
.bbig-category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.bbig-category-grid .bbig-cat-box {
    grid-column: span 2;
}
.bbig-category-grid .bbig-cat-box:nth-child(4),
.bbig-category-grid .bbig-cat-box:nth-child(5) {
    grid-column: span 3;
}



@media only screen and (max-width: 48em) {
    /*************** ADD MOBILE ONLY CSS HERE  ***************/
    .bai-viet-lien-quan ul li {
        width: 50%;
    }
    .bai-viet-lien-quan ul li .box-image img {
        height: 90px;
    }

    /* Custom Title Subcode Mobile */
    .bbig-custom-title {
        font-size: 16px !important;
    }
    .bbig-title-link {
        font-size: 12px;
    }
    .bbig-title-line {
        margin: 0 10px;
    }

    /* Mobile Category Grid */
    .bbig-category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .bbig-category-grid .bbig-cat-box,
    .bbig-category-grid .bbig-cat-box:nth-child(4),
    .bbig-category-grid .bbig-cat-box:nth-child(5) {
        grid-column: span 1 !important;
    }
    /* Fix Product Grid Mobile Overlap */
    .product-small .box-text-products {
        padding: 10px 10px 15px !important;
    }
    .product-small .box-text-products .price-wrapper .price {
        font-size: 14px;
        word-break: break-word;
    }
    .product-small .box-text-products .add-to-cart-button a.add_to_cart_button {
        width: 32px;
        height: 32px;
    }
    .product-small .box-text-products .add-to-cart-button a.add_to_cart_button::before {
        width: 16px;
        height: 16px;
    }
}