/* css/product-details.css */

/* مسیر ناوبری */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-nav a:hover {
    color: #e91e63;
}

.breadcrumb-nav .separator {
    color: #999;
    font-size: 12px;
}

.breadcrumb-nav .current {
    color: #e91e63;
    font-weight: 500;
}

/* جزئیات محصول */
.product-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.product-gallery {
    position: sticky;
    top: 20px;
}

.main-image {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-info {
    padding: 20px 0;
}

.product-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.product-meta i {
    color: #e91e63;
}

.product-price {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.price-with-discount {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1rem;
}

.discount-percent {
    background: #e91e63;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.final-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #e91e63;
}

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

.product-description h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3rem;
}

.product-description p {
    line-height: 1.8;
    color: #666;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

.quantity-btn {
    background: #f8f9fa;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-input {
    width: 60px;
    border: none;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
    background: white;
}

.add-to-cart-btn {
    flex: 1;
    min-width: 200px;
    padding: 12px 25px;
    font-size: 1.1rem;
}

.wishlist-btn {
    padding: 12px 15px;
}

.product-features {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #666;
}

.feature i {
    color: #4caf50;
    width: 20px;
}

/* محصولات مرتبط */
.related-products {
    padding: 40px 0;
    background: #f8f9fa;
}

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

/* رسپانسیو */
@media (max-width: 992px) {
    .product-details-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quantity-selector {
        justify-content: center;
    }
    
    .add-to-cart-btn {
        min-width: auto;
    }
}

/* استایل‌های گالری تصاویر */
.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumb-item {
    width: 80px;
    height: 80px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    flex-shrink: 0; /* جلوگیری از جمع شدن عکس‌ها */
}

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

.thumb-item:hover {
    border-color: #e91e63;
    opacity: 0.8;
}

.thumb-item.active {
    border-color: #e91e63;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.2);
}

/* اسکرول بار زیبا برای لیست تصاویر */
.thumbnail-list::-webkit-scrollbar {
    height: 6px;
}
.thumbnail-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.thumbnail-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* استایل انتخابگر رنگ (Variants) */
.variants-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.variant-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #555;
}

.variants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
    position: relative;
}

.variant-option:hover {
    transform: scale(1.1);
    border-color: #aaa;
}

.variant-option.active {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.2);
    transform: scale(1.1);
}

/* حالت ناموجود برای رنگ */
.variant-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.variant-option.disabled::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}

.variant-option .cross {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #c62828;
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    text-shadow: 0 0 2px white;
}