﻿

/* تنسيق الصورة الرئيسية */
.main-photo-container img {
    width: 100%;
    height: 400px; /* تثبيت ارتفاع الحاوية */
    max-width: 400px; /* تثبيت العرض الأقصى */
    object-fit: contain; /* لضمان عرض الصورة بالكامل */
    background: transparent; /* خلفية شفافة */
    border: none; /* إزالة الإطار */
    border-radius: 0; /* إزالة الزوايا المستديرة */
    display: block; /* محاذاة الصورة داخل الحاوية */
    margin: auto; /* مركزية الصورة داخل الحاوية */
}

/* تنسيق الصور المصغرة */
.additional-images img {
    width: 70px; /* تثبيت العرض */
    height: 70px; /* تثبيت الارتفاع */
    object-fit: contain; /* لضمان ظهور الصورة بالكامل */
    margin: 5px; /* مسافة بين الصور */
    border: 1px solid #ddd; /* إطار خفيف */
    border-radius: 5px; /* زوايا مستديرة */
    background: transparent; /* خلفية شفافة */
    transition: border-color 0.3s ease, transform 0.2s ease; /* تأثير عند التمرير */
}

    .additional-images img:hover {
        border-color: #007bff; /* تغيير لون الإطار عند التمرير */
        transform: scale(1.05); /* تكبير خفيف عند التمرير */
    }

/* تحسين العرض على الهواتف */
@media (max-width: 768px) {
    .main-photo-container img {
        height: 250px; /* تقليل الارتفاع ليتناسب مع الهواتف */
        max-width: 100%; /* ملء العرض بالكامل على الأجهزة الصغيرة */
    }

    .additional-images img {
        width: 50px; /* تقليل حجم الصور المصغرة */
        height: 50px; /* تقليل ارتفاع الصور المصغرة */
        margin: 3px; /* تقليل المسافة بين الصور */
    }
}



.product-page .product-details h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.product-page .product-details .price {
    font-size: 22px;
    color:forestgreen;
    margin-bottom: 15px;
}

/* تنسيق حاوية الوصف */
/* حاوية النص */
.product-description-container {
    background-color: orange;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 15px;
    font-family: 'Cairo', sans-serif;
    font-size: 17px;
    line-height: 2;
    color: #222;
    text-align: right !important; /* 🔒 إجباري يمين */
    direction: rtl !important; /* 🔒 إجباري اتجاه عربي */
    unicode-bidi: embed !important; /* تثبيت اتجاه النص حتى لو فيه إنجليزي */
}



/* النصوص المختصرة */
/* وصف مختصر وكامل */
.short-description,
.full-description {
    white-space: pre-wrap;
    direction: rtl;
}
.d-none {
    display: none !important;
}
.product-description-container.expanded .full-description {
    display: block !important;
}

 عند التبديل 
.product-description-container.expanded {
    max-height: none;  عرض النص بالكامل 
}

/* زر عرض المزيد */
.toggle-description {
    font-size: 15px;
    color: #007bff;
    font-weight: bold;
    margin-top: 10px;
    padding: 0;
    border: none;
    background: none;
}

    .toggle-description:hover {
        color: #0056b3;
        text-decoration: underline;
    }


.product-page .product-details .btn-link {
    font-size: 14px;
    color: #3498db;
    text-decoration: underline;
    cursor: pointer;
}

.similar-products .card {
    margin-bottom: 15px;
}

.similar-products .card-img-top {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 10px;
}

    .similar-products .product-card img {
        width: 100%;
        height: 150px;
        object-fit: contain;
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .similar-products .product-card:hover {
        transform: scale(1.05);
    }
.main-photo {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
}

.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin: 5px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.size-btn, .color-btn {
    min-width: 80px;
    margin: 5px;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

    .size-btn.selected, .color-btn.selected {
        background-color: #007bff; /* لون مميز */
        color: white; /* نص أبيض */
        border: 1px solid #0056b3; /* حدود */
    }

    .size-btn.disabled, .color-btn.disabled {
        background-color: #ddd;
        cursor: not-allowed;
        color: #999;
    }









/* شبكة المنتجات المشابهة */
.similar-products .modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* شبكة تناسب كل الأجهزة */
    gap: 15px;
    padding: 15px;
    justify-content: center;
}

/* تصميم البطاقات للمنتجات المشابهة */
.similar-products .modern-grid-item {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 250px; /* تثبيت عرض البطاقة */
    margin: auto;
}

    .similar-products .modern-grid-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    }

/* صورة المنتج */
.similar-products .product-image {
    width: 100%;
    height: 150px; /* تثبيت ارتفاع الصورة */
    overflow: hidden;
    border-bottom: 1px solid #ddd;
}

    .similar-products .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* لضمان ملء الصورة للمنطقة */
    }

/* تفاصيل المنتج */
.similar-products .product-details {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px; /* تخصيص المساحة للنص */
}

