.floating-button-wrapper {
    position: fixed;
    z-index: 9999;
    transition: all 0.3s ease;
}

.floating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    background: #ff5722;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    border: none;
    cursor: pointer;
    padding: 0 20px;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 600;
    text-align: center;
}

.floating-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.floating-button i {
    font-size: 1.2em;
}

.button-text {
    white-space: nowrap;
    font-weight: 600;
}

/* Positions */
.floating-button-wrapper.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.floating-button-wrapper.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.floating-button-wrapper.bottom-right {
    bottom: 20px;
    right: 20px;
}

.floating-button-wrapper.bottom-left {
    bottom: 20px;
    left: 20px;
}

.floating-button-wrapper.top-right {
    top: 20px;
    right: 20px;
}

.floating-button-wrapper.top-left {
    top: 20px;
    left: 20px;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 87, 34, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0);
    }
}

/* Responsive Styles */
@media (min-width: 768px) {
    .floating-button {
        min-width: 60px;
        height: 60px;
    }
    
    .floating-button:has(.button-text) {
        padding: 0 25px;
    }
}

@media (max-width: 767px) {
    .floating-button {
        min-width: 50px;
        height: 50px;
    }
    
    .floating-button:has(.button-text) {
        padding: 0 20px;
    }
    
    .floating-button-wrapper.bottom-center,
    .floating-button-wrapper.top-center {
        transform: translateX(-50%);
    }
}

/* Style cho nút chỉ có icon */
.floating-button:not(:has(.button-text)) {
    padding: 0;
    width: 60px;
}

@media (max-width: 767px) {
    .floating-button:not(:has(.button-text)) {
        width: 50px;
    }
}

/* Ẩn nút khi không cần thiết */
.floating-button-wrapper.hidden {
    display: none;
}

/* WooCommerce Product Button Styles */
.floating-product-button-wrapper {
    margin: 20px 0;
    text-align: center;
}

.floating-product-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none !important;
    min-height: auto !important;
}

.floating-product-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.floating-product-button i {
    font-size: 1.1em;
}

/* Đảm bảo nút WooCommerce không bị ảnh hưởng bởi theme */
.woocommerce div.product form.cart .floating-product-button-wrapper {
    float: none;
    clear: both;
}

.woocommerce div.product form.cart .floating-product-button {
    float: none;
    margin: 0;
}