/* Branch Manager — Frontend
 * كل القياسات بالبكسل (وليس rem) حتى لا تتأثر بقوالب مثل Bricks التي تجعل html{font-size:62.5%}.
 */

.branch-manager {
    --bm-accent: #d9731a;
    --bm-heading: #1c1917;
    --bm-text: #292524;
    --bm-muted: #78716c;
    --bm-surface: #fff;
    --bm-soft: #faf6f1;
    --bm-border: #ece4da;
    --bm-hero-text: #fff;
    --bm-upcoming: #15803d;
    --bm-hero-bg: linear-gradient(135deg, #eb8227, #8a3b0c);
    --bm-radius: 14px;
    --bm-radius-sm: 9px;
    --bm-heading-weight: 800;
    --bm-shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 4px 16px rgba(28, 25, 23, .06);
    --bm-shadow-hover: 0 10px 30px rgba(28, 25, 23, .12);

    color: var(--bm-text);
    font-size: 16px;
    line-height: 1.7;
    width: 100%;
}

.branch-manager *,
.branch-manager *::before,
.branch-manager *::after {
    box-sizing: border-box;
}

.branch-manager [hidden] {
    display: none !important;
}

.branch-manager a {
    color: inherit;
    text-decoration: none;
}

.branch-manager img {
    max-width: 100%;
    height: auto;
}

.branch-manager .bm-icon {
    flex-shrink: 0;
    vertical-align: middle;
}

.branch-manager:dir(ltr) .bm-icon--chevron,
.branch-manager:dir(ltr) .bm-icon--chevron-next {
    transform: scaleX(-1);
}

.branch-manager .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.bm-container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 20px;
    container-type: inline-size;
}

.bm-main {
    padding-block: 32px 64px;
}

/* ---------------- الرأس ---------------- */

.bm-hero {
    background: var(--bm-hero-bg);
    color: var(--bm-hero-text);
    padding-block: 40px 48px;
    position: relative;
    overflow: hidden;
}

.bm-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -120px;
    top: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
    pointer-events: none;
}

.bm-hero .bm-container {
    position: relative;
    z-index: 1;
}

.bm-hero--branch {
    padding-block: 40px 76px;
}

.bm-hero--branch.has-image {
    background: linear-gradient(to top, rgba(12, 10, 9, .88) 0%, rgba(12, 10, 9, .55) 55%, rgba(12, 10, 9, .35) 100%), var(--bm-hero-image) center / cover no-repeat;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
}

.branch-manager .bm-page-title {
    color: inherit;
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: var(--bm-heading-weight);
    line-height: 1.3;
    margin: 10px 0 8px;
}

.bm-single--activity .bm-page-title {
    color: var(--bm-heading);
}

.bm-hero__desc {
    font-size: 18px;
    max-width: 760px;
    margin: 0 0 12px;
    opacity: .92;
}

.bm-hero__desc a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.bm-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.bm-hero__stat {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 15px;
    backdrop-filter: blur(4px);
}

.bm-hero__stat strong {
    font-size: 18px;
    font-weight: 800;
}

a.bm-hero__stat:hover {
    background: rgba(255, 255, 255, .26);
}

/* ---------------- مسار التنقل ---------------- */

.bm-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--bm-muted);
}

.bm-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.bm-breadcrumbs li + li::before {
    content: "/";
    opacity: .5;
    margin-inline-end: 4px;
}

.bm-breadcrumbs a:hover {
    color: var(--bm-accent);
}

.bm-breadcrumbs--light ol {
    color: rgba(255, 255, 255, .82);
}

.bm-breadcrumbs--light a:hover {
    color: #fff;
    text-decoration: underline;
}

.bm-single--activity .bm-breadcrumbs {
    padding-top: 24px;
}

/* ---------------- الأزرار ---------------- */

.branch-manager .bm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--bm-radius-sm);
    border: 2px solid var(--bm-accent);
    background: var(--bm-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
    text-decoration: none;
}

.branch-manager .bm-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
    color: #fff;
}

.branch-manager .bm-button--ghost {
    background: transparent;
    color: var(--bm-accent);
}

.branch-manager .bm-button--ghost:hover {
    background: var(--bm-accent);
}

.branch-manager .bm-button--block {
    display: flex;
    width: 100%;
}

