/* ============================================================
   Re-Blox layout — header, mega menu, footer, switchers, RTL.
   Loaded after rb-theme.css. Uses logical properties so the
   same rules work for dir="ltr" and dir="rtl".
   ============================================================ */

/* ---------- Arabic font ---------- */
[dir="rtl"] body { font-family: 'Cairo', system-ui, "Segoe UI", Tahoma, sans-serif; letter-spacing: 0; }

/* ---------- Top bar ---------- */
.rb-topbar__promises a:hover, .rbl-lang:hover { color: var(--rb-text); }
.rb-topbar__end { display: flex; align-items: center; gap: 12px; }
.rbl-switch { display: inline-flex; border: 1px solid var(--rb-line); border-radius: 999px; padding: 2px; }
.rbl-switch a { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--rb-muted); }
.rbl-switch a.is-on { background: var(--rb-accent); color: var(--rb-accent-ink); }
.rbl-lang { font-weight: 600; }

/* ---------- Header ---------- */
.rb-header__logo img { height: 40px; width: auto; }
.rb-cart__badge { right: auto; inset-inline-end: -7px; }
.rb-cart__total { font-weight: 700; white-space: nowrap; }
.rb-search:focus-within { box-shadow: 0 0 0 3px rgb(var(--rb-accent-rgb) / .18); }
#rbMenuToggle { display: none; }

/* ---------- Mega menu ---------- */
.rbm-trigger { display: inline-flex !important; align-items: center; gap: 7px; }
.rbm-ico { width: 16px; height: 16px; flex: 0 0 auto; }
.rbm-panel {
    width: min(1240px, 96vw); inset-inline-start: 0; left: auto;
    padding: 18px 22px 22px; border-radius: 0 0 18px 18px; z-index: 60;
    box-shadow: 0 30px 70px rgba(0,0,0,.55);
}
.rbm-strip {
    display: flex; align-items: center; gap: 14px; padding: 13px 16px; margin-bottom: 16px;
    border: 1px solid rgb(var(--rb-accent-rgb) / .45); border-radius: 14px;
    background: linear-gradient(90deg, rgb(var(--rb-accent-rgb) / .16), rgb(var(--rb-accent-rgb) / .04));
}
[dir="rtl"] .rbm-strip { background: linear-gradient(-90deg, rgb(var(--rb-accent-rgb) / .16), rgb(var(--rb-accent-rgb) / .04)); }
.rbm-strip__txt b { display: block; font-size: 15px; }
.rbm-strip__txt small { color: var(--rb-muted); font-size: 12px; }
.rbm-strip__btn {
    margin-inline-start: auto; background: var(--rb-accent); color: var(--rb-accent-ink);
    font-weight: 800; font-size: 13px; padding: 10px 16px; border-radius: 10px; white-space: nowrap;
}
[dir="rtl"] .rbm-arrow { display: inline-block; transform: scaleX(-1); }
.rbm-cols { display: grid; grid-template-columns: 230px 1fr; gap: 24px; }
.rbm-left { display: flex; flex-direction: column; gap: 2px; }
.rbm-all {
    display: flex; justify-content: space-between; align-items: center; padding: 9px 12px;
    border-radius: 10px; color: var(--rb-accent); font-weight: 700; font-size: 13px; margin-bottom: 6px;
}
.rbm-tab {
    display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid transparent;
    border-radius: 10px; background: transparent; color: var(--rb-muted); font: inherit; font-size: 13.5px; cursor: pointer;
}
.rbm-tab span { flex: 1; text-align: start; }
.rbm-tab.is-on { background: rgba(255,255,255,.05); color: var(--rb-text); border-color: var(--rb-line); }
.rbm-chev { opacity: .45; font-style: normal; }
[dir="rtl"] .rbm-chev { transform: scaleX(-1); }
.rbm-dot { width: 11px; height: 11px; border-radius: 4px; background: var(--t, var(--rb-accent)); flex: 0 0 auto; display: inline-block; }
.rbm-right { min-height: 300px; }
.rbm-body { display: none; }
.rbm-body.is-on { display: block; }
.rbm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.rbm-head b { font-size: 22px; font-weight: 800; }
.rbm-head a { color: var(--rb-accent); font-size: 13px; }
.rbm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rbm-reg {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--rb-line);
    border-radius: 10px; background: rgba(255,255,255,.03); font-size: 13.5px; font-weight: 600;
    transition: border-color .12s, transform .12s;
}
.rbm-reg:hover { border-color: var(--rb-accent); transform: translateY(-1px); }
.rbm-flag { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; flex: 0 0 auto; }
.rbm-globe { width: 22px; text-align: center; flex: 0 0 auto; }

/* ---------- Footer ---------- */
.rb-footer__about img { height: 44px; width: auto; margin-bottom: 10px; }
.rb-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rb-footer__legal { display: flex; gap: 16px; }

/* ---------- Mobile ---------- */
@media (max-width: 920px) {
    #rbMenuToggle { display: inline-block; }
    .rb-menu { display: none; }
    #rbHeader.rb-menu--open .rb-menu { display: block; }
    .rb-menu__list { flex-direction: column; }
    .rb-menu__item--haspanel:hover .rb-panel { display: none; }
    .rb-menu__item--haspanel.is-open .rb-panel { display: block; position: static; width: auto; box-shadow: none; border-radius: 14px; }
    .rbm-cols { grid-template-columns: 1fr; }
    .rbm-left { flex-direction: row; flex-wrap: wrap; }
    .rbm-tab { flex: 0 0 auto; }
    .rbm-tab span { flex: none; }
    .rbm-chev { display: none; }
    .rbm-grid { grid-template-columns: repeat(2, 1fr); }
    .rbm-strip__btn { display: none; }
    .rb-header__bar { flex-wrap: wrap; }
    .rb-search { order: 10; flex-basis: 100%; }
    .rb-tool { display: none; }
    .rb-header__tools { margin-inline-start: auto; }
}
@media (max-width: 560px) {
    .rb-topbar__promises li:not(:first-child) { display: none; }
    .rb-header__logo img { height: 34px; }
}
