/*
Theme Name: TBAY Bồn Nước (Elementor V2)
Theme URI: https://tbay.vn
Author: TBAY Tech Team
Author URI: https://tbay.vn
Description: Giao diện chuyên nghiệp dành cho website bán bồn nước TBAY trên nền tảng Elementor Page Builder + WooCommerce.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: tbay
*/

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES & ROOT VARIABLES
   ========================================================================== */
:root {
    --wpshare247-bg-body: #ffffff;           
    --wpshare247-bg-section-alt: #f8fafc;    
    --wpshare247-color-primary: #0284c7;     
    --wpshare247-color-primary-dark: #0369a1; 
    --wpshare247-color-accent: #f97316;      
    --wpshare247-color-accent-hover: #ea580c;
    --wpshare247-text-main: #334155;
    --wpshare247-text-muted: #64748b;
    --wpshare247-bg-card: #ffffff;
    --wpshare247-border-color: #e2e8f0;
    --wpshare247-font-heading: 'Roboto', Arial, sans-serif;
    --wpshare247-font-body: 'Roboto', Arial, sans-serif;
    --wpshare247-container-width: 1280px;
    --wpshare247-radius-base: 0px; 
    --wpshare247-shadow-card: 0 4px 6px -1px rgba(2, 132, 199, 0.05), 0 2px 4px -1px rgba(2, 132, 199, 0.03);
    --wpshare247-shadow-hover: 0 20px 25px -5px rgba(2, 132, 199, 0.15), 0 10px 10px -5px rgba(2, 132, 199, 0.08);
    --wpshare247-section-padding: 80px 0;
    --wpshare247-gap-base: 24px;
}

/* ==========================================================================
   2. RESET & BASE (CƠ BẢN DÀNH CHO THEME)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }

body { 
    font-family: var(--wpshare247-font-body); 
    color: var(--wpshare247-text-main); 
    line-height: 1.6; 
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%); 
    background-attachment: fixed; 
    overflow-x: hidden; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    margin: 0;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--wpshare247-bg-body); }
::-webkit-scrollbar-thumb { background: var(--wpshare247-color-primary); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--wpshare247-color-primary-dark); }

.wpshare247-ambient-glow { position: fixed; border-radius: 50%; filter: blur(120px); z-index: -1; opacity: 0.5; pointer-events: none; }
.wpshare247-glow-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: #e0f2fe; }
.wpshare247-glow-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: #bae6fd; }
.wpshare247-glow-3 { top: 40%; left: 30%; width: 40vw; height: 40vw; background: #e0e7ff; }

h1, h2, h3, h4, h5, h6 { font-family: var(--wpshare247-font-heading); font-weight: 700; color: var(--wpshare247-text-main); line-height: 1.2; margin-bottom: 1rem; text-transform: uppercase; }
h1, h2 { text-wrap: balance; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
.wpshare247-container { width: 100%; max-width: var(--wpshare247-container-width); margin: 0 auto; padding: 0 24px; z-index: 2; position: relative;}

/* ==========================================================================
   3. MOBILE HEADER & NAVIGATION FIXES
   ========================================================================== */