.branch-manager .bm-button--light {
    background: #fff;
    border-color: #fff;
    color: var(--bm-accent);
}

.branch-manager .bm-button--light:hover {
    color: var(--bm-accent);
}

.branch-manager .bm-button--whatsapp {
    background: #25d366;
    border-color: #25d366;
}

.branch-manager .bm-button--glass {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .35);
    backdrop-filter: blur(4px);
}

.bm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.bm-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--bm-accent) !important;
    font-weight: 700;
    font-size: 15px;
}

.bm-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.bm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bm-soft);
    color: var(--bm-accent);
    border: 1px solid var(--bm-border);
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
}

.bm-icon-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    background: var(--bm-accent);
}

.bm-icon-btn--whatsapp { color: #128c4b; }
.bm-icon-btn--whatsapp:hover { background: #25d366; border-color: #25d366; }
.bm-icon-btn--facebook { color: #1877f2; }
.bm-icon-btn--facebook:hover { background: #1877f2; border-color: #1877f2; }
.bm-icon-btn--instagram { color: #d62976; }
.bm-icon-btn--instagram:hover { background: linear-gradient(45deg, #feda75, #d62976, #4f5bd5); border-color: #d62976; }
.bm-icon-btn--youtube { color: #ff0000; }
.bm-icon-btn--youtube:hover { background: #ff0000; border-color: #ff0000; }
.bm-icon-btn--youtube:hover .bm-icon path { fill: #ff0000; }

/* ---------------- الشارات ---------------- */

.bm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.branch-manager .bm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--bm-badge, var(--bm-accent));
    background: color-mix(in srgb, var(--bm-badge, var(--bm-accent)) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--bm-badge, var(--bm-accent)) 22%, #fff);
}

a.bm-badge:hover {
    background: var(--bm-badge, var(--bm-accent));
    color: #fff;
}

.branch-manager .bm-badge--upcoming {
    background: var(--bm-upcoming);
    border-color: var(--bm-upcoming);
    color: #fff;
}

.branch-manager .bm-badge--light {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
}

.branch-manager .bm-badge--float {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: rgba(255, 255, 255, .95);
    border-color: transparent;
    color: var(--bm-heading);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.bm-badge--float .bm-icon {
    color: var(--bm-accent);
}

/* ---------------- البحث والتصفية ---------------- */

.bm-toolbar,
.bm-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.bm-filters {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    padding: 14px;
    box-shadow: var(--bm-shadow);
}

.bm-search {
    position: relative;
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    margin: 0;
}

.bm-search .bm-icon {
    position: absolute;
    inset-inline-start: 14px;
    color: var(--bm-muted);
    pointer-events: none;
}

.branch-manager .bm-search input,
.branch-manager .bm-select select {
    width: 100%;
    height: 46px;
    margin: 0;
    padding-block: 0;
    padding-inline: 44px 14px;
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius-sm);
    background: var(--bm-surface);
    color: var(--bm-text);
    font: inherit;
    font-size: 15px;
    box-shadow: none;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.branch-manager .bm-select {
    flex: 0 1 190px;
    margin: 0;
}

.branch-manager .bm-select select {
    padding-inline: 14px 32px;
    cursor: pointer;
}

.branch-manager .bm-search input:focus,
.branch-manager .bm-select select:focus {
    border-color: var(--bm-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-accent) 18%, transparent);
}

.bm-filters .bm-button {
    height: 46px;
}

.bm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.branch-manager .bm-chip {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--bm-border);
    background: var(--bm-surface);
    color: var(--bm-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.5;
    transition: all .15s ease;
}

.branch-manager .bm-chip:hover {
    border-color: var(--bm-accent);
    color: var(--bm-accent);
}

.branch-manager .bm-chip.is-active {
    background: var(--bm-accent);
    border-color: var(--bm-accent);
    color: #fff;
}

/* ---------------- الشبكة والبطاقات ---------------- */

.bm-grid-wrap {
    container-type: inline-size;
    width: 100%;
}

.bm-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr);
}

@container (min-width: 520px) {
    .bm-grid--cols-2,
    .bm-grid--cols-3,
    .bm-grid--cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container (min-width: 860px) {
    .bm-grid--cols-3,
    .bm-grid--cols-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container (min-width: 1080px) {
    .bm-grid--cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.bm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    overflow: hidden;
    box-shadow: var(--bm-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.bm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bm-shadow-hover);
}

.bm-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bm-soft);
}

.branch-manager .bm-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.bm-card:hover .bm-card__img {
    transform: scale(1.05);
}

.bm-placeholder,
.branch-manager .bm-card__img.bm-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--bm-accent);
    background:
        radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--bm-accent) 14%, transparent), transparent 60%),
        linear-gradient(135deg, var(--bm-soft), color-mix(in srgb, var(--bm-accent) 10%, var(--bm-soft)));
}

.bm-placeholder .bm-icon {
    opacity: .55;
}

.bm-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px 20px;
    flex: 1;
}

