/* تصميم المنتجات النافدة */

/* تعديل الكارت للمنتجات النافدة - إضافة مساحة للزر */
.product-card[data-stock="out"] .product-info {
    padding-bottom: 60px;
}

/* Badge نفد من المخزون */
.product-badge.out-of-stock {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(220, 38, 38, 0.6);
    }
}

/* زر إضافة للسلة المعطل */
.add-to-cart.out-of-stock {
    background: linear-gradient(135deg, #78716c, #57534e) !important;
    color: white !important;
    cursor: not-allowed !important;
    opacity: 0.9 !important;
    position: relative;
    overflow: hidden;
}

.add-to-cart.out-of-stock::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.add-to-cart.out-of-stock:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* زر أعلمني عند التوفر */
.notify-me-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    z-index: 3;
}

.notify-me-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.notify-me-btn i {
    animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

/* تعديل الكارت للمنتجات النافدة */
.product-card[data-stock="out"] {
    position: relative;
}

.product-card[data-stock="out"] .product-image {
    opacity: 0.6;
    filter: grayscale(20%);
    transition: all 0.3s ease;
}

.product-card[data-stock="out"]:hover .product-image {
    opacity: 0.7;
}

/* نافذة الإشعار المنبثقة */
.notify-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.notify-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.notify-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notify-modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6b7280;
    font-size: 18px;
}

.notify-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
    transform: rotate(90deg);
}

.notify-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 36px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.notify-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    text-align: center;
    margin-bottom: 10px;
}

.notify-modal-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 25px;
}

.notify-modal-product {
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notify-modal-product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.notify-modal-product-name {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.notify-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notify-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.notify-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.notify-submit {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.notify-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.notify-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* رسالة النجاح */
.notify-success {
    display: none;
    text-align: center;
    padding: 20px;
}

.notify-success.active {
    display: block;
}

.notify-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 36px;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.notify-success-title {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
}

.notify-success-message {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .notify-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .notify-modal-title {
        font-size: 20px;
    }
    
    .notify-me-btn {
        font-size: 12px;
        padding: 8px;
    }
    
    .product-card[data-stock="out"] .product-footer {
        padding-bottom: 60px;
    }
}
