﻿/**
 * هدر بیلدر Hamta Design — گرید ردیف‌ها و حالت موبایل ثابت
 */

 .hpb-header-builder {
    direction: rtl;
    box-sizing: border-box;
    z-index: 4;
    position: relative;
}

.hpb-header-builder *,
.hpb-header-builder *::before,
.hpb-header-builder *::after {
    box-sizing: border-box;
}

/* ——— دسکتاپ: ردیف‌ها به‌صورت عادی در جریان سند ——— */
.hpb-header-builder .hpb-lb-row {
    position: relative;
}

.hpb-header-builder .hpb-lb-row--top {
    z-index: 3;
}

.hpb-header-builder .hpb-lb-row--middle {
    z-index: 2;
}

.hpb-header-builder .hpb-lb-row--bottom {
    z-index: 1;
}

.hpb-lb--desktop .hpb-lb-row--top {
    background: linear-gradient(90deg, #0d48a2 0%, #3d7ab8 50%, #5ec8f0 100%);
    color: #fff;
    font-size: 13px;
}

.hpb-lb--desktop .hpb-lb-row--top .hpb-lb-cell {
    padding: 8px 0;
}

.hpb-lb--desktop .hpb-lb-row--middle {
    background: #fff;
    color: #1d1d1b;
    border-bottom: 1px solid #eaeaea;
}

.hpb-lb--desktop .hpb-lb-row--middle .hpb-lb-cell {
    padding: 12px 0;
}

.hpb-lb--desktop .hpb-lb-row--bottom {
    background: #fff;
    color: #1d1d1b;
    border-bottom: 1px solid #eaeaea;
}

.hpb-lb--desktop .hpb-lb-row--bottom .hpb-lb-cell {
    padding: 10px 0;
}

.hpb-lb--desktop.hpb-lb--sticky-bottom .hpb-lb-row--bottom.hpb-lb-row--sticky {
    position: relative;
    top: auto;
    z-index: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.hpb-lb-sticky-bottom-host {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: transparent;
}

/* host هم کلاس hpb-header-builder دارد — z-index:4 تم را override می‌کند */
.hpb-header-builder.hpb-lb-sticky-bottom-host {
    z-index: 100;
}

body.admin-bar .hpb-lb--desktop.hpb-lb--sticky-bottom .hpb-lb-row--bottom.hpb-lb-row--sticky {
    top: auto;
}

body.admin-bar .hpb-lb-sticky-bottom-host {
    top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .hpb-lb--desktop.hpb-lb--sticky-bottom .hpb-lb-row--bottom.hpb-lb-row--sticky {
        top: auto;
    }

    body.admin-bar .hpb-lb-sticky-bottom-host {
        top: var(--wp-admin--admin-bar--height, 46px);
    }
}

.hpb-lb--desktop.hpb-lb--sticky-bottom .hpb-lb-row--bottom.hpb-lb-row--sticky a {
    color: inherit;
}

/* عرض کانتینر — متغیر inline روی #hpb-site-header / #hpb-site-footer (critical CSS در wp_head) */
header#hpb-site-header {
    max-width: var(--hpb-lb-desktop-max-width, var(--hpb-site-container-max, 1400px));
    margin: 0px auto;
}

.hpb-header {
    max-width: var(--hpb-lb-desktop-max-width, var(--hpb-site-container-max, 1400px));
    margin: 0px auto;
}

footer#hpb-site-footer {
    max-width: var(--hpb-lb-desktop-max-width, var(--hpb-site-container-max, 1400px));
    margin: 0px auto;
}

/**
 * چیدمان ستون‌ها: معادل گرید ۱۲ ستونهٔ Bootstrap 5
 * — ۱ ستون ⇒ span 12 ⇒ col-12 (تمام عرض ردیف)
 * — ۲ ستون ⇒ هر کدام span 6 ⇒ col-6 (دو نیمهٔ مساوی)
 * — ۳ ستون ⇒ هر کدام span 4 ⇒ col-4 (سه بخش مساوی)
 *
 * وقتی تم کلاس‌های row/col بوت‌استرپ را می‌شناسد، همان رفتار را می‌گیرید؛
 * در غیر این صورت قوانین زیر (مشابه BS5 g-3) اعمال می‌شود.
 */
