/**
 * استایل‌های دکمه خرید سریع
 */

/* استایل پایه */
.buy-now-button {
    background: #28a745 !important;
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
}

.buy-now-button:hover {
    background: #218838 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    color: white !important;
}

.buy-now-button:active {
    transform: translateY(0);
}

.buy-now-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

/* حالت لودینگ */
.buy-now-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.buy-now-button .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* استایل‌های رنگی مختلف */
.buy-now-button.success {
    background: #4caf50 !important;
}

.buy-now-button.success:hover {
    background: #45a049 !important;
}

.buy-now-button.danger {
    background: #f44336 !important;
}

.buy-now-button.danger:hover {
    background: #da190b !important;
}

.buy-now-button.warning {
    background: #ff9800 !important;
}

.buy-now-button.warning:hover {
    background: #e68900 !important;
}

.buy-now-button.info {
    background: #2196f3 !important;
}

.buy-now-button.info:hover {
    background: #0b7dda !important;
}

.buy-now-button.purple {
    background: #9c27b0 !important;
}

.buy-now-button.purple:hover {
    background: #7b1fa2 !important;
}

/* سایز‌های مختلف */
.buy-now-button.small {
    padding: 8px 16px;
    font-size: 13px;
}

.buy-now-button.large {
    padding: 16px 32px;
    font-size: 17px;
}

.buy-now-button.full-width {
    width: 100%;
    display: block;
}

/* استایل گرادیانت */
.buy-now-button.gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.buy-now-button.gradient:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.buy-now-button.gradient-fire {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.buy-now-button.gradient-fire:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%) !important;
}

.buy-now-button.gradient-ocean {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.buy-now-button.gradient-ocean:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%) !important;
}

/* انیمیشن‌ها */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.buy-now-button.pulse {
    animation: pulse 2s infinite;
}

.buy-now-button.pulse:hover {
    animation: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.buy-now-button.shake:hover {
    animation: shake 0.5s;
}

/* استایل دکمه شناور */
.floating-buy-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    transition: all 0.3s ease;
}

.floating-buy-button .buy-now-button {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    padding: 15px 30px;
}

.floating-buy-button:hover {
    transform: translateY(-5px);
}

/* استایل دکمه در لیست محصولات */
.woocommerce ul.products li.product .buy-now-button {
    margin-top: 10px;
    width: 100%;
}

/* استایل دکمه در صفحه محصول */
.single-product .buy-now-button {
    margin-top: 15px;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .buy-now-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .buy-now-button.large {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .floating-buy-button {
        bottom: 10px;
        left: 10px;
    }
    
    .floating-buy-button .buy-now-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* سازگاری با تم‌های مختلف */
.woocommerce .buy-now-button,
.woocommerce-page .buy-now-button {
    display: inline-block;
}

/* استایل آیکون */
.buy-now-button i {
    margin-left: 8px;
}

.buy-now-button svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-left: 8px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .buy-now-button {
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }
}

/* استایل برای حالت غیرفعال */
.buy-now-button:disabled,
.buy-now-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* جلوگیری از انتخاب متن */
.buy-now-button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
