/* 1. Container chính trên máy tính */
    .custom-wc-container {
        max-width: 1280px; 
        width: 100%;
        margin: 20px auto;
        padding: 0 15px;
        font-family: Inter, sans-serif;
        box-sizing: border-box;
    }

    /* 2. Style cho Breadcrumb (Đường dẫn trang) */
    .woocommerce-breadcrumb {
        font-size: 14px;
        color: #666;
        margin-bottom: 15px;
        padding: 0;
        background: transparent;
    }
    .woocommerce-breadcrumb a {
        color: #0066cc;
        text-decoration: none;
    }
    .woocommerce-breadcrumb a:hover {
        text-decoration: underline;
    }

    /* 3. Cấu trúc lưới sản phẩm chính */
    .custom-single-product-wrap {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .product-top-section {
        display: grid;
        grid-template-columns: 45% 55%;
        gap: 30px;
        background: #fff;
        padding: 25px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.03);
        box-sizing: border-box;
    }

    /* Hình ảnh sản phẩm */
    .product-gallery-col .woocommerce-product-gallery {
        width: 100% !important; 
        max-width: 100% !important;
        float: none !important;
    }
    .product-gallery-col .woocommerce-product-gallery__image img {
        width: 100% !important;
        height: auto !important;
        border-radius: 8px;
    }

    /* Thông tin và tiêu đề sản phẩm chính */
    .product-summary-col .product_title {
        font-size: 24px !important;
        line-height: 1.35;
        font-weight: 700;
        margin-top: 0;
        margin-bottom: 12px;
        color: #112950; 
    }

    .product-summary-col .price {
        color: #d71920 !important; 
        font-size: 22px !important;
        font-weight: bold;
        margin-bottom: 15px;
    }

    /* 4. Ô SỐ LƯỢNG & NÚT ĐẶT HÀNG */
    .product-summary-col form.cart {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 20px;
    }

    .product-summary-col div.quantity {
        display: inline-flex;
        border: 1px solid #dcdcdc;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
        height: 46px;
    }
    .product-summary-col div.quantity input.qty {
        width: 45px !important;
        height: 100% !important;
        border: none !important;
        text-align: center;
        font-size: 16px;
        font-weight: 600;
        outline: none;
        box-shadow: none !important;
        background: transparent !important;
    }
    .product-summary-col div.quantity input.qty::-webkit-inner-spin-button,
    .product-summary-col div.quantity input.qty::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .product-summary-col button.single_add_to_cart_button {
        background-color: #0056b3 !important; 
        color: #fff !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 0 24px !important;
        height: 46px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        transition: background 0.2s ease;
        flex-grow: 1;
        box-shadow: none !important;
    }
    .product-summary-col button.single_add_to_cart_button:hover {
        background-color: #004085 !important; 
    }

    /* 5. KHỐI TABS MÔ TẢ & KHỐI LIÊN KẾT 2 CHIỀU ĐỘC LẬP */
    .product-tabs-col {
        background: #fff;
        padding: 25px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.03);
        box-sizing: border-box;
    }

    /* CSS Tùy chỉnh riêng cho Khối Liên kết 2 chiều tự động */
    .dst-relations-box {
        background: #fff;
        padding: 25px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.03);
        box-sizing: border-box;
        margin-top: 20px;
    }

    .dst-relations-box h2,
    .dst-relations-box h3,
    .dst-relations-box .dst-title {
        font-size: 20px !important;
        font-weight: 700 !important;
        color: #112950 !important;
        margin-top: 0 !important;
        margin-bottom: 15px !important;
        border-bottom: 2px solid #0056b3;
        padding-bottom: 8px;
        display: inline-block;
    }

    .dst-relations-box ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 12px;
    }

    .dst-relations-box ul li a {
        display: flex;
        align-items: center;
        padding: 10px 14px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        color: #0056b3;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        transition: all 0.2s ease;
    }

    .dst-relations-box ul li a:hover {
        background: #0056b3;
        color: #ffffff;
        border-color: #0056b3;
        transform: translateY(-2px);
    }

    /* 6. SẢN PHẨM TƯƠNG TỰ (RELATED PRODUCTS) */
    .related.products, 
    .upsells.products {
        background: #fff;
        margin-top: 20px;
        padding: 20px 15px;
        border-radius: 12px;
    }
    .related.products > h2, 
    .upsells.products > h2 {
        font-size: 20px !important;
        font-weight: 700;
        color: #112950;
        margin-bottom: 15px;
    }
    
    .related.products ul.products, 
    .upsells.products ul.products {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 15px !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .related.products ul.products li.product, 
    .upsells.products ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
        background: #fafafa;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: auto !important;
    }
    
    .related.products ul.products li.product img,
    .upsells.products ul.products li.product img {
        border-radius: 6px;
        margin-bottom: 10px;
    }

    .related.products ul.products li.product .woocommerce-loop-product__title,
    .upsells.products ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
        font-weight: 600;
        color: #333;
        line-height: 1.35;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
        margin-bottom: 10px !important;
    }

    .related.products ul.products li.product .price,
    .upsells.products ul.products li.product .price {
        color: #d71920 !important;
        font-size: 15px !important;
        font-weight: bold;
        margin-top: auto;
    }

    /* 7. RESPONSIVE MOBILE */
    @media (max-width: 768px) {
        body.single-product .site-content,
        body.single-product .content-container,
        .custom-wc-container {
            width: 100vw !important;
            max-width: 100vw !important;
            margin-left: calc(-50vw + 50%) !important;
            margin-right: calc(-50vw + 50%) !important;
            padding-left: 4px !important;
            padding-right: 4px !important;
            box-sizing: border-box !important;
        }

        .product-top-section {
            grid-template-columns: 1fr !important;
            padding: 8px !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            border: none !important;
            background: #fff;
        }

        .product-tabs-col,
        .dst-relations-box {
            border-radius: 0 !important;
            padding: 12px 8px !important;
            box-shadow: none !important;
            border: none !important;
            background: #fff;
        }

        .dst-relations-box ul {
            grid-template-columns: 1fr;
        }

        .product-summary-col .product_title {
            font-size: 20px !important;
        }
        .product-summary-col .price {
            font-size: 20px !important;
        }

        .related.products ul.products, 
        .upsells.products ul.products {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 8px !important;
        }
        .related.products, 
        .upsells.products {
            border-radius: 0 !important;
            padding: 12px 6px !important;
        }
    }

