/* ----------------------
/ File: mobile.css
/ Theme: Artender
/ Developer: sepehrdarvishii
/ Section: Mobile Header + Drawer Menu
/ -------------------- */


/* ----------------------
/ Mobile Header Wrapper
/ هدر موبایل شناور
/ -------------------- */
.artender-mobile-header-wrap {
    width: 100%;
    direction: rtl;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 99990;
    background: transparent;
    padding: 4px 8px 5px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: padding 0.2s ease, transform 0.2s ease;
}

.artender-mobile-header-shell {
    width: 100%;
    max-width: 100%;
}

.artender-mobile-header-offset {
    width: 100%;
    height: var(--artender-mobile-header-height, 124px);
    pointer-events: none;
    user-select: none;
}

@media (max-width: 991px) {
    .artender-mobile-header-offset {
        height: var(--artender-mobile-header-height, 124px);
    }

    .admin-bar .artender-mobile-header-wrap {
        top: 46px;
    }
}



/* ----------------------
/ Scrolled Mobile Header
/ هدر هنگام اسکرول: بدون بکگراند کلی، فقط کارت‌های نرم‌تر و واضح‌تر
/ -------------------- */
.artender-mobile-header-wrap.is-scrolled .artender-mobile-top-card {
    width: 100%;
    min-height: 56px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.055);
    border-radius: 16px;
    padding: 6px 9px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.055);
    margin-bottom: 6px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    direction: rtl;
}

.artender-mobile-header-wrap.is-scrolled .artender-mobile-search-box .dgwt-wcas-sf-wrapp,
.artender-mobile-header-wrap.is-scrolled .artender-mobile-search-fallback {
    min-height: 40px;
    height: 40px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.085);
    display: flex;
    align-items: center;
    overflow: hidden;
    direction: rtl;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.045);
}

.artender-mobile-header-wrap.is-scrolled .artender-mobile-buy-button {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    border-radius: 11px;
    background: var(--artender-primary-color, #f50000);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px 10px;
    font-size: 9.2px;
    font-weight: 800;
    line-height: 1.3;
    box-shadow: 0 4px 10px rgba(var(--artender-primary-rgb, 245, 0, 0), 0.12);
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* ----------------------
/ Address Bar
/ -------------------- */
.artender-mobile-address-bar {
    width: 100%;
    background: var(--artender-primary-color, #f50000);
    color: #ffffff;
    border-radius: 15px;
    padding: 8px 12px;
    margin-bottom: 7px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(var(--artender-primary-rgb, 245, 0, 0), 0.18);
}

.artender-mobile-address-bar span {
    font-size: 12px;
    font-weight: 900;
    line-height: 1.8;
}


/* ----------------------
/ Top Card
/ -------------------- */
.artender-mobile-top-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    padding: 3px 6px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 4px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.045);
    margin-bottom: 4px;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    direction: rtl;
}

.artender-mobile-header-spacer {
    width: 48px;
    height: 40px;
    display: block;
}


/* ----------------------
/ Menu Toggle
/ -------------------- */
.artender-mobile-menu-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(15, 23, 42, 0.055);
    outline: none;
    border-radius: 12px;
    background: #f5f5f4;
    color: #262626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    position: relative;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.035);
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-menu-toggle span {
    width: 19px;
    height: 1.6px;
    border-radius: 99px;
    background: currentColor;
    display: block;
    position: absolute;
    right: 10px;
    transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.artender-mobile-menu-toggle span:nth-child(1) {
    top: 12px;
}

.artender-mobile-menu-toggle span:nth-child(2) {
    top: 19px;
}

.artender-mobile-menu-toggle span:nth-child(3) {
    top: 26px;
}

.artender-mobile-menu-toggle.is-active span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}

.artender-mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.artender-mobile-menu-toggle.is-active span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}


/* ----------------------
/ Center Logo
/ -------------------- */
.artender-mobile-logo {
    min-width: 0;
    text-align: center;
    justify-self: center;
    align-self: center;
}

.artender-mobile-logo a {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artender-mobile-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 104px !important;
    max-height: 34px !important;
    object-fit: contain;
    margin: 0 auto;
}

.artender-mobile-logo strong {
    font-size: 17px;
    font-weight: 900;
    color: #111827;
    line-height: 1.6;
}