@media (max-width: 991px) {
    .wow {
        visibility: visible !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    html, body {
        height: auto !important;
        min-height: 100vh;
    }
    .wpshare247-header__main .wpshare247-container {
        position: relative !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 15px !important;
        flex-wrap: wrap !important;
        gap: 0 !important;
    }
    .wpshare247-mobile-menu-btn {
        order: 1 !important;
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 38px !important;
        height: 38px !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        color: var(--wpshare247-color-primary-dark) !important;
        margin: 0 !important;
        font-size: 20px !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }
    .wpshare247-header__logo {
        order: 2 !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        position: static !important;
        flex-shrink: 0 !important;
    }
    .wpshare247-header__logo img {
        width: 28px !important;
        height: 28px !important;
    }
    .wpshare247-header__logo span {
        font-size: 1.7rem !important;
    }
    .wpshare247-header__actions {
        order: 3 !important;
        position: static !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    .wpshare247-header__actions .wpshare247-action-item {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 36px !important;
        color: var(--wpshare247-text-main) !important;
        text-decoration: none !important;
        padding: 2px !important;
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }
    .wpshare247-header__actions .wpshare247-action-item svg {
        width: 22px !important;
        height: 22px !important;
        margin-bottom: 3px !important;
    }
    .wpshare247-header__actions .wpshare247-action-badge {
        position: absolute !important;
        top: -5px !important;
        right: -3px !important;
        background: var(--wpshare247-color-accent) !important;
        color: #ffffff !important;
        font-size: 10px !important;
        padding: 1px 5px !important;
        border-radius: 999px !important;
        border: 2px solid #ffffff !important;
        line-height: 1.2 !important;
    }
    .wpshare247-header__search {
        order: 4 !important;
        width: 100% !important;
        min-width: 100% !important;
        margin-top: 10px !important;
    }
    .wpshare247-header__nav-bar { padding-top: 0 !important; }
    .wpshare247-mobile-menu-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 15px;
        background: #ffffff;
    }
    .wpshare247-mobile-close-btn {
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        width: 38px; height: 38px;
        display: flex; align-items: center; justify-content: center;
        color: var(--wpshare247-text-main);
        cursor: pointer;
        transition: 0.3s;
    }
    .wpshare247-mobile-close-btn:hover { border-color: #ef4444; color: #ef4444; }
    ul.wpshare247-main-nav > li.menu-item-has-children > ul.sub-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    ul.wpshare247-main-nav > li.menu-item-has-children.active > ul.sub-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        animation: fadeInMenu 0.3s ease forwards;
    }
    @keyframes fadeInMenu {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* ==========================================================================
   4. TOAST NOTIFICATION STYLING
   ========================================================================== */
#wpshare247-toast-container {
    position: fixed; bottom: 30px; right: 30px;
    z-index: 999999; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.wpshare247-toast-msg {
    background: #10b981; color: white; padding: 15px 25px; border-radius: 8px; font-weight: bold;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); display: flex; align-items: center; gap: 10px;
    transform: translateX(120%); opacity: 0; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.wpshare247-toast-msg.show { transform: translateX(0); opacity: 1; }

/* ==========================================================================
   5. TRANG CHÍNH SÁCH - LƯỚI NỔI 3D
   ========================================================================== */
.wpshare247-lively-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; padding: 20px 0; }
.wpshare247-lively-card { background: #fff; border-radius: 20px; padding: 40px 30px; position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 1px solid #f1f5f9; z-index: 1; }
.wpshare247-lively-card:hover { transform: translateY(-15px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); }
.wpshare247-lively-bg-icon { position: absolute; right: -20px; bottom: -20px; font-size: 150px; opacity: 0.03; z-index: -1; transition: transform 0.6s ease; }
.wpshare247-lively-card:hover .wpshare247-lively-bg-icon { transform: scale(1.2) rotate(-15deg); }
.wpshare247-lively-icon-box { width: 70px; height: 70px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; margin-bottom: 25px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.wpshare247-bg-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3); }
.wpshare247-bg-green { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); }
.wpshare247-bg-orange { background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3); }
.wpshare247-bg-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3); }
.wpshare247-bg-teal { background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 10px 20px rgba(20, 184, 166, 0.3); }
.wpshare247-bg-rose { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3); }
.wpshare247-lively-card h3 { font-size: 1.5rem; color: var(--wpshare247-text-main); margin-bottom: 15px; font-weight: 800; }
.wpshare247-lively-card ul { list-style: none; padding: 0; margin: 0; }
.wpshare247-lively-card ul li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--wpshare247-text-muted); font-size: 1.05rem; line-height: 1.5; }
.wpshare247-lively-card ul li i { position: absolute; left: 0; top: 4px; font-size: 1.1rem; }
.wpshare247-lively-note { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #e2e8f0; font-size: 0.9rem; color: #ef4444; font-style: italic; }

/* ==========================================================================
   6. WOOCOMMERCE SINGLE PRODUCT (FORM CART & BUTTONS)
   ========================================================================== */
.wpshare247-single-cart-wrap form.cart {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 0;
}
.wpshare247-single-cart-wrap form.cart .quantity {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.wpshare247-single-cart-wrap form.cart .quantity input.qty {
    width: 70px;
    height: 48px;
    padding: 0 10px;
    text-align: center;
    border: 1px solid var(--wpshare247-border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wpshare247-text-main);
    background: #ffffff;
    outline: none;
    transition: border-color 0.3s;
}
.wpshare247-single-cart-wrap form.cart .quantity input.qty:focus {
    border-color: var(--wpshare247-color-primary);
}
.wpshare247-single-cart-wrap form.cart button.single_add_to_cart_button {
    background: var(--wpshare247-color-accent) !important;
    color: #ffffff !important;
    padding: 14px 36px !important;
    font-family: var(--wpshare247-font-heading) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border-radius: 50px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3) !important;
    transition: all 0.3s ease !important;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}
.wpshare247-single-cart-wrap form.cart button.single_add_to_cart_button:hover {
    background: var(--wpshare247-color-accent-hover) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5) !important;
}