.qty-btn {
        background: #f1f3f5;
        border: none;
        width: 36px;
        height: 100%;
        font-size: 16px;
        font-weight: bold;
        color: #333;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }
    .qty-btn:hover {
        background: #e2e6ea;
    }

#sticky-add-to-cart-bar {
                position: fixed;
                bottom: -100px;
                left: 0;
                width: 100%;
                background: #ffffff;
                box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
                z-index: 999;
                padding: 10px 15px;
                box-sizing: border-box;
                transition: bottom 0.3s ease-in-out;
            }
            #sticky-add-to-cart-bar.active {
                bottom: 0;
            }
            .sticky-container {
                max-width: 1280px;
                margin: 0 auto;
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 15px;
            }
            .sticky-product-info {
                display: flex;
                align-items: center;
                gap: 12px;
            }
            .sticky-product-info img {
                width: 45px;
                height: 45px;
                object-fit: cover;
                border-radius: 6px;
                border: 1px solid #eee;
            }
            .sticky-details {
                display: flex;
                flex-direction: column;
            }
            .sticky-title {
                font-size: 14px;
                font-weight: 600;
                color: #333;
                max-width: 350px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            .sticky-price .price {
                font-size: 14px;
                color: #d71920 !important;
                font-weight: bold;
                margin: 0;
            }
            .sticky-actions form.cart {
                display: flex;
                align-items: center;
                gap: 10px;
                margin: 0 !important;
            }
            #sticky-add-to-cart-bar div.quantity {
                height: 40px;
                display: flex;
                border: 1px solid #dcdcdc;
                border-radius: 6px;
                overflow: hidden;
            }
            #sticky-add-to-cart-bar div.quantity input.qty {
                width: 40px !important;
                height: 100% !important;
                border: none !important;
                text-align: center;
                font-size: 14px;
            }
            #sticky-add-to-cart-bar button.single_add_to_cart_button {
                background-color: #0056b3 !important;
                color: #fff !important;
                border: none !important;
                border-radius: 6px !important;
                padding: 0 20px !important;
                height: 40px !important;
                font-size: 14px !important;
                font-weight: 700 !important;
                cursor: pointer;
            }
            #sticky-add-to-cart-bar button.single_add_to_cart_button:hover {
                background-color: #004085 !important;
            }

            @media (max-width: 768px) {
                .sticky-title {
                    display: none;
                }
                .sticky-container {
                    justify-content: space-between;
                }
                #sticky-add-to-cart-bar button.single_add_to_cart_button {
                    padding: 0 12px !important;
                    font-size: 13px !important;
                }
            }
