/* product.css - تنسيقات صفحة المنتج */

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

/* تنسيقات مسار التنقل */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--dark-color);
}

.breadcrumb i {
    font-size: 10px;
    color: var(--text-light);
}

/* تنسيقات تفاصيل المنتج */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* معرض الصور */
.product-gallery {
    position: relative;
}

.main-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
    height: 500px;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.view-3d {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.view-3d:hover {
    background-color: var(--primary-color);
    color: white;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

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

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* معلومات المنتج */
.product-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 14px;
}

.product-country {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-country::before {
    content: '\f3c5';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
}

.product-sku {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-sku::before {
    content: '\f02a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.current-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 18px;
    text-decoration: line-through;
    color: var(--text-light);
}

.discount {
    font-size: 16px;
    color: #4caf50;
    font-weight: 500;
}

.product-description {
    margin-bottom: 30px;
}

.product-description h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.product-description p {
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 15px;
}

.product-description ul {
    padding-right: 20px;
    margin-bottom: 15px;
}

.product-description ul li {
    margin-bottom: 8px;
    position: relative;
    padding-right: 20px;
}

.product-description ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    right: 0;
}

/* خيارات المنتج */
.product-options {
    margin-bottom: 30px;
}

.option {
    margin-bottom: 20px;
}

.option label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

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

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
}

.color-option.active {
    border-color: var(--primary-color);
}

.color-option.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.size-guide-link {
    margin-right: 15px;
    font-size: 14px;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.size-guide-link:hover {
    color: var(--dark-color);
}

.quantity-selector {
    display: flex;
    align-items: center;
    max-width: 150px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--light-color);
}

.quantity-selector input {
    width: 50px;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    margin: 0 10px;
}

/* أزرار الإجراءات */
.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.add-to-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 16px;
}

.add-to-wishlist {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
}

