/* استایل‌های محصولات ناموجود در پکیج */
.package-product-item.out-of-stock {
    opacity: 0.7;
    position: relative;
}

.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.package-availability {
    margin-top: 15px;
    padding: 15px;
    background: #e9ecef;
    border-radius: 8px;
    border-right: 4px solid #28a745;
}

.package-availability p {
    margin: 5px 0;
    font-size: 14px;
}

.package-availability-notice {
    color: #856404;
    background: #fff3cd;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
    font-size: 13px;
}



/* استایل‌های متمایز کردن محصولات پکیج در سبد خرید */
.wd-package-item {
    border-right: 3px solid #28a745 !important;
}


.wd-package-item-first {
    border-top: 5px solid #e9ecef !important;
}
.wd-package-item-last {
    border-bottom: 5px solid #e9ecef !important;
}

.wd-package-icon-tooltip {
    position: relative !important;
    display: inline-flex !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
    cursor: help !important;
}

.wd-package-icon {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}

.wd-package-icon-tooltip:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.package-quantity-fixed {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

.remove-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* استایل‌های گرید محصولات پکیج */
.package-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.package-product-item {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
}

.package-product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.package-product-item h3 {
    font-size: 16px;
    margin: 10px 0;
    line-height: 1.4;
}

.package-product-item h3 a {
    text-decoration: none;
    color: #333;
}

.package-product-item h3 a:hover {
    color: #0073aa;
}

.package-product-price {
    font-weight: bold;
    color: #28a745;
    font-size: 14px;
}

/* استایل‌های بخش قیمت‌گذاری پکیج */
.package-pricing {
    text-align: center;
    margin: 30px 0;
    padding: 25px 20px;
    background: #ffffff;
    border-radius: 10px;
    border: 2px dashed #47b9c4;
    max-width: 500px;
    margin-right: auto;
    margin-left: auto;
}

.package-pricing h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

.package-pricing-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.package-regular-price {
    text-decoration: line-through;
    color: #000;
    font-size: 20px;
    font-weight: 500;
}

.package-discounted-price {
    color: #28a745;
    font-size: 28px;
    font-weight: bold;
}

.package-price {
    color: #333;
    font-size: 28px;
    font-weight: bold;
}

.package-discount-badge {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
}

.package-saving-amount {
    color: #dc3545;
    font-size: 16px;
    font-weight: bold;
}

/* استایل‌های بخش دکمه و پیام */
.package-add-to-cart-container {
    text-align: center;
    margin-top: 20px;
}

.add-package-to-cart {
    padding: 15px 35px !important;
    background: #296c72 !important;
    color: #fff !important;
    border-radius: 50px !important;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 250px;
}

.add-package-to-cart:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.add-package-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.add-package-to-cart.loading {
    position: relative;
    color: transparent;
}

.add-package-to-cart.loading::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: package-spin 1s linear infinite;
}

.package-cart-message {
    margin-top: 15px;
}

.package-cart-message .success {
    color: #155724;
    padding: 12px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    display: block;
    font-weight: 500;
}

.package-cart-message .error {
    color: #721c24;
    padding: 12px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    display: block;
    font-weight: 500;
}

.package-remove-message {
    margin: 10px 0;
}

/* انیمیشن‌ها */
@keyframes package-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .package-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .package-pricing-content {
        gap: 15px;
        flex-direction: column;
    }
    
    .package-regular-price {
        font-size: 18px;
    }
    
    .package-discounted-price,
    .package-price {
        font-size: 24px;
    }
    
    .package-discount-badge {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .add-package-to-cart {
        padding: 12px 25px;
        font-size: 16px;
        min-width: 200px;
    }
    
    .wd-package-icon-tooltip:hover::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .package-products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .package-product-item {
        padding: 10px;
    }
    
    .package-product-item h3 {
        font-size: 14px;
    }
    
    .package-pricing {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .package-pricing h3 {
        font-size: 18px;
    }
}
.package-regular-price .woocommerce-Price-amount.amount {
    color: #947c7c;
}

.cart-widget-side img.wd-package-icon {
    min-width: 20px !important;
    margin: 0px !important;
}

/* استایل‌های مخصوص نمایش پکیج پیشنهادی در صفحه محصول */
.related-suggested-package {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.package-suggestion-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.package-suggestion-header h3 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #47b9c4;
}

.package-suggestion-header p {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}