:root {
    --b-primary: #0D0625;
    --b-accent: #E14A5C;
    --b-glass: rgba(255, 255, 255, 0.7);
    --b-glass-border: rgba(255, 255, 255, 0.5);
    --b-shadow: 0 10px 30px rgba(13, 6, 37, 0.08);
    --b-green: #10b981;
    --b-gradient: linear-gradient(135deg, #E14A5C 0%, #ff758c 100%);
}

.bunak-dash-wrapper {
    font-family: inherit; max-width: 1200px; margin: 20px auto; direction: rtl; color: var(--b-primary); padding: 0 10px;
}

/* Glass Panels */
.glass-panel {
    background: var(--b-glass); border: 1px solid var(--b-glass-border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 24px; box-shadow: var(--b-shadow); padding: 20px; transition: transform 0.3s;
}
.dark-theme { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; }

/* Header & Controls */
.bunak-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.header-controls { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.dash-title { margin: 0; font-weight: 800; font-size: 1.5rem; }
.highlight { color: var(--b-accent); }

/* Search Box */
.bunak-search-box { position: relative; width: 100%; max-width: 300px; }
#bunak-search-input { width: 100%; padding: 10px 15px 10px 40px; border-radius: 50px !important; border: 1px solid rgba(0,0,0,0.1) !important; background: rgba(255,255,255,0.6) !important; font-family: inherit; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); opacity: 0.5; }

/* Filter Buttons */
.filter-group { background: rgba(13, 6, 37, 0.05); padding: 5px; border-radius: 50px !important; display: flex; gap: 5px; }
.filter-btn { background: transparent !important; border: none !important; padding: 8px 20px; border-radius: 50px !important; cursor: pointer; font-family: inherit; font-weight: 600; color: #666; transition: all 0.3s ease; }
.filter-btn.active { background: #fff !important; color: var(--b-accent) !important; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* Charts & Controls */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }
.chart-box { min-height: 350px; width: 100%; overflow: hidden; }
.chart-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }


/* Reset Zoom Button */
.chart-btn.hidden { display: none !important; }

#toggle-chart-type { width: 30px; padding: 0; border-radius: 50% !important; font-size: 16px; }


/* Products Grid */
.fade-in { animation: fadeIn 0.5s ease; }




.product-title { margin: 0; font-size: 0.95rem; height: 42px; overflow: hidden; line-height: 1.4; }
.product-title a { color: var(--b-primary); text-decoration: none; }
.price-value.new { font-size: 1.25rem; font-weight: 900; color: var(--b-primary); }




/* History Trigger Button */
.history-trigger-row { text-align: center; }

.history-btn-view:hover { border-color: var(--b-accent); color: var(--b-accent); background: rgba(225, 74, 92, 0.05); }
.count-badge { background: var(--b-accent); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; margin-left: 5px; }



/* Modal Styles */
.bunak-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(13, 6, 37, 0.85); z-index: 99999; display: none; justify-content: center; align-items: center; backdrop-filter: blur(8px); }
.bunak-modal.active { display: flex; animation: fadeIn 0.3s; }
.bunak-modal-content { background: #fff; width: 95%; max-width: 420px; padding: 0; border-radius: 24px; overflow: hidden; position: relative; max-height: 90vh; display: flex; flex-direction: column; }
.close-modal { position: absolute; left: 15px; top: 15px; font-size: 28px; cursor: pointer; color: #fff; z-index: 10; }
.history-close { color: #333; }

.modal-profit-box { background: linear-gradient(135deg, #10b981 0%, #059669 100%); padding: 35px 20px; text-align: center; color: #fff; position: relative; }
.profit-value-wrapper { display: flex; justify-content: center; align-items: baseline; gap: 8px; position: relative; z-index: 2; }
.profit-number { font-size: 3rem; font-weight: 900; letter-spacing: -2px; line-height: 1; }

.modal-body { padding: 25px; background: #fff; position: relative; z-index: 5; border-radius: 20px 20px 0 0; margin-top: -15px; }
.modal-product-summery { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; border-bottom: 1px dashed #e5e7eb; padding-bottom: 20px; }
#modal-img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; border: 1px solid #f3f4f6; }





.action-btn.secondary { background: #f3f4f6 !important; color: #4b5563 !important; }
.qty-selector.large { width: 100%; display: flex; justify-content: space-between; align-items: center; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 16px; padding: 6px; height: 56px; }
.qty-selector.large .qty-btn { width: 44px; height: 44px; font-size: 20px; }
.qty-selector.large input { font-size: 1.4rem; width: 80px; }

/* History List Styles */
.history-header { padding: 20px; border-bottom: 1px solid #eee; text-align: center; }
.history-header h3 { margin: 0; font-size: 1.1rem; }
.history-header p { margin: 5px 0 0; color: #666; font-size: 0.9rem; }
.history-list-wrap { padding: 20px; overflow-y: auto; max-height: 400px; }
.detailed-history-list { list-style: none; padding: 0; margin: 0; }
.history-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eee; align-items: center; font-size: 0.9rem; }
.history-item.up .h-diff { color: #ef4444; background: #fee2e2; padding: 2px 8px; border-radius: 4px; }
.history-item.down .h-diff { color: #166534; background: #dcfce7; padding: 2px 8px; border-radius: 4px; }
.h-date { color: #888; font-size: 0.8rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 480px) { .header-controls { flex-direction: column-reverse; width: 100%; } .bunak-search-box { max-width: 100%; } }


/* ... استایل‌های قبلی ... */

/* Search Box Placement Update (1. جابجایی سرچ باکس) */
.search-container-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    margin-top: 10px;
}

.bunak-search-box {
    position: relative;
    width: 100%;
    max-width: 600px; /* عریض‌تر برای جذابیت */
}

#bunak-search-input {
    width: 100%;
    padding: 15px 20px 15px 50px; /* پدینگ بیشتر برای حس مدرن */
    border-radius: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    font-family: inherit;
    font-size: 1rem;
    box-shadow: 0 5px 20px rgba(13, 6, 37, 0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
#bunak-search-input:focus {
    background: #fff !important;
    box-shadow: 0 8px 25px rgba(13, 6, 37, 0.1);
    border-color: var(--b-accent) !important;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    font-size: 1.2rem;
}


/* ریسپانسیو در موبایل */
@media (max-width: 480px) {
    .search-container-wrapper { margin-bottom: 20px; }
    #bunak-search-input { font-size: 0.9rem; padding: 12px 15px 12px 40px; }
    
    .card-actions { flex-direction: row; }
    .add-cart-btn { font-size: 0.85rem; min-width: auto; }
}




/* --- استایل جدید دکمه مشاهده نوسانات (جذاب‌تر) --- */
.history-trigger-row {
    margin-top: 5px;
}


.history-btn-view:hover {
    background: #fff;
    border-color: var(--b-accent);
    color: var(--b-accent);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.count-badge {
    background: var(--b-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(225, 74, 92, 0.3);
}

/* --- استایل دکمه ضربدر جستجو --- */
.clear-search {
    position: absolute;
    right: 45px; /* سمت راست (چپ آیکون سرچ در RTL) */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    display: none; /* پیش فرض مخفی */
    z-index: 10;
}
.clear-search.visible { display: block; }
.clear-search:hover { color: var(--b-accent); }
.bunak-search-box input { padding-left: 40px; padding-right: 40px; } /* فضای خالی برای دکمه */


/* --- استایل‌های مودال تاریخچه --- */
.history-chart-wrapper {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.history-header-labels {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    font-size: 0.8rem;
    color: #888;
    font-weight: 700;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 5px;
}
.detailed-history-list { list-style: none; padding: 0; margin: 0; }
.history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 5px; border-bottom: 1px dashed #eee; font-size: 0.9rem;
}
.history-item.up .h-diff { color: #ef4444; }
.history-item.down .h-diff { color: #166534; }
.diff-percent { font-size: 0.75rem; color: #999; margin-right: 3px; font-weight: 400; }



.card-img {
    width: 100%;
    position: relative;
    background: transparent;
    display: block;
    overflow: hidden;
}


/* استایل برچسب کاتالوگ انحصاری */
.exclusive-group-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45) !important;
    z-index: 3;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-img img {
    width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: unset !important; /* رفع حالت زوم و برش */
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

.card-body {
    padding: 16px; /* ایجاد فاصله منظم برای نوشته‌ها و دکمه‌ها */
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.card-body {
    padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
    width: 100%; box-sizing: border-box; /* مهم */
}



/* --- 3. بج سود (شامل تومان) --- */
/* ══════════════════════════════════════════════════
   رفع تداخل بج سود و بج زمان
   ══════════════════════════════════════════════════ */
/* بج ساعت در بالا سمت راست */
.price-time-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    color: #fff;
    z-index: 4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

/* کادر شمارنده تعداد با پدینگ متقارن و کنترل دقیق ارتفاع */
.bunak-qty-box {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #cbd5e1; /* خط خاکستری ملایم */
    border-radius: 10px;
    padding: 2px 3px; /* ایجاد دقیقاً ۲ تا ۳ پیکسل فاصله از همه طرف */
    box-sizing: border-box;
    transition: all 0.25s ease;
}

/* دکمه‌های + و - کاملاً مربعی بدون کشیدگی مستطیلی */
.bunak-qty-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 28px !important; /* جلوگیری قطعی از کشیده شدن */
    border-radius: 7px !important;
    border: none !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.bunak-qty-btn.plus {
    background: linear-gradient(145deg, #6a0d25 0%, #3a0412 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.bunak-qty-btn.plus:hover {
    background: linear-gradient(145deg, #7d112d 0%, #4c0719 100%) !important;
}

.bunak-qty-btn.minus {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}
.bunak-qty-btn.minus:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.bunak-qty-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    font-family: inherit;
    line-height: 1;
}



/* ══════════════════════════════════════════════════
   اصلاح اندازه و فاصله دکمه‌های + و - از کادر خاکستری
   ══════════════════════════════════════════════════ */





.profit-txt { font-weight: 800; font-size: 0.85rem; }
.profit-val-dynamic { font-size: 0.7rem; color: #047857; margin-top: 2px; }

/* --- 4. دکمه نوسان (History) --- */
.history-trigger-row { width: 100%; margin-top: 5px; }

.history-btn-view {
    width: 100%;
    border: none;
    border-radius: 50px; /* کاملا گرد */
    padding: 8px 0;
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; justify-content: center; align-items: center; gap: 5px;
}

/* حالت فعال (چند نوسان) */
.history-btn-view.multiple {
    background: rgba(225, 74, 92, 0.1);
    color: #E14A5C;
    border: 1px solid rgba(225, 74, 92, 0.2);
}



.history-btn-view[disabled] { pointer-events: none; opacity: 0.8; }

/* سایر استایل‌ها (Unit Price) */
.unit-price-row {
    font-size: 0.75rem; color: #64748b;
    background: rgba(0,0,0,0.03);
    padding: 3px 8px; border-radius: 6px;
    display: inline-flex; justify-content: space-between; width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .card-actions { flex-direction: row; } /* در موبایل هم افقی بماند */
    .add-cart-btn { font-size: 0.8rem; }
}

























/* --- استایل اینپوت تعداد (حل مشکل دیده نشدن عدد) --- */
.qty-selector {
    flex: 0 0 100px; /* عرض ثابت و کافی */
    background: #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 3px;
    height: 42px;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.card-qty {
    width: 40px;
    text-align: center;
    border: none !important;
    background: #fff !important; /* پس زمینه سفید */
    color: #000 !important; /* متن مشکی */
    font-weight: 800;
    font-size: 1.1rem;
    height: 34px;
    border-radius: 6px;
    margin: 0 2px;
    padding: 0;
    -moz-appearance: textfield;
}
.card-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qty-btn {
    width: 28px; height: 100%;
    background: #fff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #334155 !important;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: #f1f5f9 !important; color: #000 !important; }



/* --- دکمه نوسان (History) --- */
.history-btn-view {
    width: 100%;
    border-radius: 12px; /* گوشه گرد */
    padding: 10px;
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    transition: 0.3s;
    margin-bottom: 10px;
}

.history-btn-view.multiple:hover {
    background: #E14A5C;
    color: #fff;
    box-shadow: 0 4px 12px rgba(225, 74, 92, 0.2);
}
/* وقتی تک نوسان است (غیرفعال) */
.history-btn-view.single {
    opacity: 0.6; cursor: default;
}



/* --- History Modal Styles (New & Improved) --- */

/* ══════════════════════════════════════════════════
   مودال شیشه‌ای و دارک مدرن تاریخچه نوسانات بُنک
   ══════════════════════════════════════════════════ */
.bunak-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 3, 20, 0.82) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
}

.history-content.glass-panel-modal {
    background: linear-gradient(150deg, #120629 0%, #0d0625 50%, #170933 100%) !important;
    border: 1px solid rgba(225, 74, 92, 0.28) !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    width: 100%;
    max-width: 520px;
    border-radius: 22px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    direction: rtl;
    box-sizing: border-box;
}

/* هدر مودال */
.history-modal-header {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 16px 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.history-modal-header h3 {
    margin: 0 !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-modal-header h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #E14A5C, #ff758c);
    border-radius: 4px;
}

.history-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.history-close:hover {
    background: rgba(225, 74, 92, 0.25);
    border-color: rgba(225, 74, 92, 0.5);
    color: #ffffff;
    transform: rotate(90deg);
}

/* بدنه مودال */
.history-modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* باکس نمودار شیشه‌ای */
.history-chart-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 14px 12px 8px 12px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    min-height: 175px;
    box-sizing: border-box;
}

#history-modal-chart {
    width: 100% !important;
    height: 155px !important;
    position: relative;
}

/* جدول لیست تاریخچه */
.history-table-wrapper {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-sizing: border-box;
}

.history-table-header {
    display: grid !important;
    grid-template-columns: 1fr 1.1fr 1fr !important;
    padding: 10px 14px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    color: rgba(255, 255, 255, 0.65) !important;
    text-align: center !important;
}

.history-list-wrap {
    max-height: 250px;
    overflow-y: auto;
}

.detailed-history-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.history-item {
    display: grid !important;
    grid-template-columns: 1fr 1.1fr 1fr !important;
    padding: 10px 14px !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.07) !important;
    align-items: center !important;
    transition: background 0.2s ease !important;
}

.history-item:last-child {
    border-bottom: none !important;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.035) !important;
}

.h-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 2px !important;
}

/* ستون تاریخ و ساعت */
.h-col.date .date-main {
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    color: #e2e8f0 !important;
}

.h-col.date .date-time {
    font-size: 0.7rem !important;
    color: rgba(255, 255, 255, 0.45) !important;
}

/* ستون قیمت */
.h-col.price .price-val {
    font-weight: 900 !important;
    color: #ffffff !important;
    font-size: 0.85rem !important;
    direction: ltr !important;
    letter-spacing: -0.3px !important;
}

/* بج شیشه‌ای تغییر وضعیت */
.diff-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 2.5px 8px !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
    box-sizing: border-box !important;
}

.diff-badge small {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    opacity: 0.9 !important;
}

/* بج افزایش قیمت (قرمز/زرشکی شیشه‌ای) */
.diff-badge.up {
    background: rgba(225, 74, 92, 0.15) !important;
    border: 1px solid rgba(225, 74, 92, 0.35) !important;
    color: #ff758c !important;
}

/* بج کاهش قیمت (سبز زمردی شیشه‌ای) */
.diff-badge.down {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}

/* بج بدون تغییر */
.diff-badge.neutral {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.68rem !important;
}

/* اسکرول‌بار ظریف */
.history-modal-body-scroll::-webkit-scrollbar,
.history-list-wrap::-webkit-scrollbar {
    width: 4px;
}
.history-modal-body-scroll::-webkit-scrollbar-track,
.history-list-wrap::-webkit-scrollbar-track {
    background: transparent;
}
.history-modal-body-scroll::-webkit-scrollbar-thumb,
.history-list-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
.history-modal-body-scroll::-webkit-scrollbar-thumb:hover,
.history-list-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(225, 74, 92, 0.4);
}

.history-empty-state {
    padding: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
}
















/* --- استایل نمایش درصد سود در مودال --- */
.profit-details-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    position: relative;
    z-index: 2;
}

#modal-profit-percent {
    font-size: 1.1rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.approx-badge {
    background: #fbbf24; /* رنگ زرد هشدار */
    color: #451a03;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s;
}
.approx-badge.hidden { display: none; }

/* ... سایر استایل‌ها (بدون تغییر) ... */





/* --- اصلاح بخش دکمه خرید (تک دکمه) --- */
.card-actions {
    display: flex;
    margin-top: 12px;
    width: 100%;
}

.add-cart-btn {
    width: 100%; /* تمام عرض */
    background: linear-gradient(135deg, #0D0625 0%, #1e293b 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    height: 45px; /* کمی بلندتر برای جذابیت */
    font-size: 0.95rem; 
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 6, 37, 0.2);
    transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center;
}

.add-cart-btn:hover {
    background: linear-gradient(135deg, #E14A5C 0%, #ff758c 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(225, 74, 92, 0.4);
}







/* ... استایل‌های قبلی ... */

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.action-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 12px !important;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* دکمه افزودن و ادامه (تیره) */
.action-btn.primary {
    background: #334155 !important;
    color: #fff !important;
}
.action-btn.primary:hover {
    background: #1e293b !important;
    transform: translateY(-2px);
}

/* دکمه تسویه نهایی (سبز/آبی جذاب) */
.action-btn.checkout {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px -5px rgba(16, 185, 129, 0.4);
}
.action-btn.checkout:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -5px rgba(16, 185, 129, 0.5);
}
.action-btn.checkout:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none !important;
}

/* ... سایر استایل‌ها ... */




/* المان نگهبان (نامرئی اما دارای ارتفاع برای تشخیص اسکرول) */
#bunak-scroll-sentinel {
    width: 100%;
    height: 20px; /* ارتفاع حداقلی برای دیده شدن توسط Observer */
    margin-top: 10px;
    background: transparent;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════
   اسکلتون درون شبکه اصلی محصولات
   ══════════════════════════════════════════════════ */
.products-grid .bunak-skeleton-card {
    min-height: 380px;
    width: 100%;
}

/* کارت اسکلتون واحد با کادر و پس‌زمینه تفکیک‌شده */
.bunak-skeleton-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    height: 100%;
    box-sizing: border-box;
}

/* بلوک تصویر کالا با خاکستری ملایم و مرز مشخص */
.bsk-img-block {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
}

.bsk-body-block {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    flex-grow: 1;
}

@media (max-width: 600px) {
    .bsk-body-block {
        padding: 10px;
        gap: 6px;
    }
}

/* خطوط متنی عنوان با خاکستری واضح‌تر */
.bsk-line {
    height: 14px;
    border-radius: 6px;
    background: #cbd5e1;
}

.bsk-line.title {
    width: 85%;
}

.bsk-line.subtitle {
    width: 55%;
    margin-bottom: 2px;
    background: #e2e8f0;
}

/* باکس قیمت با رنگ شبیه به کادر قیمت اصلی */
.bsk-box.price-box {
    height: 48px;
    width: 100%;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
}

/* باکس سود و نوسان با ته رنگ سبز شیشه‌ای */
.bsk-box.metric-box {
    height: 42px;
    width: 100%;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 10px;
}

/* دکمه اسکلتون با پس‌زمینه زرشکی مات متناسب با تم بُنک */
.bsk-box.btn-box {
    height: 42px;
    width: 100%;
    margin-top: auto;
    border-radius: 12px;
    background: #831843;
    opacity: 0.35;
}

/* انیمیشن شیمر نوری پرکنتراست */
.bsk-shimmer {
    position: relative;
    overflow: hidden;
}

.bsk-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: bskShimmerAnim 1.3s infinite ease-in-out;
}

@keyframes bskShimmerAnim {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}











/* --- استایل قیمت اصلی ووکامرس در انتهای کارت --- */
.wc-main-price-row {
    margin-top: auto; /* چسبیدن به پایین قبل از دکمه */
    margin-bottom: 10px;
    background: #fff;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.wc-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.wc-value {
    font-size: 0.95rem;
    color: #0D0625;
    font-weight: 800;
}






/* --- استایل دکمه‌های فیلتر نمودار رادار --- */
.radar-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px;
    border-radius: 8px;
    gap: 2px;
}

.radar-filter-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 600;
}

.radar-filter-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.radar-filter-btn.active {
    background: #00F0FF; /* رنگ نئونی مخصوص تم دارک */
    color: #0D0625;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}









/* --- استایل دکمه‌های کنترل نمودار (جدید) --- */
.chart-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chart-btn {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #0D0625;
    cursor: pointer;
    border-radius: 12px; /* گوشه‌های گرد */
    padding: 6px 12px;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chart-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: #E14A5C;
    border-color: #E14A5C;
}

/* دکمه بازنشانی */
#reset-chart-zoom {
    font-size: 1rem;
    font-weight: bold;
}

/* دکمه تغییر نوع نمودار */
.chart-btn.toggle-mode {
    font-size: 1.2rem;
}









/* Chart.js Canvas */
#chart-trend,
#chart-radar,
#history-modal-chart,
#bunak-single-chart-area {
    display: block;
    width: 100% !important;
}
#chart-trend { height: 300px !important; }
#chart-radar { height: 300px !important; }
#history-modal-chart { height: 200px !important; }
#bunak-single-chart-area { height: 350px !important; }











/* ════════════════════════════════════════════════
   انیمیشن Skeleton نمودارها
════════════════════════════════════════════════ */
.bunak-chart-skeleton {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    z-index: 5;
    transition: opacity 0.4s ease;
}
.bunak-chart-skeleton.bcs-fade-out { opacity: 0; }

.bcs-shimmer {
    width: 100%; height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0)     0%,
        rgba(255,255,255,0.07)  45%,
        rgba(225,74,92,0.08)    50%,
        rgba(255,255,255,0.07)  55%,
        rgba(255,255,255,0)     100%
    );
    background-size: 200% 100%;
    animation: bunakShimmer 1.6s ease-in-out infinite;
}
@keyframes bunakShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* حذف کش رندر موبایل */
.chart-box canvas,
#chart-trend,
#chart-radar {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
@media (max-width: 768px) {
    .chart-box {
        min-height: 280px;
        overflow: visible !important;
        -webkit-overflow-scrolling: auto;
    }
    .chart-box canvas { max-width: 100% !important; }
    .glass-panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,0.92); }
}

/* ════════════════════════════════════════════════
   باکس گزارش هوشمند
════════════════════════════════════════════════ */
.bunak-report-box {
    direction: rtl;
    margin-bottom: 28px;
    background: linear-gradient(145deg, #0a021e 0%, #0d0625 55%, #150836 100%);
    border: 1px solid rgba(225, 74, 92, 0.25);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px -15px rgba(13,6,37,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.bunak-report-box::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(225,74,92,0.1) 0%, transparent 65%);
    pointer-events: none;
}
.bunak-report-box::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(0,227,150,0.07) 0%, transparent 65%);
    pointer-events: none;
}

/* Skeleton داخل گزارش */
.brb-skeleton { position: relative; z-index: 1; }
.brb-sk-line {
    height: 14px; border-radius: 8px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 12px;
    overflow: hidden;
}
.brb-sk-line::after {
    content: ''; display: block; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: bunakShimmer 1.6s infinite;
    background-size: 200% 100%;
}
.brb-sk-line.wide  { width: 65%; }
.brb-sk-line.medium { width: 40%; }
.brb-sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.brb-sk-card { height: 80px; border-radius: 14px; background: rgba(255,255,255,0.06); overflow: hidden; }
.brb-sk-card::after {
    content: ''; display: block; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    animation: bunakShimmer 1.6s infinite;
    background-size: 200% 100%;
}

/* هدر گزارش */
.brb-header-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; position: relative; z-index: 1;
}
.brb-badge-wrap { display: flex; align-items: center; gap: 8px; }
.brb-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #00E396;
    box-shadow: 0 0 10px rgba(0,227,150,0.7);
    animation: brbPulse 2s ease-in-out infinite;
}
@keyframes brbPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(0,227,150,0.5); }
    50%       { box-shadow: 0 0 16px rgba(0,227,150,0.9); }
}
.brb-badge-text {
    font-size: 0.85rem; font-weight: 800; color: rgba(255,255,255,0.9);
    letter-spacing: 0.3px;
}
.brb-date { font-size: 0.78rem; color: rgba(255,255,255,0.35); }

/* کارت‌های آمار */
.brb-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin-bottom: 16px; position: relative; z-index: 1;
}
.brb-stat-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    transition: border-color 0.3s;
}
.brb-stat-card:hover { border-color: rgba(225,74,92,0.35); }
.brb-stat-icon { font-size: 1.3rem; line-height: 1; }
.brb-stat-val  { font-size: 1.6rem; font-weight: 900; color: #fff; letter-spacing: -1px; line-height: 1; }
.brb-stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.45); font-weight: 600; }
.brb-stat-trend { font-size: 0.72rem; margin-top: 2px; }
.brb-trend-up   { color: #E14A5C; }
.brb-trend-down { color: #00E396; }

/* ردیف پرنوسان‌ها */
.brb-volatile-row {
    display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px; position: relative; z-index: 1;
}
.brb-volatile-title { font-size: 0.78rem; color: rgba(255,255,255,0.45); font-weight: 700; white-space: nowrap; padding-top: 4px; }
.brb-volatile-list  { display: flex; flex-wrap: wrap; gap: 6px; }
.brb-volatile-item {
    background: rgba(225,74,92,0.12);
    border: 1px solid rgba(225,74,92,0.2);
    color: #ffb3be;
    font-size: 0.75rem; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
}
.brb-volatile-item em { font-style: normal; color: #E14A5C; font-weight: 800; }

/* باکس تحلیل هوش مصنوعی */
.brb-insight-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex; align-items: flex-start; gap: 12px;
    position: relative; z-index: 1;
}
.brb-insight-icon-wrap {
    width: 36px; height: 36px; min-width: 36px;
    background: linear-gradient(135deg, rgba(225,74,92,0.25), rgba(90,50,180,0.2));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.brb-insight-text {
    margin: 0; font-size: 0.88rem; line-height: 1.7;
    color: rgba(255,255,255,0.8); flex: 1;
}
.brb-insight-source {
    display: block; font-size: 0.7rem; color: rgba(255,255,255,0.25);
    margin-top: 6px; text-align: left;
}

/* ریسپانسیو موبایل */
@media (max-width: 600px) {
    .brb-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .brb-sk-grid    { grid-template-columns: repeat(2, 1fr); }
    .bunak-report-box { padding: 16px; }
    .brb-stat-val   { font-size: 1.3rem; }
}
@media (max-width: 400px) {
    .brb-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}











/* ════════════════════════════════════════════════
   انیمیشن Skeleton روی نمودارهای داشبورد
════════════════════════════════════════════════ */
.bunak-chart-skeleton {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    z-index: 5;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.bunak-chart-skeleton.bcs-fade-out { opacity: 0; }
.bcs-shimmer {
    width: 100%; height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0)    0%,
        rgba(255,255,255,0.07) 45%,
        rgba(225,74,92,0.08)   50%,
        rgba(255,255,255,0.07) 55%,
        rgba(255,255,255,0)    100%
    );
    background-size: 200% 100%;
    animation: bunakShimmer 1.6s ease-in-out infinite;
}
@keyframes bunakShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── رفع کش رندر موبایل ── */
.chart-box {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
.chart-box canvas,
#chart-trend,
#chart-radar {
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
@media (max-width: 768px) {
    .chart-box {
        min-height: 260px;
        overflow: visible !important;
        -webkit-overflow-scrolling: auto;
    }
    .chart-box canvas { max-width: 100% !important; }
    /* موبایل: backdrop-filter سنگین است، حذف می‌شود */
    .glass-panel {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(255,255,255,0.95) !important;
    }
}


/* ════════════════════════════════════════════════
   باکس گزارش هوشمند — wrapper
════════════════════════════════════════════════ */
.bunak-report-box {
    direction: rtl;
    margin-bottom: 28px;
    background: linear-gradient(145deg, #0a021e 0%, #0d0625 55%, #150836 100%);
    border: 1px solid rgba(225, 74, 92, 0.22);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 20px 60px -15px rgba(13,6,37,0.55),
        0 0 0 1px rgba(255,255,255,0.04) inset;
}
.bunak-report-box::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(225,74,92,0.1) 0%, transparent 65%);
    pointer-events: none;
}
.bunak-report-box::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(0,227,150,0.07) 0%, transparent 65%);
    pointer-events: none;
}