.hpb-header-builder .hpb-lb-cols.row,
.hpb-footer-builder .hpb-lb-cols.row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: 0;
    margin-right: 0;
    margin-left: 0;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.hpb-header-builder .hpb-lb-cols.row > .hpb-lb-cell,
.hpb-footer-builder .hpb-lb-cols.row > .hpb-lb-cell {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
    box-sizing: border-box;
}

.hpb-header-builder .hpb-lb-cols--1.row > .hpb-lb-cell.col-12,
.hpb-footer-builder .hpb-lb-cols--1.row > .hpb-lb-cell.col-12 {
    flex: 0 0 auto;
    width: 100%;
}

.hpb-header-builder .hpb-lb-cols--2.row > .hpb-lb-cell.col-6,
.hpb-footer-builder .hpb-lb-cols--2.row > .hpb-lb-cell.col-6 {
    flex: 0 0 auto;
    width: 50%;
}

.hpb-header-builder .hpb-lb-cols--3.row > .hpb-lb-cell.col-4,
.hpb-footer-builder .hpb-lb-cols--3.row > .hpb-lb-cell.col-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
}

.hpb-lb-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.hpb-lb-cell > * {
    max-width: 100%;
}

.hpb-lb-render-block {
    max-width: 100%;
}

.hpb-lb-render-block--divider {
    width: 100%;
}

.hpb-lb-divider {
    display: block;
    width: 100%;
    min-height: var(--hd-divider-height, 24px);
}

.hpb-lb-render-block--title_line {
    width: 100%;
    min-width: 0;
}

.hpb-lb-title-line {
    display: flex;
    align-items: center;
    gap: var(--hd-title-line-gap, 12px);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: flex-start;
    text-align: right;
    direction: rtl;
    overflow: hidden;
}

.hpb-lb-title-line-text {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    color: var(--hd-title-line-title-color, inherit);
    font-size: var(--hd-title-line-title-size, 18px);
}

.hpb-lb-title-line-rule {
    flex: 1 1 auto;
    display: block;
    min-width: 24px;
    height: var(--hd-title-line-height, 1px);
    background: var(--hd-title-line-color, #d1d5db);
}

.hpb-lb-search-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 220px;
    margin: 0;
}

.hpb-lb-search-field {
    min-width: 0;
    flex: 1 1 auto;
    border: 1px solid #d1d5db;
    border-radius: 10px 0 0 10px;
    padding: 9px 12px;
}

.hpb-lb-search-submit {
    border: 0;
    border-radius: 0 10px 10px 0;
    padding: 9px 14px;
    background: #1d4ed8;
    color: #fff;
    cursor: pointer;
}

.hpb-lb-cell-align-right {
    justify-content: flex-start;
}

.hpb-lb-cell-align-left {
    justify-content: flex-end;
}

/* ——— موبایل: کل هدر ثابت بالای صفحه، ردیف‌ها پشت‌سرهم ——— */
.hpb-lb--mobile-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    background: #fff;
    /* color: #1d1d1b; */
    /* border-bottom: 1px solid rgba(15, 23, 42, 0.08); */
    /* box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06); */
    z-index: 100;
}

body.admin-bar .hpb-lb--mobile-fixed {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .hpb-lb--mobile-fixed {
        top: 46px !important;
    }
}

.hpb-lb--mobile-fixed .hpb-lb-row--top {
    border-bottom: 1px solid #f0f0f0;
}

.hpb-lb--mobile-fixed .hpb-lb-row--middle {
    border-bottom: 1px solid #f0f0f0;
}

.hpb-lb--mobile-fixed .hpb-lb-cell {
    padding: 8px 0;
    font-size: 14px;
}

/* لینک‌ها و منوهای داخل شورت‌کد */
.hpb-header-builder a,
.hpb-footer-builder a {
    color: inherit;
}

.hpb-footer-builder {
    direction: rtl;
    box-sizing: border-box;
}

