﻿
   
    /* Reset و فونت‌ها */
    *

{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    direction:rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

:root {
    --primary-color: #4895ef;
    --secondary-color: #4361ee;
    --accent-color: #3f37c9;
    --text-color: #f8f9fa;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --text-muted: #bdc3c7;
    --header-bg: #121212;
    --footer-bg: #121212;
}



[data-theme="dark"] {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --text-muted: #7f8c8d;
    --header-bg: #2c3e50;
    --footer-bg: #2c3e50;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f39c12;

    --primary-color: #4895ef;
    --secondary-color: #4361ee;
    --accent-color: #3f37c9;
    --text-color: #f8f9fa;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --text-muted: #bdc3c7;
    --header-bg: #121212;
    --footer-bg: #121212;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* هدر مدرن */
header {
    background-color: var(--header-bg);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

    nav ul li a {
        color: white;
        text-decoration: none;
        font-weight: 500;
        padding: 5px 10px;
        border-radius: 4px;
        transition: all 0.3s;
    }

        nav ul li a:hover {
            color: var(--accent-color);
            background-color: rgba(255,255,255,0.1);
        }

/* دکمه تغییر تم */
.theme-toggle {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

    .theme-toggle:hover {
        background: rgba(255,255,255,0.2);
    }

/* بخش محصول - طراحی مدرن */
.product-details {
    display: flex;
    flex-wrap: wrap;
    margin-top: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-gallery {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}
.main-image-container {
    position: relative;
    width: 90px;
    height: 50px;
    max-height: 100px;
    max-width: 100px;
    overflow: hidden;
    aspect-ratio: 1/1;
    margin: 0px auto 6px;
    border-radius: 50px;
    border:2px solid white;
}
.main-image {
    position: relative;
    width: 97%;
    height: 87%;
    object-fit:fill;
    aspect-ratio: 1/1;
    border-radius: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
}

.thumbnail-container {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s;
}

    .thumbnail:hover {
        border-color: var(--accent-color);
        transform: translateY(-3px);
    }

.product-info {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    border-right: 1px solid var(--border-color);
}

.product-title {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 700;
}

.product-brand {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 14px;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 8px;
}

.stars {
    color: var(--warning-color);
    font-size: 18px;
}

.review-count {
    color: var(--accent-color);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.price-container {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(72, 149, 239, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(72, 149, 239, 0.2);
}

.current-price {
    font-size: 28px;
    font-weight: bold;
    color: var(--danger-color);
}

.old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    margin-right: 10px;
}

.discount {
    background-color: var(--danger-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}

.product-description {
    margin: 20px 0;
    line-height: 1.8;
    color: var(--text-color);
}

.features {
    margin: 20px 0;
}

.feature-item {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.feature-icon {
    margin-left: 10px;
    color: var(--success-color);
    font-weight: bold;
    font-size: 18px;
}

.actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 45px;
    background: rgba(0,0,0,0.05);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s;
}

    .quantity-btn:hover {
        background: rgba(0,0,0,0.1);
    }

.quantity-input {
    width: 50px;
    height: 45px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    font-weight: bold;
}

.add-to-cart {
    flex: 1;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    height: 45px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .add-to-cart:hover {
        background-color: var(--secondary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    }

.wishlist-btn {
    width: 45px;
    height: 45px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .wishlist-btn:hover {
        color: var(--danger-color);
        border-color: var(--danger-color);
        transform: translateY(-2px);
    }

/* تب‌های مدرن */
.product-tabs {
    margin-top: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    transition: all 0.3s;
}

    .tab-btn:hover {
        color: var(--primary-color);
    }

    .tab-btn.active {
        color: var(--primary-color);
        font-weight: 700;
    }

        .tab-btn.active:after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 100%;
            height: 3px;
            background-color: var(--primary-color);
        }

.tab-content {
    padding: 25px;
    display: none;
}

    .tab-content.active {
        display: block;
    }

.specifications table {
    width: 100%;
    border-collapse: collapse;
}

.specifications tr:nth-child(even) {
    background-color: rgba(0,0,0,0.03);
}

.specifications th, .specifications td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.specifications th {
    color: var(--text-muted);
    font-weight: normal;
    width: 30%;
}

/* بخش نظرات مدرن */
.reviews-summary {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 40px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.average-rating {
    font-size: 36px;
    font-weight: bold;
    margin-left: 20px;
    text-align: center;
    min-width: 120px;
}

.rating-stars {
    font-size: 24px;
    color: var(--warning-color);
    margin-bottom: 5px;
}

.rating-bars {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.bar-label {
    width: 80px;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--warning-color);
}

.review-list {
    margin-top: 30px;
}

.review-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

.review-author {
    font-weight: bold;
    color: var(--primary-color);
}

.review-date {
    color: var(--text-muted);
    font-size: 14px;
}

.review-rating {
    color: var(--warning-color);
    margin: 5px 0;
    font-size: 16px;
}

.review-text {
    color: var(--text-color);
    line-height: 1.7;
}

/* محصولات مرتبط مدرن */
.related-products {
    margin-top: 50px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
    font-weight: 700;
}

    .section-title:after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 60px;
        height: 4px;
        background-color: var(--primary-color);
        border-radius: 2px;
    }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    }

.product-card-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-bottom: 1px solid var(--border-color);
    padding: 15px;
    background: var(--bg-color);
}

.product-card-body {
    padding: 20px;
}

.product-card-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 600;
}

.product-card-price {
    font-weight: bold;
    color: var(--danger-color);
    font-size: 18px;
}

/* فوتر مدرن */
footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 50px 0;
    margin-top: 70px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
    color: white;
}

    .footer-column h3:after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 40px;
        height: 2px;
        background-color: var(--accent-color);
    }

.footer-column ul {
    list-style: none;
}

    .footer-column ul li {
        margin-bottom: 12px;
    }

        .footer-column ul li a {
            color: #bdc3c7;
            text-decoration: none;
            transition: all 0.3s;
            display: block;
            padding: 5px 0;
        }

            .footer-column ul li a:hover {
                color: var(--accent-color);
                transform: translateX(-5px);
            }

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
    font-size: 14px;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .product-details {
        flex-direction: column;
    }

    .product-info {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .actions {
        flex-direction: column;
    }

    .quantity-selector {
        width: 100%;
        justify-content: center;
    }

    .add-to-cart {
        width: 100%;
        padding: 12px;
    }

    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }

    .reviews-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .average-rating {
        margin: 15px 0;
    }

    .theme-toggle {
        position: static;
        transform: none;
        margin-left: 15px;
    }
}