/* ==========================================================================
   7. WOOCOMMERCE CART (GIỎ HÀNG THẬT & EMPTY CART FIX FONT)
   ========================================================================== */
.woocommerce-cart table.shop_table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--wpshare247-border-color);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    margin-bottom: 30px;
}
.woocommerce-cart table.shop_table th {
    background: #f8fafc;
    padding: 15px 20px;
    font-family: var(--wpshare247-font-heading);
    font-weight: 700;
    color: var(--wpshare247-color-primary-dark);
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--wpshare247-border-color);
}
.woocommerce-cart table.shop_table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.woocommerce-cart table.shop_table td.product-thumbnail img {
    max-width: 80px;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 8px;
}
.woocommerce-cart table.shop_table td.product-name a {
    font-weight: 700;
    color: var(--wpshare247-text-main);
}
.woocommerce-cart table.shop_table td.product-name a:hover {
    color: var(--wpshare247-color-primary);
}
.woocommerce-cart table.shop_table td.product-price,
.woocommerce-cart table.shop_table td.product-subtotal {
    font-weight: 800;
    color: #dc2626;
}
.woocommerce-cart .cart-collaterals {
    display: flex;
    justify-content: flex-end;
}
.woocommerce-cart .cart_totals {
    width: 100%;
    max-width: 450px;
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--wpshare247-border-color);
}
.woocommerce-cart .cart_totals h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--wpshare247-color-primary-dark);
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 12px;
}
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    background: var(--wpshare247-color-accent) !important;
    color: #ffffff !important;
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3) !important;
    transition: all 0.3s ease !important;
}
.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
    background: var(--wpshare247-color-accent-hover) !important;
    transform: translateY(-3px);
}

/* LÀM ĐẸP TRANG GIỎ HÀNG RỖNG (EMPTY CART) - FIX LỖI FONT TRIỆT ĐỂ */
.woocommerce-cart .cart-empty,
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: var(--wpshare247-text-muted);
    font-size: 1.2rem;
    font-weight: 500;
    margin: 40px auto;
    max-width: 800px;
    list-style: none;
}
.woocommerce-cart .cart-empty::before,
.cart-empty::before {
    content: "\f07a";
    font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif;
    font-weight: 900;
    display: block;
    font-size: 3.5rem;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1;
}
.woocommerce-cart .return-to-shop,
.return-to-shop {
    text-align: center;
    margin-bottom: 50px;
}
.woocommerce-cart .return-to-shop .button,
.return-to-shop .button {
    background: var(--wpshare247-color-primary) !important;
    color: #ffffff !important;
    padding: 14px 36px !important;
    border-radius: 50px !important;
    text-transform: uppercase;
    font-weight: 700;
    font-family: var(--wpshare247-font-heading);
    border: none !important;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3) !important;
    transition: all 0.3s ease;
    display: inline-block;
}
.woocommerce-cart .return-to-shop .button:hover,
.return-to-shop .button:hover {
    background: var(--wpshare247-color-primary-dark) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.4) !important;
}

/* ==========================================================================
   7B. WOOCOMMERCE GUTENBERG EMPTY CART & BLOCKS FIX (TRIỆT TIÊU KHỐI ĐEN)
   ========================================================================== */
