

/* لتنسيق Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background-color: #2e7d32;
    /* أخضر افتراضي */
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 15px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInOut 4s forwards;
    direction: rtl;
}

.toast.error {
    background-color: #c62828;
    /* أحمر */
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}


/* صندوق التقييمات */
.product-reviews {
    margin-top: 40px;
    padding: 25px;
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}

/* عنوان التقييمات */
.product-reviews h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: var(--secondary-color);
}

/* كل تقييم */
.product-reviews .review {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}

.product-reviews .review:last-child {
    border-bottom: none;
}

.product-reviews .review strong {
    color: var(--primary-color);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.product-reviews .rating {
    color: #ffc107;
    /* لون النجوم */
    margin-bottom: 8px;
}

/* نص التعليق */
.product-reviews .review p {
    margin: 0 0 5px;
}

/* تاريخ التعليق */
.product-reviews .review small {
    color: #888;
    font-size: 12px;
}

.submit-review {
    margin-top: 30px;
    padding: 25px;
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}

.submit-review h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.submit-review form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.submit-review select,
.submit-review textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    resize: vertical;
}

.submit-review button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-review button:hover {
    background-color: #d43b7b;
    /* لون أغمق */
}

/* النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-edit {
    background-color: var(--secondary-color);
    color: white;
}

.btn-edit:hover {
    background-color: #555;
}

.btn-delete {
    background-color: rgba(179, 0, 0, 0.6);
    color: white;
}

.btn-delete:hover {
    background-color: #b30000;
}

.alert {
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
    font-size: 15px;
}

.alert.success {
    background-color: #e6f9e6;
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

.alert.error {
    background-color: #fdecea;
    color: #c62828;
    border: 1px solid #c62828;
}

.reviews-scroll {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    background-color: #fafafa;
}

/* زر اضهار واخفاء التعليقات الزائده */
.hidden-review {
    display: none;
}

.btn-show-more {
    padding: 8px 20px;
    background-color: var(--primary-color, #e91e63);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-show-more:hover {
    background-color: #d81b60;
}

/* لإخفاء الرسالة تم التعديل بعد 4 ثوانٍ بشكل سموث */
.alert {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.alert.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.color-options {
    margin-top: 20px;
}

.color-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
    color: #444;
}

.color-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-btn {
    padding: 8px 18px;
    border: 2px solid #e91e63;
    background-color: white;
    color: #e91e63;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.color-btn:hover,
.color-btn.active {
    background-color: #e91e63;
    color: white;
}

.thumbnail.active {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

.color-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* تنسيقات المقاسات */
.product-sizes {
    margin-top: 15px;
    font-weight: bold;
}

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

.size-box {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f5f5f5;
    font-size: 14px;
}

/* --------- */
.thumbnail {
    position: relative;
    cursor: pointer;
    margin: 5px;
    border: 2px solid transparent;
}

.thumbnail.active {
    border-color: #ff6b6b;
}

.thumbnail-sizes {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    padding: 3px;
    background: rgba(0,0,0,0.5);
}

.size-badge {
    background: #fff;
    color: #333;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* تنسيقات ازرار اختيار المقاس */
/* أضف هذا في ملف CSS الخاص بك */
.product-sizes select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.thumbnail {
    cursor: pointer;
    transition: all 0.3s;
}

.thumbnail.active {
    border: 2px solid #ff6b6b;
}

.color-btn.active {
    background-color: #ff6b6b;
    color: white;
}

/* أضف هذا لملف CSS الخاص بك */
.btn-outline-primary {
    border: 1px solid #007bff;
    color: #007bff;
    background: transparent;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

.fa-spinner {
    margin-right: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* تنسيقات اختيار المقاسات */
.product-sizes {
    margin: 20px 0;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.size-option {
    position: relative;
}

.size-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.size-option label {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.size-option input[type="radio"]:checked + label {
    border-color: #ff6b8b;
    background-color: #ff6b8b;
    color: white;
}

.size-option input[type="radio"]:disabled + label {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.7;
}

.size-option input[type="radio"]:not(:disabled):hover + label {
    border-color: #ff6b8b;
}

.size-guide-link {
    margin-top: 10px;
}

.size-guide-link a {
    color: #ff6b8b;
    font-size: 14px;
    text-decoration: underline;
}

.size-loading {
    padding: 10px;
    color: #6c757d;
    font-style: italic;
}

/* مودال دليل المقاسات */
.size-guide-modal img {
    max-width: 100%;
    height: auto;
}