.hg-card-box {
    background: #ffffff; color: #333333; padding: 20px;
    border-radius: 10px; border: 1px solid #eeeeee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02); font-family: inherit;
    margin-top: 15px; transition: all 0.3s ease;
    width: 100%; display: block; box-sizing: border-box;
}
.hg-header { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid #d4af37; padding-bottom: 15px; margin-bottom: 20px; }
.hg-header svg { width: 28px; fill: #d4af37; }
.hg-header h3 { margin: 0; font-size: 18px; font-weight: bold; color: inherit; }

/* استفاده از flex تا در صورت خاموش شدن یک آیتم، بقیه مرتب شوند */
.hg-grid { 
    display: flex; 
    flex-wrap: wrap;
    gap: 8px; 
}
.hg-item {
    background: rgba(0,0,0,0.03); padding: 10px 5px; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    flex: 1 1 calc(33.333% - 8px); min-width: 70px; box-sizing: border-box;
}
.hg-label { font-size: 12px; color: #666; margin-bottom: 4px; white-space: nowrap; }
.hg-val { font-size: 15px; font-weight: bold; color: inherit; }

.hg-extras-box { margin-top: 15px; background: rgba(0,0,0,0.02); border-radius: 5px; padding: 10px; font-size: 13px; border: 1px dashed #cccccc; }
.hg-extras-title { margin-bottom: 8px; font-weight: bold; color: inherit; }
.hg-extra-item { display: flex; justify-content: space-between; margin-bottom: 3px; }
.hg-divider { height: 1px; background: #eeeeee; margin: 20px 0; }
.hg-total { display: flex; justify-content: space-between; align-items: center; }
.hg-total-price { font-size: 20px; color: #d4af37; font-weight: bold; }

/* --- استایل پیش‌فرض وزن ساده (قابل تغییر در المنتور) --- */
.hg-single-weight-wrapper { 
    display: flex; align-items: center; gap: 5px; 
    font-size: 15px; font-weight: bold; margin-bottom: 15px; color: #333;
}
.hg-weight-label { color: inherit; }
.hg-dynamic-single-weight { color: inherit; }

/* --- استایل پاپ آپ فرمول --- */
.hg-formula-container { position: relative; display: inline-block; z-index: 10; margin-bottom: 10px;}
.hg-formula-trigger { 
    cursor: pointer; color: #555; font-size: 13px; font-family: inherit;
    display: inline-flex; align-items: center; gap: 5px; transition: color 0.3s; 
}
.hg-formula-trigger svg { width: 18px; fill: currentColor; }
.hg-formula-trigger:hover { color: #d4af37; }

.hg-formula-modal { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); z-index: 99999; backdrop-filter: blur(3px); 
}
.hg-formula-modal-content { 
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    background: #fff; padding: 25px; border-radius: 12px; 
    border: 2px solid #d4af37; min-width: 320px; text-align: center; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); font-family: inherit;
}
.hg-formula-close { 
    position: absolute; top: 10px; right: 15px; font-size: 24px; 
    cursor: pointer; color: #aaa; transition: color 0.2s; line-height: 1; 
}
.hg-formula-close:hover { color: #ff4444; }
.hg-formula-modal-content h4 { 
    margin-top: 0; color: #333; font-size: 16px; margin-bottom: 15px; 
    border-bottom: 1px dashed #eee; padding-bottom: 10px; 
}
.hg-formula-modal-content p { 
    direction: rtl; font-size: 14px; background: rgba(0,0,0,0.03); padding: 12px; 
    border-radius: 6px; color: #333; line-height: 1.8; margin: 0; font-weight: bold; 
}

@media (max-width: 600px) { 
    .hg-item { flex: 1 1 calc(50% - 8px); }
    .hg-formula-modal-content { min-width: 90%; padding: 20px; }
}