.wc-block-cart__empty-cart-wrapper,
.wp-block-woocommerce-empty-cart-block,
.wp-block-woocommerce-cart {
    text-align: center;
    padding: 20px 0;
}
.wc-block-cart__empty-cart-title,
.wp-block-woocommerce-empty-cart-block h2 {
    font-size: 1.6rem !important;
    color: var(--wpshare247-color-primary-dark) !important;
    margin: 20px 0 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
}
.wc-block-cart__empty-cart-wrapper svg.wc-block-cart__empty-cart-icon,
.wp-block-woocommerce-empty-cart-block svg {
    width: 75px !important;
    height: 75px !important;
    margin: 0 auto 15px !important;
    display: block !important;
}
.wc-block-cart__empty-cart-wrapper .wc-block-grid__products,
.wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 25px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 30px 0 0 0 !important;
}
.wc-block-grid__product {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}
.wc-block-grid__product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 25px rgba(0,0,0,0.08) !important;
    border-color: var(--wpshare247-color-primary) !important;
}
.wc-block-grid__product-image,
.wc-block-grid__product-image img,
.wc-block-grid__product-link img {
    max-height: 160px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    margin: 0 auto 15px !important;
    display: block !important;
}
.wc-block-grid__product-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--wpshare247-text-main) !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
}
.wc-block-grid__product-price {
    margin-bottom: 15px !important;
    font-size: 1.15rem !important;
    color: #dc2626 !important;
    font-weight: 800 !important;
}
/* TRIỆT TIÊU KHỐI ĐEN KÉO DÀI CỦA NÚT ADD TO CART */
.wc-block-grid__product-add-to-cart,
.wc-block-components-product-button,
.wp-block-button.wc-block-components-product-button,
.wc-block-grid__product-add-to-cart.wp-block-button {
    width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: auto !important;
    padding: 0 !important;
}
.wc-block-grid__product-add-to-cart .wp-block-button__link,
.wc-block-components-product-button__button,
.wp-block-button__link.wc-block-components-product-button__button,
.wc-block-cart__empty-cart-wrapper button.wp-block-button__link,
.wc-block-grid__product button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 130px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 8px 24px !important;
    background: var(--wpshare247-color-accent) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    font-family: var(--wpshare247-font-heading) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}
.wc-block-grid__product-add-to-cart .wp-block-button__link:hover,
.wc-block-components-product-button__button:hover,
.wc-block-grid__product button:hover {
    background: var(--wpshare247-color-accent-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4) !important;
}

/* ==========================================================================
   8. WOOCOMMERCE MY ACCOUNT (TRANG TÀI KHOẢN THẬT)
   ========================================================================== */
.woocommerce-account .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}
.woocommerce-MyAccount-navigation {
    flex: 0 0 250px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid #e2e8f0;
}
.woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}
.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 15px 20px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
    background-color: var(--wpshare247-color-accent);
    color: #ffffff;
}
.woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
}
@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
        gap: 20px;
    }
    .woocommerce-MyAccount-navigation {
        flex: 100%;
        width: 100%;
    }
}
/* ====================================================
   LƯỚI SẢN PHẨM BÁN CHẠY (TÙY CHỈNH ACF CỘT) - FIXED
==================================================== */
ul.tbay-bestseller-grid {
    display: grid !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ẩn các class ảo (pseudo) mặc định của Woo làm hỏng lưới */
ul.tbay-bestseller-grid::before,
ul.tbay-bestseller-grid::after {
    display: none !important;
}

/* Ép thẻ li của WooCommerce từ Float/Width % sang Grid Item */
.woocommerce ul.tbay-bestseller-grid li.product,
ul.tbay-bestseller-grid li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    clear: none !important;
}

/* Xử lý số cột tương ứng với class động từ PHP */
ul.tbay-bestseller-grid.col-3 { grid-template-columns: repeat(3, 1fr) !important; }
ul.tbay-bestseller-grid.col-4 { grid-template-columns: repeat(4, 1fr) !important; }
ul.tbay-bestseller-grid.col-5 { grid-template-columns: repeat(5, 1fr) !important; }

/* Responsive: Thu nhỏ màn hình tự động giảm cột */
@media (max-width: 1024px) {
    ul.tbay-bestseller-grid[class*="col-"] { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
    ul.tbay-bestseller-grid[class*="col-"] { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
}