/* ----------------------
/ Cart Button
/ -------------------- */
.artender-mobile-cart-button {
    min-width: 74px;
    width: 74px;
    min-height: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--artender-primary-color, #f50000);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    position: relative;
    padding: 4px 8px;
    font-size: 9.4px;
    font-weight: 850;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
    box-shadow: 0 5px 13px rgba(var(--artender-primary-rgb, 245, 0, 0), 0.16);
    -webkit-tap-highlight-color: transparent;
    text-decoration: none !important;
}

.artender-mobile-cart-button:hover,
.artender-mobile-cart-button:focus,
.artender-mobile-cart-button:active {
    background: var(--artender-primary-hover-color, #d90000);
    color: #ffffff;
    text-decoration: none !important;
    outline: none !important;
}

.artender-mobile-cart-button-text {
    display: block;
    font-size: 9.4px;
    font-weight: 850;
    line-height: 1.35;
    text-align: center;
}

.artender-mobile-cart-count {
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--artender-primary-color, #f50000);
    font-size: 9px;
    font-weight: 900;
    line-height: 16px;
    text-align: center;
    position: absolute;
    top: -3px;
    left: -3px;
    padding: 0 4px;
}


/* ----------------------
/ Bottom Card
/ -------------------- */
.artender-mobile-bottom-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
    direction: rtl;
}

.artender-mobile-bottom-card.has-search:not(.has-buy-button),
.artender-mobile-bottom-card.has-buy-button:not(.has-search) {
    grid-template-columns: minmax(0, 1fr);
}

.artender-mobile-bottom-card.has-buy-button:not(.has-search) .artender-mobile-buy-button {
    width: 100%;
}

.artender-mobile-bottom-card .artender-mobile-search-box {
    grid-column: 1 / -1;
    grid-row: 1;
}

.artender-mobile-bottom-card .artender-mobile-buy-button {
    grid-column: 1 / -1;
    grid-row: 2;
}


/* ----------------------
/ Search Box
/ فقط کادر سرچ؛ نتیجه‌ها داخل fibosearch.css کنترل می‌شوند
/ -------------------- */
.artender-mobile-search-box {
    min-width: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
    z-index: 100020;
    overflow: visible;
}

.artender-mobile-search-box .artender-fibosearch,
.artender-mobile-search-box .artender-mobile-fibosearch,
.artender-mobile-search-box .dgwt-wcas-search-wrapp,
.artender-mobile-search-box .dgwt-wcas-search-form {
    width: 100% !important;
    max-width: 100% !important;
}

.artender-mobile-search-box .dgwt-wcas-sf-wrapp {
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.085) !important;
    overflow: hidden !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.045) !important;
    display: flex !important;
    align-items: center !important;
    direction: rtl !important;
}