.branch-manager .bm-card__title {
    margin: 0;
    font-size: 19px;
    font-weight: var(--bm-heading-weight);
    line-height: 1.45;
    color: var(--bm-heading);
}

.bm-card__title a:hover {
    color: var(--bm-accent);
}

.bm-card__title a::after {
    /* البطاقة كلها قابلة للنقر */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.bm-card a:not(.bm-card__title a),
.bm-card button {
    position: relative;
    z-index: 2;
}

.bm-card__excerpt {
    margin: 0;
    color: var(--bm-muted);
    font-size: 15px;
    line-height: 1.75;
}

.bm-card__meta {
    color: var(--bm-muted);
    font-size: 14px;
}

.bm-card__branch {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--bm-border);
}

.bm-card__branch .bm-icon {
    color: var(--bm-accent);
}

.bm-card__branch a {
    font-weight: 600;
}

.bm-card__branch a:hover {
    color: var(--bm-accent);
}

.bm-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.bm-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
}

.bm-info-list .bm-icon {
    color: var(--bm-accent);
    margin-top: 4px;
}

.bm-info-list a:hover {
    color: var(--bm-accent);
}

.bm-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--bm-border);
}

.bm-card__icons {
    display: inline-flex;
    gap: 6px;
}

.bm-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bm-muted);
    font-size: 14px;
}

.bm-count .bm-icon {
    color: var(--bm-accent);
}

.bm-count strong {
    color: var(--bm-heading);
    font-size: 16px;
}

.bm-branch-card .bm-button {
    margin-top: 4px;
}

.bm-date-chip,
.bm-photo-count {
    position: absolute;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(12, 10, 9, .72);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.bm-date-chip {
    inset-inline-start: 12px;
}

.bm-photo-count {
    inset-inline-end: 12px;
}

.is-upcoming .bm-date-chip {
    background: var(--bm-upcoming);
}

/* قائمة أفقية (layout="list") */
.bm-grid--list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
}

@container (min-width: 560px) {
    .bm-grid--list .bm-card {
        flex-direction: row;
    }

    .bm-grid--list .bm-card__media {
        flex: 0 0 34%;
        aspect-ratio: auto;
        min-height: 170px;
    }
}

/* ---------------- الأقسام والصناديق ---------------- */

.bm-section {
    margin-block: 40px;
}

.bm-section:first-child {
    margin-top: 0;
}

.bm-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.branch-manager .bm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: var(--bm-heading-weight);
    color: var(--bm-heading);
    line-height: 1.4;
}

.bm-section-head .bm-section-title {
    margin: 0;
}

.bm-section-title .bm-icon {
    color: var(--bm-accent);
}

.bm-section-title__count {
    font-size: 14px;
    font-weight: 700;
    color: var(--bm-accent);
    background: color-mix(in srgb, var(--bm-accent) 12%, #fff);
    border-radius: 999px;
    padding: 1px 10px;
}

.bm-box {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--bm-shadow);
}

.bm-box > :last-child {
    margin-bottom: 0;
}

.branch-manager .bm-box__title {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bm-border);
    font-size: 18px;
    font-weight: var(--bm-heading-weight);
    color: var(--bm-heading);
    line-height: 1.4;
}

.bm-box__title a:hover {
    color: var(--bm-accent);
}

.bm-box .bm-button--block {
    margin-top: 16px;
}

/* ---------------- تخطيط الصفحات المفردة ---------------- */

.bm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

