/* صفحة تفاصيل المنتج */
.product-details-page {
    padding: 30px 0;
}

/* شريط التنقل */
.breadcrumb-container {
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
    background-color: transparent;
}

.breadcrumb-item {
    font-size: 14px;
    color: #666;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #e26d00;
    text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item {
    padding-right: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    color: #999;
    content: "/";
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 600;
}

/* معرض الصور */
.product-gallery {
    margin-bottom: 30px;
}

.main-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    text-align: center;
    padding: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 10px;
    width: 100%;
    max-width: 280px;
}

.thumbnail {
    width: 45px;
    height: 45px;
    border-radius: 3px;
    cursor: pointer;
    padding: 1px;
    border: 1px solid #ddd;
    object-fit: contain;
    transition: border-color 0.3s;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: var(--primary-color);
}

/* معلومات المنتج */
.product-info-wrapper {
    padding: 0 15px;
}

.product-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

.product-price-block {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
    flex-wrap: wrap;
}

.product-price-block .current-price {
    font-size: 1.6rem;
    font-weight: bold;
    color: #000;
    display: flex;
    align-items: center;
}

.product-price-block .old-price {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: #888;
    display: flex;
    align-items: center;
}

.discount-tag {
    background-color: #dc0000;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.product-availability {
    margin-bottom: 15px;
}

.in-stock {
    color: #28a745;
    font-weight: 600;
}

.out-of-stock {
    color: #dc3545;
    font-weight: 600;
}

/* أنماط تقييم المنتج */
.product-rating {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rating-stars {
    display: flex;
    align-items: center;
    font-size: 18px;
}

.rating-stars i {
    color: #FFB800;
    margin-left: 2px;
}

.rating-stars .fa-star, 
.rating-stars .fa-star-half-alt {
    color: #FFB800;
}

.rating-stars .fa-star-half-alt {
    position: relative;
}

.rating-stars .far.fa-star {
    color: #ccc;
}

.rating-value {
    margin-right: 10px;
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.rating-count {
    color: #777;
    font-size: 14px;
}

.product-short-description {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #555;
}

.product-actions {
    margin: 20px 0;
}

.quantity-wrapper {
    margin-bottom: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    max-width: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-minus,
.quantity-plus {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
}

#quantity {
    width: 70px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield;
    appearance: textfield;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-block {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 1;
}

.btn-add-cart:hover {
    background-color: #e26d00;
}

.btn-add-wishlist {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-wishlist:hover {
    background-color: #ffe8d6;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.product-meta {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.meta-item {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.meta-title {
    font-weight: bold;
    margin-left: 5px;
}

/* التبويبات */
.product-description-tabs {
    margin: 40px 0;
}

.nav-tabs {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.nav-link {
    font-weight: 600;
    padding: 10px 20px;
    color: #555;
    border: 1px solid transparent;
    margin-bottom: -1px;
    transition: all 0.3s;
}

.nav-link.active,
.nav-link:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-pane {
    padding: 20px 0;
}

.product-description,
.product-specifications {
    line-height: 1.7;
}

/* نموذج التقييم */
.add-review-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.rating-select {
    font-size: 1.5rem;
    color: #ffc107;
    cursor: pointer;
    margin-bottom: 15px;
}

/* المنتجات ذات الصلة */
.related-products {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-products .section-title {
    margin-bottom: 25px;
    font-size: 1.5rem;
    position: relative;
    padding-right: 15px;
    font-weight: bold;
}

.related-products .section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 5px;
    height: 25px;
    background-color: var(--primary-color);
    transform: translateY(-50%);
}

.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-products .product-card {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 768px) {
    .related-products .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .related-products .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 767px) {
    .main-image {
        height: 300px;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-info-wrapper {
        padding: 0;
        margin-top: 20px;
    }
}
