/*
Theme Name: Yến Việt
Theme URI: https://www.facebook.com/vutruongduy2109
Author: Vũ Trường Duy
Author URI: https://www.facebook.com/vutruongduy2109
Description: The woocommerce website sell product.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags:  woocommerce, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: dvutail
*/

/* BEGIN POPUP SALES */
.yenviet-sales-pop {
    position: fixed;
    bottom: 24px;
    left: 20px;
    z-index: 99999;
    background: #fffbeb;
    border: 2px solid #5b0815;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(91, 8, 21, 0.25);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 340px;
    width: calc(100% - 40px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease-in-out;
    font-family: inherit;
}

.yenviet-sales-pop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.yenviet-pop-img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #fde68a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.yenviet-pop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yenviet-pop-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.35;
    color: #1f2937;
}

.yenviet-pop-buyer {
    font-weight: 700;
    color: #111827;
}

.yenviet-pop-status {
    color: #5b0815;
    font-weight: 600;
}

.yenviet-pop-title {
    display: block;
    font-weight: 700;
    color: #5b0815;
    text-decoration: none;
    margin: 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yenviet-pop-title:hover {
    color: #b45309;
    text-decoration: underline;
}

.yenviet-pop-time {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.yenviet-pop-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.yenviet-pop-close:hover {
    color: #5b0815;
}
/* END POPUP SALES */

/* 1. Ép toàn bộ khung lưới WooCommerce kéo giãn đều chiều cao các cột */
.products, ul.products, div.products {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

.products .product, 
.products .product-card, 
.products .type-product,
ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    position: relative !important;
}

/* 2. Cố định chiều cao tên sản phẩm (Chuẩn 2 dòng) */
.woocommerce-loop-product__title,
.product-card-bottom h3,
.product-card-bottom a,
.products li.product h2,
.products li.product .product-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 2.8em !important; 
    line-height: 1.4em !important;
    margin-bottom: 4px !important;
}

/* 3. CỐ ĐỊNH CHIỀU CAO CỤM ĐÁNH GIÁ & ĐÃ BÁN */
.yenviet-clean-meta {
    min-height: 34px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    margin-bottom: 4px !important;
}

/* 4. Đẩy khối giá và nút bấm xuống đáy */
.product-card-bottom,
.products li.product .price,
.type-product .price {
    margin-top: auto !important;
}

/* 5. Khung định vị Badges trên ảnh */
.yenviet-badges-wrapper {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    pointer-events: none !important;
    z-index: 20 !important;
}

.yenviet-badge {
    display: inline-block !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

.yenviet-badge-sale {
    background-color: #dc2626 !important;
    text-align: center !important;
}

.yenviet-badge-sale .yenviet-badge-line-1 {
    display: block !important;
    font-size: 9px !important;
    font-weight: 500 !important;
    opacity: 0.9 !important;
    line-height: 1 !important;
    margin-bottom: 2px !important;
}

.yenviet-badge-sale .yenviet-badge-line-2 {
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.yenviet-badge-feature {
    margin-left: auto !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
}
.yenviet-badge-banchay { background-color: #ea580c !important; }
.yenviet-badge-khanhhoa { background-color: #15803d !important; }
.yenviet-badge-chungsan { background-color: #0284c7 !important; }
.yenviet-badge-thuonghang { background-color: #b45309 !important; }

.onsale, .product-card .sale-badge {
    display: none !important;
}

.product-card-bottom span.block {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 8px !important;
}
.product-card-bottom span.block del,
.product-card-bottom span.block ins {
    display: inline-block !important;
    margin: 0 !important;
}
.product-card-bottom span.block del {
    font-size: 0.85em !important;
    color: #9ca3af !important;
}

.product-card-bottom .product-card__rating {
    display: none !important;
}

/* 6. CỤM 2 NÚT NGUYÊN BẢN 1 DÒNG */
.yenviet-quick-buttons {
    display: flex !important;
    gap: 6px !important;
    margin-top: 8px !important;
    padding-top: 4px !important;
    width: 100% !important;
}

.yenviet-btn {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 8px 2px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    color: #ffffff !important;
    transition: opacity 0.2s ease !important;
    white-space: nowrap !important;
    border: none !important;
    cursor: pointer !important;
}

.yenviet-btn:hover {
    opacity: 0.9 !important;
    color: #ffffff !important;
}

.yenviet-btn-call {
    background-color: #16a34a !important;
}

.yenviet-btn-zalo {
    background-color: #0068ff !important;
}

/* 7. GIAO DIỆN POPUP TƯ VẤN SANG TRỌNG */
.yenviet-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 9999999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
}

.yenviet-modal-box {
    background: #ffffff !important;
    border-radius: 12px !important;
    max-width: 420px !important;
    width: 100% !important;
    padding: 24px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    text-align: left !important;
    font-family: inherit !important;
    animation: yenvietFadeIn 0.25s ease-out !important;
}

@keyframes yenvietFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.yenviet-modal-header {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.yenviet-modal-desc {
    font-size: 13px !important;
    color: #475569 !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
}

/* Khung thông tin sản phẩm cần copy */
.yenviet-product-info-box {
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.yenviet-product-info-details {
    flex: 1 !important;
}

.yenviet-info-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 2px !important;
}

.yenviet-info-price {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #dc2626 !important;
}

.yenviet-copy-action-btn {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.2s !important;
}

.yenviet-copy-action-btn:hover {
    background: #cbd5e1 !important;
}

.yenviet-copy-action-btn.copied {
    background: #16a34a !important;
    color: #ffffff !important;
}

/* Cụm nút hành động bên dưới */
.yenviet-modal-actions {
    display: flex !important;
    gap: 10px !important;
}

.yenviet-modal-go-zalo {
    flex: 2 !important;
    background: #0068ff !important;
    color: #ffffff !important;
    text-align: center !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.yenviet-modal-close-btn {
    flex: 1 !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    text-align: center !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
}

.category-description p {
    margin-bottom: 20px;
}
.category-description table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc; /* Viền ngoài bảng */
}

.category-description th, 
.category-description td {
    border: 1px solid #ccc; /* Viền giữa các ô */
    padding: 10px; /* Khoảng cách giữa nội dung và viền */
    text-align: left; /* Căn trái nội dung */
}

.category-description th {
    background-color: #f4f4f4; /* Màu nền tiêu đề bảng */
    font-weight: bold;
    text-align: center;
}

.category-description tr:nth-child(even) {
    background-color: #f9f9f9; /* Màu nền xen kẽ cho các dòng */
}

.category-description tr:hover {
    background-color: #e0e0e0; /* Hiệu ứng hover khi di chuột vào */
}

/* Định dạng danh sách không có thứ tự (unordered list) */
.category-description ul {
    list-style: none; /* Ẩn dấu chấm mặc định */
    margin: 15px 0;
    padding-left: 20px;
}

/* Định dạng danh sách có thứ tự (ordered list) */
.category-description ol {
    list-style: decimal; /* Hiển thị số thứ tự */
    margin: 15px 0;
    padding-left: 20px;
}

/* Định dạng các mục danh sách */
.category-description ul li,
.category-description ol li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px; /* Dịch nội dung sang phải để tạo khoảng trống cho biểu tượng */
}

/* Biểu tượng tùy chỉnh cho danh sách ul */
.category-description ul li::before {
    content: "✔"; /* Thêm biểu tượng check */
    position: absolute;
    left: 0;
    color: #ff6600; /* Màu cam */
    font-size: 16px;
    font-weight: bold;
}

/* Danh sách lồng nhau */
.category-description ul ul, 
.category-description ol ol {
    margin-top: 5px;
    padding-left: 25px;
}

/* Hover hiệu ứng */
.category-description li:hover {
    color: #333;
    transition: 0.3s;
}

.procat-h1 {
    font-size: 28px;
}
#rank-math-toc nav {
    border-top: 1px solid #ddd;
    padding-top: 10px;
}
.rank-math-breadcrumb a, .rank-math-breadcrumb span {
    font-size: 14px;
    color: #57534E;
}
.dvutail-single-post__body h2 {
    color: #b08347;
    font-size: 18px;
    font-weight: bold;
    border-left: 3px solid #b08347;
    padding-left: 12px;
}

#rank-math-toc h2 {
    font-size: 24px;
    font-weight: bold;
    color: #292524;
    border-left: none;
    margin-bottom: 10px;
    padding-left: 0;
}
#rank-math-toc {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background: #f9f9f9;
    transition: all 0.3s ease-in-out;
    margin-bottom: 20px;
}
/* Bỏ list-style (dấu chấm, số) cho các tiêu đề lớn */
#rank-math-toc > nav > ul {
    list-style-type: none;
}

/* Vẫn giữ dấu chấm hoặc số cho các tiêu đề nhỏ hơn */
#rank-math-toc > nav > ul > li > ul {
    list-style-type: disc; /* Có thể đổi thành circle, square nếu muốn */
}
#toc-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

#toc-toggle-btn:hover {
    color: #005f87;
}

