/* انیمیشن بلبرینگ در حال چرخش */
.bearing-loader {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto;
    flex-shrink: 0;
}

/* اندازه کوچک‌تر برای فضاهای محدود */
.product-image-container .bearing-loader,
.comparison-product-card .bearing-loader,
.wishlist-item .bearing-loader {
    width: 75px;
    height: 75px;
}

.product-image-container .bearing-loader .bearing-ball,
.comparison-product-card .bearing-loader .bearing-ball,
.wishlist-item .bearing-loader .bearing-ball {
    width: 8px;
    height: 8px;
}

.bearing-outer-ring {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: bearing-rotate 4s linear infinite;
}

.bearing-inner-ring {
    width: 60%;
    height: 60%;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: bearing-rotate-reverse 3s linear infinite;
}

.bearing-balls {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    animation: bearing-rotate 4s linear infinite;
}

.bearing-ball {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.6);
}

/* قرار دادن ساچمه‌ها در موقعیت‌های مختلف */
.bearing-ball:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.bearing-ball:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.bearing-ball:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.bearing-ball:nth-child(4) {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.bearing-ball:nth-child(5) {
    top: 15%;
    right: 15%;
    transform: translate(50%, -50%);
}

.bearing-ball:nth-child(6) {
    bottom: 15%;
    right: 15%;
    transform: translate(50%, 50%);
}

.bearing-ball:nth-child(7) {
    bottom: 15%;
    left: 15%;
    transform: translate(-50%, 50%);
}

.bearing-ball:nth-child(8) {
    top: 15%;
    left: 15%;
    transform: translate(-50%, -50%);
}

/* انیمیشن چرخش */
@keyframes bearing-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bearing-rotate-reverse {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

/* استایل برای placeholder محصول */
.default-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    min-height: 200px;
    width: 100%;
    padding: 20px;
    position: relative;
}

/* استایل برای product-image-container */
.product-image-container .default-product-image {
    min-height: 150px;
    padding: 15px;
}

.default-product-image .bearing-loader {
    margin-bottom: 15px;
}

.default-product-image .product-icon-text {
    color: #6c757d;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

/* استایل برای card-img-top-container */
.card-img-top-container .default-product-image {
    min-height: 250px;
    aspect-ratio: 1 / 1;
}

/* استایل برای product-card */
.product-card .default-product-image {
    min-height: 200px;
    aspect-ratio: 1 / 1;
}

/* انیمیشن نرم برای ظاهر شدن */
.default-product-image {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

