/* ==================================================
   PRODUCT DETAIL PAGE - صفحه جزئیات محصول
   شامل: گالری تصاویر، انتخاب وزن/سایز، تب توضیحات
   ================================================== */

.product-detail-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 40px;
    margin: 30px 0;
}

/* ===== گالری تصاویر ===== */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}

.gallery-main .no-img {
    font-size: 60px;
    color: #ddd;
}

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

.gallery-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #eee;
    cursor: pointer;
    transition: border-color 0.3s;
    background: #fafafa;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: #4caf50;
}

/* ===== اطلاعات محصول ===== */
.product-detail-info { padding-top: 5px; }

.product-cat {
    display: inline-block;
    font-size: 12px;
    color: #4caf50;
    background: #e8f5e9;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-detail-info h1 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* ===== انتخاب وزن / سایز ===== */
.variant-selector { margin-bottom: 18px; }
.variant-selector label {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.variant-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.25s;
}

.variant-btn:hover { border-color: #4caf50; color: #4caf50; }

.variant-btn.active {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

/* ===== قیمت ===== */
.product-price-lg {
    margin: 15px 0;
    font-size: 22px;
}
.product-price-lg del {
    color: #bbb;
    font-size: 15px;
    margin-left: 10px;
}
.product-price-lg strong {
    color: #4caf50;
    font-size: 26px;
    font-weight: 800;
}
.product-price-lg span {
    font-size: 13px;
    color: #888;
}

.product-expiry {
    font-size: 13px;
    color: #888;
    background: #f8f9fa;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.product-expiry i { color: #f2994a; }

/* ===== موجودی / متا ===== */
.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 18px 0;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}
.meta-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #666; }
.meta-item i { color: #4caf50; }

/* ===== افزودن به سبد ===== */
.add-to-cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}
.qty-selector button {
    width: 40px;
    height: 44px;
    background: #f8f9fa;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #555;
}
.qty-selector button:hover { background: #e8f5e9; color: #4caf50; }
.qty-selector input {
    width: 50px;
    height: 44px;
    border: none;
    text-align: center;
    font-family: 'Vazirmatn';
    font-size: 15px;
}

.add-to-cart .btn-primary {
    flex: 1;
    min-width: 200px;
}
.add-to-cart .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===== تب‌های توضیحات ===== */
.product-tabs-detail { margin-top: 40px; }
.tabs-nav {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}
.tab-link {
    padding: 12px 24px;
    background: none;
    border: none;
    font-family: 'Vazirmatn';
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}
.tab-link.active, .tab-link:hover { color: #4caf50; border-color: #4caf50; }

.tab-content { display: none; line-height: 2; color: #555; font-size: 14px; }
.tab-content.active { display: block; }

/* ===== سبد خرید: نمایش تنوع انتخابی ===== */
.cart-item-variant {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #4caf50;
    background: #e8f5e9;
    padding: 3px 10px;
    border-radius: 15px;
    margin: 5px 0;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gallery-main { aspect-ratio: 1.1 / 1; }
    .add-to-cart { flex-direction: column; align-items: stretch; }
    .add-to-cart .btn-primary { width: 100%; }
}