/* skeleton داخل گزارش */
.brb-skeleton { position: relative; z-index: 1; }
.brb-sk-line {
    height: 14px; border-radius: 8px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}
.brb-sk-line::after {
    content: '';
    display: block; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200% 100%;
    animation: bunakShimmer 1.6s infinite;
    position: absolute; top: 0; left: 0;
}
.brb-sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.brb-sk-card {
    height: 80px; border-radius: 14px;
    background: rgba(255,255,255,0.06);
    overflow: hidden; position: relative;
}
.brb-sk-card::after {
    content: '';
    display: block; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    background-size: 200% 100%;
    animation: bunakShimmer 1.6s infinite;
    position: absolute; top: 0; left: 0;
}

/* هدر */
.brb-header-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px; position: relative; z-index: 1;
}
.brb-badge-wrap { display: flex; align-items: center; gap: 8px; }
.brb-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #00E396;
    box-shadow: 0 0 10px rgba(0,227,150,0.7);
    animation: brbPulse 2s ease-in-out infinite;
}
@keyframes brbPulse {
    0%,100% { box-shadow: 0 0 6px rgba(0,227,150,0.5); }
    50%      { box-shadow: 0 0 18px rgba(0,227,150,0.95); }
}
.brb-badge-text { font-size: 0.85rem; font-weight: 800; color: rgba(255,255,255,0.9); }
.brb-date { font-size: 0.75rem; color: rgba(255,255,255,0.3); }

