/* متغيرات الألوان */
:root {
    --primary-color: #4CAF50;
    --primary-hover: #3e8e41;
    --secondary-color: #f8f9fa;
    --secondary-hover: #e2e6ea;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --border-color: #ddd;
    --text-color: #333;
    --text-light: #777;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* أساسيات الصفحة */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: transparent;
    color: var(--text-color);
    line-height: 1.6;
}

/* تصميم الصفحة الرئيسية */
.product-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: transparent;
}

.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: transparent;
    border-radius: 0;
    padding: 20px 0;
    box-shadow: none;
    margin-bottom: 30px;
}

/* معرض الصور */
.product-gallery {
    flex: 1;
    min-width: 300px;
}

.main-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: none;
    border-radius: 0;
    position: relative;
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-container {
    position: relative;
    padding: 0 30px;
}

.thumbnails-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 10px;
}

.thumbnails-wrapper::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: var(--primary-color);
}

.thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.thumbnail-nav:hover {
    opacity: 1;
}

.prev-thumb {
    left: 0;
}

.next-thumb {
    right: 0;
}

/* تفاصيل المنتج */
.product-details {
    flex: 1;
    min-width: 300px;
}

.product-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.product-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffffff;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    color: var(--text-light);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #FFD700;
}

.product-sku {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-pricing {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-price {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
}

.old-price {
    font-size: 18px;
    text-decoration: line-through;
    color: var(--text-light);
}

.product-description {
    margin: 25px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.product-description h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #8a699b;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #833dae;
    color: white;
}

.btn-primary:hover {
    background-color: #833dae;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #833dae;
    color: #833dae;
}

.btn-outline:hover {
    background-color: #833dae;
    color: white;
    transform: translateY(-2px);
}

.product-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tags-label {
    font-size: 14px;
    color: var(--text-light);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* تبويبات المعلومات */
.product-tabs {
    background: transparent;
    border-radius: 10px;
    box-shadow: none;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-light);
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: bold;
}

.tab-btn.active:after {
    background-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    color: var(--dark-color);
}

.tabs-content {
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.specs-table {
    margin-top: 15px;
}

.spec-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-name {
    width: 30%;
    font-weight: bold;
}

.spec-value {
    width: 70%;
}

.write-review {
    margin-top: 15px;
}

/* التكيف مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
    }

    .main-image-container {
        height: 300px;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .tabs-header {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .tabs-header::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        white-space: nowrap;
    }

    .spec-row {
        flex-direction: column;
        gap: 5px;
    }

    .spec-name, .spec-value {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-page {
        padding: 10px;
    }

    .product-container {
        padding: 15px 0;
    }

    .main-image-container {
        height: 250px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-title {
        font-size: 20px;
    }

    .current-price {
        font-size: 24px;
    }

    .old-price {
        font-size: 16px;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}