#toc-toggle-btn:hover {
    background: #005f87;
}


.top-announcement-bar {
    background: linear-gradient(90deg, #fff7ed 0%, #fef3c7 50%, #fff7ed 100%);
    color: #5b0815;
    border-bottom: 1px solid #fde68a;
    font-size: 13px;
    font-weight: 600;
    height: 34px;
    line-height: 34px;
    overflow: hidden;
    width: 100%;
}

.announcement-track {
    display: flex;
    width: max-content;
    animation: marquee-infinite 48s linear infinite;
}
.top-announcement-bar:hover .announcement-track {
    animation-play-state: paused;
}
.announcement-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.announcement-item {
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
}
.announcement-divider {
    color: #b45309;
    opacity: 0.5;
}

@keyframes marquee-infinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==============================================================================
   1. KHU VỰC CSS DÙNG CHUNG (BASE & ALL DEVICES)
   Áp dụng cho mọi thiết bị. Viết các style mặc định ở đây.
   ============================================================================== */

html, body {
    max-width: 100%;
    /* Thêm các thuộc tính dùng chung tại đây */
}


/* ==============================================================================
   2. MOBILE SMALL & MEDIUM (Màn hình dọc nhỏ & vừa: Mobile < 576px)
   ============================================================================== */
@media screen and (max-width: 575.98px) {
    /* Viết CSS chỉ dành riêng cho điện thoại màn hình nhỏ tại đây */
    
}


/* ==============================================================================
   3. MOBILE LARGE & PHABLET (Màn hình lớn: 576px - 767px)
   ============================================================================== */
@media screen and (min-width: 576px) and (max-width: 767.98px) {
    /* Viết CSS dành riêng cho điện thoại kích thước lớn tại đây */

}


/* ==============================================================================
   4. TOTAL MOBILE & TABLET PORTRAIT (Tất cả thiết bị di động: < 768px)
   Dùng để fix các lỗi giao diện di động chung (như lỗi tràn lề, ẩn menu PC...)
   ============================================================================== */
@media screen and (max-width: 767.98px) {
    /* Fix tràn lề mobile */
    html, body {
        overflow-x: hidden !important;
    }
    .yenviet-sales-pop {
        bottom: 75px;
        left: 12px;
        max-width: 300px;
    }
}


/* ==============================================================================
   5. TABLET PORTRAIT (Máy tính bảng màn hình dọc: 768px - 991px)
   ============================================================================== */
@media screen and (min-width: 768px) and (max-width: 991.98px) {
    /* Viết CSS dành riêng cho iPad / Tablet dọc tại đây */

}


/* ==============================================================================
   6. TABLET LANDSCAPE & SMALL LAPTOP (Tablet ngang & Laptop nhỏ: 992px - 1199px)
   ============================================================================== */
@media screen and (min-width: 992px) and (max-width: 1199.98px) {
    /* Viết CSS cho Tablet ngang / Laptop 13-14 inch tại đây */

}


/* ==============================================================================
   7. TOTAL DESKTOP & LAPTOP (Tất cả màn hình máy tính: >= 768px hoặc >= 992px)
   Dùng để khôi phục thuộc tính chuẩn PC (như overflow, ẩn menu mobile...)
   ============================================================================== */
@media screen and (min-width: 768px) {
    /* Trả lại hiển thị chuẩn cho slider & giao diện PC */
    .dvutail-product-category,
    .section-product-featured,
    .swiper-wrapper {
        overflow: visible !important;
    }

}


/* ==============================================================================
   8. LARGE DESKTOP (Màn hình PC lớn / Monitor: >= 1200px)
   ============================================================================== */
@media screen and (min-width: 1200px) {
    /* Viết CSS cho màn hình máy tính để bàn chuẩn tại đây */

}


/* ==============================================================================
   9. EXTRA LARGE DESKTOP (Màn hình siêu rộng / 2K, 4K: >= 1400px)
   ============================================================================== */
@media screen and (min-width: 1400px) {
    /* Viết CSS cho màn hình độ phân giải cao tại đây */

}


/* ==============================================================================
   10. ĐẶC BIỆT: CHẾ ĐỘ XOAY MÀN HÌNH (ORIENTATION) & IN ẤN (PRINT)
   ============================================================================== */

/* Màn hình điện thoại / tablet nằm ngang */
@media screen and (orientation: landscape) and (max-width: 991.98px) {
    
}

/* Tối ưu giao diện khi người dùng bấm In trang web (Ctrl + P) */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
}
