/* ===== Branch Menu — Blue & White ===== */
.bm-menu {
    --bm-blue: #1768F2;
    --bm-blue-deep: #0B3FA8;
    --bm-blue-ink: #0F2657;
    --bm-blue-pale: #EAF2FF;
    --bm-blue-paler: #F5F9FF;
    --bm-line: #DCE8FB;
    --bm-white: #FFFFFF;
    --bm-shadow: 0 10px 24px -12px rgba(11, 63, 168, .28);
    --bm-shadow-soft: 0 4px 14px -6px rgba(11, 63, 168, .16);

    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: var(--bm-blue-ink);
    direction: rtl;
    max-width: 1000px;
    margin: 0 auto;
    padding: 8px 4px 60px;
}

.bm-menu-guard {
    text-align: center;
    padding: 40px 16px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #0F2657;
    background: #F5F9FF;
    border-radius: 16px;
}
.bm-menu-guard a { color: #1768F2; font-weight: 700; }

/* ---- Out-of-order-hours banner ---- */
.bm-hours-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, #FDEEED, #FFF6F5);
    border: 1px solid #F6C9C5;
    border-radius: 16px;
    padding: 14px 18px;
    margin: 6px 4px 18px;
    box-shadow: 0 6px 18px -10px rgba(209, 69, 59, .35);
    animation: bm-rise .4s cubic-bezier(.22,1,.36,1);
}
.bm-hours-banner-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #D1453B;
    position: relative;
}
.bm-hours-banner-icon::before {
    content: '!';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 17px;
}
.bm-hours-banner-text { display: flex; flex-direction: column; gap: 2px; }
.bm-hours-banner-text strong { color: #8A2A22; font-size: 14.5px; }
.bm-hours-banner-text span { color: #A8463D; font-size: 13px; }

/* ---- Restaurant info: collapsible accordion ---- */
.bm-restaurant-accordion {
    margin: 6px 4px 20px;
    animation: bm-rise .4s cubic-bezier(.22,1,.36,1);
}

.bm-restaurant-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-family: inherit;
    text-align: right;
    background: linear-gradient(135deg, var(--bm-white), var(--bm-blue-paler));
    border: 1.5px solid var(--bm-line);
    border-radius: 18px;
    padding: 14px 18px;
    cursor: pointer;
    box-shadow: var(--bm-shadow-soft);
    transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.bm-restaurant-toggle:hover { border-color: var(--bm-blue); box-shadow: var(--bm-shadow); }
.bm-restaurant-toggle:active { transform: scale(.995); }
.bm-restaurant-toggle.is-open {
    border-radius: 18px 18px 0 0;
    border-color: var(--bm-blue);
}

.bm-rt-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--bm-blue), var(--bm-blue-deep));
    position: relative;
    box-shadow: 0 6px 14px -6px rgba(11,63,168,.5);
}
.bm-rt-icon::before {
    content: '';
    position: absolute;
    inset: 10px;
    background-color: #fff;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M11 9h2V7h-2v2zm1-7C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8zM11 17h2v-6h-2v6z'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M11 9h2V7h-2v2zm1-7C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8zM11 17h2v-6h-2v6z'/></svg>") center / contain no-repeat;
}

.bm-rt-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 120px;
}
.bm-rt-title { font-size: 14.5px; font-weight: 800; color: var(--bm-blue-ink); }
.bm-rt-sub { font-size: 12.5px; color: #6C84AE; }

.bm-rt-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    order: 3;
    flex-basis: 100%;
    margin-inline-start: 56px;
}

.bm-rt-chevron {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    position: relative;
    transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.bm-rt-chevron::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--bm-blue);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.4 8.6 12 13.2l4.6-4.6L18 10l-6 6-6-6z'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.4 8.6 12 13.2l4.6-4.6L18 10l-6 6-6-6z'/></svg>") center / contain no-repeat;
}
.bm-restaurant-toggle[aria-expanded="true"] .bm-rt-chevron { transform: rotate(180deg); }

.bm-restaurant-panel {
    height: 0;
    overflow: hidden;
    transition: height .35s cubic-bezier(.22,1,.36,1);
}
.bm-restaurant-panel-inner {
    background: var(--bm-blue-paler);
    border: 1.5px solid var(--bm-line);
    border-top: none;
    border-radius: 0 0 18px 18px;
    padding: 18px 20px 20px;
    margin-top: -1px;
}

