/* --- استایل های مدیریت شعب (Admin - SPA) --- */
.wbm-spa-wrap { direction: rtl; font-family: Tahoma, sans-serif; }
.wbm-toolbar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 15px; border-radius: 8px; margin: 20px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.wbm-search-cont { position: relative; width: 300px; }
.wbm-search-cont input { width: 100%; padding-right: 30px; height: 36px; border-radius: 5px; border: 1px solid #ccc; }
.wbm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.wbm-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 15px; transition: 0.3s; }
.wbm-card:hover { border-color: #2271b1; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.wbm-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 9999; display: none; align-items: center; justify-content: center; } /* display moved to js toggle */
.wbm-modal { background: #fff; width: 950px; max-width: 95%; border-radius: 8px; overflow: hidden; }
.wbm-modal-header { background: #f6f7f7; padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.wbm-modal-body { padding: 20px; max-height: 90vh; overflow-y: auto; }
.wbm-field { margin-bottom: 12px; }
.wbm-field label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 12px; }
.wbm-field input[type=text], .wbm-field input[type=number], .wbm-field input[type=time], .wbm-field select { width: 100%; height: 34px; border-radius: 4px; border: 1px solid #8c8f94; }
.wbm-modal-footer { margin-top: 15px; display: flex; gap: 10px; justify-content: flex-end; padding-top: 15px; border-top: 1px solid #eee; }
.wbm-fence-item { background: #fff; border: 1px solid #ddd; padding: 8px; border-radius: 5px; margin-bottom: 8px; }
.wbm-fence-item input { font-size: 11px !important; height: 26px !important; margin-bottom: 4px !important; }

/* --- استایل های مدیریت موجودی (Admin - Inventory) --- */
.wbm-wrap { direction: rtl; font-family: Tahoma, sans-serif; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); margin: 20px 0 0 0; position: relative; }
.wbm-header { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 20px; background: #f0f6fc; padding: 20px; border-radius: 8px; border: 1px solid #c5d9ed; }
.wbm-control-group { display: flex; flex-direction: column; width: 200px; }
.wbm-control-group label { font-weight: bold; margin-bottom: 5px; font-size: 12px; color: #1d2327; }
.wbm-control-group select, .wbm-control-group input { height: 36px; border-radius: 4px; border: 1px solid #8c8f94; width: 100%; }
.wbm-btn-filter { background: #2271b1; color: #fff; border: none; cursor: pointer; padding: 0 20px; height: 36px; border-radius: 4px; margin-top: auto; }
.wbm-bulk-panel { background: #fff8e5; border: 1px solid #ccd0d4; padding: 15px; border-radius: 8px; margin-bottom: 20px; display: flex; align-items: flex-end; gap: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.wbm-bulk-title { width: 100%; font-weight: bold; margin-bottom: 10px; border-bottom: 1px solid #e5e5e5; padding-bottom: 5px; color: #d63638; }
.wbm-btn-apply { background: #d63638; color: #fff; border: none; cursor: pointer; padding: 0 20px; height: 36px; border-radius: 4px; transition: 0.3s; }
.wbm-btn-apply:hover { background: #a82022; }
.wbm-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.wbm-table th { text-align: right; padding: 15px; border-bottom: 2px solid #ddd; background: #fafafa; font-weight: bold; }
.wbm-table td { padding: 10px 15px; border-bottom: 1px solid #eee; vertical-align: middle; }
.wbm-prod-img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }
.wbm-row-select { transform: scale(1.5); cursor: pointer; }
.wbm-sale-inputs { display: flex; gap: 5px; align-items: center; }
.wbm-input-price { width: 120px; padding: 5px; border: 1px solid #ccc; border-radius: 4px; }
.wbm-disabled { opacity: 0.5; pointer-events: none; background: #f9f9f9; }
.wbm-overlay { position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(255,255,255,0.9); z-index: 50; display: none; align-items: center; justify-content: center; font-size: 18px; font-weight: bold; color: #2271b1; border-radius: 8px; flex-direction: column; }
.wbm-switch { position: relative; display: inline-block; width: 40px; height: 20px; vertical-align: middle; }
.wbm-switch input { opacity: 0; width: 0; height: 0; }
.wbm-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.wbm-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .wbm-slider { background-color: #2271b1; }
.wbm-stock-switch input:checked + .wbm-slider { background-color: #00a32a; }
input:checked + .wbm-slider:before { transform: translateX(20px); }
.wbm-status-msg { font-size: 18px; margin-right: 5px; vertical-align: middle; display:inline-block; width:20px; }

/* --- استایل های تنظیمات دسته ها (Admin - Settings) --- */
.wbm-settings-wrap { direction: rtl; font-family: 'Vazirmatn', sans-serif; max-width: 1200px; margin: 20px auto; }
.wbm-header-bar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 15px 25px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: sticky; top: 32px; z-index: 99; border: 1px solid #f0f0f1; margin-bottom: 25px; }
.wbm-title h1 { margin: 0; font-size: 20px; font-weight: 800; color: #2c3338; }
.wbm-subtitle { color: #646970; font-size: 13px; margin-top: 5px; }
.wbm-cat-list { display: flex; flex-direction: column; gap: 15px; }
.wbm-cat-row { display: flex; align-items: center; background: #fff; padding: 15px; border-radius: 12px; border: 1px solid #e0e0e0; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.wbm-cat-row:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.08); border-color: #00a651; }
.wbm-col-info { display: flex; align-items: center; gap: 15px; width: 30%; border-left: 1px solid #f0f0f1; padding-left: 15px; }
.wbm-cat-img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; background: #f6f7f7; border: 1px solid #ddd; padding: 2px; }
.wbm-cat-name { font-weight: 800; font-size: 15px; color: #333; display: block; }
.wbm-cat-id { font-size: 11px; color: #999; background: #f0f0f1; padding: 2px 6px; border-radius: 4px; }
.wbm-col-order { width: 15%; padding: 0 20px; text-align: center; border-left: 1px solid #f0f0f1; }
.wbm-col-order label { display: block; font-size: 11px; color: #777; margin-bottom: 5px; font-weight: bold; }
.wbm-input-order { width: 80px; text-align: center; border: 1px solid #ccc; border-radius: 6px; padding: 8px; font-weight: bold; font-family: sans-serif; }
.wbm-col-branches { flex-grow: 1; padding-right: 20px; }
.wbm-branches-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.branch-check-label { position: relative; cursor: pointer; user-select: none; }
.branch-check-input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.branch-pill { background-color: #f0f0f1; color: #50575e; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid #dcdcde; transition: all 0.2s ease; display: flex; align-items: center; gap: 5px; }
.branch-pill:hover { background-color: #e5e5e5; }
.branch-check-input:checked ~ .branch-pill { background-color: #00a651; color: #fff; border-color: #00a651; box-shadow: 0 4px 10px rgba(0, 163, 42, 0.3); }
.wbm-save-btn { background: #00a651 !important; border-color: #00a651 !important; color: #fff !important; padding: 8px 25px !important; font-size: 14px !important; font-weight: bold !important; border-radius: 6px !important; transition: 0.3s !important; height: 40px !important; display: flex; align-items: center; gap: 5px; }
.wbm-save-btn:hover { background: #00a651 !important; }
.wbm-toast { position: fixed; bottom: 30px; left: 30px; background: #333; color: #fff; padding: 15px 25px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: none; z-index: 1000; font-weight: bold; }
.wbm-spin { animation: spin 2s infinite linear; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes popIn { 0% { transform: scale(0); } 80% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* --- استایل های تنظیمات ظاهری (Admin - Appearance) --- */
.wbm-settings-card { background:#fff; padding:20px; border-radius:8px; box-shadow:0 2px 10px rgba(0,0,0,0.1); max-width:800px; direction:rtl; font-family:tahoma; }
.wbm-setting-row { display:flex; align-items:center; padding:10px 0; border-bottom:1px solid #f0f0f0; gap:10px; }
.wbm-setting-row label { width:150px; font-weight:bold; font-size:13px; }
.wbm-group-title { background:#00a651; color:#fff; padding:8px 15px; border-radius:5px; margin-top:20px; font-size:14px; }

/* --- استایل های فرانت اند (Frontend) --- */
:root { --wbm-green: #09a957; --wbm-green-dark: #00a04e; --wbm-bg: #fcfcfc; --wbm-text: #333333; --wbm-price: #008840; }
.wbm-app { font-family: 'Vazirmatn', sans-serif !important; background-color: var(--wbm-bg); direction: rtl; padding: 20px 10px; max-width: 1200px; margin: 0 auto; min-height: 100vh;font-size: 12px; }
.wbm-app * { box-sizing: border-box; }
.wbm-app a { text-decoration: none; }
.wbm-branch-select-box { text-align:center; padding: 1px 10px; }
.wbm-branches-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto; }
.wbm-branch-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); cursor: pointer; transition: 0.3s; border: 1px solid #f0f0f0; display: flex; flex-direction: row; height: 140px; }
.wbm-branch-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-color: var(--wbm-green); }
.wbm-b-img { width: 140px; height: 100%; background-size: cover; background-position: center; position: relative; background-color: #eee; flex-shrink: 0; }
.wbm-b-info { padding: 15px; display: flex; flex-direction: column; justify-content: space-between; flex-grow: 1; text-align: right; }
.wbm-b-title { margin: 0; font-size: 16px; font-weight: 900; color: #333; }
@media (max-width: 768px) {
    .wbm-branches-wrapper { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; padding: 0 5px; }
    .wbm-branch-card { height: auto !important; flex-direction: column !important; border-radius: 12px !important; } 
    .wbm-b-img { width: 100% !important; height: 100px !important; }
    .wbm-b-info { padding: 10px !important; }
    .wbm-b-title { font-size: 13px !important; }
}

.wbm-cat-nav { display: flex; overflow-x: auto; gap: 15px; padding: 10px 5px 20px 5px; margin-bottom: 10px; scrollbar-width: none; position: sticky; top: 0; background: rgba(252, 252, 252, 0.98); z-index: 99; border-bottom: 1px solid #f0f0f0; backdrop-filter: blur(5px); }
.wbm-cat-item { display: flex; flex-direction: column; align-items: center; min-width: 75px; cursor: pointer; transition: 0.3s; opacity: 0.6; }
.wbm-cat-item.active { opacity: 1; transform: translateY(-5px); }
.wbm-cat-img-box { width: 55px; height: 55px; border-radius: 14px; background: #fff; padding: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.04); border: 2px solid transparent; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.wbm-cat-item.active .wbm-cat-img-box { border-color: var(--wbm-green); box-shadow: 0 4px 15px rgba(0, 192, 94, 0.2); }
.wbm-cat-img-box img { width: 100%; height: 100%; object-fit: contain; }
.wbm-cat-title { font-size: 12px; font-weight: 700; color: var(--wbm-text); text-align: center; white-space: nowrap; }
.wbm-search-wrapper { position: relative; margin-bottom: 20px; }
.wbm-search-input { width: 100%; padding: 12px 45px 12px 15px; border: 1px solid #eee; border-radius: 12px; background: #fff; font-family: 'Vazirmatn'; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: 0.3s; outline: none; }
.wbm-search-input:focus { border-color: var(--wbm-green); box-shadow: 0 4px 12px rgba(0, 192, 94, 0.1); }
.wbm-search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #999; font-size: 20px; }
.wbm-products-list { display: flex; flex-direction: column; gap: 15px; padding-bottom: 100px; min-height: 300px; }
.wbm-prod-card { background: #fff; border-radius: 20px; padding: 15px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 10px rgba(0,0,0,0.03); border: 1px solid #f0f0f1; transition: 0.3s; position: relative; animation: fadeIn 0.5s ease; }
.wbm-prod-img { width: 85px; height: 85px; object-fit: cover; border-radius: 12px; }
.wbm-prod-price { color: var(--wbm-price); font-weight: 800; font-size: 20px; }
.wbm-action-area { min-width: 110px; display: flex; justify-content: flex-end; }
.wbm-qty-control { display: none; align-items: center; background: #f0f0f1; border-radius: 50px; padding: 3px; gap: 10px; }
.wbm-qty-btn { width: 30px; height: 30px; border-radius: 50%; border: none; background: #fff; color: var(--wbm-green); font-weight: bold; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; }
.wbm-qty-num { font-weight: bold; font-size: 14px; min-width: 20px; text-align: center; }
.wbm-add-btn { background: var(--wbm-green); color: #fff !important; border: none; border-radius: 25px; padding: 8px 18px; font-size: 13px; font-weight: 800; cursor: pointer; }
.wbm-mini-cart-bar {
    position: fixed;
    bottom: 25px;
    left: 15px;
    right: 15px;
    bottom: 35px; /* ۱۰ پیکسل به مقدار قبلی اضافه شد */
    /* گرادینت سبز جذاب و زنده */
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: #fff;
    padding: 14px 22px;
    border-radius: 20px;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    /* سایه سبز درخشان (Glow Effect) */
    box-shadow: 0 10px 25px rgba(150, 201, 61, 0.4), 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* انیمیشن ورود */
    animation: wbmSlideUp 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* افکت نبض برای جلب توجه به سبد خرید */
.wbm-mini-cart-bar.active-pulse {
    animation: wbmPulse 0.4s ease-in-out;
}

@keyframes wbmPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* استایل متون داخل نوار */
#wbm-total-price {
    font-size: 20px;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#wbm-total-items {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: bold;
    display: inline-block;
    margin-top: 4px;
}

/* دکمه تکمیل خرید (سفید و شیشه‌ای) */
.wbm-fact-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(5px);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 20px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.wbm-fact-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
}
.wbm-price-area { font-weight: 900; font-size: 16px; flex: 1; }
.wbm-item-badge { background: #fff; color: #000; padding: 3px 12px; border-radius: 8px; font-weight: bold; font-size: 13px; margin: 0 15px; }
.wbm-fact-btn { background: #fff; color: #fff !important; border-radius: 12px; padding: 8px 15px; font-size: 13px; font-weight: bold; border: none; cursor: pointer; }
.wbm-modal-overlay-front { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 10000; display: none; align-items: flex-end; }
.wbm-modal-sheet { background: #fff; width: 100%; border-radius: 25px 25px 0 0; padding: 25px; max-height: 90vh; overflow-y: auto; animation: wbmSlideUp 0.3s ease-out; }
@keyframes wbmSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.wbm-fact-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.wbm-delivery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.wbm-delivery-card { border: 2px solid #eee; padding: 20px; border-radius: 15px; cursor: pointer; text-align: center; }
.wbm-delivery-card.active { border-color: var(--wbm-green); background: #f0fff4; }
.wbm-delivery-card .dashicons { font-size: 40px; width: 40px; height: 40px; display: block; margin: 0 auto 10px; }
.wbm-confirm-box { background: #e6fffa; border: 1px solid #38b2ac; color: #234e52; padding: 12px; border-radius: 12px; text-align: center; margin-bottom: 15px; font-size: 13px; font-weight: bold; }
.wbm-label { display: block; font-weight: bold; font-size: 12px; margin-bottom: 5px; text-align: right; }
.wbm-input { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 15px; font-family: inherit; font-size: 14px; text-align: right; }
#wbm-checkout-map { height: 180px; width: 100%; border-radius: 15px; margin-bottom: 10px; border: 1px solid #ddd; }
.gateway-icon img { max-height: 25px; width: auto; vertical-align: middle; }
.wbm-search-container { padding: 15px 10px; background: transparent; position: sticky; top: 0px; z-index: 98; }
.wbm-search-inner { position: relative; display: flex; align-items: center; background: #ffffff; border-radius: 16px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); border: 1px solid #f0f0f1; transition: all 0.3s ease; overflow: hidden; }
.wbm-search-inner:focus-within { border-color: var(--wbm-green); box-shadow: 0 6px 20px rgba(9, 169, 87, 0.12); transform: translateY(-1px); }
.wbm-search-input-modern { width: 100%; border: none !important; padding: 14px 45px 14px 15px !important; border-radius: 16px !important; font-size: 14px !important; outline: none !important; background: transparent !important; color: #333; font-family: inherit; box-shadow: none !important; height: auto !important; }
.wbm-search-icon-modern { position: absolute; right: 15px; font-size: 20px; color: #94a3b8; pointer-events: none; transition: color 0.3s; }
.wbm-search-inner:focus-within .wbm-search-icon-modern { color: var(--wbm-green); }
.wbm-search-clear { position: absolute; left: 12px; background: #f1f5f9; border: none; width: 24px; height: 24px; border-radius: 50%; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; padding: 0; transition: 0.2s; }
.wbm-search-clear:hover { background: #e2e8f0; color: #000; }
/* ظرفیت محتوای متنی کارت محصول */
.wbm-prod-card > div:first-child > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px; 
    text-align: right;
    flex: 1;
}

/* استایل عنوان محصول */
.wbm-prod-title {
    color: <?php echo $opt['title_color']; ?> !important;
    font-size: <?php echo $opt['title_size']; ?>px !important; /* سایز از پنل */
    font-weight: <?php echo $opt['title_weight']; ?> !important; /* وزن از پنل */
    margin: 0 0 5px 0 !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* استایل توضیحات کوتاه */
.wbm-prod-desc {
    color: <?php echo $opt['desc_color']; ?> !important;
    font-size: <?php echo $opt['desc_size']; ?>px !important; /* سایز از پنل */
    font-weight: <?php echo $opt['desc_weight']; ?> !important; /* وزن از پنل */
    margin-bottom: 8px !important;
    line-height: 1.6 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.8;
}

/* استایل قیمت محصول */
.wbm-prod-price {
    color: <?php echo $opt['price_color']; ?> !important;
    font-size: <?php echo $opt['price_size']; ?>px !important; /* سایز از پنل */
    font-weight: <?php echo $opt['price_weight']; ?> !important; /* وزن از پنل */
    display: block !important;
    margin-top: 5px !important;
}

.wbm-branch-card.highlight-branch {
    border: 2px solid #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 15px rgba(37,99,235,0.2);
}

.wbm-status-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}
.wbm-status-online { background: #dcfce7; color: #166534; border-color: #86efac; }
.wbm-status-offline { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
/* چیدمان ۳ ستونه دسکتاپ */
.wbm-branches-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px;
    direction: rtl;
}

/* کارت اصلی */
.wbm-full-img-card {
    display: flex !important;
    background: #fff;
    border-radius: 25px;
    height: 120px;
    cursor: pointer;
    border: 1px solid #eee;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: 0.3s ease;
}

.wbm-full-img-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 35px rgba(0, 129, 54, 0.15);
}

/* بخش اطلاعات (چپ) */
.wbm-card-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
}

.wbm-title {
    margin: 0 0 5px 0 !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    color: #222;
}

.wbm-address {
    font-size: 10px;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wbm-stars {
    color: #ffb400;
    font-size: 18px;
    letter-spacing: -2px;
}

.wbm-num {
    font-weight: bold;
    font-size: 16px;
    margin-right: 8px;
    color: #333;
}

/* بخش تصویر کامل (راست) */
.wbm-card-image-full {
    width: 150px; /* عرض بخش تصویر */
    background-color: #008136; /* رنگ پایه سبز */
    background-size: cover; /* تصویر کل فضا را پر می‌کند */
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    flex-shrink: 0;
}

/* نشان وضعیت */
.wbm-badge-float {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 10px;
    color: #fff;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2);
}

.is-online .wbm-badge-float { color: #51ff9c; }
.is-offline { opacity: 0.7; filter: grayscale(1); }
/* --- تنظیمات اختصاصی موبایل --- */
@media (max-width: 767px) {
    .wbm-branches-wrapper {
        display: flex !important;
        flex-direction: column !important; /* اجبار به چیدمان ستونی (یک شعبه در هر ردیف) */
        gap: 15px !important;
        padding: 10px !important;
    }

    .wbm-modern-branch-card {
        width: 100% !important; /* هر کارت تمام عرض صفحه را می‌گیرد */
        height: 135px !important; /* ارتفاع بهینه برای موبایل */
    }

    .wbm-card-media {
        width: 110px !important; /* ابعاد تصویر در موبایل کمی جمع‌وجورتر */
    }

    .wbm-branch-name {
        font-size: 16px !important;
    }
    
    .wbm-branch-address {
        font-size: 11px !important;
        -webkit-line-clamp: 1 !important; /* آدرس در موبایل برای زیبایی بیشتر در یک خط */
    }
}
/* نوار ابزار یکپارچه در یک خط */
.wbm-unified-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    margin-bottom: 30px;
    direction: rtl;
}

/* باکس جستجو مدرن */
.wbm-search-glass-side {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 20px;
    padding: 0 15px;
    transition: 0.3s all ease;
}

.wbm-search-glass-side:focus-within {
    background: #fff;
    border-color: #008136;
    box-shadow: 0 10px 25px rgba(0, 129, 54, 0.08);
}

.wbm-search-glass-side .dashicons { color: #008136; font-size: 20px; }

#wbm-branch-search-input {
    width: 100%; border: none !important; background: transparent !important;
    padding: 12px 10px !important; font-size: 14px; font-family: 'Vazirmatn';
    outline: none !important; box-shadow: none !important;
}

#wbm-clear-btn { background: none; border: none; font-size: 22px; color: #cbd5e1; cursor: pointer; line-height: 1; }

/* دکمه نقشه فوق گرافیکی - نسخه سبز مدرن */
.wbm-map-btn-graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 25px;
    
    /* پس‌زمینه سبز موبی‌دیک با گرادینت ملایم برای عمق بیشتر */
    background: linear-gradient(135deg, #008136 0%, #00a847 100%);
    
    /* رنگ نوشته و آیکون کاملاً سفید */
    color: #ffffff !important;
    
    /* حذف هرگونه خط حاشیه */
    border: none !important;
    outline: none !important;
    
    /* شعاع انحنای دور دکمه: ۲۰ پیکسل طبق درخواست شما */
    border-radius: 20px;
    
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    
    /* سایه گرافیکی برای ایجاد حالت شناور */
    box-shadow: 0 8px 20px rgba(0, 129, 54, 0.25);
    
    /* انیمیشن نرم */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* حالت هاور (وقتی ماوس روی دکمه می‌رود) */
.wbm-map-btn-graphic:hover {
    /* کمی بالا آمدن دکمه */
    transform: translateY(-4px);
    
    /* تقویت سایه در حالت هاور */
    box-shadow: 0 12px 28px rgba(0, 129, 54, 0.4);
    
    /* کمی روشن‌تر شدن پس‌زمینه */
    filter: brightness(1.1);
}

/* حالت کلیک */
.wbm-map-btn-graphic:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 129, 54, 0.2);
}

/* استایل آیکون داخل دکمه برای اطمینان از سفید بودن */
.wbm-map-btn-graphic .dashicons, 
.wbm-map-btn-graphic span {
    color: #ffffff !important;
    font-size: 20px;
}
/* پاپ‌آپ نقشه */
.wbm-map-overlay-v3 {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(10px);
    z-index: 9999999; display: none; align-items: center; justify-content: center;
}

.wbm-map-modal-window {
    width: 92%; max-width: 950px; height: 85vh;
    background: #fff; border-radius: 35px; overflow: hidden;
    display: flex; flex-direction: column; box-shadow: 0 30px 100px rgba(0,0,0,0.5);
}

.wbm-map-modal-header {
    padding: 20px 25px; display: flex; justify-content: space-between;
    align-items: center; border-bottom: 1px solid #f1f5f9;
    font-weight: 900; color: #008136;
}

.wbm-close-x { font-size: 35px; cursor: pointer; color: #cbd5e1; line-height: 0.7; transition: 0.2s; }
.wbm-close-x:hover { color: #f00; }

#wbm-map-canvas-v3 { flex: 1; position: relative; }

.wbm-gps-btn { 
    position: absolute; top: 20px; left: 20px; z-index: 1000; 
    background: #fff; border: none; width: 50px; height: 50px; 
    border-radius: 15px; box-shadow: 0 8px 25px rgba(0,0,0,0.15); 
    cursor: pointer; color: #008136; display: flex; align-items: center; justify-content: center;
}

.wbm-map-status-bar { padding: 15px; background: #008136; color: #fff; text-align: center; font-size: 13px; font-weight: bold; }

.wbm-map-btn-link {
    background: #008136; color: #fff !important; padding: 8px 18px; border-radius: 12px;
    text-decoration: none !important; display: inline-block; margin-top: 10px; font-size: 13px;
}

/* افکت مکان کاربر */
.u-pulse-dot { width: 14px; height: 14px; background: #3b82f6; border: 3px solid #fff; border-radius: 50%; position: relative; }
.u-pulse-dot::after { content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px; border: 2px solid #3b82f6; border-radius: 50%; animation: wbmPulse 2s infinite; }
@keyframes wbmPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2.5); opacity: 0; } }

/* ریسپانسیو موبایل */
@media (max-width: 600px) {
    .wbm-btn-text { display: none; } /* در موبایل فقط آیکون نقشه بماند تا در یک خط جا شوند */
    .wbm-map-btn-graphic { padding: 0 15px; }
    .wbm-unified-toolbar { gap: 8px; }
}
/* کلاسی برای مخفی کردن کارت بدون تداخل با استایل اصلی */
.wbm-card-hidden {
    display: none !important;
}

/* اصلاح استایل دکمه پاک کردن برای اینکه ظاهر را جابجا نکند */
.wbm-search-glass-side {
    position: relative;
    display: flex;
    align-items: center;
}

#wbm-clear-btn {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #999;
}
/* استایل لینک داخل پاپ‌آپ نقشه */
.wbm-map-btn-link:hover {
    background: #005a26 !important;
}

/* افکت خط‌چین نرم برای محدوده حصارها */
.leaflet-interactive {
    transition: fill-opacity 0.3s;
}
.leaflet-interactive:hover {
    fill-opacity: 0.5 !important;
}

/* کانتینر نقشه */
#wbm-map-canvas-v3 {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
}



.wbm-prod-card {
    display: none; /* محصولات در ابتدا مخفی باشند تا JS لود شود */
}