/* ══════════════════════════════════════════════════
   چیدمان و رنگ‌بندی تفکیک‌شده کارت‌های آمار گزارش
   ══════════════════════════════════════════════════ */
.brb-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    position: relative;
    z-index: 1;
}

/* استایل عمومی تمام کارت‌های آمار */
.brb-stat-card {
    border-radius: 16px !important;
    padding: 15px 10px !important;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box;
}

.brb-stat-icon  { font-size: 1.3rem !important; line-height: 1 !important; }
.brb-stat-val   { font-size: 1.6rem !important; font-weight: 900 !important; color: #ffffff !important; letter-spacing: -1px !important; line-height: 1 !important; }
.brb-stat-label { font-size: 0.72rem !important; font-weight: 600 !important; line-height: 1.3 !important; }
.brb-stat-trend { font-size: 0.72rem !important; margin-top: 2px !important; }
.brb-trend-up   { color: #ff758c !important; }
.brb-trend-down { color: #00E396 !important; }

/* ۱. کارت‌های ثابت (امروز و ۷ روز گذشته - سمت راست در ویندوز) */
.brb-stat-card[data-key="today"] {
    order: 1 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.brb-stat-card[data-key="today"] .brb-stat-label {
    color: rgba(255, 255, 255, 0.45) !important;
}

.brb-stat-card[data-key="week"] {
    order: 2 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.brb-stat-card[data-key="week"] .brb-stat-label {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* ۲. کارت‌های متغیر و وابسته به بازه (سمت چپ در ویندوز با رنگ شیشه‌ای متمایز) */
.brb-stat-card[data-key="month"] {
    order: 3 !important;
    /* بک‌گراند شیشه‌ای بنفش/زرشکی با درخشش ملایم */
    background: linear-gradient(145deg, rgba(225, 74, 92, 0.14) 0%, rgba(13, 6, 37, 0.5) 100%) !important;
    border: 1px solid rgba(225, 74, 92, 0.4) !important;
    box-shadow: 0 4px 18px rgba(225, 74, 92, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
.brb-stat-card[data-key="month"] .brb-stat-val {
    color: #ffb3be !important;
    text-shadow: 0 0 12px rgba(225, 74, 92, 0.35);
}
.brb-stat-card[data-key="month"] .brb-stat-label {
    color: rgba(255, 200, 210, 0.85) !important;
    font-weight: 700 !important;
}

.brb-stat-card[data-key="avg"] {
    order: 4 !important;
    /* بک‌گراند شیشه‌ای با تم متناسب و حاشیه مشخص */
    background: linear-gradient(145deg, rgba(225, 74, 92, 0.14) 0%, rgba(13, 6, 37, 0.5) 100%) !important;
    border: 1px solid rgba(225, 74, 92, 0.4) !important;
    box-shadow: 0 4px 18px rgba(225, 74, 92, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
.brb-stat-card[data-key="avg"] .brb-stat-val {
    color: #ffb3be !important;
    text-shadow: 0 0 12px rgba(225, 74, 92, 0.35);
}
.brb-stat-card[data-key="avg"] .brb-stat-label {
    color: rgba(255, 200, 210, 0.85) !important;
    font-weight: 700 !important;
}

/* هاور کارت‌ها */
.brb-stat-card:hover {
    transform: translateY(-2px);
}
.brb-stat-card[data-key="month"]:hover,
.brb-stat-card[data-key="avg"]:hover {
    border-color: rgba(225, 74, 92, 0.7) !important;
    box-shadow: 0 6px 22px rgba(225, 74, 92, 0.3) !important;
}

/* ══════════════════════════════════════════════════
   چیدمان موبایل: متغیرهای بازه در بالا (ردیف اول)
   ══════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .brb-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* کارت‌های بازه به ردیف بالا منتقل می‌شوند */
    .brb-stat-card[data-key="month"] {
        order: 1 !important;
    }
    .brb-stat-card[data-key="avg"] {
        order: 2 !important;
    }

    /* کارت‌های ثابت امروز و ۷ روز به ردیف پایین می‌روند */
    .brb-stat-card[data-key="today"] {
        order: 3 !important;
    }
    .brb-stat-card[data-key="week"] {
        order: 4 !important;
    }

    .brb-stat-val {
        font-size: 1.3rem !important;
    }
    .brb-stat-label {
        font-size: 0.68rem !important;
    }
}

/* ── بهترین روز سفارش ── */
.brb-best-day-row {
    display: flex; align-items: center; gap: 12px;
    background: rgba(0,227,150,0.08);
    border: 1px solid rgba(0,227,150,0.2);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 14px;
    position: relative; z-index: 1;
    flex-wrap: wrap;
}
.brb-bestday-icon { font-size: 1.3rem; }
.brb-bestday-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.brb-bestday-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.brb-bestday-val {
    font-size: 1rem; font-weight: 800; color: #00E396;
    text-shadow: 0 0 12px rgba(0,227,150,0.4);
}
.brb-order-now-btn {
    background: linear-gradient(135deg, #00E396, #00b377);
    color: #0a021e !important;
    text-decoration: none !important;
    font-size: 0.82rem; font-weight: 800;
    padding: 8px 16px; border-radius: 10px;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(0,227,150,0.3);
}
.brb-order-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,227,150,0.45);
}

/* ── نمودار مینی هفتگی ── */
.brb-mini-chart-wrap {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    position: relative; z-index: 1;
}
.brb-mini-chart-label {
    font-size: 0.72rem; color: rgba(255,255,255,0.4);
    font-weight: 700; margin-bottom: 8px;
}

/* ── پرنوسان‌ها — کارت‌های کامل ── */
.brb-volatile-section {
    margin-bottom: 14px; position: relative; z-index: 1;
}
.brb-volatile-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.brb-volatile-title { font-size: 0.8rem; font-weight: 800; color: rgba(255,255,255,0.7); }
.brb-volatile-sub   { font-size: 0.7rem; color: rgba(255,255,255,0.3); }

.brb-volatile-list {
    display: flex; flex-direction: column; gap: 6px;
}
/* ══════════════════════════════════════════════════
   استایل استاندارد و واکنش‌گرای کارت‌های پرنوسان
   ══════════════════════════════════════════════════ */
.brb-volatile-section {
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.brb-volatile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.brb-volatile-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
}

.brb-volatile-sub {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
}

.brb-volatile-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brb-volatile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 8px 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}

.brb-volatile-card:hover {
    background: rgba(225, 74, 92, 0.1);
    border-color: rgba(225, 74, 92, 0.35);
    transform: translateX(-2px);
}

.brb-vol-img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: #ffffff;
    flex-shrink: 0;
    padding: 3px;
    box-sizing: border-box;
}

.brb-vol-info {
    flex: 1;
    min-width: 0; /* جلوگیری از سرریز متن و فشار به قیمت */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
}

.brb-vol-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.3;
}

.brb-vol-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
}

.brb-vol-change {
    font-style: normal;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.brb-vol-pct {
    font-style: normal;
    color: #00E396;
    font-weight: 800;
    background: rgba(0, 227, 150, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
}

.brb-vol-pct.high {
    color: #ff758c;
    background: rgba(225, 74, 92, 0.15);
}

.brb-vol-price {
    font-size: 0.85rem;
    font-weight: 900;
    color: #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: left;
    direction: ltr;
    padding-right: 4px;
}

/* ══════════════════════════════════════════════════
   باکس تحلیل هوش مصنوعی (خوانا و مرتب در موبایل)
   ══════════════════════════════════════════════════ */
.brb-insight-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column; /* چیدمان عمودی برای راحتی خوانش متن */
    gap: 12px;
}

.brb-insight-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.brb-insight-icon-wrap {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, rgba(225, 74, 92, 0.25), rgba(90, 50, 180, 0.25));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.brb-insight-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brb-source-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
}

.brb-source-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ══════════════════════════════════════════════════
   باکس‌های شیشه‌ای چندگانه تحلیل هوشمند بازار
   ══════════════════════════════════════════════════ */
.brb-insight-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.brb-glass-block {
    background: rgba(13, 6, 37, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 12px 14px;
    box-sizing: border-box;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brb-glass-block:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* ۱. باکس خلاصه وضعیت دوره (آبی نئونی ملایم) */
.brb-glass-block.state-box {
    border-right: 3px solid #38bdf8;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.08) 0%, rgba(13, 6, 37, 0.4) 100%);
}

/* ۲. باکس اقلام پرنوسان (زرشکی/طلایی شیشه‌ای برای بیان دوطرفه ریسک و سود) */
.brb-glass-block.volatile-box {
    border-right: 3px solid #fbbf24;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.08) 0%, rgba(13, 6, 37, 0.4) 100%);
}

/* ۳. باکس استراتژی خرید و سود (سبز زمردی شیشه‌ای) */
.brb-glass-block.strategy-box {
    border-right: 3px solid #00E396;
    background: linear-gradient(90deg, rgba(0, 227, 150, 0.08) 0%, rgba(13, 6, 37, 0.4) 100%);
}

/* ۴. باکس زمان‌بندی هوشمند سفارش (سرخ‌آبی/بنفش شیشه‌ای) */
.brb-glass-block.timing-box {
    border-right: 3px solid #E14A5C;
    background: linear-gradient(90deg, rgba(225, 74, 92, 0.08) 0%, rgba(13, 6, 37, 0.4) 100%);
}

/* هدر هر بلوک شیشه‌ای */
.bgb-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}

.bgb-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.bgb-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.brb-glass-block.state-box .bgb-title    { color: #7dd3fc; }
.brb-glass-block.volatile-box .bgb-title { color: #fde047; }
.brb-glass-block.strategy-box .bgb-title { color: #6ee7b7; }
.brb-glass-block.timing-box .bgb-title   { color: #fca5a5; }

/* متن داخلی بلوک */
.bgb-body {
    font-size: 0.82rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
    text-align: justify;
}

@media (max-width: 600px) {
    .brb-glass-block {
        padding: 10px 12px;
        border-radius: 12px;
    }
    .bgb-title {
        font-size: 0.76rem;
    }
    .bgb-body {
        font-size: 0.78rem;
        line-height: 1.7;
    }
}

/* ══════════════════════════════════════════════════
   تنظیمات واکنش‌گرایی در نمایشگرهای موبایل (زیر 600px)
   ══════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .bunak-report-box {
        padding: 14px !important;
        border-radius: 18px !important;
        margin-bottom: 20px !important;
    }

    .brb-header-row {
        margin-bottom: 14px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .brb-date {
        font-size: 0.7rem !important;
    }

    /* دو ستونه شدن کارت‌های آمار در موبایل */
    .brb-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .brb-stat-card {
        padding: 10px 8px !important;
    }

    .brb-stat-val {
        font-size: 1.25rem !important;
    }

    .brb-stat-label {
        font-size: 0.68rem !important;
    }

    /* سطر بهترین روز سفارش */
    .brb-best-day-row {
        padding: 10px 12px !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .brb-bestday-icon {
        font-size: 1.1rem !important;
    }

    .brb-bestday-label {
        font-size: 0.7rem !important;
    }

    .brb-bestday-val {
        font-size: 0.88rem !important;
    }

    /* تنظیمات کارت کالای پرنوسان در موبایل */
    .brb-volatile-card {
        padding: 6px 10px !important;
        gap: 8px !important;
    }

    .brb-vol-img {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }

    .brb-vol-name {
        font-size: 0.76rem !important;
    }

    .brb-vol-meta {
        font-size: 0.68rem !important;
        gap: 6px !important;
    }

    .brb-vol-price {
        font-size: 0.78rem !important;
    }

    /* متن تحلیل هوش مصنوعی در موبایل */
    .brb-insight-box {
        padding: 12px !important;
        gap: 8px !important;
    }

    .brb-insight-text {
        font-size: 0.82rem !important;
        line-height: 1.75 !important;
    }
}

.brb-insight-icon-wrap {
    width: 38px; height: 38px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(225,74,92,0.2), rgba(90,50,180,0.2));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.brb-source-icon { line-height: 1; }
.brb-insight-meta {
    display: flex; flex-direction: column; gap: 3px;
}
.brb-source-label {
    font-size: 0.8rem; font-weight: 800;
    color: rgba(255,255,255,0.75);
}
.brb-source-badge {
    display: inline-block;
    font-size: 0.65rem; font-weight: 800;
    padding: 2px 8px; border-radius: 20px;
    letter-spacing: 0.3px;
}
/* رنگ‌های badge بر اساس منبع */
.brb-badge-claude {
    background: rgba(90,50,180,0.25);
    color: #c4b5fd;
    border: 1px solid rgba(90,50,180,0.4);
}
.brb-badge-gemini {
    background: rgba(26,115,232,0.2);
    color: #93c5fd;
    border: 1px solid rgba(26,115,232,0.35);
}
.brb-badge-php {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.12);
}

.brb-insight-text {
    margin: 0 0 16px 0;
    font-size: 0.88rem; line-height: 1.8;
    color: rgba(255,255,255,0.8);
}

/* دکمه CTA */
.brb-cta-btn {
    display: flex; justify-content: center; align-items: center; gap: 8px;
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #E14A5C 0%, #ff758c 100%);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-size: 0.95rem; font-weight: 800;
    box-shadow: 0 8px 20px rgba(225,74,92,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: -0.2px;
}
.brb-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(225,74,92,0.5);
}
.brb-cta-arrow {
    transition: transform 0.2s;
    display: inline-block;
}
.brb-cta-btn:hover .brb-cta-arrow { transform: translateX(-4px); }




/* کانتینر اختصاصی دکمه خرید و شمارنده داخل کارت */
.bunak-cart-action-wrap {
    width: 100%;
    position: relative;
    box-sizing: border-box;
}




/* ۱. هایلایت زرد در حین کلیک و کم/زیاد شدن */
.bunak-qty-box.status-loading {
    border-color: #f59e0b !important;
    background: #fefce8 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45) !important;
}

/* ۲. هایلایت سبز بعد از موفقیت‌آمیز بودن افزودن به سبد */
.bunak-qty-box.status-success {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45) !important;
}
















/* ══════════════════════════════════════════════════
   چیدمان محصولات: ۵ محصول در دسکتاپ، ۲ محصول در موبایل
   ══════════════════════════════════════════════════ */
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important; /* ۵ کالا در حالت ویندوز */
    gap: 12px !important;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* ۲ کالا در موبایل */
        gap: 8px !important;
    }
    .card-body {
        padding: 10px !important;
        gap: 6px !important;
    }
    .product-title {
        font-size: 0.82rem !important;
        height: 38px !important;
    }
    .price-new-value {
        font-size: 0.95rem !important;
    }
}

/* ══════════════════════════════════════════════════
   استایل برچسب زمان آخرین تغییر قیمت (بالا راست)
   ══════════════════════════════════════════════════ */
.price-time-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    color: #fff;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.2px;
}

/* رنگ‌بندی شرطی */
.price-time-badge.time-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); /* زیر ۲ روز */
}
.price-time-badge.time-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); /* ۲ تا ۷ روز */
}
.price-time-badge.time-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); /* ۷ تا ۱۴ روز */
}
.price-time-badge.time-black {
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%); /* بیش از ۱۴ روز */
}

