
/* =========================================================
   UPJET UNIFIED THEME V47
   Final theme normalization layer for storefront + admin.
   ========================================================= */
@font-face{font-family:"Upjet Yekan";src:url("fonts/Yekan.woff2") format("woff2");font-style:normal;font-weight:100 900;font-display:swap}
@font-face{font-family:"Upjet Vazirmatn";src:url("fonts/Vazirmatn-Variable.woff2") format("woff2");font-style:normal;font-weight:100 900;font-display:swap}
:root{
 --upjet-font-fa:"Upjet Yekan","Upjet Vazirmatn",Tahoma,Arial,sans-serif;
 --upjet-font-mixed:"Upjet Vazirmatn","Upjet Yekan",Tahoma,Arial,sans-serif;
 --upjet-font-latin:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
 --upjet-orange:#ff6b00;--upjet-orange-2:#ff8a2b;--upjet-green:#169b62;
 --upjet-text:#202631;--upjet-muted:#727b88;--upjet-bg:#f4f6f8;--upjet-surface:#fff;
 --upjet-line:#e4e8ed;--upjet-radius:16px;--upjet-radius-lg:20px;
 --upjet-shadow:0 8px 26px rgba(15,23,42,.055);
}
html{font-family:var(--upjet-font-fa);scrollbar-gutter:stable}
body,button,input,select,textarea{font-family:var(--upjet-font-fa)!important}
[lang="en"],.ltr,[dir="ltr"]{font-family:var(--upjet-font-latin)}
.site-body,.admin-body{color:var(--upjet-text);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
.site-body{background:#fff}
.admin-body{background:var(--upjet-bg)!important}
/* Shared rhythm */
:where(.ui-page,.admin-content-v2,.account-page,.checkout-page,.cart-page,.content-page){min-width:0}
:where(.panel-form,.form-card,.admin-card,.dashboard-panel,.contact-info-card,.account-card,.checkout-card,.cart-summary,.seo-card-v24){border-color:var(--upjet-line)!important;border-radius:var(--upjet-radius)!important;box-shadow:var(--upjet-shadow)}
:where(.panel-form,.form-card,.admin-card) :where(input,select,textarea),
.site-body :where(input,select,textarea),.admin-body :where(input,select,textarea){font:inherit;box-sizing:border-box}
.site-body :where(input,select,textarea):focus,.admin-body :where(input,select,textarea):focus{outline:none;border-color:rgba(255,107,0,.62);box-shadow:0 0 0 3px rgba(255,107,0,.09)}
:where(.btn,button.btn,a.btn){border-radius:12px;font-weight:700;line-height:1.35}
:where(.btn.primary,button.primary,a.primary){background:linear-gradient(135deg,var(--upjet-orange),var(--upjet-orange-2));border-color:transparent;color:#fff}
:where(.alert){border-radius:12px}
:where(.admin-page-intro,.admin-card-head,.section-head,.page-head){min-width:0}
:where(.admin-page-intro h1,.ui-page h1,.page-head h1){letter-spacing:-.01em}
/* Store product/title typography */
.store-product-card,.product-card{border-radius:var(--upjet-radius);overflow:hidden}
.store-product-card :where(h3,a,strong,small),.product-card :where(h3,a,strong,small){min-width:0}
.product-text-latin,.product-text-latin>a{font-family:var(--upjet-font-latin)!important;direction:ltr;text-align:left;unicode-bidi:isolate}
.product-text-mixed,.product-text-mixed>a{font-family:var(--upjet-font-mixed)!important;unicode-bidi:plaintext}
.product-text-persian,.product-text-persian>a{font-family:var(--upjet-font-fa)!important}
/* Tables never stretch the whole app */
:where(.table-wrap,.admin-table-wrap,.responsive-table,.admin-card.table-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
:where(table){border-collapse:separate;border-spacing:0}
/* Consistent mobile */
@media(max-width:760px){
 :root{--upjet-radius:14px}
 .site-main{min-width:0}
 :where(.ui-page,.admin-content-v2){min-width:0}
}


/* Legacy layout fixes consolidated from V31 */
/* UPJET V31— Admin header + Eways layout fixes */

/* The header has three logical columns: page title, search, actions.
   Alerts + user chip are grouped in one cell so the avatar never wraps
   into a phantom second row while the sticky header keeps a fixed height. */
.admin-top.admin-top-v2{
    grid-template-columns:minmax(190px,250px) minmax(280px,520px) minmax(220px,auto)!important;
    align-items:center!important;
    min-height:74px;
    height:74px;
}
.admin-top-actions{
    min-width:0;
    max-width:100%;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    white-space:nowrap;
}
.admin-top-actions .admin-order-alerts,
.admin-top-actions .admin-user-chip{
    flex:0 0 auto;
    min-width:0;
}
.admin-top-actions .admin-user-chip{
    margin:0!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
}
.admin-top-actions .admin-user-chip>span{
    flex:0 0 39px;
}
.admin-top-actions .admin-user-chip>div{
    min-width:0;
}

/* Make the Eways action row tolerant of the new batch selectors. */
.eways-head-actions{align-items:center!important;flex-wrap:wrap!important}
.eways-head-actions form{max-width:100%}
.eways-batch-inline{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.eways-batch-inline label{margin:0!important;font-size:9px!important;white-space:nowrap}
.eways-batch-inline input[type=number]{width:82px!important;min-width:72px;height:36px;padding:5px 8px}
.eways-map-sync-batch{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.eways-map-sync-batch input[type=number]{width:76px!important;min-width:68px;height:32px;padding:4px 7px}

@media(max-width:1250px) and (min-width:1001px){
    .admin-top.admin-top-v2{
        grid-template-columns:minmax(160px,220px) minmax(230px,1fr) auto!important;
    }
    .admin-top-actions{gap:7px}
    .admin-user-chip b,.admin-user-chip small{max-width:120px!important}
}

@media(max-width:1000px){
    .admin-top.admin-top-v2{
        grid-template-columns:auto minmax(180px,1fr) auto!important;
        height:auto;
        min-height:68px;
    }
    .admin-top-actions{justify-content:flex-start}
    .admin-top-actions .admin-user-chip>div{display:none!important}
}

@media(max-width:800px){
    .admin-top.admin-top-v2{
        grid-template-columns:minmax(0,1fr) auto!important;
        grid-auto-rows:auto;
        padding-block:8px!important;
    }
    .admin-top-title{grid-column:1;grid-row:1}
    .admin-top-actions{grid-column:2;grid-row:1}
    .admin-global-search{grid-column:1/-1!important;grid-row:2!important;max-width:none!important;margin:0!important}
}

@media(max-width:560px){
    .admin-top-actions .admin-order-alert-button>span:nth-child(2){display:none}
    .admin-top-actions{gap:5px}
    .admin-top-actions .admin-user-chip>span{width:36px;height:36px;flex-basis:36px}
    .eways-batch-inline{width:100%}
}

/* Consolidated admin stability from V41 */
/* =========================================================
       UPJET V41 — Admin dashboard visual + layout synchronization
       One stable geometry for every admin page.
       ========================================================= */

    :root{
        --upjet-admin-sidebar-width:275px!important;
        --upjet-admin-top-height:74px;
        --upjet-admin-canvas-max:1600px;
        --upjet-admin-page-gap:18px;
        --upjet-admin-card-radius:16px;
        --upjet-admin-card-border:#e2e7ec;
        --upjet-admin-card-shadow:0 7px 22px rgba(15,23,42,.035);
    }

    /* Keep browser scrollbar geometry stable between short and long pages. */
    html{
        scrollbar-gutter:stable;
        overflow-y:scroll;
        overflow-x:hidden;
    }
    body.admin-body{
        min-height:100vh;
        margin:0;
        overflow-x:hidden!important;
        background:#f2f4f7!important;
    }

    /* Never switch desktop sidebar from 275px to 250px near 1250px.
       That old breakpoint was a major source of page-to-page horizontal jumps. */
    @media(min-width:1001px){
        :root{--upjet-admin-sidebar-width:275px!important}
        .admin-shell.admin-shell-v2{
            grid-template-columns:275px minmax(0,1fr)!important;
        }
        .admin-sidebar.admin-sidebar-v2{
            width:275px!important;
            min-width:275px!important;
            max-width:275px!important;
        }
    }

    .admin-shell.admin-shell-v2{
        width:100%!important;
        max-width:100vw!important;
        min-height:100vh;
        align-items:start!important;
    }
    .admin-main{
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        overflow-x:hidden!important;
    }

    /* Sidebar keeps exactly the same geometry and remembers its own scroll position. */
    .admin-sidebar.admin-sidebar-v2{
        top:0!important;
        height:100vh!important;
        min-height:100vh!important;
        box-sizing:border-box!important;
        overflow:hidden!important;
    }
    .admin-sidebar-v2 nav{
        flex:1 1 auto!important;
        min-height:0!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain;
        scrollbar-gutter:stable;
    }
    .admin-sidebar-v2 .admin-logo,
    .admin-sidebar-v2 .admin-sidebar-bottom{
        flex:0 0 auto;
    }

    /* One fixed desktop header height on every admin route. */
    @media(min-width:1001px){
        .admin-top.admin-top-v2{
            height:var(--upjet-admin-top-height)!important;
            min-height:var(--upjet-admin-top-height)!important;
            max-height:var(--upjet-admin-top-height)!important;
            grid-template-columns:minmax(190px,1fr) minmax(300px,520px) minmax(245px,280px)!important;
            align-items:center!important;
            gap:18px!important;
            padding:0 24px!important;
            box-sizing:border-box!important;
        }
        .admin-top-title{
            min-width:0!important;
            height:100%;
            align-items:center!important;
        }
        .admin-top-title>div{
            min-width:0!important;
        }
        .admin-top-title b{
            max-width:100%!important;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }
        .admin-global-search{
            width:100%!important;
            max-width:520px!important;
            min-width:0!important;
            margin:0!important;
        }
        .admin-top-actions{
            width:100%!important;
            min-width:245px!important;
            max-width:280px!important;
            justify-content:flex-end!important;
            gap:9px!important;
        }
        .admin-user-chip{
            width:166px!important;
            min-width:166px!important;
            max-width:166px!important;
            justify-content:flex-end!important;
        }
        .admin-user-chip>div{
            width:112px!important;
            min-width:0!important;
        }
        .admin-user-chip b,
        .admin-user-chip small{
            max-width:112px!important;
            overflow:hidden!important;
            text-overflow:ellipsis!important;
            white-space:nowrap!important;
        }

        /* Badge appears without changing button/header width. */
        .admin-order-alert-button{position:relative!important}
        .admin-order-alert-badge{
            position:absolute!important;
            inset-inline-start:-6px!important;
            top:-6px!important;
            margin:0!important;
            z-index:2;
        }
    }

    /* Identical canvas width/padding on all admin pages. */
    .admin-content.admin-content-v2{
        width:100%!important;
        max-width:var(--upjet-admin-canvas-max)!important;
        min-width:0!important;
        min-height:calc(100vh - var(--upjet-admin-top-height));
        margin:0 auto!important;
        padding:20px 24px 56px!important;
        box-sizing:border-box!important;
    }
    .admin-content-v2,
    .admin-content-v2 *{
        box-sizing:border-box;
    }
    .admin-content-v2>*{
        max-width:100%;
        min-width:0;
    }

    /* Newer modules previously had their own 1400/1480/etc page widths.
       Make every route use the same parent canvas. */
    .admin-content-v2 :where(
        .admin-clarity-page,
        .admin-command-dashboard,
        .seo-v24,
        .ai-center,
        .analytics-v10,
        .journey-v10,
        .ab-v22,
        .health-v23,
        .pcb-admin-v30,
        .pcbq-v30,
        .pci-v28,
        .pc-admin-v29,
        .torob-content-page,
        .torob-import-page,
        .upjet-banner-admin-page,
        .slider-v17-page,
        .product-ai-assistant-v9,
        .product-ai-v12
    ){
        width:100%!important;
        max-width:none!important;
        min-width:0!important;
        margin-inline:0!important;
    }

    /* Same page heading rhythm everywhere. */
    .admin-page-intro,
    .admin-page-head,
    .clarity-head{
        width:100%!important;
        min-width:0!important;
        margin:0 0 var(--upjet-admin-page-gap)!important;
    }
    .admin-page-intro{
        min-height:58px;
        display:flex!important;
        align-items:center!important;
        justify-content:space-between!important;
        gap:14px!important;
    }
    .admin-page-intro h1,
    .admin-page-head h1,
    .clarity-head h1{
        margin-top:0!important;
        line-height:1.55!important;
    }
    .admin-page-intro p,
    .admin-page-head p,
    .clarity-head p{
        line-height:1.8!important;
    }

    /* Common surfaces should feel like the same admin theme. */
    .admin-content-v2 :where(.admin-card,.panel-form,.form-card){
        border-color:var(--upjet-admin-card-border)!important;
        border-radius:var(--upjet-admin-card-radius)!important;
        box-shadow:var(--upjet-admin-card-shadow);
    }
    .admin-card-head{
        min-width:0;
        gap:12px;
    }
    .admin-card-head>div,
    .admin-card-head h2{
        min-width:0;
    }

    /* Tables must scroll inside their own section, never widen the whole page. */
    .admin-content-v2 :where(.table-wrap,.admin-table-wrap,.ab-table-wrap-v22){
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        overflow-x:auto!important;
        overscroll-behavior-inline:contain;
    }

    /* Prevent wide actions/long URLs from changing the page canvas. */
    .admin-content-v2 :where(.row-actions,.admin-actions,.eways-head-actions){
        max-width:100%!important;
        min-width:0!important;
        flex-wrap:wrap!important;
    }
    .admin-content-v2 :where(input,select,textarea){
        min-width:0;
    }
    .admin-content-v2 textarea{
        max-width:100%!important;
    }

    /* At <=1000 sidebar becomes drawer, but content/header still share one geometry. */
    @media(max-width:1000px){
        html{overflow-y:auto}
        .admin-shell.admin-shell-v2{
            grid-template-columns:minmax(0,1fr)!important;
        }
        .admin-main{
            max-width:100vw!important;
        }
        .admin-content.admin-content-v2{
            max-width:none!important;
            padding:16px!important;
        }
        .admin-top.admin-top-v2{
            max-height:none!important;
        }
    }

    @media(max-width:800px){
        .admin-content.admin-content-v2{
            padding:14px 12px 42px!important;
        }
        .admin-page-intro{
            min-height:0;
            align-items:stretch!important;
        }
    }

/* Consolidated home card typography from V42 */
/* =========================================================
       UPJET V42 — Home product cards: English/Persian typography
       ========================================================= */

    /* Keep the card body vertically stable even when titles vary in length. */
    body.page-home .store-product-card .product-body{
        display:flex!important;
        flex-direction:column!important;
        min-width:0!important;
    }
    body.page-home .store-product-card .product-card-footer{
        margin-top:auto!important;
        width:100%!important;
        min-width:0!important;
    }

    /* Long model names no longer stretch one card taller than its neighbours. */
    body.page-home .store-product-card .product-card-title > a{
        display:-webkit-box!important;
        -webkit-box-orient:vertical!important;
        -webkit-line-clamp:3!important;
        overflow:hidden!important;
        max-width:100%!important;
        overflow-wrap:anywhere!important;
        word-break:normal!important;
        text-decoration:none!important;
    }

    /* Pure English names: use a real Latin UI stack, not Persian Yekan. */
    body.page-home .store-product-card .product-text-latin,
    body.page-home .store-product-card .product-text-latin > a{
        font-family:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif!important;
        direction:ltr!important;
        text-align:left!important;
        unicode-bidi:isolate!important;
        letter-spacing:.005em!important;
    }
    body.page-home .store-product-card .product-card-title.product-text-latin > a{
        font-weight:650!important;
        line-height:1.48!important;
    }
    body.page-home .store-product-card .product-brand-name.product-text-latin{
        font-weight:650!important;
        letter-spacing:.02em!important;
    }

    /* Mixed Persian + English model names need one bilingual font.
       Vazirmatn is already self-hosted/preloaded by the current theme. */
    body.page-home .store-product-card .product-text-mixed,
    body.page-home .store-product-card .product-text-mixed > a{
        font-family:"Upjet Vazirmatn","Yekan",Tahoma,Arial,sans-serif!important;
        unicode-bidi:plaintext!important;
        letter-spacing:0!important;
    }

    /* Persian-only names stay on the site's Yekan typography. */
    body.page-home .store-product-card .product-text-persian,
    body.page-home .store-product-card .product-text-persian > a{
        font-family:"Yekan",Tahoma,Arial,sans-serif!important;
        letter-spacing:0!important;
    }

    /* Card cleanup: keep images and footer controls from shifting between rows. */
    body.page-home .store-product-card .product-image{
        min-width:0!important;
    }
    body.page-home .store-product-card .product-image img{
        object-fit:contain!important;
    }
    body.page-home .store-product-card .price-row{
        min-width:0!important;
    }
    body.page-home .store-product-card .price-row strong{
        color:#111827!important;
        text-shadow:none!important;
    }

    @media(max-width:760px){
        body.page-home .store-product-card .product-card-title > a{
            -webkit-line-clamp:2!important;
        }
        body.page-home .store-product-card .product-card-title.product-text-latin > a{
            line-height:1.42!important;
        }
    }
