/**
 * ETM Mobile Bar - Megamenu Styles (Complete)
 * استایل کامل مگامنو موبایل — نسخه نهایی 2.1.0
 *
 * @package ETM_MobileBar
 * @version 2.1.0
 */

/* ═══════════════════════════════════════════════════
   🎯 Wrapper اصلی
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu {
    position: fixed;
    inset: 0;
    z-index: 99995;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    display: none;
    box-sizing: border-box;
}

.etm-mbu-megamenu *,
.etm-mbu-megamenu *::before,
.etm-mbu-megamenu *::after {
    box-sizing: border-box;
}

.etm-mbu-megamenu[hidden] {
    display: none !important;
}

.etm-mbu-megamenu.is-open {
    display: block;
}

/* ─── Overlay ─── */
.etm-mbu-megamenu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: background 0.35s ease, backdrop-filter 0.35s ease;
    cursor: pointer;
}

.etm-mbu-megamenu.is-open .etm-mbu-megamenu-overlay {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ═══════════════════════════════════════════════════
   📦 Panel Inner
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-inner {
    position: absolute;
    background: var(--etm-bg, #ffffff);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════
   🎨 Type: Drawer (کشویی از کنار)
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-drawer .etm-mbu-megamenu-inner {
    top: 0;
    bottom: 0;
    width: 90%;
    max-width: 420px;
    transform: translateX(100%);
    opacity: 0;
}

.etm-mbu-megamenu-drawer.etm-mbu-animation-slide-right .etm-mbu-megamenu-inner {
    right: 0;
    left: auto;
    transform: translateX(100%);
    border-radius: 24px 0 0 24px;
}

.etm-mbu-megamenu-drawer.etm-mbu-animation-slide-left .etm-mbu-megamenu-inner {
    left: 0;
    right: auto;
    transform: translateX(-100%);
    border-radius: 0 24px 24px 0;
}

.etm-mbu-megamenu-drawer.etm-mbu-animation-fade .etm-mbu-megamenu-inner {
    right: 0;
    left: auto;
    transform: none;
    border-radius: 24px 0 0 24px;
}

.etm-mbu-megamenu-drawer.etm-mbu-animation-scale .etm-mbu-megamenu-inner {
    top: 50%;
    right: 50%;
    left: auto;
    bottom: auto;
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    border-radius: 24px;
    transform: translate(50%, -50%) scale(0.8);
    opacity: 0;
}

.etm-mbu-megamenu-drawer.is-open .etm-mbu-megamenu-inner {
    transform: translateX(0);
    opacity: 1;
}

.etm-mbu-megamenu-drawer.etm-mbu-animation-scale.is-open .etm-mbu-megamenu-inner {
    transform: translate(50%, -50%) scale(1);
}

/* ═══════════════════════════════════════════════════
   🎨 Type: Modal (وسط صفحه)
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-modal .etm-mbu-megamenu-inner {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 24px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
}

.etm-mbu-megamenu-modal.is-open .etm-mbu-megamenu-inner {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ═══════════════════════════════════════════════════
   🎨 Type: Fullscreen (تمام صفحه)
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-fullscreen .etm-mbu-megamenu-inner {
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    transform: translateY(100%);
    opacity: 0;
}

.etm-mbu-megamenu-fullscreen.etm-mbu-animation-slide-right .etm-mbu-megamenu-inner {
    transform: translateX(100%);
}

.etm-mbu-megamenu-fullscreen.is-open .etm-mbu-megamenu-inner {
    transform: translateY(0);
    opacity: 1;
}

.etm-mbu-megamenu-fullscreen.etm-mbu-animation-slide-right.is-open .etm-mbu-megamenu-inner {
    transform: translateX(0);
}

/* ═══════════════════════════════════════════════════
   📱 Header
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--etm-primary, #7c3aed), var(--etm-secondary, #2563eb));
    color: #fff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.etm-mbu-megamenu-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.etm-mbu-megamenu-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.etm-mbu-megamenu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    flex-shrink: 0;
    font-size: 20px;
}

.etm-mbu-megamenu-title {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.etm-mbu-megamenu-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.etm-mbu-megamenu-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    padding: 0;
    font-size: 16px;
}

.etm-mbu-megamenu-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.etm-mbu-megamenu-action-btn:active {
    transform: scale(0.95);
}

.etm-mbu-megamenu-action-btn svg {
    width: 20px;
    height: 20px;
}

.etm-mbu-megamenu-close {
    font-size: 22px;
    line-height: 1;
}

.etm-mbu-megamenu-close:hover {
    transform: rotate(90deg);
}

/* ═══════════════════════════════════════════════════
   📜 Content (Body)
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: var(--etm-bg, #ffffff);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.etm-mbu-megamenu-content::-webkit-scrollbar {
    width: 6px;
}

.etm-mbu-megamenu-content::-webkit-scrollbar-track {
    background: transparent;
}

.etm-mbu-megamenu-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.etm-mbu-megamenu-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ═══════════════════════════════════════════════════
   🧩 Blocks (عمومی)
   ═══════════════════════════════════════════════════ */

.etm-mbu-block {
    margin-bottom: 20px;
}

.etm-mbu-block:last-child {
    margin-bottom: 0;
}

.etm-mbu-block-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 900;
    color: var(--etm-text, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.etm-mbu-block-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 14px;
    background: var(--etm-primary, #7c3aed);
    border-radius: 2px;
}

.etm-mbu-empty-text {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   📂 Block: Categories
   ═══════════════════════════════════════════════════ */

.etm-mbu-categories {
    display: grid;
    gap: 8px;
}

.etm-mbu-categories.etm-mbu-layout-grid {
    grid-template-columns: repeat(3, 1fr);
}

.etm-mbu-categories.etm-mbu-layout-list {
    grid-template-columns: 1fr;
}

.etm-mbu-categories.etm-mbu-layout-masonry {
    grid-template-columns: repeat(2, 1fr);
}

.etm-mbu-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--etm-text, #1e293b);
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.etm-mbu-cat-item:hover {
    border-color: var(--etm-primary, #7c3aed);
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}

.etm-mbu-cat-item:active {
    transform: translateY(0);
}

.etm-mbu-layout-list .etm-mbu-cat-item {
    flex-direction: row;
    text-align: right;
    padding: 12px 14px;
}

.etm-mbu-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 12px;
    font-size: 22px;
    flex-shrink: 0;
    border: 1.5px solid #e2e8f0;
}

.etm-mbu-cat-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.etm-mbu-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.etm-mbu-layout-list .etm-mbu-cat-icon,
.etm-mbu-layout-list .etm-mbu-cat-image {
    width: 40px;
    height: 40px;
}

.etm-mbu-cat-emoji {
    font-size: 22px;
    line-height: 1;
}

.etm-mbu-cat-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.etm-mbu-cat-name {
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.4;
    display: block;
    word-break: break-word;
}

.etm-mbu-cat-count {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   🛒 Block: Products
   ═══════════════════════════════════════════════════ */

.etm-mbu-products {
    display: grid;
    gap: 10px;
}

.etm-mbu-products.etm-mbu-layout-grid {
    grid-template-columns: repeat(2, 1fr);
}

.etm-mbu-products.etm-mbu-layout-list {
    grid-template-columns: 1fr;
}

.etm-mbu-product-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
}

.etm-mbu-product-item:hover {
    border-color: var(--etm-primary, #7c3aed);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.etm-mbu-product-image {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.etm-mbu-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.etm-mbu-product-noimage {
    font-size: 40px;
    opacity: 0.3;
}

.etm-mbu-product-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 8px;
    background: #ef4444;
    color: #fff;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
}

.etm-mbu-product-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.etm-mbu-product-name {
    margin: 0;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--etm-text, #1e293b);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.etm-mbu-product-price {
    font-size: 13px;
    font-weight: 900;
    color: var(--etm-primary, #7c3aed);
}

.etm-mbu-product-price del {
    color: #94a3b8;
    font-weight: 600;
    font-size: 11px;
    margin-left: 4px;
}

.etm-mbu-product-price ins {
    text-decoration: none;
    color: #10b981;
}

/* ─── List Layout ─── */
.etm-mbu-layout-list .etm-mbu-product-item {
    flex-direction: row;
    align-items: center;
}

.etm-mbu-layout-list .etm-mbu-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.etm-mbu-layout-list .etm-mbu-product-info {
    flex: 1;
    min-width: 0;
}

/* ═══════════════════════════════════════════════════
   📱 Block: ET Phones
   ═══════════════════════════════════════════════════ */

.etm-mbu-et-phones {
    display: grid;
    gap: 10px;
}

.etm-mbu-et-phones.etm-mbu-layout-grid {
    grid-template-columns: repeat(2, 1fr);
}

.etm-mbu-et-phones.etm-mbu-layout-list {
    grid-template-columns: 1fr;
}

.etm-mbu-et-phone-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
}

.etm-mbu-et-phone-item:hover {
    border-color: var(--etm-primary, #7c3aed);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.08);
}

.etm-mbu-et-phone-image {
    position: relative;
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.etm-mbu-et-phone-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.etm-mbu-et-phone-noimage {
    font-size: 40px;
    opacity: 0.3;
}

.etm-mbu-et-phone-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
}

.etm-mbu-et-phone-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.etm-mbu-et-phone-name {
    margin: 0;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--etm-text, #1e293b);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.etm-mbu-et-phone-meta {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.etm-mbu-et-phone-price {
    font-size: 13px;
    font-weight: 900;
    color: #2563eb;
}

/* ═══════════════════════════════════════════════════
   🏢 Block: Brands
   ═══════════════════════════════════════════════════ */

.etm-mbu-brands {
    display: grid;
    gap: 8px;
}

.etm-mbu-brands.etm-mbu-layout-grid {
    grid-template-columns: repeat(4, 1fr);
}

.etm-mbu-brands.etm-mbu-layout-list {
    grid-template-columns: repeat(2, 1fr);
}

.etm-mbu-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: var(--etm-text, #1e293b);
    text-align: center;
    transition: all 0.2s;
    min-height: 60px;
}

.etm-mbu-brand-item:hover {
    border-color: var(--etm-primary, #7c3aed);
    background: #faf5ff;
    transform: translateY(-2px);
}

.etm-mbu-brand-item img {
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
}

.etm-mbu-brand-name {
    font-size: 12.5px;
    font-weight: 800;
}

/* ═══════════════════════════════════════════════════
   🔗 Block: Links
   ═══════════════════════════════════════════════════ */

.etm-mbu-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.etm-mbu-links.etm-mbu-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.etm-mbu-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: var(--etm-text, #1e293b);
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.etm-mbu-link-item:hover {
    background: #faf5ff;
    border-color: var(--etm-primary, #7c3aed);
    transform: translateX(-3px);
}

.etm-mbu-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 16px;
}

.etm-mbu-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.etm-mbu-link-text {
    flex: 1;
    font-size: 13px;
    font-weight: 800;
}

.etm-mbu-link-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   🖼️ Block: Banner
   ═══════════════════════════════════════════════════ */

.etm-mbu-banner {
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

.etm-mbu-banner a {
    display: block;
    line-height: 0;
}

.etm-mbu-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.etm-mbu-banner:hover img {
    transform: scale(1.03);
}

/* ═══════════════════════════════════════════════════
   📋 Block: Menu
   ═══════════════════════════════════════════════════ */

.etm-mbu-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.etm-mbu-menu-block.etm-mbu-menu-grid .etm-mbu-menu-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.etm-mbu-menu-list li {
    position: relative;
}

.etm-mbu-menu-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: var(--etm-text, #1e293b);
    font-size: 13px;
    font-weight: 800;
    transition: all 0.2s;
}

.etm-mbu-menu-list li a:hover {
    background: #faf5ff;
    color: var(--etm-primary, #7c3aed);
    transform: translateX(-3px);
}

.etm-mbu-menu-list .sub-menu {
    list-style: none;
    margin: 4px 0 0 20px;
    padding: 0;
}

/* ═══════════════════════════════════════════════════
   📱 Block: Social
   ═══════════════════════════════════════════════════ */

.etm-mbu-socials {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.etm-mbu-socials.etm-mbu-socials-round {
    justify-content: center;
}

.etm-mbu-social-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: var(--etm-social-color, #64748b);
    font-size: 12.5px;
    font-weight: 800;
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.etm-mbu-social-item:hover {
    background: var(--etm-social-color, #7c3aed);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.etm-mbu-socials-round .etm-mbu-social-item {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

.etm-mbu-socials-round .etm-mbu-social-label {
    display: none;
}

.etm-mbu-social-icon {
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.etm-mbu-social-icon svg {
    width: 20px;
    height: 20px;
}

/* ═══════════════════════════════════════════════════
   📞 Block: Contact
   ═══════════════════════════════════════════════════ */

.etm-mbu-contact-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.etm-mbu-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: var(--etm-text, #1e293b);
    transition: all 0.2s;
}

.etm-mbu-contact-item:hover {
    background: #faf5ff;
    transform: translateX(-3px);
}

.etm-mbu-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 10px;
    flex-shrink: 0;
    font-size: 16px;
}

.etm-mbu-contact-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.etm-mbu-contact-label {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 700;
}

.etm-mbu-contact-value {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--etm-text, #1e293b);
    direction: ltr;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════
   📝 Block: Posts
   ═══════════════════════════════════════════════════ */

.etm-mbu-posts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.etm-mbu-post-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.etm-mbu-post-item:hover {
    background: #faf5ff;
    transform: translateX(-3px);
}

.etm-mbu-post-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.etm-mbu-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.etm-mbu-post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.etm-mbu-post-title {
    margin: 0;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--etm-text, #1e293b);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.etm-mbu-post-date {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   💻 Block: Custom HTML
   ═══════════════════════════════════════════════════ */

.etm-mbu-custom-html {
    font-size: 13px;
    line-height: 1.7;
    color: var(--etm-text, #1e293b);
}

.etm-mbu-custom-html img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.etm-mbu-custom-html a {
    color: var(--etm-primary, #7c3aed);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   🔻 Footer
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-footer {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1.5px solid #f1f5f9;
    flex-shrink: 0;
    text-align: center;
}

.etm-mbu-megamenu-footer-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 10px;
}

.etm-mbu-megamenu-footer-text:last-child {
    margin-bottom: 0;
}

.etm-mbu-megamenu-footer .etm-mbu-socials {
    justify-content: center;
}

/* ═══════════════════════════════════════════════════
   🎬 Animations
   ═══════════════════════════════════════════════════ */

.etm-mbu-block {
    animation: etm-megamenu-block-in 0.4s ease backwards;
}

.etm-mbu-block:nth-child(1) { animation-delay: 0.05s; }
.etm-mbu-block:nth-child(2) { animation-delay: 0.1s; }
.etm-mbu-block:nth-child(3) { animation-delay: 0.15s; }
.etm-mbu-block:nth-child(4) { animation-delay: 0.2s; }
.etm-mbu-block:nth-child(5) { animation-delay: 0.25s; }
.etm-mbu-block:nth-child(6) { animation-delay: 0.3s; }

@keyframes etm-megamenu-block-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════
   📱 Responsive
   ═══════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .etm-mbu-categories.etm-mbu-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .etm-mbu-brands.etm-mbu-layout-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .etm-mbu-products.etm-mbu-layout-grid,
    .etm-mbu-et-phones.etm-mbu-layout-grid {
        grid-template-columns: 1fr;
    }

    .etm-mbu-megamenu-content {
        padding: 12px;
    }

    .etm-mbu-block-title {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .etm-mbu-categories.etm-mbu-layout-grid {
        grid-template-columns: 1fr;
    }

    .etm-mbu-brands.etm-mbu-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════
   🌙 Dark Mode
   ═══════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    .etm-mbu-megamenu-inner {
        background: #1a1625;
        color: #f1f5f9;
    }

    .etm-mbu-megamenu-content {
        background: #1a1625;
    }

    .etm-mbu-cat-item,
    .etm-mbu-product-item,
    .etm-mbu-et-phone-item,
    .etm-mbu-brand-item,
    .etm-mbu-link-item,
    .etm-mbu-contact-item,
    .etm-mbu-post-item,
    .etm-mbu-menu-list li a {
        background: #231d2f;
        border-color: #2d2640;
        color: #f1f5f9;
    }

    .etm-mbu-cat-item:hover,
    .etm-mbu-product-item:hover,
    .etm-mbu-et-phone-item:hover,
    .etm-mbu-brand-item:hover,
    .etm-mbu-link-item:hover,
    .etm-mbu-contact-item:hover,
    .etm-mbu-post-item:hover {
        background: #2d2640;
    }

    .etm-mbu-cat-icon,
    .etm-mbu-link-icon,
    .etm-mbu-contact-icon {
        background: #1a1625;
        border-color: #2d2640;
        color: #f1f5f9;
    }

    .etm-mbu-megamenu-footer {
        background: #231d2f;
        border-color: #2d2640;
    }

    .etm-mbu-block-title {
        color: #f1f5f9;
        border-color: #2d2640;
    }
}

/* ═══════════════════════════════════════════════════
   🖨️ Print
   ═══════════════════════════════════════════════════ */

@media print {
    .etm-mbu-megamenu {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════
   ♿ Accessibility
   ═══════════════════════════════════════════════════ */

.etm-mbu-megamenu-action-btn:focus-visible,
.etm-mbu-cat-item:focus-visible,
.etm-mbu-product-item:focus-visible,
.etm-mbu-link-item:focus-visible {
    outline: 2px solid var(--etm-primary, #7c3aed);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .etm-mbu-megamenu-inner,
    .etm-mbu-megamenu-overlay,
    .etm-mbu-block,
    .etm-mbu-cat-item,
    .etm-mbu-product-item {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════
   📌 Body Lock (وقتی مگامنو بازه)
   ═══════════════════════════════════════════════════ */

body.etm-mbu-megamenu-open {
    overflow: hidden;
    touch-action: none;
}