.artender-mobile-search-box .dgwt-wcas-search-submit {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 40px !important;
    background: transparent !important;
    color: #4b5563 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.artender-mobile-search-box .dgwt-wcas-ico-magnifier,
.artender-mobile-search-box .dgwt-wcas-search-submit svg {
    width: 15px !important;
    height: 15px !important;
    opacity: 0.88 !important;
}

.artender-mobile-search-box input.dgwt-wcas-search-input {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    line-height: 40px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #262626 !important;
    font-size: 10.6px !important;
    font-weight: 500 !important;
    text-align: right !important;
    padding: 0 12px 0 4px !important;
    -webkit-tap-highlight-color: transparent !important;
}

.artender-mobile-search-box input.dgwt-wcas-search-input::placeholder {
    color: #52525b !important;
    opacity: 1 !important;
    font-size: 10.6px !important;
    font-weight: 500 !important;
}

.artender-mobile-search-box .dgwt-wcas-preloader,
.artender-mobile-search-box .dgwt-wcas-voice-search {
    display: none !important;
}


/* ----------------------
/ Search Fallback
/ -------------------- */
.artender-mobile-search-fallback {
    min-height: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e7e9ed;
    display: flex;
    align-items: center;
    overflow: hidden;
    direction: rtl;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
}

.artender-mobile-search-fallback button {
    width: 38px;
    min-width: 38px;
    height: 40px;
    border: 0;
    outline: none;
    background: transparent;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.artender-mobile-search-fallback svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.artender-mobile-search-fallback input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 0;
    outline: none;
    background: transparent;
    color: #262626;
    font-size: 10.6px;
    font-weight: 500;
    text-align: right;
    padding: 0 12px 0 4px;
}

.artender-mobile-search-fallback input::placeholder {
    color: #52525b;
    opacity: 1;
    font-size: 10.6px;
    font-weight: 500;
}


/* ----------------------
/ Buy Button
/ -------------------- */
.artender-mobile-buy-button {
    min-width: 82px;
    min-height: 38px;
    border-radius: 10px;
    background: var(--artender-primary-color, #f50000);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px 6px;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.35;
    box-shadow: 0 4px 10px rgba(var(--artender-primary-rgb, 245, 0, 0), 0.14);
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-buy-button:hover,
.artender-mobile-buy-button:focus,
.artender-mobile-buy-button:active {
    background: var(--artender-primary-hover-color, #d90000);
    color: #ffffff;
    text-decoration: none !important;
    outline: none !important;
}


/* ----------------------
/ Drawer Overlay
/ -------------------- */
.artender-mobile-drawer-overlay {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2147483000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.artender-mobile-drawer-overlay[hidden] {
    display: none !important;
}

.artender-mobile-drawer-overlay.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


/* ----------------------
/ Drawer
/ -------------------- */
.artender-mobile-drawer {
    display: flex !important;
    width: min(82vw, 330px);
    height: auto;
    background: transparent;
    position: fixed;
    top: 12px;
    right: 8px;
    bottom: 12px;
    z-index: 2147483100;
    transform: translateX(calc(105% + 18px));
    transition: transform 0.24s cubic-bezier(0.2, 0.75, 0.25, 1);
    direction: rtl;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
}

.artender-mobile-drawer.is-active {
    transform: translateX(0) !important;
}

.artender-mobile-drawer-inner {
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 20px;
    box-shadow: -10px 10px 38px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* ----------------------
/ Drawer Head
/ -------------------- */
.artender-mobile-drawer-head {
    min-height: 68px;
    margin: 10px 10px 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: #111827;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(var(--artender-primary-rgb, 245, 0, 0), 0.09);
    border-radius: 15px;
    box-shadow:
        0 7px 20px rgba(15, 23, 42, 0.10),
        0 1px 3px rgba(15, 23, 42, 0.05);
    direction: ltr;
}

.artender-mobile-drawer-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(var(--artender-primary-rgb, 245, 0, 0), 0.10);
    outline: none;
    border-radius: 11px;
    background: rgba(var(--artender-primary-rgb, 245, 0, 0), 0.055);
    color: #111827;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    grid-column: 1;
    justify-self: start;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-drawer-close:hover,
.artender-mobile-drawer-close:focus-visible {
    background: rgba(var(--artender-primary-rgb, 245, 0, 0), 0.09);
    color: var(--artender-primary-color, #f50000);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.10);
}

.artender-mobile-drawer-close:active {
    transform: scale(0.96);
}

.artender-mobile-drawer-logo {
    grid-column: 2;
    min-width: 0;
    min-height: 46px;
    text-align: center;
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artender-mobile-drawer-logo img {
    max-width: 130px;
    max-height: 43px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.artender-mobile-drawer-logo strong {
    font-size: 15px;
    font-weight: 900;
    color: #111827;
}


/* ----------------------
/ Drawer Title
/ -------------------- */
.artender-mobile-drawer-title {
    height: 42px;
    margin: 10px 10px 8px;
    border-radius: 12px;
    background: #f6f6f6;
    border: 1px solid #ececec;
    color: #1f2937;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.artender-mobile-drawer-title strong {
    grid-column: 2;
    font-size: 13px;
    font-weight: 950;
}


/* ----------------------
/ Drawer Menu
/ -------------------- */
.artender-mobile-drawer-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 10px 10px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.artender-mobile-smart-menu,
.artender-mobile-smart-menu ul,
.artender-mobile-smart-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.artender-mobile-menu-item {
    margin: 0 0 7px;
    padding: 0;
    position: relative;
}

.artender-mobile-menu-row {
    min-height: 46px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: stretch;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.035);
    overflow: hidden;
}

.artender-mobile-menu-link {
    min-height: 46px;
    padding: 10px 14px;
    color: #1f2937;
    font-size: 13.5px;
    font-weight: 950;
    line-height: 1.7;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: right;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-menu-link:hover {
    color: var(--artender-primary-color, #f50000);
}

.artender-mobile-menu-item:not(.has-mobile-submenu) .artender-mobile-menu-row {
    grid-template-columns: minmax(0, 1fr);
}

.artender-mobile-submenu-toggle {
    width: 42px;
    min-height: 46px;
    border: 0;
    outline: none;
    background: #fafafa;
    color: #555555;
    border-right: 1px solid #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-submenu-toggle::before {
    content: "";
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}

.artender-mobile-menu-item.is-open > .artender-mobile-menu-row .artender-mobile-submenu-toggle::before {
    transform: rotate(135deg);
}

.artender-mobile-smart-menu .sub-menu {
    display: none;
    padding: 7px 8px 0 0;
}

.artender-mobile-menu-item.is-open > .sub-menu {
    display: block;
}

.artender-mobile-menu-level-1 .artender-mobile-menu-row {
    background: #fafafa;
    border-radius: 11px;
}

.artender-mobile-menu-level-1 .artender-mobile-menu-link {
    min-height: 42px;
    font-size: 12.5px;
    font-weight: 850;
    padding-right: 14px;
}

.artender-mobile-menu-level-1 .artender-mobile-submenu-toggle {
    min-height: 42px;
}

.artender-mobile-menu-level-2 .artender-mobile-menu-row {
    background: #fdfdfd;
}

.artender-mobile-menu-level-2 .artender-mobile-menu-link {
    font-size: 12px;
    font-weight: 750;
}


/* ----------------------
/ Drawer Actions
/ -------------------- */
.artender-mobile-drawer-actions {
    flex: 0 0 auto;
    padding: 9px 10px 12px;
    display: grid;
    gap: 7px;
    background: linear-gradient(to top, #ffffff 86%, rgba(255, 255, 255, 0));
    border-top: 1px solid #f0f0f0;
}

.artender-mobile-drawer-action {
    min-height: 45px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--artender-primary-color, #f50000);
    font-size: 12.5px;
    font-weight: 950;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 10px;
    box-shadow: 0 10px 22px rgba(var(--artender-primary-rgb, 245, 0, 0), 0.18);
    -webkit-tap-highlight-color: transparent;
    text-decoration: none !important;
}

.artender-mobile-drawer-action:hover {
    color: #ffffff;
    background: var(--artender-primary-hover-color, #d90000);
}


/* ----------------------
/ Drawer Body Lock
/ -------------------- */
body.artender-mobile-drawer-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.artender-mobile-drawer-open .artender-mobile-bottom-menu,
body.artender-mobile-drawer-open .artender-mobile-product-bar,
body.artender-mobile-drawer-open .artender-product-mobile-dock,
body.artender-mobile-drawer-open .artender-mobile-product-search-results,
body.artender-mobile-drawer-open .dgwt-wcas-search-wrapp.dgwt-wcas-search-wrapp-mobile {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.artender-mobile-drawer-open .artender-mobile-header-wrap {
    pointer-events: none;
}


/* ----------------------
/ Admin Bar
/ -------------------- */
body.artender-mobile-drawer-open #wpadminbar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.admin-bar .artender-mobile-drawer-overlay {
    top: 0;
}

.admin-bar .artender-mobile-drawer {
    top: 12px;
    bottom: 12px;
    height: auto;
}


/* ----------------------
/ Very Small Mobile
/ -------------------- */
@media (max-width: 380px) {
    .artender-mobile-top-card {
        grid-template-columns: 44px minmax(0, 1fr) 70px;
        min-height: 52px;
        padding: 5px 7px;
        gap: 5px;
        border-radius: 15px;
    }

    .artender-mobile-header-spacer {
        width: 44px;
        height: 38px;
    }

    .artender-mobile-menu-toggle {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .artender-mobile-menu-toggle span {
        right: 9px;
        width: 18px;
    }

    .artender-mobile-cart-button {
        min-width: 68px;
        width: 68px;
        min-height: 38px;
        height: 38px;
        font-size: 8.9px;
        padding: 3px 6px;
    }

    .artender-mobile-cart-button-text {
        font-size: 8.9px;
    }

    .artender-mobile-bottom-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .artender-mobile-buy-button {
        width: 100%;
        min-width: 0;
        font-size: 8.8px;
        padding: 5px 8px;
    }

    .artender-mobile-logo img {
        max-width: 92px !important;
        max-height: 32px !important;
    }

    .artender-mobile-drawer {
        width: 86vw;
        top: 9px;
        right: 6px;
        bottom: 9px;
    }

    .artender-mobile-drawer-head {
        margin: 8px 8px 7px;
        min-height: 64px;
        padding: 7px 8px;
        border-radius: 14px;
    }

    .artender-mobile-drawer-logo img {
        max-width: 122px;
        max-height: 40px;
    }

    .artender-mobile-menu-link {
        font-size: 12.5px;
    }

    .artender-mobile-drawer-action {
        font-size: 12px;
    }
}

/* ----------------------
/ Mobile Safe Ajax Product Search
/ سرچ موبایل مستقل از FiboSearch برای جلوگیری از صفحه سفید
/ -------------------- */
.artender-mobile-product-search-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    direction: rtl;
}

.artender-mobile-product-search {
    width: 100%;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    border-radius: 14px;
    background: #f4f4f4;
    border: 1px solid #dfdfdf;
    display: flex;
    align-items: center;
    direction: rtl;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
}

.artender-mobile-product-search:focus-within {
    background: #ffffff;
    border-color: rgba(var(--artender-primary-rgb, 245, 0, 0), 0.22);
    box-shadow: 0 0 0 4px rgba(var(--artender-primary-rgb, 245, 0, 0), 0.055);
}

.artender-mobile-product-search-submit {
    width: 46px;
    min-width: 46px;
    height: 46px;
    border: 0;
    outline: none;
    background: transparent;
    color: #3f3f3f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-product-search-submit svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.artender-mobile-product-search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    line-height: 46px;
    border: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    color: #2b2b2b;
    font-size: 13px;
    font-weight: 850;
    text-align: center;
    direction: rtl;
    padding: 0 8px;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-product-search-input::placeholder {
    color: #363636;
    opacity: 1;
    font-weight: 850;
}

.artender-mobile-product-search-results {
    position: fixed;
    left: 8px;
    right: 8px;
    z-index: 1000000;
    max-height: 58vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    padding: 6px;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.artender-mobile-product-search-results[hidden] {
    display: none !important;
}

.artender-mobile-product-search-list {
    display: grid;
    gap: 0;
}

.artender-mobile-product-search-item {
    width: 100%;
    min-width: 0;
    min-height: 70px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 54px;
    grid-template-areas: "price title image";
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin: 0;
    border-bottom: 1px solid #f1f1f1;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    direction: ltr;
    text-decoration: none !important;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-product-search-item:last-child {
    border-bottom: 0;
}

.artender-mobile-product-search-item:hover,
.artender-mobile-product-search-item:focus {
    background: #fafafa;
    text-decoration: none !important;
    outline: none;
}

.artender-mobile-product-search-price {
    grid-area: price;
    width: 82px;
    min-width: 82px;
    max-width: 82px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--artender-primary-color, #f50000);
    color: #ffffff;
    font-size: 9.2px;
    font-weight: 950;
    line-height: 1.2;
    text-align: center;
    direction: rtl;
    unicode-bidi: isolate;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 6px;
}

.artender-mobile-product-search-title {
    grid-area: title;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    color: #111827;
    font-size: 11.8px;
    font-weight: 850;
    line-height: 1.65;
    text-align: right;
    direction: rtl;
    white-space: normal;
    overflow: hidden;
    text-overflow: unset;
    max-height: 40px;
}

.artender-mobile-product-search-image {
    grid-area: image;
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--artender-primary-rgb, 245, 0, 0), 0.22);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.artender-mobile-product-search-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.artender-mobile-product-search-message {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #374151;
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.artender-mobile-product-search-more {
    width: calc(100% - 12px);
    max-width: 320px;
    height: 42px;
    margin: 10px auto 4px;
    border-radius: 10px;
    background: var(--artender-primary-color, #f50000);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    line-height: 42px;
    text-align: center;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.artender-mobile-product-search-more:hover,
.artender-mobile-product-search-more:focus {
    background: var(--artender-primary-hover-color, #d90000);
    color: #ffffff;
    text-decoration: none !important;
    outline: none;
}

@media (max-width: 390px) {
    .artender-mobile-product-search-item {
        grid-template-columns: 76px minmax(0, 1fr) 48px;
        gap: 7px;
        min-height: 66px;
        padding: 7px;
    }

    .artender-mobile-product-search-price {
        width: 76px;
        min-width: 76px;
        max-width: 76px;
        height: 28px;
        min-height: 28px;
        max-height: 28px;
        font-size: 8.4px;
        padding: 0 5px;
    }

    .artender-mobile-product-search-title {
        font-size: 11px;
        line-height: 1.55;
        max-height: 36px;
    }

    .artender-mobile-product-search-image {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        height: 48px;
        min-height: 48px;
        max-height: 48px;
    }
}

/* ----------------------
/ Home Categories Final Position
/ -------------------- */
@media (max-width: 991px) {
    .artender-front-page .artender-home-main-categories {
        margin-top: 25px !important;
        margin-bottom: var(--artender-home-section-gap, 12px) !important;
        padding-top: 0 !important;
        transform: translateY(-18px);
    }
}
/* ----------------------
/ Mobile Category Text Controls
/ کنترل متن دسته بندی موبایل
/ -------------------- */

:root {
    --home-category-mobile-font-size: 9px;
    --home-category-mobile-font-weight: 900;
    --home-category-mobile-line-height: 3.45;
    --home-category-mobile-min-height: 29px;
    --home-category-mobile-max-height: 30px;
}


@media (max-width: 420px) {

    .artender-home-main-category-content span {

        font-size: var(--home-category-mobile-font-size) !important;

        font-weight: var(--home-category-mobile-font-weight) !important;

        line-height: var(--home-category-mobile-line-height) !important;

        min-height: var(--home-category-mobile-min-height) !important;

        max-height: var(--home-category-mobile-max-height) !important;

        overflow: hidden !important;

        text-align: center !important;

    }

}
/* ==========================================================
 * Artender Mobile Header v7
 * Stable size on scroll + compact RTL search alignment
 * ========================================================== */
@media (max-width: 991px) {
    /* Prevent any geometry change while scrolling. */
    .artender-mobile-header-wrap,
    .artender-mobile-header-wrap.is-scrolled {
        padding: 4px 8px 5px;
        transform: none;
    }

    .artender-mobile-header-wrap.is-scrolled .artender-mobile-top-card {
        width: 100%;
        min-height: auto;
        padding: 3px 6px;
        grid-template-columns: 64px minmax(0, 1fr) 64px;
        gap: 4px;
        margin-bottom: 4px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.97);
        border-color: rgba(15, 23, 42, 0.07);
        box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transform: none;
    }

    .artender-mobile-header-wrap.is-scrolled .artender-mobile-search-box .dgwt-wcas-sf-wrapp,
    .artender-mobile-header-wrap.is-scrolled .artender-mobile-search-fallback {
        min-height: 40px !important;
        height: 40px !important;
        max-height: 40px !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.97) !important;
        border-color: rgba(15, 23, 42, 0.085) !important;
        box-shadow: 0 3px 12px rgba(15, 23, 42, 0.045) !important;
        transform: none !important;
    }

    .artender-mobile-header-wrap.is-scrolled .artender-mobile-buy-button {
        min-height: 38px;
        padding: 4px 6px;
        border-radius: 10px;
        font-size: 9.5px;
        line-height: 1.35;
        transform: none;
    }

    /* Search: icon and placeholder stay together on the right in RTL. */
    .artender-mobile-search-box .dgwt-wcas-sf-wrapp {
        position: relative !important;
        display: block !important;
        direction: rtl !important;
    }

    .artender-mobile-search-box .dgwt-wcas-search-submit {
        position: absolute !important;
        top: 0 !important;
        right: 4px !important;
        left: auto !important;
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 40px !important;
        z-index: 3 !important;
    }

    .artender-mobile-search-box .dgwt-wcas-ico-magnifier,
    .artender-mobile-search-box .dgwt-wcas-search-submit svg {
        width: 14px !important;
        height: 14px !important;
    }

    .artender-mobile-search-box input.dgwt-wcas-search-input {
        width: 100% !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        line-height: 40px !important;
        padding: 0 38px 0 10px !important;
        text-align: right !important;
        direction: rtl !important;
        font-size: 10.4px !important;
        font-weight: 500 !important;
    }

    .artender-mobile-search-box input.dgwt-wcas-search-input::placeholder {
        text-align: right !important;
        direction: rtl !important;
        font-size: 10.4px !important;
        font-weight: 500 !important;
    }

    /* Fallback search follows the same visual order. */
    .artender-mobile-search-fallback {
        position: relative;
        display: block;
        direction: rtl;
    }

    .artender-mobile-search-fallback button {
        position: absolute;
        top: 0;
        right: 4px;
        left: auto;
        width: 34px;
        min-width: 34px;
        height: 40px;
        z-index: 2;
    }

    .artender-mobile-search-fallback input {
        width: 100%;
        height: 40px;
        padding: 0 38px 0 10px;
        text-align: right;
        direction: rtl;
        font-size: 10.4px;
        font-weight: 500;
    }

    .artender-mobile-search-fallback input::placeholder {
        text-align: right;
        direction: rtl;
        font-size: 10.4px;
        font-weight: 500;
    }
}
