
/* =========================================
   کانتینر اختصاصی صفحه محصول
   ========================================= */
.container.product-container {
    max-width: 860px;        /* عرض کمتر برای صفحه محصول */
    padding-inline: clamp(16px, 4vw, 32px);
    padding-block: clamp(20px, 4vw, 32px);
    border-radius: var(--radius-xl); /* 24px */
    margin-block: clamp(16px, 3vh, 32px);
}



       .product-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
    width: 100%; /* اضافه شود */
    box-sizing: border-box; /* اضافه شود */
}

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

       .product-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    
    /* این دو خط مشکل رفتن منو زیر عکس را حل می‌کنند 👇 */
    position: relative; 
    z-index: 50; 
}

        .seller-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .seller-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 18px;
        }

        .seller-details {
            display: flex;
            flex-direction: column;
        }

        .seller-name {
            font-weight: 600;
            color: var(--dark);
            text-decoration: none;
            font-size: 15px;
        }

        .seller-name:hover {
            color: var(--primary);
        }

        .product-date {
            font-size: 12px;
            color: var(--gray);
        }

        .owner-menu {
            position: relative;
        }

        .menu-button {
            background: none;
            border: none;
            font-size: 24px;
            color: var(--gray);
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.3s;
        }

        .menu-button:hover {
            background: var(--primary-light);
            color: var(--primary);
        }

        .menu-dropdown {
    position: absolute;
    top: 100%;
    /* این خط به طور خودکار در فارسی right:0 و در انگلیسی left:0 می‌شود */
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 100;
    min-width: 160px;
}


        .owner-menu:hover .menu-dropdown {
            display: block;
        }

        .menu-dropdown a {
            display: block;
            padding: 12px 16px;
            text-decoration: none;
            color: var(--dark);
            font-size: 14px;
            transition: background 0.3s;
        }

        .menu-dropdown a:hover {
            background: var(--primary-light);
            color: var(--primary);
        }

        /* Image Slider */
        .slider-container {
            position: relative;
            width: 100%;
            aspect-ratio: 1/1;
            background: #000;
        }

        .slider {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .slide {
            display: none;
            width: 100%;
            height: 100%;
        }

        .slide.active {
            display: block;
        }

        .slide img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #f1f5f9;
        }

        .slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    box-shadow: var(--shadow-md);
    font-size: 20px;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.slider-button:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

/* پیش‌فرض (RTL فارسی) */
.slider-button.prev { right: 20px; left: auto; }
.slider-button.next { left: 20px;  right: auto; }