.hpb-footer-builder *,
.hpb-footer-builder *::before,
.hpb-footer-builder *::after {
    box-sizing: border-box;
}

/* کانتینر داخلی فوتر — همان 1400px / 100% (قوانین بالا) */

.hpb-fb-row {
    position: relative;
}

.hpb-fb--mobile .hpb-fb-cols.row > .hpb-fb-cell.col-12 {
    width: 100%;
}

.hpb-fb-contact-list {
    list-style: none;
}

.hpb-lb--desktop .hpb-lb-row--top a {
    color: #fff;
}



a.hpb-lb-logo-link {
    display: flex;
    width: 175px;
    height: 66px;
}

a.hpb-lb-logo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpb-header-builder .hpb-lb-row--middle,
.hpb-header-builder .hpb-lb-row--bottom {
    overflow: visible;
}

.hpb-header-builder .hpb-lb-row:has(.ns_home_menu) {
    position: relative;
    overflow: visible;
    z-index: 20;
}

.hpb-header-builder .hpb-lb-row-inner:has(.ns_home_menu) {
    position: relative;
    overflow: visible;
}

.hpb-header-builder .hpb-lb-cell:has(.ns_home_menu) {
    overflow: visible;
}

.hpb-header-builder .hpb-lb-cell:has(.ns_home_menu) > div,
.hpb-header-builder .hpb-lb-cell:has(.ns_home_menu) [class*="menu"] {
    position: static;
}

.hpb-header-builder .nshm_con,
.hpb-header-builder .nshm_con > ul.ns_home_menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

/* ============================================================
 * منوی اصلی هدر (ns_home_menu) — مگامنو + زیرمنو
 * الگوی بصری مشابه bottom bar: pill، active نرم، dropdown تمیز
 * ============================================================ */
.hpb-header-builder .ns_home_menu {
    --hpb-menu-link: #1d1d1b;
    --hpb-menu-link-hover: #0d48a2;
    --hpb-menu-link-active: #2563eb;
    --hpb-menu-current-bg: #fff;
    --hpb-menu-dropdown-bg: #fff;
    --hpb-menu-dropdown-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
    --hpb-menu-dropdown-radius: 12px;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    list-style: none;
    position: static;
}

.hpb-header-builder .ns_home_menu.container {
    width: 100%;
    padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
}

.hpb-lb--desktop .hpb-lb-row--bottom .ns_home_menu {
    background: #f1f1f1;
    border-radius: 8px;
    padding: 4px 8px;
    justify-content: flex-start;
}

.hpb-lb--desktop .hpb-lb-row--bottom .ns_home_menu .the_mega_menu_link {
    color: var(--hpb-menu-link);
}

.hpb-lb--desktop .hpb-lb-row--bottom .ns_home_menu .the_mega_menu.current-menu-item > .the_mega_menu_link,
.hpb-lb--desktop .hpb-lb-row--bottom .ns_home_menu .the_mega_menu.current_page_item > .the_mega_menu_link {
    color: var(--hpb-menu-link-active);
}

.hpb-header-builder .hpb-lb-row--nav-dark .ns_home_menu,
.hpb-header-builder .ns_home_menu.ns_home_menu--dark {
    --hpb-menu-link: #fff;
    --hpb-menu-link-hover: #93c5fd;
    --hpb-menu-link-active: #fff;
}

.hpb-header-builder .ns_home_menu > .the_mega_menu {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1;
}

/* زیرمنوی ساده: li والد relative بماند (مگامنوها static می‌شوند) */
.hpb-header-builder .ns_home_menu > .the_mega_menu.menu-item-has-children:not(.has_mega_dropdown):not(:has(> .the_mega_block:not(:empty))) {
    position: relative !important;
    z-index: 3;
}

/* مگامنو: list-item + static تا پنل تمام‌عرض (طرح‌های اقساطی / Elementor) به row-inner بچسبد */
.hpb-header-builder .ns_home_menu > .the_mega_menu.has_mega_dropdown,
.hpb-header-builder .ns_home_menu > .the_mega_menu:has(> .the_mega_block:not(:empty)) {
    position: static !important;
    display: list-item !important;
    list-style: none;
    flex: 0 0 auto;
}