/* ══════════════════════════════════════════════════
   دکمه افزودن به سبد و سلکتور تعداد مدرن با گرادیان
   ══════════════════════════════════════════════════ */
.bunak-btn-add-main {
    width: 100%;
    /* گرادیان زرشکی با هایلایت مشکی ملایم */
    background: linear-gradient(145deg, #6a0d25 0%, #400514 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    height: 42px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: inherit;
}
.bunak-btn-add-main:hover {
    background: linear-gradient(145deg, #7a102c 0%, #4a0718 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}






.bunak-qty-val {
    font-size: 1.1rem;
    font-weight: 900;
    color: #0f172a;
    font-family: inherit;
}







/* ══════════════════════════════════════════════════
   باکس واحد و یکپارچه قیمت (ابعاد جمع‌وجور و شیک)
   ══════════════════════════════════════════════════ */
.bunak-price-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* سطر قیمت اصلی و خط‌خورده */
.bpb-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.bpb-price-old {
    font-size: 0.72rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}




/* سطر قیمت تکی / واحد */
.bpb-unit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #e2e8f0;
    padding-top: 4px;
    font-size: 0.7rem;
    line-height: 1;
}

.bpb-unit-label {
    color: #64748b;
    font-weight: 600;
}

.bpb-unit-val {
    color: #334155;
    font-weight: 800;
}










/* ══════════════════════════════════════════════════
   بک‌گراند شیشه‌ای سبز برای قیمت کنونی
   ══════════════════════════════════════════════════ */
.bpb-price-current {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    margin-right: auto;
    background: rgba(16, 185, 129, 0.12); /* شیشه‌ای سبز زمردی */
    border: 1px solid rgba(16, 185, 129, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    line-height: 1;
}

.bpb-val {
    font-size: 0.95rem;
    font-weight: 900;
    color: #065f46; /* سبز تیره خوانا و هماهنگ */
    letter-spacing: -0.4px;
    line-height: 1;
}

.bpb-cur {
    font-size: 0.65rem;
    color: #047857;
    font-weight: 700;
    line-height: 1;
}

/* ══════════════════════════════════════════════════
   چسبیدن قطعی عکس به لبه‌ها و حذف پدینگ کارت
   ══════════════════════════════════════════════════ */
.product-card.glass-panel {
    padding: 0 !important; /* حذف کامل پدینگ کارت تا عکس لبه به لبه شود */
    border-radius: 18px;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box;
}

.card-img {
    width: 100%;
    position: relative;
    background: transparent;
    display: block;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.card-img img {
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

.card-body {
    padding: 14px;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.card-actions {
    margin-top: auto !important; /* چسبیدن تراز دکمه‌ها به کف کارت */
    padding-top: 4px;
    width: 100%;
}

/* ══════════════════════════════════════════════════
   دکمه شیشه‌ای رنگی نوسانات (بالا سمت چپ با SVG)
   ══════════════════════════════════════════════════ */
.bunak-history-glass-icon {
    position: absolute !important;
    top: 12px !important;        /* فاصله منظم از لبه بالای عکس */
    left: 12px !important;       /* فاصله منظم ۱۲ پیکسلی از لبه سمت چپ */
    right: auto !important;      /* غیرفعال‌‌سازی قطعی سمت راست */
    bottom: auto !important;     /* غیرفعال‌سازی قطعی چسبیدن به پایین */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    background: rgba(225, 74, 92, 0.45) !important; /* شیشه‌ای رنگی با وضوح بالا */
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 4px 12px rgba(225, 74, 92, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.bunak-history-glass-icon:hover {
    background: rgba(225, 74, 92, 0.8) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(225, 74, 92, 0.5);
}

.bunak-history-glass-icon:hover {
    background: rgba(225, 74, 92, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 16px rgba(225, 74, 92, 0.5);
}

/* حالت بدون سابقه */
.bunak-history-glass-icon.single {
    background: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* آیکون برداری SVG */
.bunak-history-glass-icon .hgi-svg {
    width: 17px;
    height: 17px;
    color: #ffffff;
    display: block;
    stroke: #ffffff;
}

/* بج تعداد نوسانات */
.bunak-history-glass-icon .hgi-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #0D0625;
    color: #00E396; /* سبز نئونی بنک */
    font-size: 0.65rem;
    font-weight: 900;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    padding: 0 3px;
    line-height: 1;
}









/* ══════════════════════════════════════════════════
   باکس واحد شیشه‌ای دو ردیفه: سود (ردیف ۱) و نوسان (ردیف ۲)
   ══════════════════════════════════════════════════ */
.bunak-meta-metrics-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 6px 9px;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
    gap: 5px;
    transition: all 0.25s ease;
}

/* حالت کاهش قیمت (سبز شیشه‌ای جذاب) */
.bunak-meta-metrics-box.down {
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1px solid rgba(16, 185, 129, 0.22) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.05);
}

/* حالت افزایش قیمت (قرمز شیشه‌ای جذاب) */
.bunak-meta-metrics-box.up {
    background: rgba(225, 74, 92, 0.08) !important;
    border: 1px solid rgba(225, 74, 92, 0.22) !important;
    box-shadow: 0 2px 8px rgba(225, 74, 92, 0.05);
}

/* ردیف‌های داخلی */
.bmm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    white-space: nowrap; /* ممانعت قطعی از شکستن خط */
    line-height: 1.2;
}

/* خط جداکننده ظریف بین ردیف ۱ و ۲ */
.bmm-row.profit-row {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.07);
    padding-bottom: 4px;
}

.bmm-row.profit-row .bmm-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #047857;
}

.bmm-row.profit-row .bmm-val {
    font-size: 0.72rem;
    font-weight: 900;
    color: #065f46;
}

.bmm-change-details {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bmm-row.change-row-inner .bmm-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}

.bunak-meta-metrics-box.down .change-val {
    color: #059669;
    font-size: 0.74rem;
    font-weight: 900;
}

.bunak-meta-metrics-box.up .change-val {
    color: #b91c1c;
    font-size: 0.74rem;
    font-weight: 900;
}

/* بج کوچک درصد */
.bmm-badge.change-badge {
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 5px;
    font-weight: 900;
    line-height: 1;
}

.bunak-meta-metrics-box.up .change-badge {
    background: rgba(225, 74, 92, 0.16);
    color: #dc2626;
}

.bunak-meta-metrics-box.down .change-badge {
    background: rgba(16, 185, 129, 0.16);
    color: #059669;
}







/* ══════════════════════════════════════════════════
   دکمه ذره‌بین شیشه‌ای (پایین سمت چپ تصویر)
   ══════════════════════════════════════════════════ */
.bunak-zoom-glass-btn {
    position: absolute !important;
    bottom: 12px !important;       /* گوشه پایین عکس */
    left: 12px !important;         /* سمت چپ عکس، هم‌تراز با دکمه نوسان بالا */
    right: auto !important;
    top: auto !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    background: rgba(13, 6, 37, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.bunak-zoom-glass-btn:hover {
    background: rgba(13, 6, 37, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.bunak-zoom-glass-btn .zoom-svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    display: block;
}

/* ══════════════════════════════════════════════════
   اورلی بزرگ‌نمایی تصویر (خروج با یک کلیک)
   ══════════════════════════════════════════════════ */
.bunak-zoom-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 6, 37, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.bunak-zoom-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.25s ease;
}

/* کانتینر نمایش کارت زوم‌شده */
.bunak-zoom-container {
    max-width: 400px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

/* استایل کارت زوم‌شده درون لایت‌باکس با دکمه‌های فعال */
.bunak-zoom-container .product-card {
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 22px !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    transform: scale(0.94);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto !important; /* فعال‌سازی کامل کلیک روی دکمه‌ها */
    cursor: default;
}

.bunak-zoom-container .product-card a {
    pointer-events: none; /* غیرفعال‌سازی لینک عنوان محصول در حالت زوم */
}

.bunak-zoom-overlay.active .bunak-zoom-container .product-card {
    transform: scale(1);
}

/* فونت‌ها و مقادیر در کارت زوم‌شده درشت‌تر و خواناتر می‌شوند */
.bunak-zoom-container .product-title {
    font-size: 1.15rem !important;
    height: auto !important;
    line-height: 1.5 !important;
    margin-bottom: 6px !important;
}

.bunak-zoom-container .bpb-val {
    font-size: 1.25rem !important;
}

.bunak-zoom-container .bpb-cur {
    font-size: 0.8rem !important;
}

.bunak-zoom-container .bpb-unit-val {
    font-size: 0.88rem !important;
}

.bunak-zoom-container .bmm-row.profit-row .bmm-val {
    font-size: 0.88rem !important;
}

.bunak-zoom-container .change-val {
    font-size: 0.9rem !important;
}

.bunak-zoom-container .card-body {
    padding: 18px !important;
    gap: 12px !important;
}

/* حالت موبایل: کارت تقریباً تمام‌عرض صفحه می‌شود */
@media (max-width: 600px) {
    .bunak-zoom-container {
        max-width: 94vw !important;
    }
}













/* ══════════════════════════════════════════════════
   نوار انتخاب بازه زمانی شیشه‌ای رنگی و نئونی مدرن
   ══════════════════════════════════════════════════ */
.brb-range-selector-wrap {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    background: rgba(13, 6, 37, 0.45) !important;
    border: 1px solid rgba(225, 74, 92, 0.2) !important;
    border-radius: 16px !important;
    padding: 6px 8px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.brb-range-selector-scroll {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 2px 0 !important;
}

.brb-range-selector-scroll::-webkit-scrollbar {
    display: none !important;
}

/* دکمه‌های شیشه‌ای رنگی غیرفعال */
.brb-range-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    flex-shrink: 0 !important;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    line-height: 1.3 !important;
}

/* هاور دکمه‌ها با رنگ بنفش/نئونی ملایم */
.brb-range-btn:hover {
    background: rgba(225, 74, 92, 0.18) !important;
    border-color: rgba(225, 74, 92, 0.45) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(225, 74, 92, 0.25) !important;
}

/* دکمه فعال (بازه انتخاب‌شده) با گرادیان سرخ‌آبی درخشان */
.brb-range-btn.active {
    background: linear-gradient(135deg, #E14A5C 0%, #a82435 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow: 0 4px 15px rgba(225, 74, 92, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* بهینه‌سازی دکمه‌ها در موبایل */
@media (max-width: 600px) {
    .brb-range-selector-wrap {
        padding: 4px 6px !important;
        margin-bottom: 14px !important;
    }
    .brb-range-selector-scroll {
        gap: 6px !important;
    }
    .brb-range-btn {
        padding: 6px 12px !important;
        font-size: 0.74rem !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 600px) {
    .brb-range-btn {
        padding: 6px 11px;
        font-size: 0.72rem;
    }
}







/* ══════════════════════════════════════════════════
   باکس شیشه‌ای نام محصول درون متون تحلیلی
   ══════════════════════════════════════════════════ */
.brb-product-glass-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 2px 8px !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    margin: 2px 3px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    transition: all 0.2s ease !important;
    vertical-align: middle;
}

.brb-product-glass-chip:hover {
    background: rgba(225, 74, 92, 0.3) !important;
    border-color: rgba(225, 74, 92, 0.6) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(225, 74, 92, 0.3) !important;
}

.brb-product-glass-chip .bpc-icon {
    font-style: normal;
    font-size: 0.75rem;
    line-height: 1;
}

/* هماهنگی با رنگ‌بندی هر باکس */
.brb-glass-block.volatile-box .brb-product-glass-chip {
    background: rgba(251, 191, 36, 0.16) !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
    color: #fef08a !important;
}

.brb-glass-block.strategy-box .brb-product-glass-chip {
    background: rgba(0, 227, 150, 0.16) !important;
    border-color: rgba(0, 227, 150, 0.45) !important;
    color: #a7f3d0 !important;
}

.brb-glass-block.state-box .brb-product-glass-chip {
    background: rgba(56, 189, 248, 0.16) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    color: #bae6fd !important;
}







/* ══════════════════════════════════════════════════
   باکس‌های مدرن و شیشه‌ای تحلیل بازار و نمودارها
   ══════════════════════════════════════════════════ */
.bunak-header-dark {
    background: linear-gradient(145deg, #0a021e 0%, #0d0625 55%, #150836 100%) !important;
    border: 1px solid rgba(225, 74, 92, 0.25) !important;
    border-radius: 20px !important;
    padding: 20px 24px !important;
    box-shadow: 0 15px 35px rgba(13, 6, 37, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* رفع قطعی مشکل تاریک بودن متون هدر */
.bunak-header-dark .dash-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1.35rem !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.bunak-header-dark .dash-title .highlight {
    color: #ff758c !important;
    text-shadow: 0 0 12px rgba(225, 74, 92, 0.6) !important;
}

.bunak-header-dark .dash-subtitle {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
}

.dash-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-title-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(225, 74, 92, 0.25), rgba(90, 50, 180, 0.3));
    border: 1px solid rgba(225, 74, 92, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 15px rgba(225, 74, 92, 0.2);
}

.dash-subtitle {
    display: block;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

/* استایل پایه هدر دارک */
.bunak-header-dark {
    display: flex !important;
    flex-direction: column !important; /* هدر همیشه بالا و دکمه‌ها زیر آن */
    align-items: stretch !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.bunak-header-dark .dash-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
}

.bunak-header-dark .header-controls {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* کانتینر اسکرول‌خور دکمه‌ها با افکت شیشه‌ای */
.modern-glass-filter {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 14px !important;
    padding: 6px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* فایرفاکس */
}

.modern-glass-filter::-webkit-scrollbar {
    display: none !important; /* کروم و سافاری */
}

/* دکمه‌های تایم فریم به صورت شیشه‌ای شفاف */
.modern-glass-filter .filter-btn {
    flex: 1 0 auto !important; /* اندازه متناسب با متن بدون فشرده شدن */
    color: rgba(255, 255, 255, 0.72) !important;
    padding: 8px 14px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important; /* جلوگیری از شکستن خط و گرد شدن دکمه */
    text-align: center !important;
    cursor: pointer !important;
    line-height: 1.3 !important;
    box-sizing: border-box !important;
}

.modern-glass-filter .filter-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* حالت فعال (انتخاب‌شده): شیشه‌ای زرشکی/صورتی شفاف با بردر نئونی */
.modern-glass-filter .filter-btn.active {
    background: linear-gradient(135deg, rgba(225, 74, 92, 0.25) 0%, rgba(225, 74, 92, 0.1) 100%) !important;
    border: 1px solid rgba(225, 74, 92, 0.65) !important;
    color: #ff94a4 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(225, 74, 92, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    text-shadow: 0 0 10px rgba(225, 74, 92, 0.45) !important;
}

/* ریسپانسیو اختصاصی موبایل */
@media (max-width: 600px) {
    .bunak-header-dark {
        padding: 14px !important;
        gap: 12px !important;
    }

    .bunak-header-dark .dash-title-wrap {
        gap: 10px !important;
    }

    .bunak-header-dark .dash-title {
        font-size: 1.1rem !important;
    }

    .bunak-header-dark .dash-subtitle {
        font-size: 0.72rem !important;
    }

    .modern-glass-filter {
        padding: 4px !important;
        gap: 6px !important;
    }

    .modern-glass-filter .filter-btn {
        padding: 7px 12px !important;
        font-size: 0.72rem !important;
    }
}

/* باکس نمودارها */
.charts-grid-modern {
    display: grid !important;
    grid-template-columns: 1.25fr 1fr !important;
    gap: 16px !important;
    margin-bottom: 30px !important;
}

.modern-dark-box {
    background: linear-gradient(145deg, #0a021e 0%, #0d0625 60%, #130730 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 22px !important;
    padding: 20px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(13, 6, 37, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.modern-dark-box::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(225, 74, 92, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.chart-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-heading h4 {
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
}

.chart-sub {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    display: block;
    margin-top: 2px;
}

.chart-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.chart-icon.pulse-red {
    background: rgba(225, 74, 92, 0.15);
    border: 1px solid rgba(225, 74, 92, 0.3);
}

.chart-icon.pulse-green {
    background: rgba(0, 227, 150, 0.15);
    border: 1px solid rgba(0, 227, 150, 0.3);
}

.modern-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border-radius: 10px !important;
    width: 36px;
    height: 36px;
    transition: all 0.2s ease !important;
}

.modern-btn:hover {
    background: rgba(225, 74, 92, 0.25) !important;
    border-color: rgba(225, 74, 92, 0.5) !important;
    transform: translateY(-2px);
}

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 290px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .charts-grid-modern {
        grid-template-columns: 1fr !important;
    }
}












/* ══════════════════════════════════════════════════
   باکس دارک اختصاصی و نئونی ورود به بخش هوش مصنوعی (بدون سفیدی)
   ══════════════════════════════════════════════════ */
.bunak-guest-ai-gate {
    direction: rtl !important;
    margin-bottom: 28px !important;
    /* رنگ پس‌زمینه کاملاً تیره، عمیق و یکنواخت هماهنگ با سایر باکس‌های داشبورد */
    background: linear-gradient(135deg, #090217 0%, #0d0625 55%, #15062e 100%) !important;
    border: 1px solid rgba(225, 74, 92, 0.35) !important;
    border-radius: 20px !important;
    padding: 22px 26px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    box-sizing: border-box !important;
}

/* هاله نوری ملایم در پشت آیکون ربات بدون سفید کردن زمینه */
.bunak-guest-ai-gate .bg-gate-decor {
    position: absolute !important;
    top: -60px !important;
    right: -60px !important;
    width: 200px !important;
    height: 200px !important;
    background: radial-gradient(circle, rgba(225, 74, 92, 0.15) 0%, transparent 70%) !important;
    pointer-events: none !important;
}

.bunak-guest-ai-gate .bg-gate-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    position: relative !important;
    z-index: 2 !important;
}

/* فریم تیره و پرکنتراست آیکون ربات */
.bunak-guest-ai-gate .bg-gate-icon-wrap {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    border-radius: 14px !important;
    background: linear-gradient(145deg, rgba(225, 74, 92, 0.25) 0%, #15062b 100%) !important;
    border: 1px solid rgba(225, 74, 92, 0.45) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.7rem !important;
    position: relative !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

.bunak-guest-ai-gate .bg-gate-sparkle {
    position: absolute !important;
    top: -5px !important;
    left: -5px !important;
    font-size: 0.9rem !important;
    filter: drop-shadow(0 0 6px #00E396) !important;
}

/* متن‌ها با وضوح و درخشش سفید روی زمینه مشکی */
.bunak-guest-ai-gate .bg-gate-text-wrap {
    flex: 1 !important;
    min-width: 270px !important;
}

.bunak-guest-ai-gate .bg-gate-title {
    margin: 0 0 6px 0 !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.3px !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

.bunak-guest-ai-gate .bg-gate-desc {
    margin: 0 !important;
    font-size: 0.84rem !important;
    line-height: 1.7 !important;
    color: rgba(255, 255, 255, 0.78) !important;
}

/* دکمه قرمز/زرشکی پررنگ و برجسته */
.bunak-guest-ai-gate .bg-gate-actions {
    display: flex !important;
    align-items: center !important;
}

.bunak-guest-ai-gate .bg-gate-btn.primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(135deg, #E14A5C 0%, #ad1b33 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 6px 20px rgba(225, 74, 92, 0.35) !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.bunak-guest-ai-gate .bg-gate-btn.primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(225, 74, 92, 0.55) !important;
    background: linear-gradient(135deg, #f05265 0%, #be1e38 100%) !important;
}

.bunak-guest-ai-gate .bg-gate-btn.primary svg {
    transition: transform 0.2s ease !important;
}

.bunak-guest-ai-gate .bg-gate-btn.primary:hover svg {
    transform: translateX(-4px) !important;
}

/* بهینه‌سازی ریسپانسیو کامل و جلوگیری از بریدگی متن در موبایل‌های باریک */
@media screen and (max-width: 768px) {
    .bunak-guest-ai-gate {
        padding: 14px 12px !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .bunak-guest-ai-gate .bg-gate-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* حذف قفل حداقل عرض و مهار قطعی متن درون کادر */
    .bunak-guest-ai-gate .bg-gate-text-wrap {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .bunak-guest-ai-gate .bg-gate-title {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        word-break: break-word !important;
        margin-bottom: 6px !important;
    }

    .bunak-guest-ai-gate .bg-gate-desc {
        font-size: 0.76rem !important;
        line-height: 1.6 !important;
        white-space: normal !important;
        word-break: break-word !important;
        text-align: justify !important;
    }

    .bunak-guest-ai-gate .bg-gate-actions {
        width: 100% !important;
        margin-top: 4px !important;
    }

    .bunak-guest-ai-gate .bg-gate-btn.primary {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 14px !important;
        font-size: 0.86rem !important;
        justify-content: center !important;
    }
}








/* ══════════════════════════════════════════════════
   بهینه‌سازی ریسپانسیو و شکست هوشمند سطر نوسان در موبایل
   ══════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {
    /* ۱. کادر اصلی باکس متریک */
    .bunak-meta-metrics-box {
        padding: 5px 6px !important;
        gap: 4px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* ۲. تراز سطر اول (سود شما) */
    .bmm-row.profit-row {
        padding-bottom: 3px !important;
    }
    .bmm-row.profit-row .bmm-label {
        font-size: 0.65rem !important;
    }
    .bmm-row.profit-row .bmm-val {
        font-size: 0.7rem !important;
    }

    /* ۳. فعال‌سازی شکست خط شکیل در سطر دوم (نوسان قیمت) */
    .bmm-row.change-row-inner {
        flex-wrap: wrap !important;
        white-space: normal !important;
        gap: 3px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .bmm-row.change-row-inner .bmm-label {
        font-size: 0.65rem !important;
        white-space: nowrap !important;
    }

    /* ۴. کانتینر جزئیات تغییرات (مبلغ و بج درصد) هنگام انتقال به خط بعد */
    .bmm-change-details {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-right: auto !important; /* چسبیدن به چپ در ساختار راست‌به‌چپ */
        white-space: nowrap !important;
    }

    .bunak-meta-metrics-box.down .change-val,
    .bunak-meta-metrics-box.up .change-val {
        font-size: 0.7rem !important;
        font-weight: 900 !important;
    }

    /* ۵. استایل بج درصد در حالت موبایل */
    .bmm-badge.change-badge {
        font-size: 0.62rem !important;
        padding: 1.5px 5px !important;
        border-radius: 4px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* برای موبایل‌های خیلی باریک (کمتر از 360 پیکسل مانند Galaxy Fold یا صفحه‌های کوچک) */
@media screen and (max-width: 360px) {
    .bmm-row.change-row-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
    }
    .bmm-change-details {
        width: 100% !important;
        justify-content: space-between !important;
        margin-top: 1px !important;
    }
}


/* بهینه‌سازی سرعت رندرینگ و آزاد‌سازی حافظه با content-visibility */
.product-card.glass-panel {
    content-visibility: auto;
    contain-intrinsic-size: 300px 420px; /* تخمین ابعاد کارت برای مهار پرش اسکرول */
}
/* ══════════════════════════════════════════════════
   محصولات تخفیف‌خورده: نشان درصد، تایمر، قیمت قبلی و مقدار تخفیف
   ══════════════════════════════════════════════════ */
.bunak-badge-discount {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 4;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 46px;
    padding: 5px 9px 4px;
    border-radius: 12px;
    border: 2px solid #ffffff;
    background: linear-gradient(145deg, #ff4d6d 0%, #e11d48 55%, #9f1239 100%);
    color: #ffffff;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(190, 18, 60, 0.38);
}
.bunak-badge-discount::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0) 65%);
    pointer-events: none;
}
.bunak-badge-discount .bd-pct { font-size: 15px; font-weight: 900; line-height: 1; letter-spacing: -0.3px; color: #fff; }
.bunak-badge-discount .bd-pct small { font-size: 9px; font-weight: 800; margin-left: 2px; opacity: 0.92; }
.bunak-badge-discount .bd-txt { font-size: 9px; font-weight: 800; line-height: 1; letter-spacing: 0.2px; color: #ffe4e6; }

/* نشان گروه اختصاصی در همان گوشه است؛ هنگام تخفیف کمی بالاتر می‌رود */
.card-img.has-sale .exclusive-group-badge { bottom: 66px; }

/* کادر قیمت تخفیف‌دار */
.bunak-price-block.has-discount {
    background: #ffffff;
    border: 1px dashed #fb7185;
    align-items: stretch;
    gap: 6px;
}
.bunak-price-block.has-discount .bunak-cd { margin: 0; }
.bunak-price-block.has-discount .bpb-price-old {
    color: #94a3b8;
    text-decoration-color: #ef4444;
    text-decoration-thickness: 2px;
}
.bunak-price-block.has-discount .bpb-price-current {
    background: rgba(225, 29, 72, 0.08);
    border-color: rgba(225, 29, 72, 0.25);
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.08);
}
.bunak-price-block.has-discount .bpb-val { color: #be123c; }
.bunak-price-block.has-discount .bpb-cur { color: #e11d48; }

/* ردیف مقدار تخفیف */
.bmm-row.sale-row {
    border-bottom: 1px dashed rgba(225, 29, 72, 0.22);
    padding-bottom: 4px;
}
.bmm-row.sale-row .bmm-label { font-size: 0.68rem; font-weight: 800; color: #be123c; }
.bmm-row.sale-row .bmm-val { font-size: 0.74rem; font-weight: 900; color: #be123c; }

@media (max-width: 480px) {
    .bunak-badge-discount { min-width: 40px; padding: 4px 7px 3px; border-radius: 10px; bottom: 8px; right: 8px; }
    .bunak-badge-discount .bd-pct { font-size: 13px; }
    .bunak-badge-discount .bd-txt, .bunak-badge-discount .bd-pct small { font-size: 8px; }
    .card-img.has-sale .exclusive-group-badge { bottom: 56px; }
}

/* دکمه‌ی زنگوله‌ی یادآور تغییر قیمت: کنار دکمه‌ی خرید */
.product-card .card-actions { gap: 6px; align-items: stretch; }
.product-card .card-actions .bunak-cart-action-wrap { flex: 1 1 auto; min-width: 0; width: auto; }
.product-card .card-actions .bunak-pa-btn.bunak-pa-inline {
    flex: 0 0 auto !important;
    width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    border-radius: 10px !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1.5px solid #fecdd3 !important;
    color: #e11d48 !important;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.10) !important;
}
.product-card .card-actions .bunak-pa-btn.bunak-pa-inline .bunak-pa-ico { width: 100% !important; height: 100% !important; }
.product-card .card-actions .bunak-pa-btn.bunak-pa-inline .bunak-pa-svg { width: 21px !important; height: 21px !important; }
.product-card .card-actions .bunak-pa-btn.bunak-pa-inline.is-active {
    background: linear-gradient(145deg, #6a0d25 0%, #400514 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