/* LTR انگلیسی - جاها عوض میشن */
[dir="ltr"] .slider-button.prev { left: 20px;  right: auto; }
[dir="ltr"] .slider-button.next { right: 20px; left: auto; }


        .sale-pill {
            position: absolute;
            top: 20px;
            right: 20px;
            background: linear-gradient(135deg, var(--danger), #dc2626);
            color: white;
            padding: 8px 20px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 14px;
            z-index: 20;
            box-shadow: var(--shadow-md);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        /* Actions */
        .actions {
            padding: 20px;
            display: flex;
            gap: 20px;
            border-bottom: 1px solid var(--border);
        }

        .action-button {
            display: flex;
            align-items: center;
            gap: 8px;
            background: none;
            border: none;
            font-size: 15px;
            color: var(--gray);
            cursor: pointer;
            padding: 8px 16px;
            border-radius: 30px;
            transition: all 0.3s;
        }

        .action-button:hover {
            background: var(--primary-light);
            color: var(--primary);
        }

        .action-button.liked {
            color: var(--danger);
        }

        .action-button.liked img {
            filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
        }

        .action-button img {
            width: 22px;
            height: 22px;
            transition: transform 0.3s;
        }

        .action-button:hover img {
            transform: scale(1.2);
        }

        .action-count {
            font-weight: 600;
        }

        /* Share Modal */
        .share-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
        }

        .share-modal.active {
            display: flex;
        }

        .share-content {
            background: white;
            border-radius: 24px;
            padding: 30px;
            max-width: 400px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            animation: slideUp 0.3s ease;
        }

        .share-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .share-header h3 {
            font-size: 20px;
            font-weight: 700;
        }

        .share-close {
            background: none;
            border: none;
            font-size: 24px;
            color: var(--gray);
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }

        .share-close:hover {
            background: #fee2e2;
            color: var(--danger);
        }

        .share-search {
            margin-bottom: 20px;
        }

        .share-search input {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid var(--border);
            border-radius: 30px;
            font-size: 14px;
            outline: none;
            transition: all 0.3s;
        }

        .share-search input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .share-list {
            max-height: 300px;
            overflow-y: auto;
        }

        .share-user {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.3s;
            margin-bottom: 5px;
        }

        .share-user:hover {
            background: var(--primary-light);
        }

        .share-user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }

        .share-user-info {
            flex: 1;
        }

        .share-user-name {
            font-weight: 600;
            font-size: 14px;
        }

        .share-user-username {
            font-size: 12px;
            color: var(--gray);
        }

        .share-send {
            background: var(--primary);
            color: white;
            border: none;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .share-send:hover {
            background: var(--primary-dark);
            transform: scale(1.05);
        }

        .share-send.sent {
            background: var(--success);
        }

        /* Stock */
        .stock-section {
            padding: 20px;
            border-bottom: 1px solid var(--border);
            background: var(--light);
            display: flex;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .stock-pill {
            padding: 6px 16px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 14px;
        }

        .stock-in {
            background: #e6f7e6;
            color: var(--success);
        }

        .stock-out {
            background: #fee2e2;
            color: var(--danger);
        }

        .cart-form {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
        }

        .quantity-input {
            width: 80px;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 12px;
            font-size: 14px;
            outline: none;
            transition: all 0.3s;
        }

        .quantity-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .add-to-cart {
            flex: 1;
            background: linear-gradient(135deg, var(--success), #0e9f6e);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .add-to-cart:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        /* Product Info */
        .product-info {
            padding: 20px;
        }

        .product-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 15px;
            color: var(--dark);
        }

        .product-price {
            font-size: 28px;
            font-weight: 700;
            color: var(--danger);
            margin-bottom: 20px;
        }

        .product-price del {
            font-size: 18px;
            color: var(--gray);
            font-weight: normal;
            margin-right: 10px;
        }

        .product-description {
            background: var(--light);
            padding: 20px;
            border-radius: 16px;
            font-size: 15px;
            line-height: 1.8;
            color: var(--dark);
            border: 1px solid var(--border);
        }
        
        /* کانتینر اصلی که دکمه‌ها را در یک ردیف قرار می‌دهد */
.product-actions-row {
    display: flex;
    gap: 10px; /* فاصله بین فرم سبد خرید و دکمه پیام */
    align-items: stretch; /* باعث می‌شود ارتفاع هر دو بخش برابر شود */
    width: 100%;
    margin-top: 15px; /* فاصله از بخش موجودی کالا (بالا) */
}

/* تنظیمات فرم سبد خرید برای پر کردن فضای مناسب */
.product-actions-row .cart-form {
    flex: 1; /* گرفتن نیمی از فضای موجود */
    display: flex;
}

/* گروه کردن فیلد تعداد و دکمه افزودن به سبد خرید */
.product-actions-row .cart-input-group {
    display: flex;
    gap: 8px; /* فاصله بین فیلد تعداد و دکمه */
    width: 100%;
}

/* استایل مشترک برای دکمه‌های "افزودن به سبد" و "تماس با فروشنده" */
.product-actions-row .add-to-cart,
.product-actions-row .btn-message {
    flex: 1; /* هر دو دکمه عرض برابری داشته باشند */
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap; /* جلوگیری از دو خطی شدن متن دکمه‌ها */
    height: 100%; /* استفاده از تمام ارتفاع کانتینر */
    box-sizing: border-box;
    padding: 10px 15px; /* فضای داخلی دکمه‌ها */
    cursor: pointer;
}

/* تنظیم عرض فیلد انتخاب تعداد */
.product-actions-row .quantity-input {
    width: 65px; /* عرض ثابت برای فیلد تعداد */
    text-align: center;
    padding: 8px;
    box-sizing: border-box;
}

/* ریسپانسیو: در موبایل‌های خیلی کوچک (عرض کمتر از 400px) زیر هم قرار بگیرند */
@media (max-width: 400px) {
    .product-actions-row {
        flex-direction: column; /* تغییر جهت به ستونی */
    }
    
    .product-actions-row .cart-input-group {
        flex-direction: row; /* فیلد تعداد و دکمه سبد خرید همچنان کنار هم بمانند */
    }
}

        /* =========================================
   Product Attributes (ویژگی‌های محصول)
   ========================================= */

/* استایل اصلی باکس ویژگی‌ها */
.product-attributes {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); /* سایه بسیار ملایم */
}

/* استایل عنوان باکس (h3) */
.product-attributes h3 {
    font-size: 1.15rem;
    color: #333333;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f2f2f2; /* خط جداکننده ملایم */
    font-weight: 700;
}

/* ساختار گرید برای لیست ویژگی‌ها */
.product-attributes ul {
    list-style-type: none; /* حذف نقطه‌های پیش‌فرض لیست */
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* نمایش به صورت 2 ستونه در دسکتاپ */
    gap: 12px 20px; /* فاصله بین ردیف‌ها و ستون‌ها */
}

/* استایل هر آیتم (ویژگی) */
.product-attributes li {
    display: flex;
    justify-content: space-between; /* فاصله دادن بین عنوان و مقدار */
    align-items: center;
    background-color: #f8f9fa; /* رنگ پس‌زمینه طوسی بسیار روشن */
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

/* افکت هاور برای هر ردیف (اختیاری) */
.product-attributes li:hover {
    background-color: #f0f2f5;
}

/* استایل عنوان ویژگی (مثلاً "برند:", "وضعیت:") */
.product-attributes li span {
    color: #6c757d; /* رنگ خاکستری ملایم */
    font-weight: 500;
}

/* استایل مقدار ویژگی (مثلاً "سامسونگ", "نو") */
.product-attributes li strong {
    color: #212529; /* رنگ تیره برای خوانایی بهتر */
    font-weight: 700;
    text-align: left;
    max-width: 60%; /* جلوگیری از به هم ریختگی متون طولانی */
    word-wrap: break-word; /* شکستن کلمات طولانی مثل SKU */
}

/* -----------------------------------------
   ریسپانسیو (موبایل و تبلت‌های کوچک)
   ----------------------------------------- */
@media (max-width: 650px) {
    .product-attributes ul {
        grid-template-columns: 1fr; /* تبدیل به 1 ستون در موبایل */
        gap: 10px;
    }
    
    .product-attributes {
        padding: 15px;
        margin: 20px 0;
    }
}


        /* Comments */
        /* Comments Section */
.comments-section {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-item {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 15px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.comment-date {
    font-size: 12px;
    color: var(--gray);
}

.comment-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--dark);
}

.delete-comment {
    position: absolute;
    left: 16px;
    top: 16px;
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: all 0.3s;
}

.delete-comment:hover {
    opacity: 1;
    transform: scale(1.1);
}

.comment-item.hidden {
    opacity: 0.7;
    background: #fee2e2;
}

.comment-item.hidden::before {
    content: "🔒 این نظر مخفی است";
    display: block;
    color: var(--danger);
    font-size: 12px;
    margin-bottom: 8px;
}

.load-more {
    text-align: center;
    margin: 20px 0;
}

.load-more-button {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-button:hover {
    background: var(--primary);
    color: white;
}

.load-more-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

        /* Comment Drawer */
        .comment-drawer {
            position: fixed;
            bottom: -100%;
            left: 0;
            right: 0;
            max-width: 500px;
            margin: 0 auto;
            background: white;
            border-top-left-radius: 30px;
            border-top-right-radius: 30px;
            box-shadow: var(--shadow-lg);
            transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 9999;
        }

        .comment-drawer.active {
            bottom: 0;
        }

        .drawer-header {
            padding: 20px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .drawer-header h3 {
            font-size: 18px;
            font-weight: 600;
        }

        .drawer-close {
            background: none;
            border: none;
            font-size: 24px;
            color: var(--gray);
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }

        .drawer-close:hover {
            background: #fee2e2;
            color: var(--danger);
        }

        .drawer-content {
            padding: 20px;
        }

        .comment-input {
            width: 100%;
            padding: 16px;
            border: 2px solid var(--border);
            border-radius: 16px;
            font-size: 14px;
            font-family: inherit;
            resize: vertical;
            min-height: 120px;
            outline: none;
            transition: all 0.3s;
            margin-bottom: 15px;
        }

        .comment-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .submit-comment {
            width: 100%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            border: none;
            padding: 16px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .submit-comment:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .submit-comment:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Related Products */
        .related-section {
            /*margin-top: 40px;*/
            margin: 15px;
        }

        .related-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 20px;
        }

        .related-scroll {
            display: flex;
            gap: 15px;
            overflow-x: auto;
            padding-bottom: 15px;
            scrollbar-width: thin;
        }

        .related-scroll::-webkit-scrollbar {
            height: 6px;
        }

        .related-scroll::-webkit-scrollbar-thumb {
            background: var(--primary-light);
            border-radius: 30px;
        }

        .related-item {
            flex: 0 0 140px;
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
            text-decoration: none;
            color: inherit;
            transition: all 0.3s;
        }

        .related-item:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-md);
        }

        .related-item img {
            width: 100%;
            height: 140px;
            object-fit: cover;
        }

        .related-info {
            padding: 10px;
        }

        .related-name {
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 5px;
            height: 2.4em;
            overflow: hidden;
        }

        .related-price {
            font-size: 12px;
            font-weight: 700;
            color: var(--danger);
        }

        /* Back Button */
        .back-button {
            display: inline-block;
            margin: 30px auto;
            padding: 12px 30px;
            background: white;
            color: var(--primary);
            border: 2px solid var(--primary);
            border-radius: 30px;
            text-decoration: none;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s;
            text-align: center;
        }

        .back-button:hover {
            background: var(--primary);
            color: white;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        /* Toast Notification */
        .toast {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--dark);
            color: white;
            padding: 12px 24px;
            border-radius: 50px;
            font-size: 14px;
            box-shadow: var(--shadow-lg);
            z-index: 10000;
            transition: transform 0.3s ease;
        }

        .toast.show {
            transform: translateX(-50%) translateY(0);
        }

        /* Loading Spinner */
        .spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Responsive */
        

            .product-title {
                font-size: 20px;
            }

            .product-price {
                font-size: 24px;
            }

            .actions {
                flex-wrap: wrap;
            }

            .stock-section {
                flex-direction: column;
                align-items: stretch;
            }

            .cart-form {
                flex-direction: column;
            }

            .quantity-input {
                width: 100%;
            }

            .share-content {
                padding: 20px;
            }
            .product-card {
        border-radius: 0; /* گوشه‌ها حذف شوند تا تمام عرض پر شود */
        box-shadow: none;
    }
        


    

        
        /* ---- استایل های مربوط به وضعیت وریفای محصول ---- */
.product-verification-status {
    margin: 15px 0;
    font-family: inherit;
}

.pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.pill.verified {
    background-color: #e6f4ea;
    color: #1e8e3e;
    border: 1px solid #ceead6;
}

.pill.unverified {
    background-color: #fef7e0;
    color: #b06000;
    border: 1px solid #feefc3;
}

.promote-action-box {
    margin-top: 10px;
    padding: 16px;
    background-color: #f0f4ff;
    border: 1px solid #d6e2ff;
    border-radius: 8px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.promote-action-box p {
    margin: 0;
    font-size: 13.5px;
    color: #0b43c4;
    font-weight: 500;
    flex: 1;
}

.button-promote {
    background-color: #2563eb;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.button-promote:hover {
    background-color: #1d4ed8;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.unverified-box {
    margin-top: 10px;
    padding: 12px 16px;
    background-color: #fffaf0;
    border: 1px dashed #ed8936;
    border-radius: 8px;
    color: #c05621;
    font-size: 13px;
    line-height: 1.6;
}

.unverified-box p {
    margin: 0;
}

   /* استایل کلی باکس مسیر راهنما */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 20px;
    background-color: #f8f9fa; /* یک پس‌زمینه طوسی بسیار ملایم */
    border-radius: 8px; /* گوشه‌های گرد */
    font-size: 14px;
    color: #6c757d;
}

/* استایل لینک‌های داخل مسیر راهنما */
.breadcrumb a {
    color: #007bff; /* رنگ آبی لینک‌ها (می‌توانید به رنگ قالب خود تغییر دهید) */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

/* افکت هاور (زمانی که موس روی لینک می‌رود) */
.breadcrumb a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* جداکننده‌ها (علامت / یا >) */
.breadcrumb .separator {
    margin: 0 10px;
    color: #adb5bd;
    font-size: 12px;
}

/* نام صفحه/محصول فعلی که لینک نیست */
.breadcrumb .current {
    color: #343a40; /* رنگ تیره‌تر برای متمایز شدن */
    font-weight: 600;
    
    /* این سه خط برای نام‌های طولانی است که از کادر بیرون نزند و سه نقطه شود */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px; 
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 12px;
        padding: 8px 10px;
    }
    .breadcrumb .current {
        max-width: 150px;
    }
}
     
     /* استایل پایه برای برچسب نوع محصول */
.product-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff; /* رنگ متن پیش‌فرض */
    background-color: #6c757d; /* رنگ پس‌زمینه پیش‌فرض (طوسی) */
    border-radius: 50px; /* گوشه‌های کاملاً گرد (شکل قرص) */
    vertical-align: middle;
    margin-right: 10px; /* فاصله از عنوان در سایت‌های راست‌چین */
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* یک سایه بسیار محو برای زیبایی */
}

/* کلاس‌های رنگی اختصاصی (اختیاری) */

/* برای محصول فیزیکی (آبی) */
.product-type-pill.pill-physical {
    background-color: #007bff;
}

/* برای محصول دیجیتال (سبز) */
.product-type-pill.pill-digital {
    background-color: #28a745;
}

/* برای خدمات (بنفش/نارنجی) */
.product-type-pill.pill-service {
    background-color: #6f42c1;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .product-type-pill {
        font-size: 10px;
        padding: 3px 8px;
        margin-right: 5px;
    }
}


/* =========================================
   Responsive - موبایل
   ========================================= */
@media (max-width: 640px) {

    /* ← این‌ها باید اینجا باشن، نه بیرون! */
    .product-title { font-size: 20px; }
    .product-price { font-size: 24px; }

    .actions { flex-wrap: wrap; }

    .stock-section {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-form { flex-direction: column; }
    .quantity-input { width: 100%; }
    .share-content { padding: 20px; }

    /* container */
    .container {
        margin: 60px auto 20px;
        padding: 0;
        width: 100%;
        overflow-x: hidden; /* ← اضافه شد */
    }

    .container.product-container {
        border-radius: 0;
        box-shadow: none;
        padding-inline: 0;
        margin-block: 0;
        width: 100%;
    }

    /* product card */
    .product-card {
        border-radius: 0;
        box-shadow: none;
        width: 100%;
    }

    /* related */
    .related-section {
        margin: 15px 0;
        padding: 0 12px;
    }
}
/* =========================================
   حالت تاریک (Dark Mode) برای صفحه محصول
========================================= */

/* --- پس‌زمینه و کارت‌های اصلی --- */
body.dark .product-card,
[data-theme="dark"] .product-card,
body.dark .share-content,
[data-theme="dark"] .share-content,
body.dark .comment-drawer,
[data-theme="dark"] .comment-drawer,
body.dark .menu-dropdown,
[data-theme="dark"] .menu-dropdown {
    background-color: #1f2937; /* خاکستری تیره */
    border-color: #374151;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* --- خطوط جداکننده --- */
body.dark .product-header,
[data-theme="dark"] .product-header,
body.dark .actions,
[data-theme="dark"] .actions,
body.dark .stock-section,
[data-theme="dark"] .stock-section,
body.dark .comments-section,
[data-theme="dark"] .comments-section,
body.dark .drawer-header,
[data-theme="dark"] .drawer-header {
    border-color: #374151;
}

/* --- متون و عنوان‌ها --- */
body.dark .product-title,
[data-theme="dark"] .product-title,
body.dark .seller-name,
[data-theme="dark"] .seller-name,
body.dark .share-header h3,
[data-theme="dark"] .share-header h3,
body.dark .drawer-header h3,
[data-theme="dark"] .drawer-header h3,
body.dark .related-title,
[data-theme="dark"] .related-title,
body.dark .comments-title,
[data-theme="dark"] .comments-title,
body.dark .share-user-name,
[data-theme="dark"] .share-user-name {
    color: #f3f4f6;
}

body.dark .product-date,
[data-theme="dark"] .product-date,
body.dark .share-user-username,
[data-theme="dark"] .share-user-username,
body.dark .comment-date,
[data-theme="dark"] .comment-date {
    color: #9ca3af;
}

/* --- دکمه‌ها (منو، اسلایدر، اکشن‌ها) --- */
body.dark .menu-button,
[data-theme="dark"] .menu-button,
body.dark .action-button,
[data-theme="dark"] .action-button,
body.dark .share-close,
[data-theme="dark"] .share-close,
body.dark .drawer-close,
[data-theme="dark"] .drawer-close {
    color: #d1d5db;
}

body.dark .menu-button:hover,
[data-theme="dark"] .menu-button:hover,
body.dark .action-button:hover,
[data-theme="dark"] .action-button:hover {
    background-color: #374151;
    color: var(--primary); /* اگر متغیر primary در دارک مود روشن‌تر است */
}

body.dark .slider-button,
[data-theme="dark"] .slider-button {
    background-color: rgba(31, 41, 55, 0.9);
    color: #f3f4f6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

body.dark .slider-button:hover,
[data-theme="dark"] .slider-button:hover {
    background-color: #374151;
}

body.dark .menu-dropdown a,
[data-theme="dark"] .menu-dropdown a {
    color: #d1d5db;
}

body.dark .menu-dropdown a:hover,
[data-theme="dark"] .menu-dropdown a:hover,
body.dark .share-user:hover,
[data-theme="dark"] .share-user:hover {
    background-color: #374151;
}

/* --- توضیحات محصول --- */
body.dark .product-description,
[data-theme="dark"] .product-description {
    background-color: #111827;
    color: #d1d5db;
    border-color: #374151;
}

/* --- فیلدهای ورودی (Inputs) --- */
body.dark .quantity-input,
[data-theme="dark"] .quantity-input,
body.dark .share-search input,
[data-theme="dark"] .share-search input,
body.dark .comment-input,
[data-theme="dark"] .comment-input {
    background-color: #111827;
    color: #f3f4f6;
    border-color: #4b5563;
}

body.dark .quantity-input:focus,
[data-theme="dark"] .quantity-input:focus,
body.dark .share-search input:focus,
[data-theme="dark"] .share-search input:focus,
body.dark .comment-input:focus,
[data-theme="dark"] .comment-input:focus {
    border-color: var(--primary);
}

/* --- ویژگی‌های محصول (Attributes) --- */
body.dark .product-attributes,
[data-theme="dark"] .product-attributes {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark .product-attributes h3,
[data-theme="dark"] .product-attributes h3 {
    color: #f3f4f6;
    border-bottom-color: #374151;
}

body.dark .product-attributes li,
[data-theme="dark"] .product-attributes li {
    background-color: #374151;
}

body.dark .product-attributes li:hover,
[data-theme="dark"] .product-attributes li:hover {
    background-color: #4b5563;
}

body.dark .product-attributes li span,
[data-theme="dark"] .product-attributes li span {
    color: #9ca3af;
}

body.dark .product-attributes li strong,
[data-theme="dark"] .product-attributes li strong {
    color: #f3f4f6;
}

/* --- نظرات (Comments) --- */
body.dark .comment-item,
[data-theme="dark"] .comment-item {
    background-color: #111827;
    border-color: #374151;
}

body.dark .comment-text,
[data-theme="dark"] .comment-text {
    color: #d1d5db;
}

/* --- محصولات مرتبط (Related Products) --- */
body.dark .related-item,
[data-theme="dark"] .related-item {
    background-color: #374151;
}

body.dark .related-name,
[data-theme="dark"] .related-name {
    color: #f3f4f6;
}

/* --- مسیر راهنما (Breadcrumb) --- */
body.dark .breadcrumb,
[data-theme="dark"] .breadcrumb {
    background-color: #1f2937;
}

body.dark .breadcrumb a,
[data-theme="dark"] .breadcrumb a {
    color: #60a5fa; /* آبی روشن‌تر برای دیده شدن روی تیره */
}

body.dark .breadcrumb .separator,
[data-theme="dark"] .breadcrumb .separator {
    color: #6b7280;
}

body.dark .breadcrumb .current,
[data-theme="dark"] .breadcrumb .current {
    color: #f3f4f6;
}

/* --- وضعیت وریفای و باکس‌های اخطار (Promote & Verification) --- */
body.dark .promote-action-box,
[data-theme="dark"] .promote-action-box {
    background-color: rgba(37, 99, 235, 0.1);
    border-color: #1e3a8a;
}

body.dark .promote-action-box p,
[data-theme="dark"] .promote-action-box p {
    color: #93c5fd;
}

body.dark .unverified-box,
[data-theme="dark"] .unverified-box {
    background-color: rgba(192, 86, 33, 0.1);
    border-color: #9c4221;
    color: #fbd38d;
}

/* --- بخش موجودی انبار --- */
body.dark .stock-section,
[data-theme="dark"] .stock-section {
    background-color: #111827;
}

body.dark .stock-in,
[data-theme="dark"] .stock-in {
    background-color: rgba(34, 197, 94, 0.15); /* سبز ملایم دارک */
    color: #86efac;
}

body.dark .stock-out,
[data-theme="dark"] .stock-out {
    background-color: rgba(239, 68, 68, 0.15); /* قرمز ملایم دارک */
    color: #fca5a5;
}

/* --- دکمه بازگشت --- */
body.dark .back-button,
[data-theme="dark"] .back-button {
    background-color: #1f2937;
    color: #60a5fa;
    border-color: #60a5fa;
}

body.dark .back-button:hover,
[data-theme="dark"] .back-button:hover {
    background-color: #60a5fa;
    color: #1f2937;
}

/* عکس داخل اسلایدر (جلوگیری از سفیدی زننده در صورت ترنسپرنت بودن عکس) */
body.dark .slide img,
[data-theme="dark"] .slide img {
    background: #111827;
}