.hpb-header-builder .ns_home_menu .the_mega_menu_link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--hpb-menu-link);
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.hpb-header-builder .ns_home_menu .the_mega_menu_link:hover,
.hpb-header-builder .ns_home_menu .the_mega_menu_link:focus-visible {
    color: var(--hpb-menu-link-hover);
    background: transparent;
    box-shadow: none;
}

/* current page — pill سفید روی پس‌زمینه خاکستری نوار منو */
.hpb-header-builder .ns_home_menu .the_mega_menu.current-menu-item > .the_mega_menu_link,
.hpb-header-builder .ns_home_menu .the_mega_menu.current_page_item > .the_mega_menu_link {
    color: var(--hpb-menu-link-active);
    /* background: var(--hpb-menu-current-bg); */
    box-shadow: none;
    font-weight: 600;
}

.hpb-header-builder .ns_home_menu .the_mega_menu.current-menu-ancestor:not(.current-menu-item):not(.current_page_item) > .the_mega_menu_link {
    color: var(--hpb-menu-link-hover);
    background: transparent;
    font-weight: 600;
}

.hpb-header-builder .ns_home_menu > .the_mega_menu:hover > .the_mega_menu_link,
.hpb-header-builder .ns_home_menu > .the_mega_menu:focus-within > .the_mega_menu_link {
    color: var(--hpb-menu-link-hover);
    background: transparent;
    box-shadow: none;
}

.hpb-header-builder .ns_home_menu > .the_mega_menu.current-menu-item:hover > .the_mega_menu_link,
.hpb-header-builder .ns_home_menu > .the_mega_menu.current-menu-item:focus-within > .the_mega_menu_link,
.hpb-header-builder .ns_home_menu > .the_mega_menu.current_page_item:hover > .the_mega_menu_link,
.hpb-header-builder .ns_home_menu > .the_mega_menu.current_page_item:focus-within > .the_mega_menu_link {
    color: var(--hpb-menu-link-active);
    /* background: var(--hpb-menu-current-bg); */
}

.hpb-header-builder .ns_home_menu .menu-item-has-children > .the_mega_menu_link::before,
.hpb-header-builder .ns_home_menu .the_mega_menu.has_mega_dropdown > .the_mega_menu_link::before,
.hpb-header-builder .ns_home_menu .the_mega_menu:has(> .the_mega_block:not(:empty)) > .the_mega_menu_link::before {
    content: "";
    width: 0;
    height: 0;
    border-inline: 4px solid transparent;
    border-block-start: 5px solid currentColor;
    opacity: 0.55;
    flex-shrink: 0;
}

/* ——— مگادراپ‌داون (the_mega_block) ——— */
/* anchor به row-inner = تمام عرض container هدر (نه ul باریک) */
.hpb-header-builder .ns_home_menu .the_mega_block {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    inset-inline: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin-top: 8px;
    z-index: 100060;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    box-sizing: border-box;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        visibility 0.22s;
}

.hpb-header-builder .ns_home_menu .the_mega_block:not(:empty) {
    background: var(--hpb-menu-dropdown-bg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--hpb-menu-dropdown-radius);
    box-shadow: var(--hpb-menu-dropdown-shadow);
    padding: 16px 20px;
    overflow: visible;
}

.hpb-header-builder .ns_home_menu .the_mega_block:not(:empty):has(.hpb-pmm) {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* مگامنو طرح‌های اقساطی — گرید ۲ ستونه (۲+۲ یا ۲+۱)، نه یک ستون تمام‌عرض */
.hpb-header-builder .ns_home_menu .the_mega_block .elementor {
    width: 100%;
}

.hpb-header-builder .ns_home_menu .the_mega_block .elementor-inner,
.hpb-header-builder .ns_home_menu .the_mega_block .elementor-section-wrap,
.hpb-header-builder .ns_home_menu .the_mega_block .elementor-container > .elementor-row,
.hpb-header-builder .ns_home_menu .the_mega_block .e-con.e-parent:not(.e-con--column) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch;
}

