/* استایل اختصاصی بخش نظرات محصول */

.btn-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

/* دکمه اصلی ثبت نظر داخل مودال */
.btn-review-primary {
    border-radius: 10px !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    font-weight: 700 !important;
    min-width: 110px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-review-primary .text { color: #fff !important; }
.btn-review-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-review-primary:active { transform: translateY(0); }

/* دکمه انصراف مودال */
.btn-cancel-review {
    border-radius: 10px !important;
    background: #fee2e2 !important; /* قرمز ملایم زمینه */
    color: #991b1b !important; /* قرمز متن */
    border: 1px solid #fecaca !important;
    padding: 10px 16px !important;
    font-weight: 700 !important;
    min-width: 110px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-cancel-review:hover { background: #fecaca !important; transform: translateY(-1px); }
.btn-cancel-review:active { transform: translateY(0); }

/* ورودی‌ها و تکست‌ایریا در مودال ثبت نظر */
#review-modal input[type="text"],
#review-modal textarea {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    transition: box-shadow .2s ease, border-color .2s ease;
}
#review-modal input[type="text"]:focus,
#review-modal textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* بزرگ‌تر کردن ارتفاع کادر متن نظر */
#review-modal textarea[name="body"] {
    min-height: 200px;
    resize: vertical;
}

/* ورودی‌های مودال پرسش */
#ask-modal textarea[name="question"] {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    min-height: 160px;
}
#ask-modal textarea[name="question"]:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}

.btn-review .label { 
    color: #fff; 
}

.btn-review .icon { 
    display: inline-flex; 
    align-items: center; 
}

.btn-review:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    box-shadow: 0 7px 14px rgba(59, 130, 246, 0.2), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-review:active { 
    transform: translateY(1px);
    background: linear-gradient(135deg, #1d4ed8 0%, #172554 100%);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2), 0 1px 1px rgba(0, 0, 0, 0.08);
}

.btn-review:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* انیمیشن ripple برای دکمه افزودن دیدگاه */
.btn-review::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #3b82f6 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.btn-review:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* استایل‌های تب‌های نظرات و پرسش و پاسخ */
#tab-reviews, #tab-qa {
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
}

#tab-reviews:hover, #tab-qa:hover, #tab-desc:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

#tab-reviews.active, #tab-qa.active, #tab-desc.active {
    background-color: rgba(59, 130, 246, 0.1);
}

#tab-reviews svg, #tab-qa svg, #tab-desc svg {
    transition: all 0.3s ease;
}

#tab-reviews:hover svg, #tab-qa:hover svg, #tab-desc:hover svg {
    transform: scale(1.1);
}

/* نشان تعداد نظرات کنار تب */
.badge-count {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

/* انیمیشن برای تغییر تب */
.tab-content {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل پیام عدم وجود دیدگاه */
.no-reviews-message {
    animation: fadeInUp 0.6s ease-out;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.no-reviews-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 1rem 1rem 0 0;
}

.no-reviews-message svg {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.no-reviews-message h3 {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.no-reviews-message p {
    line-height: 1.6;
    color: #64748b;
}

/* انیمیشن برای دکمه در پیام عدم وجود دیدگاه */
.no-reviews-message .btn-review {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* انیمیشن برای کارت‌های نظرات */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل برای کارت‌های نظرات */
.review-card {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    position: relative;
}

/* استایل ساده برای پرسش و پاسخ */
.qa-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 14px;
}
.qa-card .q { font-weight: 600; color: #111827; }
.qa-card .a { margin-top: 8px; color: #374151; }
.qa-empty {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}
.btn-ask {
    border-radius: 10px;
    background-image: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: #fff;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2), 0 1px 3px rgba(0, 0, 0, 0.08);
}
.btn-ask:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(59, 130, 246, 0.2), 0 3px 6px rgba(0, 0, 0, 0.08);
    background-image: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
}
.btn-ask:active { transform: translateY(0); }
.btn-ask .label { color: #fff; font-weight: 700; }
.btn-ask .icon { display: inline-flex; }

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* استایل ستاره‌ها */
.review-card .text-yellow-400 {
    color: #fbbf24 !important;
}

/* استایل عنوان نظر */
.review-card h4 {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* استایل اطلاعات کاربر */
.review-card .text-gray-500 {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* استایل متن نظر */
.review-card .text-gray-700 {
    color: #374151;
    line-height: 1.6;
    font-size: 15px;
}

/* استایل برچسب تأیید خرید */
.review-card .bg-green-100 {
    background-color: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}