@container (min-width: 900px) {
    .bm-layout {
        grid-template-columns: minmax(0, 1fr) 350px;
        gap: 32px;
    }

    .bm-layout__side {
        position: sticky;
        top: 24px;
    }
}

.bm-single--branch .bm-layout {
    margin-top: 32px;
    padding-bottom: 64px;
}

.bm-single--activity .bm-layout {
    margin-top: 28px;
}

.bm-single--activity .bm-related {
    margin-top: 48px;
    padding-bottom: 64px;
}

.bm-single--activity > .bm-container {
    padding-bottom: 48px;
}

/* ---------------- الإحصائيات ---------------- */

.bm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.bm-single--branch .bm-stats {
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.bm-stats--plain {
    margin-bottom: 32px;
}

.bm-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    padding: 16px 18px;
    box-shadow: var(--bm-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}

a.bm-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--bm-shadow-hover);
}

.bm-stat > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bm-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    color: var(--bm-accent);
    background: color-mix(in srgb, var(--bm-accent) 12%, #fff);
    flex-shrink: 0;
}

.bm-stat--upcoming .bm-stat__icon {
    color: var(--bm-upcoming);
    background: color-mix(in srgb, var(--bm-upcoming) 12%, #fff);
}

.branch-manager .bm-stat__value {
    font-size: 26px;
    font-weight: 800;
    color: var(--bm-heading);
    line-height: 1.2;
}

.branch-manager .bm-stat__value--text {
    font-size: 17px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bm-stat__label {
    font-size: 14px;
    color: var(--bm-muted);
}

/* ---------------- المحتوى ---------------- */

.bm-prose {
    font-size: 17px;
    line-height: 1.95;
    color: var(--bm-text);
}

.bm-prose > :first-child {
    margin-top: 0;
}

.bm-prose > :last-child {
    margin-bottom: 0;
}

.bm-prose p,
.bm-prose ul,
.bm-prose ol {
    margin: 0 0 1em;
}

.bm-prose ul,
.bm-prose ol {
    padding-inline-start: 1.4em;
}

.bm-prose h2,
.bm-prose h3,
.bm-prose h4 {
    color: var(--bm-heading);
    font-weight: var(--bm-heading-weight);
    line-height: 1.4;
    margin: 1.4em 0 .6em;
}

.bm-prose h2 { font-size: 1.4em; }
.bm-prose h3 { font-size: 1.2em; }

.bm-prose a {
    color: var(--bm-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bm-prose img {
    border-radius: var(--bm-radius-sm);
}

.bm-prose blockquote {
    margin: 1.2em 0;
    padding: 12px 18px;
    border-inline-start: 4px solid var(--bm-accent);
    background: var(--bm-soft);
    border-radius: var(--bm-radius-sm);
}

.bm-extra {
    margin-top: 20px;
    padding: 16px 18px;
    background: var(--bm-soft);
    border-radius: var(--bm-radius-sm);
    border: 1px solid var(--bm-border);
}

.bm-extra > :last-child {
    margin-bottom: 0;
}

/* ---------------- معلومات التواصل ---------------- */

.bm-info {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bm-info__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    margin: 0;
    border-bottom: 1px dashed var(--bm-border);
}

.bm-info__row:last-child {
    border-bottom: 0;
}

.bm-info__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--bm-accent);
    background: color-mix(in srgb, var(--bm-accent) 11%, #fff);
    flex-shrink: 0;
}

.bm-info__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bm-info__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--bm-muted);
    line-height: 1.5;
}

.bm-info__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--bm-heading);
    word-break: break-word;
}

a.bm-info__value:hover {
    color: var(--bm-accent);
}

.bm-hours {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--bm-soft);
    border-radius: var(--bm-radius-sm);
}

.bm-hours .bm-icon {
    color: var(--bm-accent);
}

.bm-hours__text {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--bm-heading);
}

.bm-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.bm-socials .bm-icon-btn {
    width: 42px;
    height: 42px;
}

.bm-map {
    border-radius: var(--bm-radius-sm);
    overflow: hidden;
    background: var(--bm-soft);
    aspect-ratio: 4 / 3;
}

.bm-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.bm-sc .bm-map {
    margin-top: 16px;
}

