/*
Theme Name: Điện nước sĩ
Author: Khang web
Version: 1.0.0
Text Domain: https://khangweb.io.vn
*/

/* Ẩn bớt nút và dòng tổng phụ thừa của WooCommerce mặc định */
.widget_shopping_cart_content .woocommerce-mini-cart__total,
.widget_shopping_cart_content .woocommerce-mini-cart__buttons {
    display: none !important;
}

/* Thông báo khi giỏ hàng trống */
.widget_shopping_cart_content .woocommerce-mini-cart__empty-message {
    text-align: center !important;
    padding: 32px 16px !important;
    color: #6b7280 !important;
    font-size: 14px !important;
}
/* Ẩn link "Xem giỏ hàng" mặc định của WooCommerce chèn sau khi click AJAX */
.add_to_cart_button + a.added_to_cart,
a.added_to_cart {
    display: none !important;
}
/* Fix hiển thị biến thể WooCommerce thành dạng inline gọn gàng */
.divide-y dl.variation {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
    margin: 2px 0 !important;
}

.divide-y dl.variation dt,
.divide-y dl.variation dd {
    display: inline-flex !important;
    align-items: center !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    color: #6b7280 !important;
}

.divide-y dl.variation dt {
    font-weight: 600 !important;
}

.divide-y dl.variation dd {
    margin-right: 8px !important;
}

/* Xóa margin mặc định của thẻ <p> bên trong <dd> */
.divide-y dl.variation dd p {
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
}
/* Trạng thái đang Loading */
.btn-add-to-cart-custom.loading {
    opacity: 0.85;
    pointer-events: none;
}
.btn-add-to-cart-custom.loading .btn-icon {
    display: none !important;
}
.btn-add-to-cart-custom.loading .btn-spinner {
    display: inline-block !important;
}

/* Trạng thái đã Thêm thành công (Added) */
.btn-add-to-cart-custom.added .btn-icon,
.btn-add-to-cart-custom.added .btn-spinner {
    display: none !important;
}
.btn-add-to-cart-custom.added .btn-check {
    display: inline-block !important;
}

/* Ẩn dấu checkmark mặc định của WooCommerce nếu không muốn bị đúp */
.btn-add-to-cart-custom + .added_to_cart {
    display: none !important;
}