.similar-products .product-name {
    margin: 5px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333; /* لون واضح للنص */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.similar-products .product-price {
    font-size: 14px;
    color: #e91e63;
    font-weight: bold;
}

/* زر عرض المنتج */
.similar-products .btn-primary {
    background-color: #007bff;
    color: #fff;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: bold;
    text-transform: capitalize;
    transition: all 0.3s ease;
}

    .similar-products .btn-primary:hover {
        background-color: #0056b3;
    }

/* تحسين العرض على الشاشات الصغيرة */
@media (max-width: 768px) {
    .similar-products .modern-grid {
        grid-template-columns: repeat(2, 1fr); /* بطاقتان في كل صف */
        gap: 10px;
    }

    .similar-products .modern-grid-item {
        max-width: 100%; /* جعل العرض مرناً */
    }

    .similar-products .product-image {
        height: 120px; /* تقليل ارتفاع الصورة */
    }

    .similar-products .product-name {
        font-size: 14px;
    }

    .similar-products .product-price {
        font-size: 12px;
    }
}






/* تحسين عرض السعر */
.product-price {
    font-size: 24px;
    color: forestgreen; /* لون مميز للسعر */
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); /* ظل خفيف للنص */
}

/* تحسين عرض اسم المنتج */
.product-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    text-align: center;
}


.quantity-wrapper {
    display: flex;
    align-items: center; /* محاذاة العناصر عموديًا */
    gap: 10px; /* مسافة بين العناصر */
}

    .quantity-wrapper input {
        flex: 0 0 auto; /* ضمان عرض مدخل الكمية بشكل ثابت */
    }

    .quantity-wrapper button {
        flex: 0 0 auto; /* ضمان عرض الزر بشكل ثابت */
        margin: 0; /* إزالة المسافات الإضافية */
    }
@media (max-width: 768px) {
    .quantity-wrapper {
        flex-direction: column; /* جعل العناصر رأسية */
        align-items: flex-start; /* محاذاة إلى اليسار */
    }

        .quantity-wrapper input,
        .quantity-wrapper button {
            width: 100%; /* توسيع العناصر لتملأ العرض */
        }

        .quantity-wrapper button {
            margin-top: 10px; /* إضافة مسافة بين المدخل والزر */
        }
}


.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 20px;
    list-style: none;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb-item {
    color: #007bff;
    font-weight: bold;
    text-transform: capitalize;
}

    .breadcrumb-item a {
        text-decoration: none;
        color: #007bff;
    }

    .breadcrumb-item.active {
        color: #6c757d;
        font-weight: normal;
    }

.breadcrumb-separator {
    color: #999;
    margin: 0 5px; /* مسافة بين الفاصل والعناصر */
    font-weight: bold;
}

.main-photo-container video {
    width: 100%;
    height: 400px; /* تثبيت ارتفاع الحاوية */
    max-width: 400px; /* تثبيت العرض الأقصى */
    object-fit: contain; /* لضمان عرض الفيديو بالكامل */
    background: transparent; /* خلفية شفافة */
    border: none; /* إزالة الإطار */
    border-radius: 0; /* إزالة الزوايا المستديرة */
    display: block; /* محاذاة الفيديو داخل الحاوية */
    margin: auto; /* مركزية الفيديو داخل الحاوية */
}



.product-description-container {
    font-size: 15px;
    padding: 15px;
}

.toggle-description {
    font-size: 14px;
}

/* تحسين العرض على الهواتف */
@media (max-width: 768px) {
    .main-photo-container video {
        height: 250px; /* تقليل الارتفاع ليتناسب مع الهواتف */
        max-width: 100%; /* ملء العرض بالكامل على الأجهزة الصغيرة */
    }
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 18px;
}

.new-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 22px;
}

.arrow {
    font-size: 18px;
    color: #28a745;
}

/* تحسين للموبايل */
@media (max-width: 768px) {
    .price-wrapper {
        flex-direction: column; /* يصير السعر القديم فوق والجديد تحت */
        align-items: flex-start;
    }

    .arrow {
        display: none; /* نلغي السهم على الموبايل */
    }
}

/* ————— تظبيط الفراغات العامة ————— */
.product-price {
    margin-bottom: 8px !important;
}

.size-options {
    margin-top: 8px;
    margin-bottom: 8px;
}

.color-options {
    margin-top: 8px;
    margin-bottom: 8px;
}

.quantity-form {
    margin-top: 10px;
}
/* بديل عن mt-4 الكبيرة */

/* ————— شارة ضمان ماتركس تحت الزر ————— */
.matrix-note {
    width: auto
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,165,0,.10);
    color: #f57c00;
    font-weight: 700;
    font-size: 14px;
}

.matrix-note-icon {
    width: 64px; /* أكبر وواضحة */
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}

/* ————— صف واحد للكمية + الزر ————— */
.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap; /* حتى على الموبايل يبقون بسطر واحد */
}

.qty-label {
    margin: 0 6px 0 0;
    white-space: nowrap;
    font-weight: 700;
}

.qty-input {
    width: 100px; /* رقم مريح للشاشة الصغيرة */
    min-height: 44px; /* لمس مريح */
    text-align: center;
}

.add-to-cart-btn {
    min-height: 44px;
    padding: 10px 16px;
    font-weight: 700;
    flex: 1; /* ياخذ المتبقي من السطر */
}

/* تصغير خفيف على الشاشات الصغيرة مع بقاءهم بنفس السطر */
@media (max-width: 576px) {
    .qty-input {
        width: 88px;
    }

    .add-to-cart-btn {
        padding: 10px 12px;
        font-size: 14px;
    }

    .matrix-note {
        font-size: 13px;
    }
}
