/* استایل‌های مدرن و واکنش‌گرا مشاور هوش مصنوعی */
.ai-hardware-advisor-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    font-family: inherit;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    direction: rtl;
    text-align: right;
}

.advisor-header h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #0f172a;
    text-align: right !important;
}
.advisor-header p {
    color: #64748b;
    margin: 0 0 20px;
    font-size: 0.95rem;
    text-align: right !important;
}

.advisor-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.advisor-step-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 8px;
    text-align: right;
}
.advisor-step-box.full-width {
    grid-column: 1 / -1;
}

/* رفع کامل مشکل فاصله زیاد بین کلمات در عناوین */
.advisor-field-label, 
.advisor-step-box label,
.advisor-step-box strong {
    display: block;
    text-align: right !important;
    text-justify: none !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
    margin-bottom: 6px;
}

.advisor-select, .advisor-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-top: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.advisor-select-sm {
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.85rem;
}

.radio-toggle-group {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 0.9rem;
}

/* نمایش پلتفرم پردازنده هر کدام در یک خط مستقل */
.cpu-platform-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.cpu-platform-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0 !important;
}
.cpu-platform-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.cpu-platform-row input[type="radio"] {
    margin: 0;
}

/* شاسی سلکتور */
.chassis-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.chassis-card {
    position: relative;
    cursor: pointer;
    display: block;
}
.chassis-card input[type="radio"] {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}
.chassis-card-body {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 10px;
    background: #fff;
    transition: all 0.2s ease;
}
.chassis-card input[type="radio"]:checked + .chassis-card-body {
    border-color: #0284c7;
    background: #f0f9ff;
}
.chassis-icon { font-size: 1.6rem; }
.chassis-info strong { display: block; font-size: 0.9rem; color: #0f172a; margin-bottom: 2px; }
.chassis-info small { font-size: 0.78rem; color: #64748b; line-height: 1.35; }

/* دکمه اصلی محاسبه */
.btn-calc-main {
    background: #0284c7 !important;
    color: #fff !important;
    padding: 12px 30px !important;
    border-radius: 8px !important;
    font-size: 1.05rem !important;
    font-weight: bold !important;
    border: none !important;
    cursor: pointer;
}
.btn-calc-main:hover {
    background: #0369a1 !important;
}

/* بنر خلاصه نتایج */
.results-summary-banner {
    background: #f1f5f9;
    border-right: 4px solid #0284c7;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: right;
}

/* کارت‌های پیشنهادی */
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.part-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    direction: rtl;
    text-align: right;
}
.part-card.is-selected {
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12);
}
.card-badge {
    position: absolute;
    top: -10px;
    left: 18px;
    background: #0f172a;
    color: #ffffff;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.part-name {
    margin: 4px 0 10px;
    font-size: 1.25rem;
    color: #0f172a;
    text-align: right;
}

/* نوار متریک‌ها با چینش استاندارد اعداد در سمت چپ واحد لاتین */
.metrics-row {
    display: flex;
    gap: 20px;
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #cbd5e1;
    direction: rtl;
    justify-content: flex-start;
    align-items: center;
}
.metric-val-tag {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: isolate;
    font-weight: 700;
    color: #0f172a;
}

/* ردیف‌های ستونی قطعات */
.hw-spec-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 16px 0;
    direction: rtl;
}

.hw-row {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    direction: rtl;
    gap: 14px;
}

.hw-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.hw-col-label {
    min-width: 145px;
    flex-shrink: 0;
    text-align: right;
}

.hw-icon-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    direction: ltr;
}

.hw-icon-tag svg {
    width: 16px;
    height: 16px;
}

/* رنگ‌بندی تفکیک‌شده تگ‌ها */
.tag-gpu     { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag-cpu     { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.tag-mb      { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.tag-ram     { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tag-psu     { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.tag-cooler  { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.tag-ssd     { background: #fdf4ff; color: #86198f; border: 1px solid #f5d0fe; }
.tag-chassis { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.tag-ups     { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }

.hw-col-name {
    font-size: 0.92rem;
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    direction: rtl;
    flex-grow: 1;
    line-height: 1.5;
}

.price-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    direction: rtl;
}
.price-box small { display: block; color: #64748b; font-size: 0.75rem; text-align: right; }
.total-amount { font-size: 1.28rem; font-weight: 900; color: #16a34a; }
.energy-box { text-align: left; font-size: 0.8rem; color: #64748b; }

/* باکس اسپانسر */
.ai-sponsor-box {
    margin-top: 25px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 20px;
}
.sponsor-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 15px;
}
.sponsor-logo-img { max-height: 50px; }
.sponsor-name { margin: 0 0 4px; font-size: 1.1rem; }
.sponsor-hint { margin: 0; font-size: 0.85rem; color: #64748b; }
.sponsor-coupon {
    display: inline-block;
    background: #fef3c7;
    border: 1px dashed #f59e0b;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 5px;
}
.sponsor-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sponsor-btn {
    padding: 10px 18px !important;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none !important;
}
.whatsapp-btn { background: #16a34a !important; color: #fff !important; border: none; }
.call-btn { background: #0284c7 !important; color: #fff !important; border: none; }
.invoice-btn { background: #475569 !important; color: #fff !important; }
.share-btn { background: #64748b !important; color: #fff !important; }

.sponsor-social-footer {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.85rem;
}
.sponsor-social-footer a { color: #475569; text-decoration: none; }