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

/* Style form dat hang giong thiet ke cu */
.xc-dat-hang-form {
    display: flex;
    overflow: hidden;
    width: min(770px, 100%);
    height: 56px;
    margin: auto;
    border: 1px solid #e6e0d6;
    border-radius: 99px;
    background: #fff;
    align-items: center;
}

.xc-dat-hang-form p {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    align-items: center;
}

.xc-dat-hang-form br, 
.xc-dat-hang-form .wpcf7-spinner {
    display: none !important;
}

.xc-dat-hang-form .wpcf7-form-control-wrap {
    flex: 1;
    height: 100%;
    margin-bottom: 0;
}

.xc-dat-hang-form input[type="tel"], 
.xc-dat-hang-form input[type="text"] {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 18px;
    border: 0 !important;
    background: transparent;
    box-shadow: none !important;
    color: #777;
    font-size: 16px;
    line-height: 56px;
    outline: none;
}

.xc-dat-hang-form input[type="submit"] {
    position: relative;
    height: 40px;
    min-height: 40px;
    margin: 8px 8px 8px 0 !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-radius: 99px !important;
    background: var(--jb-red, #e31837) !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: bold;
    line-height: 40px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.3s;
}

.xc-dat-hang-form input[type="submit"]:hover {
    opacity: 0.9;
}

.home .xc-dat-hang-form {
    width: 360px !important;
    height: 45px !important;
}

.home .xc-dat-hang-form input[type="tel"],
.home .xc-dat-hang-form input[type="text"] {
    height: 45px !important;
    padding: 0 19px !important;
    font-size: 16px !important;
    line-height: 45px !important;
}

.home .xc-dat-hang-form input[type="submit"] {
    height: 35px !important;
    min-height: 35px !important;
    line-height: 35px !important;
    margin: 5px 5px 5px 0 !important;
    padding: 0 15px !important;
}

/* Tin tuc - Cố định số dòng */
.jb-news-grid .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;
    margin-bottom: 10px;
}

.jb-news-grid .from_the_blog_excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    height: 4.5em;
    margin-bottom: 15px;
    white-space: normal;
}

/* Căn chỉnh lại nút Xem thêm */
.jb-news-more {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    height: 46px;
    line-height: 46px; /* Căn giữa chữ theo chiều dọc */
    padding: 0 30px;
    border-radius: 8px; /* Tùy chọn cho đồng bộ */
    display: inline-block;
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}

/* --- FIX TRANG TIN TỨC --- */

/* Tiêu đề luôn 2 hàng và có dấu ... nếu dài */
.jb-news-page-card h3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    height: 50.4px !important; /* Đảm bảo đúng 2 dòng với line-height: 25.2px */
}

/* Mô tả ngắn luôn 3 hàng và có dấu ... nếu dài */
.jb-news-page-card p {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    height: 68.5px !important; /* Đảm bảo đúng 3 dòng với line-height: 22.85px */
}

/* Các ảnh luôn bằng nhau (cùng tỷ lệ) */
.jb-news-page-card .img-inner {
    padding-top: 65% !important; /* Thay đổi tỷ lệ nếu cần (vd 56.25% cho 16:9) */
    position: relative;
    overflow: hidden;
}

.jb-news-page-card .img-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
/* --- FIX TRANG TH?C ÐON --- */
.page-description { display: none !important; }

/* Style phân trang s?n ph?m */
nav.woocommerce-pagination ul.page-numbers { display: flex; justify-content: center; gap: 8px; border: none; padding: 20px 0; }
nav.woocommerce-pagination ul.page-numbers li { border: none !important; margin: 0; }
nav.woocommerce-pagination ul.page-numbers li a, nav.woocommerce-pagination ul.page-numbers li span.current { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; font-size: 16px; font-weight: bold; background: #f4f4f4; color: #333; transition: all 0.3s; border: none; }
nav.woocommerce-pagination ul.page-numbers li span.current, nav.woocommerce-pagination ul.page-numbers li a:hover { background: #e31837; color: #fff; }


/* Tang do uu tien de chong bi ghi de boi jollibee.css */
body .jb-news-page-card .img-inner {
    padding-top: 65% !important;
    position: relative !important;
    overflow: hidden !important;
}

body .jb-news-page-card .img-inner img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