/* بطاقة الفرع في صفحة النشاط */
.bm-branch-box__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.bm-branch-box__head img,
.bm-branch-box__head .bm-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

.bm-branch-box__head strong {
    display: block;
    font-size: 17px;
    color: var(--bm-heading);
    line-height: 1.4;
}

.bm-branch-box__head small {
    color: var(--bm-muted);
    font-size: 14px;
}

.bm-branch-box__head:hover strong {
    color: var(--bm-accent);
}

/* ---------------- صفحة النشاط ---------------- */

.bm-single__header {
    padding-top: 18px;
    max-width: 900px;
}

.bm-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    color: var(--bm-muted);
    font-size: 15px;
}

.bm-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.bm-meta .bm-icon {
    color: var(--bm-accent);
}

.bm-meta a {
    color: var(--bm-heading);
    font-weight: 700;
}

.bm-meta a:hover {
    color: var(--bm-accent);
}

.bm-featured {
    margin: 26px 0 0;
    border-radius: var(--bm-radius);
    overflow: hidden;
    box-shadow: var(--bm-shadow);
    background: var(--bm-soft);
}

.bm-featured img {
    display: block;
    width: 100%;
    max-height: 600px;
    object-fit: cover;
}

.bm-video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--bm-radius);
    overflow: hidden;
    background: #000;
}

.bm-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------------- ألبوم الصور ---------------- */

.bm-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.bm-gallery__item {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: var(--bm-radius-sm);
    overflow: hidden;
    background: var(--bm-soft);
    cursor: zoom-in;
}

.bm-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease, filter .3s ease;
}

.bm-gallery__item:hover img {
    transform: scale(1.07);
    filter: brightness(.9);
}

.bm-gallery__item:focus-visible {
    outline: 3px solid var(--bm-accent);
    outline-offset: 2px;
}

/* ---------------- المشاركة ---------------- */

.bm-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.bm-share__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--bm-heading);
}

.bm-share__label .bm-icon {
    color: var(--bm-accent);
}

.bm-share__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.branch-manager .bm-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}

.branch-manager .bm-share__btn:hover {
    transform: translateY(-2px);
    opacity: .92;
    color: #fff;
}

