/* Loaded last: responsive and installed-app refinements, scoped to Shima. */
#shima-pwa-tools{font-family:Vazirmatn,Tahoma,sans-serif;direction:rtl}
#shima-pwa-tools [hidden]{display:none!important}
#shima-pwa-status{position:fixed;z-index:3600;bottom:var(--shima-pwa-bottom,90px);inset-inline:16px;max-width:min(440px,calc(100vw - 32px));margin:0 auto;border-radius:14px;box-shadow:0 8px 24px #12392324;font:700 13px/1.9 Vazirmatn,Tahoma,sans-serif;background:#fff4d9;color:#624507;padding:12px 18px}
#shima-pwa-tools button:focus-visible,.shima-site-shell a:focus-visible,.shima-site-shell button:focus-visible{outline:3px solid #d99010;outline-offset:3px}
.shima-site-shell,.shima-site-shell *{box-sizing:border-box}
.shima-site-shell :is(.sr-product,.sr-product-body,.srp-summary,.shima-transaction-content,.shima-qo-table-wrap){min-width:0}
.shima-site-shell img{max-width:100%}
.shima-site-shell .shima-mobile-drawer{max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(20px,env(safe-area-inset-bottom))}
.shima-site-shell .shima-qo-table-wrap{overflow-x:auto;overscroll-behavior-x:contain;max-width:100%}
@media(min-width:801px) and (max-width:1200px){.shima-site-shell .shima-main-nav{gap:16px;padding-inline:0;overflow-x:auto;white-space:nowrap;max-width:100%}.shima-site-shell .shima-main-nav>a{flex-shrink:0}}
@media(max-width:800px){
 .shima-site-shell{padding-bottom:calc(78px + env(safe-area-inset-bottom));padding-inline:env(safe-area-inset-left) env(safe-area-inset-right)}
 .shima-site-shell .shima-mobile-bottom-nav{height:calc(64px + env(safe-area-inset-bottom));padding:6px 10px calc(6px + env(safe-area-inset-bottom))}
 .shima-site-shell .shima-mobile-bottom-nav a{min-height:44px;font-size:11px}
 .shima-site-shell .shima-mobile-bottom-nav.has-5-items{grid-template-columns:repeat(5,minmax(0,1fr))}
 .shima-site-shell .shima-mobile-bottom-nav.has-5-items a{font-size:10px}
 .shima-site-shell .shima-header-inner{grid-template-columns:44px minmax(0,1fr) 96px}
 .shima-site-shell .shima-mobile-menu-toggle{width:44px;height:44px}
 .shima-site-shell input:not([type=checkbox]):not([type=radio]),.shima-site-shell select,.shima-site-shell textarea{font-size:16px!important;max-width:100%}
 .shima-site-shell .sr-product-bottom{flex-wrap:wrap;gap:8px}.shima-site-shell .sr-price{overflow-wrap:anywhere}
 .shima-site-shell .sr-section-head{flex-wrap:wrap;gap:8px}.shima-site-shell .sr-cart{min-width:44px;min-height:44px}
 .shima-site-shell .srp-sticky{bottom:calc(64px + env(safe-area-inset-bottom));padding-bottom:8px}
 .shima-site-shell.shima-product-reference{padding-bottom:calc(150px + env(safe-area-inset-bottom))}
 .shima-site-shell .srp-sticky-info{min-width:0}.shima-site-shell .srp-sticky-info b{overflow-wrap:anywhere;white-space:normal}
 .shima-site-shell .srp-sticky-buy{white-space:normal}
 .shima-site-shell .srp-secondary{flex-wrap:wrap}
 .shima-site-shell .shima-mobile-bottom-nav{display:grid;position:fixed;inset:auto 0 0;z-index:3000;grid-template-columns:repeat(4,minmax(0,1fr));background:#fff;border-top:1px solid #e2e8e4;box-shadow:0 -6px 20px #1239230d}
 .shima-site-shell .shima-mobile-bottom-nav a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;color:#475569;font-weight:800}
 .shima-site-shell .shima-mobile-bottom-nav svg{width:20px;height:20px}
 .shima-site-shell .srp-sticky-info .shima-price-unit{white-space:normal;display:block;font-size:10px}
 body.shima-keyboard-open .shima-mobile-bottom-nav,
 body.shima-keyboard-open .srp-sticky{visibility:hidden;pointer-events:none}
 body.shima-keyboard-open #shima-pwa-status,
 body.shima-keyboard-open #shima-pwa-update{display:none!important}
}
@media(max-width:360px){
 .shima-site-shell .shima-header-inner{column-gap:4px}.shima-site-shell .shima-logo img{width:100%;height:auto}
 .shima-site-shell .sr-products,.shima-site-shell .sr-products-count-2,.shima-site-shell .sr-products-count-3{grid-template-columns:minmax(0,1fr)}
 .shima-site-shell .sr-banner-copy{width:100%}.shima-site-shell .sr-banner-promises{display:none}
 .shima-site-shell .sr-products-count-1 .sr-product{display:block}.shima-site-shell .sr-products-count-1 .sr-product-body{padding-top:12px}
 .shima-site-shell .srp-sticky-info{display:none}
 .shima-site-shell .shima-mobile-bottom-nav.has-5-items a{font-size:9px}
 .shima-site-shell .shima-archive-grid{grid-template-columns:minmax(0,1fr)}
}
.shima-site-shell .shima-price-unit{white-space:normal;overflow-wrap:anywhere}
.shima-site-shell .shima-product-price strong{min-width:0;overflow-wrap:anywhere}
@media(display-mode:standalone){.shima-site-shell .shima-header{padding-top:env(safe-area-inset-top)}}
@media(prefers-reduced-motion:reduce){#shima-pwa-tools *{scroll-behavior:auto;animation:none;transition:none}}

/* 3.4.2: handheld-only app controls. They are hidden by default and enabled only after JS identifies a handheld device. */
#shima-pwa-settings-open,#shima-pwa-update,#shima-pwa-status{display:none}
body.shima-pwa-handheld #shima-pwa-status:not([hidden]){display:block}

/* Update is a transient bottom card, not footer content. */
body.shima-pwa-handheld #shima-pwa-update:not([hidden]){display:block;position:fixed;z-index:3500;bottom:var(--shima-pwa-bottom,88px);inset-inline:12px;width:min(460px,calc(100vw - 24px));margin:0 auto;padding:14px;border:1px solid #cde3d5;border-radius:18px;background:#fff;color:#174c31;box-shadow:0 14px 36px #102d1e30;font:700 13px/1.9 Vazirmatn,Tahoma,sans-serif}
#shima-pwa-update .shima-pwa-update-head{display:flex;align-items:center;gap:10px}
#shima-pwa-update .shima-pwa-update-head>div{display:flex;flex-direction:column;min-width:0}
#shima-pwa-update .shima-pwa-update-head strong{font-size:14px}
#shima-pwa-update .shima-pwa-update-head small{font-size:10px;color:#789086;font-weight:700}
#shima-pwa-update .shima-pwa-update-mark{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:12px;background:#eaf7ef;color:#087b43;font-size:20px}
#shima-pwa-update p{font-size:11.5px;margin:8px 0;color:#536b5f}
#shima-pwa-update .shima-pwa-update-actions{display:flex;gap:8px}
#shima-pwa-update button{font:inherit;min-height:42px;padding:7px 14px;border-radius:11px;border:1px solid #bed8c8;background:#087b43;color:#fff;cursor:pointer}
#shima-pwa-update #shima-pwa-update-later{background:#fff;color:#174c31}
#shima-pwa-update button:disabled{opacity:.55;cursor:default}
body.shima-menu-open #shima-pwa-update{display:none!important}

/* Single entry point for install + push settings. In the drawer it behaves like a native menu item; without a drawer it becomes a compact floating launcher. */
body.shima-pwa-handheld #shima-pwa-settings-open:not([hidden]){display:flex;align-items:center;gap:10px;width:min(440px,calc(100vw - 24px));min-height:52px;margin:10px auto;padding:9px 12px;border:1px solid #d9e8df;border-radius:15px;background:#fff;color:#174c31;box-shadow:0 7px 22px #12392312;font:700 13px/1.7 Vazirmatn,Tahoma,sans-serif;text-align:right;cursor:pointer}
#shima-pwa-settings-open .shima-pwa-settings-icon{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:11px;background:#edf7f1;color:#087b43;font-size:18px}
#shima-pwa-settings-open .shima-pwa-settings-copy{display:flex;flex-direction:column;min-width:0;flex:1}
#shima-pwa-settings-open .shima-pwa-settings-copy strong{font-size:12.5px}
#shima-pwa-settings-open .shima-pwa-settings-copy small{font-size:10px;color:#7a8f84;font-weight:600;white-space:normal}
#shima-pwa-settings-open .shima-pwa-settings-arrow{font-size:22px;color:#8aa096}
body.shima-pwa-handheld #shima-pwa-tools>#shima-pwa-settings-open:not([hidden]){position:fixed;z-index:3200;bottom:var(--shima-pwa-bottom,80px);inset-inline:12px;width:min(300px,calc(100vw - 24px));margin:0 0 0 auto}
.shima-mobile-drawer #shima-pwa-settings-open{position:static!important;width:100%!important;max-width:100%;margin:4px 0!important;box-shadow:none!important;flex-shrink:0}

/* Mobile app settings and iOS guide use bottom sheets. */
#shima-pwa-settings,#shima-pwa-guide,#shima-push-dialog{box-sizing:border-box;width:min(520px,100vw);max-width:100%;max-height:min(84dvh,720px);margin:auto auto 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom));border:1px solid #d5e6dc;border-bottom:0;border-radius:24px 24px 0 0;background:#fff;color:#173a28;overflow:auto;font:14px/2 Vazirmatn,Tahoma,sans-serif;direction:rtl}
#shima-pwa-settings::backdrop,#shima-pwa-guide::backdrop,#shima-push-dialog::backdrop{background:#09251899;backdrop-filter:blur(2px)}
#shima-pwa-settings .shima-pwa-close,#shima-pwa-guide .shima-pwa-close,#shima-push-dialog .shima-pwa-close{float:left;min-width:44px;min-height:44px;border:0;border-radius:12px;font-size:24px;background:#edf5ef;color:#174c31;cursor:pointer}
.shima-pwa-sheet-head{display:flex;align-items:center;gap:12px;margin:4px 0 18px}
.shima-pwa-sheet-head img{width:58px;height:58px;border-radius:15px;box-shadow:0 5px 14px #1239231a}
.shima-pwa-sheet-head h2{margin:0;font-size:20px}.shima-pwa-sheet-head p{margin:0;color:#85958d;font-size:11px}
.shima-pwa-setting-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 0;border-top:1px solid #e7eee9}
.shima-pwa-setting-row>div{display:flex;flex-direction:column;min-width:0}.shima-pwa-setting-row strong{font-size:13px}.shima-pwa-setting-row small{font-size:10.5px;color:#73877d;font-weight:600}
.shima-pwa-setting-row button,#shima-push-dialog button:not(.shima-pwa-close){font:inherit;min-height:44px;padding:8px 13px;border-radius:11px;border:1px solid #bed8c8;background:#087b43;color:#fff;cursor:pointer;white-space:nowrap}
#shima-pwa-push-row #shima-push-open{background:#fff;color:#087b43}
.shima-pwa-privacy-note{margin:16px 0 0;padding:12px;border-radius:13px;background:#f6f9f7;color:#728279;font-size:10.5px;line-height:1.9}
#shima-pwa-guide{text-align:right}#shima-pwa-guide h2{font-size:20px;line-height:1.8}#shima-pwa-guide>img{display:block;margin:6px auto 12px}

#shima-push-dialog h2{font-size:20px}#shima-push-dialog h3{font-size:15px}
#shima-push-options>label{display:flex;align-items:center;gap:10px;min-height:48px}
#shima-push-options input{width:20px;height:20px;accent-color:#087b43}
#shima-push-options>button{margin:4px 0}
#shima-push-dialog #shima-push-disable{background:#fff;color:#174c31}
#shima-push-dialog button:disabled{opacity:.55;cursor:default}
#shima-push-devices p{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #e3ece6;padding-top:10px}
#shima-push-login{display:inline-flex;min-height:44px;align-items:center;padding:8px 14px;border-radius:11px;background:#087b43;color:#fff;text-decoration:none;font-weight:800}
#shima-push-dialog :focus-visible,#shima-pwa-settings :focus-visible,#shima-pwa-guide :focus-visible,#shima-pwa-update :focus-visible{outline:3px solid #d99010;outline-offset:2px}

@media(min-width:801px){
 /* The mobile bottom nav stays off above its layout breakpoint, even on touch devices. PWA launcher may remain available on an actual handheld in landscape. */
 .shima-site-shell .shima-mobile-bottom-nav{display:none!important}
}