.add-to-wishlist.in-wishlist {
    background-color: var(--light-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.add-to-wishlist.in-wishlist i {
    color: var(--primary-color);
}

/* معلومات الشحن */
.product-shipping {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.shipping-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.shipping-info:last-child {
    margin-bottom: 0;
}

.shipping-info i {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 3px;
}

.shipping-info strong {
    display: block;
    margin-bottom: 5px;
}

.shipping-info span {
    font-size: 14px;
    color: var(--text-light);
}

/* مشاركة المنتج */
.product-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-share span {
    font-weight: 500;
}

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

.share-buttons a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.share-buttons a:hover {
    transform: translateY(-3px);
}

.share-buttons a:nth-child(1):hover {
    background-color: #3b5998;
    color: white;
}

.share-buttons a:nth-child(2):hover {
    background-color: #1da1f2;
    color: white;
}

.share-buttons a:nth-child(3):hover {
    background-color: #25d366;
    color: white;
}

.share-buttons a:nth-child(4):hover {
    background-color: #ea4335;
    color: white;
}

/* علامات التبويب */
.product-tabs {
    margin-bottom: 60px;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.tabs-header li {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.tabs-header li:hover {
    color: var(--primary-color);
}

.tabs-header li.active {
    color: var(--primary-color);
}

.tabs-header li.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.tab-pane h4 {
    font-size: 18px;
    margin: 25px 0 15px;
    color: var(--dark-color);
}

.tab-pane p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.tab-pane ul {
    padding-right: 20px;
    margin-bottom: 20px;
}

.tab-pane ul li {
    margin-bottom: 10px;
    position: relative;
    padding-right: 20px;
}

.tab-pane ul li::before {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    right: 0;
    font-size: 12px;
}

/* جدول المواصفات */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th, .specs-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.specs-table th {
    width: 30%;
    font-weight: 600;
    color: var(--dark-color);
    background-color: var(--light-color);
}

/* معرض الصور الإضافية */
.product-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.product-images-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.product-images-gallery img:hover {
    transform: scale(1.05);
    box-shadow: var(--box-shadow);
}

/* ملخص التقييمات */
.reviews-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.average-rating {
    text-align: center;
    min-width: 150px;
}

.average {
    font-size: 48px;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
    margin-bottom: 10px;
}

.average-stars {
    color: #ffc107;
    margin-bottom: 10px;
}

.total-reviews {
    color: var(--text-light);
    font-size: 14px;
}

.rating-bars {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rating-bar span {
    min-width: 60px;
}

.bar-container {
    flex: 1;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background-color: #ffc107;
    border-radius: 4px;
}

/* قائمة التقييمات */
.reviews-list {
    margin-bottom: 40px;
}

.no-reviews {
    text-align: center;
    padding: 30px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    color: var(--text-light);
}

/* نموذج كتابة تقييم */
.write-review {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
}

.write-review h3 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.rating-select {
    display: flex;
    gap: 5px;
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
}

.rating-select i:hover, .rating-select i.active {
    color: #ffc107;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-family);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 126, 139, 0.2);
}

/* المنتجات المتعلقة */
.related-products {
    margin-top: 60px;
}

/* النافذة المنبثقة للعرض ثلاثي الأبعاد */
.modal-3d {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-3d-content {
    position: relative;
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-modal-btn:hover {
    color: var(--primary-color);
}

.modal-3d-content h2 {
    margin-bottom: 20px;
    text-align: center;
}

#canvas-3d-container {
    width: 100%;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* تنسيقات صفحة المنتجات */
.products-section {
    padding: 50px 0;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* قسم الفلاتر */
.filter-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-section {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-section h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
    font-size: 20px;
    position: relative;
    padding-bottom: 10px;
}

.filter-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-group-title {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-range input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-family);
}

.price-range input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.filter-section .btn {
    width: 100%;
    margin-top: 20px;
}

/* رأس قسم المنتجات */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.products-count {
    color: var(--text-light);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-family: var(--font-family);
    cursor: pointer;
}

.sort-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* شبكة المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* بطاقة المنتج */
.product-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-actions {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 126, 139, 0.3);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-title {
    font-size: 17px;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 15px;
    text-decoration: line-through;
    color: var(--text-light);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.stars {
    color: #ffc107;
}

.rating-count {
    font-size: 13px;
    color: var(--text-light);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 13px;
}

.product-availability {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-availability::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
}

.in-stock {
    color: #4caf50;
}

.in-stock::before {
    content: '\f00c';
}

.out-of-stock {
    color: #f44336;
}

.out-of-stock::before {
    content: '\f00d';
}

.product-sales {
    color: var(--text-light);
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(255, 126, 139, 0.2);
}

.add-to-cart:hover {
    background-color: var(--dark-color);
    box-shadow: 0 6px 12px rgba(109, 59, 71, 0.2);
}

/* رسالة عدم وجود نتائج */
.no-results-message {
    text-align: center;
    padding: 50px 20px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    grid-column: 1 / -1;
}

.no-results-message h3 {
    margin: 15px 0;
    color: var(--dark-color);
}

.no-results-message p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ترقيم الصفحات */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 4px;
    color: var(--text-color);
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.pagination-item:hover, .pagination-item.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(255, 126, 139, 0.2);
}

.pagination-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* تحسينات للتجاوب */
@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filter-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .reviews-summary {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-options {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .add-to-cart-btn, .add-to-wishlist {
        width: 100%;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tabs-header li {
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 300px;
    }
    
    .main-image {
        height: 350px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .product-price {
        flex-wrap: wrap;
    }
}

/* تحسينات للإشعارات */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1003;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 350px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    border-right: 4px solid #4caf50;
}

.notification.success i {
    color: #4caf50;
}

.notification.error {
    border-right: 4px solid #f44336;
}

.notification.error i {
    color: #f44336;
}

.notification i {
    font-size: 20px;
}

/* تحسينات للتفاعل */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