.bm-share__btn--facebook { background: #1877f2; }
.bm-share__btn--whatsapp { background: #25d366; }
.bm-share__btn--telegram { background: #229ed9; }
.bm-share__btn--x { background: #111; }
.branch-manager .bm-share__btn--copy { background: var(--bm-soft); color: var(--bm-heading); border: 1px solid var(--bm-border); }
.branch-manager .bm-share__btn--copy:hover { color: var(--bm-heading); }
.branch-manager .bm-share__btn--copy.is-copied { background: var(--bm-upcoming); color: #fff; border-color: var(--bm-upcoming); }

.bm-layout__side .bm-share__btn span {
    display: none;
}

.bm-layout__side .bm-share__btn {
    padding: 9px;
}

/* ---------------- نظرة على الفروع ---------------- */

.bm-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.bm-overview__group {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    padding: 18px 20px;
    box-shadow: var(--bm-shadow);
}

.branch-manager .bm-overview__city {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--bm-heading);
    font-weight: var(--bm-heading-weight);
}

.bm-overview__city .bm-icon {
    color: var(--bm-accent);
}

.bm-overview__city span {
    margin-inline-start: auto;
    font-size: 13px;
    color: var(--bm-accent);
    background: color-mix(in srgb, var(--bm-accent) 12%, #fff);
    border-radius: 999px;
    padding: 1px 10px;
}

.bm-overview ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bm-overview li {
    margin: 0;
    border-top: 1px dashed var(--bm-border);
}

.bm-overview li a {
    display: block;
    padding: 9px 0;
}

.bm-overview li strong {
    display: block;
    color: var(--bm-heading);
    font-size: 15px;
}

.bm-overview li small {
    display: block;
    color: var(--bm-muted);
    font-size: 13px;
}

.bm-overview li a:hover strong {
    color: var(--bm-accent);
}

/* ---------------- ترقيم الصفحات والحالات الفارغة ---------------- */

.bm-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}

.bm-pagination a.page-numbers,
.bm-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    justify-content: center;
    border-radius: var(--bm-radius-sm);
    border: 1px solid var(--bm-border);
    background: var(--bm-surface);
    font-weight: 700;
    font-size: 15px;
}

.bm-pagination a.page-numbers:hover {
    border-color: var(--bm-accent);
    color: var(--bm-accent);
}

.bm-pagination span.page-numbers.current {
    background: var(--bm-accent);
    border-color: var(--bm-accent);
    color: #fff;
}

.bm-pagination span.dots {
    border: 0;
    background: none;
}

.bm-empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--bm-muted);
    background: var(--bm-surface);
    border: 1px dashed var(--bm-border);
    border-radius: var(--bm-radius);
}

.bm-empty .bm-icon {
    color: var(--bm-accent);
    opacity: .6;
}

.bm-empty p {
    font-size: 17px;
    margin: 12px 0 18px;
}

.bm-empty--small {
    padding: 32px 20px;
}

.bm-empty-inline {
    color: var(--bm-muted);
    text-align: center;
    padding: 24px 0;
    margin: 0;
}

/* ---------------- الأكواد المختصرة ---------------- */

.bm-sc {
    margin-block: 8px 32px;
}

/* ---------------- الجوال ---------------- */

@media (max-width: 640px) {
    .bm-hero {
        padding-block: 28px 36px;
    }

    .bm-hero--branch {
        padding-block: 28px 64px;
    }

    .bm-hero--branch.has-image {
        min-height: 320px;
    }

    .bm-hero__desc {
        font-size: 16px;
    }

    .bm-actions .bm-button {
        flex: 1 1 auto;
        padding-inline: 14px;
    }

    .bm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .bm-stat {
        padding: 12px;
        gap: 10px;
    }

    .bm-stat:has(.bm-stat__value--text) {
        grid-column: 1 / -1;
    }

    .bm-stat__icon {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .branch-manager .bm-stat__value {
        font-size: 21px;
    }

    .bm-box {
        padding: 18px;
    }

    .branch-manager .bm-section-title {
        font-size: 21px;
    }

    .bm-select {
        flex: 1 1 calc(50% - 6px) !important;
    }

    .bm-filters .bm-button {
        flex: 1 1 auto;
    }

    .bm-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .bm-prose {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .branch-manager *,
    .bm-lightbox * {
        transition: none !important;
    }
}

@media print {
    .bm-share,
    .bm-share-box,
    .bm-actions,
    .bm-filters,
    .bm-toolbar,
    .bm-box--map,
    .bm-pagination,
    .bm-video {
        display: none !important;
    }

    .bm-hero {
        background: none !important;
        color: #000 !important;
    }

    .bm-card,
    .bm-box,
    .bm-stat {
        box-shadow: none !important;
        break-inside: avoid;
    }
}

/* ---------------- عارض الصور (خارج نطاق .branch-manager) ---------------- */

.bm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 8, .94);
    opacity: 0;
    transition: opacity .2s ease;
    direction: ltr;
    touch-action: pan-y;
}

.bm-lightbox.is-open {
    opacity: 1;
}

.bm-lightbox__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 94vw;
}

.bm-lightbox__img {
    display: block;
    max-width: 94vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    user-select: none;
}

.bm-lightbox__caption {
    color: #eee;
    font-size: 15px;
    margin-top: 12px;
    text-align: center;
    direction: rtl;
    min-height: 1em;
}

.bm-lightbox__counter {
    position: absolute;
    top: 18px;
    left: 20px;
    color: #ddd;
    font: 600 14px/1.4 system-ui, sans-serif;
}

.bm-lightbox button {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: background-color .15s ease;
}

.bm-lightbox button:hover,
.bm-lightbox button:focus-visible {
    background: rgba(255, 255, 255, .26);
    outline: none;
}

.bm-lightbox__close {
    top: 12px;
    right: 14px;
}

.bm-lightbox__prev {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.bm-lightbox__next {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.bm-lightbox--single .bm-lightbox__prev,
.bm-lightbox--single .bm-lightbox__next,
.bm-lightbox--single .bm-lightbox__counter {
    display: none;
}

@media (max-width: 640px) {
    .bm-lightbox__prev,
    .bm-lightbox__next {
        top: auto;
        bottom: 18px;
        transform: none;
    }
}

body.bm-lightbox-open {
    overflow: hidden;
}
