/* تنسيقات سلايدر المنتج في الصفحة الرئيسية */
.product-slider {
    position: relative;
    width: 100%;
    height: 250px;
}

.product-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-slide.active {
    opacity: 1;
    z-index: 1;
}

.product-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-prev, .product-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 12px;
}

.product-prev {
    right: 10px;
}

.product-next {
    left: 10px;
}

/* تنسيقات الألوان والمقاسات */
.product-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0;
}


.color-with-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.color-dot {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #ccc;
    cursor: pointer;
    position: relative;
}

/* دعم مخصص للنافذة المنبثقة */
.color-dot:hover::after {
    content: attr(title);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}


.color-label {
    color: #333;
    font-size: 13px;
}


.product-sizes {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.size-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #ddd;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .product-slider {
        height: 150px;
    }
    
    .product-prev, .product-next {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }
}

/* إضافة ستايلات السلايدر هنا لتجنب مشاكل التحميل */
.product-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f8f9fa;
}


.product-slide:hover img {
    transform: scale(1.05);
}

.product-prev, .product-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 20px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 12px;
}
.product-prev {
    right: 10px;
    z-index: 11;
}
.product-next {
    left: 10px;
    z-index: 11;
}
.product-sizes {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.size-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #ddd;
}

/* مؤشرات الصور */
.slider-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.indicator.active {
    background-color: white;
}

/* تحسينات للمنتجات ذات صورة واحدة */
.product-slider-container:not(.has-multiple-images) .slider-prev,
.product-slider-container:not(.has-multiple-images) .slider-next,
.product-slider-container:not(.has-multiple-images) .slider-indicators {
    display: none;
}

/* تحسينات للهواتف */
@media (max-width: 768px) {
    .product-slider {
        height: 200px;
    }

    .slider-prev,
    .slider-next {
        width: 25px;
        height: 25px;
    }

    .indicator {
        width: 6px;
        height: 6px;
    }
}
