/* ShopCMS 1.6 — site-wide semantic colors and mobile usability */
.storefront{--red:var(--theme-primary);--red2:var(--theme-secondary);--neo-red:var(--theme-primary);--neo-red-dark:var(--theme-primary);--mobile-red:var(--theme-primary);--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);--bg:var(--theme-page-bg);--card:var(--theme-surface);--green:var(--theme-success);color:var(--theme-text)}
.storefront .site-header,.storefront .header-main,.storefront .header-nav-wrap{background:var(--theme-header-bg);color:var(--theme-header-text)}
.storefront .site-header .nav a,.storefront .header-actions a,.storefront .logo{color:var(--theme-header-text)}
.storefront .neo-search,.storefront .mobile-search-form,.storefront .mobile-live-search{background:var(--theme-search-bg)}
.storefront .store-promo-bar{background:var(--theme-promo-bg)!important;color:var(--theme-promo-text)!important}
.storefront .store-promo-bar *{color:inherit}
.storefront .site-footer{background:var(--theme-footer-bg)!important;color:var(--theme-footer-text)!important}
.storefront .site-footer a,.storefront .site-footer b,.storefront .site-footer p,.storefront .site-footer small{color:var(--theme-footer-text)}
.storefront .mobile-bottom-nav{background:var(--theme-mobile-nav-bg)!important}
.storefront .mobile-bottom-nav a,.storefront .mobile-bottom-nav button{color:var(--theme-text)}
.storefront .neo-hero,.storefront .hero-premium,.storefront .hero-highlight{background-color:var(--theme-hero-bg)}
.storefront .neo-deals,.storefront .amazing-section,.storefront .deals-showcase,.storefront .special-section{background-color:var(--theme-deals-bg)}
.storefront .premium-showcase,.storefront .premium-dark,.storefront .dark-showcase{background-color:var(--theme-premium-bg)}
.storefront .primary,.storefront .btn-primary,.storefront button.primary{background:var(--theme-primary);color:var(--theme-button-text)}
.storefront .product-card,.storefront .neo-product-card{background:var(--theme-surface)}
.storefront :where(.badge-success,.stock-status.available){color:var(--theme-success)}
.admin-interface{--primary:var(--theme-admin-primary);--primary2:var(--theme-accent);--sidebar:var(--theme-admin-sidebar);--soft:var(--theme-admin-bg)}
.admin-interface .sidebar{background:var(--theme-admin-sidebar)}
.admin-interface .admin-main{background:var(--theme-admin-bg)}
.admin-interface .primary,.admin-interface button.primary{background:var(--theme-admin-primary)}
/* Text inputs must compute >=16 CSS pixels on iPhone, to prevent Safari focus auto-zoom. */
@media(max-width:900px){
 html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
 input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,[contenteditable=true],[contenteditable=""],[role=textbox],.rich-surface{font-size:16px!important;line-height:1.55!important;min-width:0}
 .admin-interface :where(.form-grid,.form-grid>*,.panel,.settings-panel,.admin-content){min-width:0}
 .admin-interface input:not([type=checkbox]):not([type=radio]),.admin-interface select,.admin-interface textarea{max-width:100%}
}
/* Inspired by the clean AppSaz mobile navigation, no giant logo or oversized imagery. */
@media(max-width:900px){
 .storefront .mobile-menu-backdrop{position:fixed!important;inset:0!important;background:rgba(14,23,45,.55)!important;backdrop-filter:blur(5px);z-index:1000!important}
 .storefront .mobile-menu-drawer{position:fixed!important;right:0!important;left:auto!important;top:0!important;bottom:0!important;height:100dvh!important;width:min(88vw,390px)!important;max-width:390px!important;background:#fff!important;border-radius:0!important;z-index:1001!important;display:flex!important;flex-direction:column!important;padding:0!important;overflow:hidden!important;box-shadow:-20px 0 70px rgba(15,23,42,.22);transform:translateX(105%);transition:transform .25s ease}
 .storefront.mobile-menu-open .mobile-menu-drawer{transform:translateX(0)!important}
 .storefront .mobile-menu-drawer img{width:auto!important;height:auto!important;max-height:54px!important;max-width:76px!important;object-fit:contain!important}
 .storefront .mobile-menu-head{padding:20px 18px 15px!important;flex:0 0 auto;display:flex!important;justify-content:space-between!important;align-items:center!important;border-bottom:1px solid #eef1f6!important}
 .storefront .mobile-menu-head .logo{display:flex;max-width:220px;min-width:0;gap:10px;align-items:center;font-size:17px!important;white-space:normal}
 .storefront .mobile-menu-head .logo-mark{width:48px;height:48px;flex:0 0 48px}
 .storefront .mobile-menu-head button{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;border:1px solid #e9edf5;border-radius:14px;background:#f7f8fc;color:#344054;font-size:26px}
 .storefront .mobile-menu-account{margin:12px 18px 8px!important;padding:0!important;background:transparent!important;border:0!important}
 .storefront .mobile-menu-account a{display:flex!important;flex-direction:column;gap:3px;text-decoration:none;border-radius:16px;background:#f7f9ff!important;border:1px solid #edf0fa!important;padding:14px 16px!important;color:#111827}
 .storefront .mobile-menu-account small{font-size:12px;color:#8291ad}
 .storefront .mobile-drawer-nav{display:block!important;flex:1 1 auto;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:6px 18px 20px!important;margin:0!important}
 .storefront .mobile-drawer-nav:before{content:'دسترسی سریع';display:block;margin:10px 5px;color:#98a2b3;font-size:12px;font-weight:750}
 .storefront .mobile-custom-menu,.storefront .mobile-custom-menu ul{display:grid!important;gap:9px;list-style:none!important;padding:0!important;margin:0!important;width:100%!important}
 .storefront .mobile-custom-menu li{display:block!important;max-width:100%!important;width:100%!important;height:auto!important;min-width:0!important;float:none!important;background:transparent!important;border:0!important;box-shadow:none!important}
 .storefront .mobile-custom-menu a{min-height:65px!important;display:flex!important;align-items:center!important;gap:12px!important;border:1px solid #ecf0f6!important;border-radius:18px!important;padding:13px 15px!important;color:#111827!important;background:#fff!important;text-decoration:none!important;font-size:15px!important;line-height:1.5!important;font-weight:800!important;white-space:normal!important;overflow-wrap:anywhere}
 .storefront .mobile-custom-menu a:before{content:'➜';width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border-radius:12px;background:#f0f3ff;color:var(--theme-accent);font-size:17px}
 .storefront .mobile-custom-menu>li:nth-child(2n) a:before{background:#fff2f4;color:var(--theme-primary)}
 .storefront .mobile-custom-menu ul{margin:6px 24px 4px 0!important}
 .storefront .mobile-custom-menu ul a{min-height:46px!important;font-weight:600!important;font-size:14px!important}
 .storefront .mobile-custom-menu ul a:before{width:20px;height:20px;flex:0 0 20px;font-size:10px}
 .storefront .mobile-custom-menu .has-children:not(.submenu-open)>ul{display:none!important}
 .storefront .mobile-custom-menu .has-children.submenu-open>ul{display:grid!important}
 .storefront .mobile-menu-footer{margin-top:auto;flex:0 0 auto;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;padding:14px 18px max(18px,env(safe-area-inset-bottom))!important;background:white!important;border-top:1px solid #edf0f5!important}
 .storefront .mobile-menu-footer a{display:grid!important;place-items:center!important;min-height:49px!important;border:1px solid #e8ebf2!important;background:#f3f5f9!important;border-radius:15px!important;padding:8px!important;font-size:14px!important;font-weight:800!important;text-align:center!important;color:#263247!important;text-decoration:none!important}
 .storefront .mobile-menu-footer a:first-child{color:white!important;background:var(--theme-accent)!important;border-color:transparent!important}
 .storefront.mobile-menu-open{overflow:hidden!important}
}
@media(prefers-reduced-motion:reduce){.storefront .mobile-menu-drawer{transition:none!important}}
.site-settings-page{display:grid;gap:16px;max-width:1200px;margin:auto}.site-settings-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.site-settings-tabs{display:flex;gap:8px;flex-wrap:wrap}.site-settings-tabs a{padding:11px 18px;background:#fff;border:1px solid #e5e9f0;border-radius:13px;color:#394357;text-decoration:none;font-weight:800}.site-settings-tabs a.active{background:var(--theme-admin-primary);color:white}
.theme-preview{background:var(--theme-page-bg);border:1px solid var(--theme-border);border-radius:22px;overflow:hidden;color:var(--theme-text)}.theme-preview-bar{background:var(--theme-header-bg);color:var(--theme-header-text);display:flex;gap:15px;align-items:center;justify-content:space-between;padding:15px 22px}.theme-preview-bar span{flex:1;max-width:430px;border-radius:12px;background:var(--theme-search-bg);padding:9px 15px;color:var(--theme-muted)}.theme-preview-body{display:grid;grid-template-columns:2fr 1fr;gap:16px;padding:16px}.theme-preview-hero{background:var(--theme-hero-bg);border-radius:17px;min-height:165px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:22px;gap:6px}.theme-preview-hero strong{font-size:23px}.theme-preview-hero small{color:var(--theme-muted)}.theme-preview-hero button{border:0;border-radius:10px;background:var(--theme-primary);color:var(--theme-button-text);padding:10px 17px;margin-top:8px}.theme-preview-card{background:var(--theme-surface);border-radius:17px;border:1px solid var(--theme-border);padding:20px;display:flex;flex-direction:column;gap:10px}.theme-preview-card span{background:var(--theme-page-bg);border-radius:13px;flex:1;display:grid;place-items:center;color:var(--theme-muted)}.theme-preview-card small{color:var(--theme-primary)}.theme-preview-footer{background:var(--theme-footer-bg);color:var(--theme-footer-text);padding:13px 22px}
.theme-presets{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.theme-presets button{padding:9px 13px;border:1px solid #e4e7ec;border-radius:10px;background:#fff;cursor:pointer}.theme-color-group h2{font-size:19px;margin:0 0 18px}.theme-color-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.theme-color-control{display:flex;align-items:center;justify-content:space-between;min-width:0;gap:9px;padding:11px;border:1px solid #e5eaf2;border-radius:13px}.theme-color-control span{font-size:13px;font-weight:700}.theme-color-control>div{display:flex;align-items:center;gap:8px}.theme-color-control input{width:45px;height:40px;border:1px solid #dae1eb;border-radius:9px;cursor:pointer;padding:2px}.theme-color-control output{font:12px ui-monospace,monospace;color:#667085}.theme-savebar{position:sticky;bottom:15px;z-index:5;display:flex;gap:9px;padding:12px;background:rgba(255,255,255,.96);border:1px solid #e9edf3;border-radius:16px;box-shadow:0 15px 30px rgba(15,23,42,.08)}.performance-settings-form{display:grid;gap:13px}.performance-toggle{display:flex;align-items:center;gap:12px;font-weight:800}.performance-toggle input{width:23px;height:23px}.perf-ttl{display:grid;gap:8px;max-width:450px}.perf-ttl input{padding:12px;border:1px solid #e2e6ed;border-radius:11px;max-width:240px}.perf-ttl small{color:#667085}
@media(max-width:820px){.site-settings-head{flex-direction:column;align-items:stretch}.theme-color-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.theme-color-grid{grid-template-columns:1fr}.theme-preview-body{grid-template-columns:1fr}.theme-preview-bar{gap:6px;padding:11px}.theme-preview-bar span{display:none}.theme-savebar{bottom:calc(10px + env(safe-area-inset-bottom))}.theme-savebar button{flex:1}.theme-color-control output{font-size:12px}}

@media(max-width:900px){.storefront .mobile-drawer-intro{padding:15px 22px 0;display:grid;gap:3px}.storefront .mobile-drawer-intro b{font-size:16px}.storefront .mobile-drawer-intro small{font-size:12px;color:#94a3b8}.storefront .mobile-menu-drawer[aria-hidden=true]{pointer-events:none}.storefront .mobile-menu-drawer[aria-hidden=false]{pointer-events:auto}}


/* Form zoom repair for iOS: no user-scalable restrictions required */
@media (max-width: 900px){
 input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),textarea,select,[contenteditable="true"],.rte-editor,.rte-content,.editor-content{font-size:16px!important}
 .store-announcement-bar,.shop-notice{overflow-wrap:anywhere}
}