.bm-restaurant-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bm-restaurant-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #4A6491;
    line-height: 1.6;
}
.bm-ri-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--bm-blue-pale);
    position: relative;
    margin-top: 1px;
}
.bm-ri-icon::before {
    content: '';
    position: absolute;
    inset: 6px;
    background-color: var(--bm-blue);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.bm-ri-address::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C7.6 2 4 5.6 4 10c0 6 8 12 8 12s8-6 8-12c0-4.4-3.6-8-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C7.6 2 4 5.6 4 10c0 6 8 12 8 12s8-6 8-12c0-4.4-3.6-8-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/></svg>"); }
.bm-ri-phone::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.9 21 3 13.1 3 3c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.5.6 3.6.1.4 0 .8-.2 1L6.6 10.8z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.9 21 3 13.1 3 3c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.5.6 3.6.1.4 0 .8-.2 1L6.6 10.8z'/></svg>"); }
.bm-ri-clock::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 10.4 4.2 2.5-.7 1.2L11 13V6h1.5v6.4z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 10.4 4.2 2.5-.7 1.2L11 13V6h1.5v6.4z'/></svg>"); }
.bm-ri-area::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 6.5 9 4l6 2.5 6-2.5v15l-6 2.5-6-2.5-6 2.5v-15z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 6.5 9 4l6 2.5 6-2.5v15l-6 2.5-6-2.5-6 2.5v-15z'/></svg>"); }

/* status badges (shared look with branch-selection.css) */
.bm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 999px;
}
.bm-status-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.bm-status-open { color: #1E9E5C; background: #E7F7EE; }
.bm-status-open::before { background: #1E9E5C; box-shadow: 0 0 0 3px rgba(30,158,92,.18); }
.bm-status-closed { color: #D1453B; background: #FCEBEA; }
.bm-status-closed::before { background: #D1453B; box-shadow: 0 0 0 3px rgba(209,69,59,.18); }

@media (max-width: 560px) {
    .bm-restaurant-toggle { padding: 12px 14px; gap: 12px; }
    .bm-rt-icon { width: 36px; height: 36px; border-radius: 11px; }
    .bm-rt-badges { margin-inline-start: 48px; }
    .bm-rt-title { font-size: 13.5px; }
    .bm-rt-sub { font-size: 12px; }
}

/* ---- Menu card wrapper ---- */
.bm-menu-card {
    background: linear-gradient(180deg, var(--bm-white) 0%, var(--bm-blue-paler) 100%);
    border: 1px solid var(--bm-line);
    border-radius: 26px;
    padding: 18px 14px 26px;
    box-shadow: var(--bm-shadow-soft);
    position: relative;
    overflow: hidden;
}
.bm-menu-card::before {
    /* نوار تزئینی بالای کارت */
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bm-blue), #59A6FF, var(--bm-blue-deep));
}

/* نواری که درست کنار/بالای لیست غذاها نشان می‌دهد این شعبه الان سفارش نمی‌پذیرد */
.bm-order-block-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FCEBEA;
    color: #8A2A22;
    border: 1px solid #F6C9C5;
    border-radius: 12px;
    padding: 10px 14px;
    margin: 4px 6px 4px;
    font-size: 12.5px;
    font-weight: 600;
}
.bm-obs-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bm-red);
    position: relative;
}
.bm-obs-icon::before {
    content: '!';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

/* ---- Orb rows (categories / products) ---- */
.bm-cats-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 14px 6px 18px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--bm-blue-pale) transparent;
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.bm-cats-row::-webkit-scrollbar { height: 6px; }
.bm-cats-row::-webkit-scrollbar-thumb { background: var(--bm-blue-pale); border-radius: 10px; }

.bm-products-section { border-top: 1px dashed var(--bm-line); margin-top: 6px; padding-top: 4px; }
.bm-products-heading {
    display: flex;
    padding: 16px 8px 0;
}
.bm-products-heading span {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bm-blue-deep);
    letter-spacing: .2px;
    background: var(--bm-blue-pale);
    padding: 5px 14px;
    border-radius: 999px;
}
.bm-products-heading span:empty { display: none; }

.bm-orb {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
    opacity: 0;
    transform: translateY(8px);
    animation: bm-orb-in .4s cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(var(--bm-i, 0) * 45ms);
}
@keyframes bm-orb-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bm-orb-circle {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--bm-white);
    border: 1.5px solid var(--bm-line);
    box-shadow: var(--bm-shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.34,1.4,.64,1), box-shadow .25s ease, border-color .25s ease;
}
.bm-orb-circle img { width: 62%; height: 62%; object-fit: contain; }
.bm-orb-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #4A6491;
    text-align: center;
    line-height: 1.3;
    transition: color .2s ease;
}

.bm-orb:hover .bm-orb-circle { transform: translateY(-3px); box-shadow: var(--bm-shadow); }