.hpb-header-builder .ns_home_menu .the_mega_block .elementor-section,
.hpb-header-builder .ns_home_menu .the_mega_block .elementor-column,
.hpb-header-builder .ns_home_menu .the_mega_block .e-con.e-child {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
}

/* یک آیتم فرد (مثلاً ۳ طرح): سطر دوم در وسط، نیم‌عرض */
.hpb-header-builder .ns_home_menu .the_mega_block .elementor-section:last-child:nth-child(odd),
.hpb-header-builder .ns_home_menu .the_mega_block .elementor-row > .elementor-column:last-child:nth-child(odd),
.hpb-header-builder .ns_home_menu .the_mega_block .e-con.e-parent > .e-con:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 8px) !important;
    max-width: calc(50% - 8px) !important;
}

.hpb-header-builder .ns_home_menu .the_mega_block .elementor-column > .elementor-widget-wrap,
.hpb-header-builder .ns_home_menu .the_mega_block .e-con-inner {
    min-width: 0;
}

.hpb-header-builder .ns_home_menu .the_mega_menu.has_mega_dropdown:hover > .the_mega_block:not(:empty),
.hpb-header-builder .ns_home_menu .the_mega_menu.has_mega_dropdown:focus-within > .the_mega_block:not(:empty),
.hpb-header-builder .ns_home_menu .the_mega_menu:hover > .the_mega_block:not(:empty),
.hpb-header-builder .ns_home_menu .the_mega_menu:focus-within > .the_mega_block:not(:empty) {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hpb-header-builder .ns_home_menu .the_mega_block .elementor {
    width: 100%;
}

.hpb-header-builder .ns_home_menu .the_mega_block img {
    max-width: 100%;
    height: auto;
}

/* مگامenu — گرید طرح‌ها + منوی محصولات (همیشه در builder.css sync) */
.hpb-header-builder .ns_home_menu .the_mega_block .hpb-grid {
    width: 100%;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-grid__inner {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: var(--hpb-gap, 12px) !important;
    grid-auto-rows: minmax(120px, auto);
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-grid__item {
    opacity: 1 !important;
    transform: none !important;
    min-width: 0;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-card {
    height: 100%;
    text-align: center;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-card__body {
    padding: 8px 10px 12px;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-card__title {
    font-size: 13px !important;
    line-height: 1.45;
    margin: 0;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-pmm {
    width: 100% !important;
    --hpb-pmm-width: 100% !important;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-pmm__inner {
    width: 100%;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-pmm__panels {
    min-height: var(--hpb-pmm-min-h, 280px);
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-pmm__panel.is-active {
    display: block;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-pmm__panel-content {
    padding: 16px 20px 20px;
}

.hpb-header-builder .ns_home_menu .the_mega_block .hpb-pmm__grid {
    width: 100%;
}

@media (max-width: 767px) {
    .hpb-header-builder .ns_home_menu .the_mega_block .hpb-grid__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* ——— زیرمنوی ساده (the_mega_submenu) ——— */
.hpb-header-builder .ns_home_menu .the_mega_submenu,
.hpb-header-builder .b2blinks .the_mega_submenu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    left: auto !important;
    right: auto !important;
    min-width: 220px;
    width: max-content;
    max-width: min(320px, 92vw);
    z-index: 100060;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    background: var(--hpb-menu-dropdown-bg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow: var(--hpb-menu-dropdown-shadow);
    padding: 8px;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        visibility 0.22s;
}

.hpb-header-builder .ns_home_menu .the_mega_menu.menu-item-has-children:hover > .the_mega_submenu,
.hpb-header-builder .ns_home_menu .the_mega_menu.menu-item-has-children:focus-within > .the_mega_submenu,
.hpb-header-builder .b2blinks .the_mega_menu.menu-item-has-children:hover > .the_mega_submenu,
.hpb-header-builder .b2blinks .the_mega_menu.menu-item-has-children:focus-within > .the_mega_submenu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hpb-header-builder .ns_home_menu .the_mega_submenu > .the_mega_menu {
    display: block;
    width: 100%;
}

.hpb-header-builder .ns_home_menu .the_mega_submenu .the_mega_menu_link {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1b;
    white-space: normal;
}

.hpb-header-builder .ns_home_menu .the_mega_submenu .the_mega_menu_link:hover,
.hpb-header-builder .ns_home_menu .the_mega_submenu .the_mega_menu_link:focus-visible {
    color: #0d48a2;
    background: rgba(13, 72, 162, 0.08);
}

.hpb-header-builder .ns_home_menu .the_mega_submenu .current-menu-item > .the_mega_menu_link {
    color: #0d48a2;
    background: rgba(13, 72, 162, 0.12);
    font-weight: 600;
}

/* ——— موبایل: منوی افقی اسکرول‌پذیر ——— */
@media (max-width: 991px) {
    .hpb-header-builder .ns_home_menu {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        padding: 2px 0;
    }

    .hpb-header-builder .ns_home_menu::-webkit-scrollbar {
        display: none;
    }

    .hpb-header-builder .ns_home_menu .the_mega_menu_link {
        padding: 7px 9px;
        font-size: 13px;
    }

    .hpb-header-builder .ns_home_menu .the_mega_block,
    .hpb-header-builder .ns_home_menu .the_mega_submenu {
        position: fixed;
        top: auto;
        right: 12px;
        left: 12px;
        bottom: calc(72px + env(safe-area-inset-bottom, 0));
        max-height: min(70vh, 520px);
        overflow: auto;
        transform: translateY(12px);
    }

    .hpb-header-builder .ns_home_menu .the_mega_menu:hover > .the_mega_block:not(:empty),
    .hpb-header-builder .ns_home_menu .the_mega_menu:focus-within > .the_mega_block:not(:empty),
    .hpb-header-builder .ns_home_menu .the_mega_menu.menu-item-has-children:hover > .the_mega_submenu,
    .hpb-header-builder .ns_home_menu .the_mega_menu.menu-item-has-children:focus-within > .the_mega_submenu,
    .hpb-header-builder .ns_home_menu .the_mega_menu.is-open > .the_mega_block:not(:empty),
    .hpb-header-builder .ns_home_menu .the_mega_menu.is-open > .the_mega_submenu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hpb-header-builder .ns_home_menu .the_mega_menu_link,
    .hpb-header-builder .ns_home_menu .the_mega_block,
    .hpb-header-builder .ns_home_menu .the_mega_submenu {
        transition: none;
    }
}

.new_shop_menu >div>ul {
    display: flex;
    border-radius: 10px;
    background: #f1f1f1;
    width: 100%;
}

.new_shop_menu >div>ul a {
    color: #000 !important;
}

.mobile_top_bar {
    border-radius: 10px;
    width: calc(100% - 10px);
    background: #fff;
    margin: 5px auto 0;
    border: 1px solid gainsboro;
    box-sizing: border-box;
    overflow: hidden;
}



.qa_footer_memu a:hover {
    color: #5ec8f0;
}

.qa_footer_memu a:before {
    background: linear-gradient(180deg, #5ec8f0 0%, #a78bfa 100%);
}

/* فوتر — هماهنگ با لوگو (سرمه‌ای)، جایگزین بنفش تکیه #663cb8 در تنظیمات */
#hpb-site-footer.hpb-footer-builder,
.hpb-footer-builder.hpb-fb--desktop {
    background: linear-gradient(180deg, #0d48a2 0%, #1a2d5c 100%) !important;
    color: #fff;
}

.hpb-footer-builder .hpb-lb-title-line-text,
.hpb-footer-builder .hpb-lb-html,
.hpb-footer-builder .footer_menu .the_mega_menu_link,
.hpb-footer-builder .fm_con a {
    color: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 8px;
}

.hpb-footer-builder .footer_menu .the_mega_menu_link:hover,
.hpb-footer-builder .fm_con a:hover {
    color: #5ec8f0;
}

.hpb-footer-builder .hpb-lb-title-line-rule {
    background: linear-gradient(90deg, #5ec8f0, #a78bfa);
}

.hpb-fb--desktop .ns_footer_row:first-child {padding: 40px 40px 0px;border-radius: 10px 10px 0 0;}

.hpb-fb--desktop .ns_footer_row:nth-child(2) {
    padding: 0 40px 40px;
    border-radius: 0 0 10px 10px;
}

/* ============================================================
 * 1.0.106: Override grid قدیمی برای ساختار Bootstrap
 * فایل hamta-page-builder-admin.css ساختار CSS Grid برای .hpb-lb-admin-cols
 * تعریف می‌کند که با Bootstrap .row تداخل دارد. override می‌کنیم.
 * ============================================================ */
.hamta-admin-wrap .hpb-fb-admin-row .hpb-lb-col[class*="col-lg-"],
.hamta-admin-wrap .hpb-fb-admin-row .hpb-lb-col[class*="col-"] {
    /* col-* در گرید ادمین عرض را به min-content می‌کشد؛ پر کردن سلول */
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
}

/* ============================================================
 * 1.0.106: Accordion + Card ساختار Bootstrap-friendly برای ردیف‌های فوتر
 *
 * هر ردیف یک Bootstrap card است: .card-header کلیک‌پذیر است،
 * .card-body در حالت collapse مخفی می‌شود.
 * Bootstrap 5 RTL handle های `bootstrap_style`/`bootstrap_rtl` تم mega
 * را در ادمین فوتر/هدر/منو enqueue می‌کنیم؛ اگر تم تغییر کند CDN fallback است.
 * ============================================================ */
/* ============================================================
 * 1.0.107: تمام‌عرض بدون محدودیت
 * صفحه footer/header builder باید عرض کامل ادمین WP را اشغال کند.
 * تم/پلاگین‌های دیگر گاهی روی .wrap یا فرم max-width می‌گذارند که نباید
 * این بخش را محدود کند.
 * ============================================================ */
body.wp-admin .wrap.hamta-admin-wrap,
body.wp-admin .hamta-admin-wrap,
.hamta-admin-wrap,
.hamta-admin-wrap > form,
#hamta-page-builder-header-builder-form,
#hd-custom-css-form {
    max-width: 100% !important;
    width: 100% !important;
    margin-inline-end: 20px;
}
.hpb-lb-branch-panel,
.hpb-fb-branch-panel,
.hd-ft-panel,
#hd-ft-panel-footer {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
}
.hpb-fb-admin-row.card,
.hpb-fb-admin-row,
.hpb-lb-admin-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: block;
}
/* WordPress گاهی روی form-table عرض محدود می‌کند */
.hamta-admin-wrap .form-table,
.hamta-admin-wrap .form-wrap {
    max-width: none !important;
}

.hpb-fb-admin-row.card {
    border: 1px solid #cbd5e1;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    overflow: hidden;
    margin-bottom: 14px !important;
}
.hpb-fb-admin-row > .hpb-fb-row-legend {
    cursor: pointer;
    user-select: none;
    background: linear-gradient(180deg, #f8fafc, #eef2f7) !important;
    border-bottom: 1px solid #cbd5e1;
    transition: background .15s ease;
}
.hpb-fb-admin-row > .hpb-fb-row-legend:hover {
    background: linear-gradient(180deg, #eef2f7, #dde4ee) !important;
}
.hpb-fb-admin-row > .hpb-fb-row-legend:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}
.hpb-fb-row-title-text {
    color: #1e293b;
    font-size: 13px;
}
.hpb-fb-row-cols-badge {
    font-weight: 500 !important;
    font-size: 11px !important;
    background: #64748b !important;
}

/* آیکن مثلثی toggle (دائماً قابل دیدن، فقط می‌چرخد) */
.hpb-fb-row-toggle-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 6px solid #475569;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    transition: transform .15s ease;
    flex-shrink: 0;
}
.hpb-fb-admin-row.hpb-fb-row-collapsed > .hpb-fb-row-legend .hpb-fb-row-toggle-icon {
    transform: rotate(-90deg);
}

/* در حالت collapsed، body مخفی می‌شود */
.hpb-fb-admin-row.hpb-fb-row-collapsed > .hpb-fb-row-body,
.hpb-fb-admin-row.hpb-fb-row-collapsed > .card-body {
    display: none !important;
}
.hpb-fb-admin-row.hpb-fb-row-collapsed {
    background: #f8fafc;
}

/* Drag handle */
.hpb-fb-row-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    color: #94a3b8;
    cursor: grab;
    font-family: monospace;
    font-size: 16px;
    line-height: 1;
    user-select: none;
    border-radius: 4px;
    transition: color .15s ease, background .15s ease;
    flex-shrink: 0;
}
.hpb-fb-row-drag-handle:hover {
    color: #1e293b;
    background: #e2e8f0;
}
.hpb-fb-row-drag-handle:active,
.ui-sortable-helper .hpb-fb-row-drag-handle {
    cursor: grabbing;
    color: #0f172a;
}

/* Placeholder برای sortable ردیف‌ها */
.hpb-fb-row-sortable-ph {
    background: #fef3c7;
    border: 2px dashed #f59e0b;
    border-radius: 10px;
    margin: 0 0 14px;
    height: 60px;
    box-sizing: border-box;
    visibility: visible !important;
}
.ui-sortable-helper.hpb-fb-admin-row {
    box-shadow: 0 12px 28px rgba(15, 23, 42, .2) !important;
    transform: rotate(.4deg);
    opacity: .96;
}

/* بهبود ظاهر design fields داخل ردیف — Bootstrap-friendly */
.hpb-fb-admin-row .hpb-lb-row-design-fields .form-label {
    color: #334155;
    margin-bottom: 4px !important;
}
.hpb-fb-admin-row .hpb-lb-row-design-fields input,
.hpb-fb-admin-row .hpb-lb-row-design-fields textarea,
.hpb-fb-admin-row .hpb-lb-row-design-fields select {
    font-size: 13px !important;
}

/* ستون‌های داخل ردیف */
.hpb-fb-admin-row .hpb-lb-col > .border {
    border-color: #e2e8f0 !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.hpb-fb-admin-row .hpb-lb-col > .border:hover {
    border-color: #94a3b8 !important;
}
.hpb-fb-admin-row .hpb-lb-col-hidden {
    display: none !important;
}
.hpb-fb-admin-row .hpb-lb-col-label {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.hpb-fb-admin-row .hpb-lb-cell-list {
    min-height: 60px;
    border: 1px dashed #e2e8f0;
    border-radius: 6px;
    padding: 6px;
    background: #fafbfc;
}
.hpb-fb-admin-row .hpb-lb-cell-list:empty::before {
    content: "آیتمی اضافه نشده — از پالت بکشید";
    display: block;
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
    padding: 12px 4px;
}
.hpb-fb-admin-row .hpb-lb-cell-list.hpb-lb-sortable-active {
    border-color: #2563eb;
    background: #eff6ff;
}

/* بلوک‌های داخل ستون — سازگاری با Bootstrap */
.hpb-fb-admin-row .hpb-lb-block {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 12px;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .03);
}

/* پنل پیش‌نمایش JSON ذخیره‌شده */
.hpb-fb-saved-preview {
    margin-top: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}
.hpb-fb-saved-preview > summary {
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 600;
    user-select: none;
    list-style: none;
}
.hpb-fb-saved-preview > summary::-webkit-details-marker { display: none; }
.hpb-fb-saved-preview > summary::before {
    content: "▼";
    display: inline-block;
    margin-left: 6px;
    color: #64748b;
    transition: transform .15s ease;
}
.hpb-fb-saved-preview:not([open]) > summary::before {
    transform: rotate(-90deg);
}

/* اجتناب از تداخل WP admin form-table */
.hpb-fb-admin-row .form-control,
.hpb-fb-admin-row .form-select {
    box-shadow: none;
}
.hpb-fb-admin-row .form-control:focus,
.hpb-fb-admin-row .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 .15rem rgba(37, 99, 235, .2);
}