.bm-orb.is-active .bm-orb-circle {
    border-color: var(--bm-blue);
    box-shadow: 0 0 0 5px var(--bm-blue-pale), var(--bm-shadow);
    transform: scale(1.05);
}
.bm-orb.is-active .bm-orb-label { color: var(--bm-blue-deep); font-weight: 700; }
.bm-orb.is-active .bm-orb-circle::after {
    content: '✓';
    position: absolute;
    bottom: -2px; left: -2px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bm-blue);
    color: #fff;
    font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(11,63,168,.4);
}

.bm-empty {
    padding: 30px 10px;
    color: #7C93BE;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

/* ---- Detail panel ---- */
.bm-detail-panel {
    margin-top: 22px;
    background: linear-gradient(180deg, var(--bm-blue-paler), var(--bm-white));
    border: 1px solid var(--bm-line);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--bm-shadow);
    animation: bm-rise .35s cubic-bezier(.22,1,.36,1);
}
@keyframes bm-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bm-detail-top { display: flex; gap: 20px; align-items: flex-start; }
.bm-detail-img {
    width: 128px; height: 128px;
    border-radius: 20px;
    object-fit: cover;
    background: var(--bm-blue-pale);
    box-shadow: var(--bm-shadow-soft);
    flex: 0 0 auto;
}
.bm-detail-info { flex: 1; min-width: 0; }
.bm-detail-name { font-size: 19px; font-weight: 800; color: var(--bm-blue-ink); margin: 0 0 6px; }
.bm-detail-desc { font-size: 13.5px; color: #5C74A0; line-height: 1.7; margin: 0 0 10px; }
.bm-detail-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--bm-blue-deep);
}
.bm-detail-price .woocommerce-Price-amount { color: var(--bm-blue-deep); }

/* size chips */
.bm-size-block { margin-top: 18px; }
.bm-size-title { font-size: 13px; font-weight: 700; color: var(--bm-blue-deep); margin-bottom: 10px; }
.bm-size-row { display: flex; flex-wrap: wrap; gap: 10px; }
.bm-size-chip {
    font-family: inherit;
    border: 1.5px solid var(--bm-line);
    background: var(--bm-white);
    color: var(--bm-blue-ink);
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}
.bm-size-chip:hover { border-color: var(--bm-blue); }
.bm-size-chip.is-selected {
    background: var(--bm-blue);
    border-color: var(--bm-blue);
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(23,104,242,.55);
}
.bm-size-chip.is-disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* footer: qty + add to cart */
.bm-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed var(--bm-line);
}
.bm-qty {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bm-white);
    border: 1.5px solid var(--bm-line);
    border-radius: 999px;
    padding: 4px;
}
.bm-qty button,
.bm-qty-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bm-blue-pale);
    cursor: pointer;
    position: relative;
    padding: 0;
}
.bm-qty-btn:hover { background: var(--bm-blue); }
.bm-qty-btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 12px; height: 2px;
    background: var(--bm-blue-deep);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: background .15s ease;
}
.bm-qty-btn.bm-qty-plus::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 2px; height: 12px;
    background: var(--bm-blue-deep);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: background .15s ease;
}
.bm-qty-btn:hover::before,
.bm-qty-btn:hover::after { background: #fff; }
.bm-qty span { min-width: 26px; text-align: center; font-weight: 700; }

.bm-order-blocked-note {
    margin: 10px 4px 0;
    font-size: 12.5px;
    color: var(--bm-red);
    font-weight: 600;
    text-align: center;
}

.bm-add-btn {
    flex: 1;
    max-width: 260px;
    background: linear-gradient(135deg, var(--bm-blue), var(--bm-blue-deep));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px -8px rgba(11,63,168,.5);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.bm-add-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px rgba(11,63,168,.6); }
.bm-add-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.bm-add-btn.is-success { background: linear-gradient(135deg, #1E9E5C, #167A47); }

.bm-toast {
    position: fixed;
    bottom: 24px;
    right: 50%;
    transform: translateX(50%);
    background: var(--bm-blue-ink);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 30px -8px rgba(0,0,0,.35);
    z-index: 9999;
    animation: bm-toast-in .25s ease;
}
@keyframes bm-toast-in { from { opacity: 0; transform: translateX(50%) translateY(12px); } to { opacity: 1; transform: translateX(50%) translateY(0); } }

@media (max-width: 560px) {
    .bm-detail-top { flex-direction: column; align-items: center; text-align: center; }
    .bm-detail-img { width: 100%; height: 180px; }
    .bm-detail-footer { flex-direction: column; }
    .bm-add-btn { max-width: 100%; width: 100%; }
}
