/* ChatLoja - ajustes exclusivos para celular/tablet compacto */
:root{--mobile-bottom-safe:env(safe-area-inset-bottom,0px)}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
*{scrollbar-width:thin;scrollbar-color:var(--primary) rgba(255,255,255,.08)}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-track{background:rgba(255,255,255,.08);border-radius:999px}
*::-webkit-scrollbar-thumb{background:linear-gradient(180deg,var(--primary),var(--primary2));border-radius:999px;border:2px solid rgba(255,255,255,.18)}
body.theme-light.gold-light *{scrollbar-color:#d89a00 rgba(143,95,0,.10)}
body.theme-light.gold-light *::-webkit-scrollbar-track{background:rgba(143,95,0,.10)}
body.theme-light.gold-light *::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#f2a900,#ffd54f);border-color:rgba(255,255,255,.75)}

.mobile-panel-close{display:none}

@media (max-width:1100px){
  .catalog-mobile-btn{display:inline-flex!important}
  .zap-info.product-panel{display:flex!important;position:fixed;top:0;right:0;bottom:0;width:min(420px,94vw);z-index:75;transform:translateX(105%);transition:transform .22s ease;box-shadow:-24px 0 70px rgba(0,0,0,.38);border-left:1px solid var(--line);padding:10px;overflow:hidden;background:var(--left)}
  .zap-info.product-panel.open{transform:translateX(0)}
  .zap-info.product-panel .mobile-panel-close{display:grid;place-items:center;position:absolute;top:8px;right:8px;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.12);color:var(--text);border:1px solid var(--line);font-size:24px;z-index:3;cursor:pointer}
  .zap-info.product-panel .chatloja-card{padding:12px 48px 12px 12px;border-radius:18px;margin-bottom:8px}
  .zap-info.product-panel .chatloja-card strong{font-size:16px;margin:0 0 4px}
  .zap-info.product-panel .chatloja-card p{font-size:12px;line-height:1.35;margin:0 0 8px}
  .zap-info.product-panel .product-filters{margin-top:6px;padding:8px;border-radius:16px;background:rgba(255,255,255,.06);border:1px solid var(--line)}
  .zap-info.product-panel .section-title{font-size:10px;margin-bottom:7px;letter-spacing:.10em}
  .zap-info.product-panel .product-catalog{margin-top:8px;gap:7px;overflow-y:auto;overscroll-behavior:contain;padding:0 2px 10px 0}
  .zap-info.product-panel .product-links{display:none}
}

@media (max-width:780px){
  body.chat-body{height:100dvh;overflow:hidden}
  .zap-app{height:100dvh!important;grid-template-columns:1fr!important;overflow:hidden}
  .zap-chat{height:100dvh;min-height:0;overflow:hidden}
  .zap-chat-header{height:auto;min-height:58px;padding:7px 8px;gap:7px;display:grid;grid-template-columns:38px 34px minmax(0,1fr);align-items:center;position:relative;z-index:32}
  .mobile-toggle{display:grid!important;place-items:center;width:38px;height:38px;border-radius:12px;font-size:19px;color:var(--text)}
  .chat-avatar{width:34px;height:34px;border-radius:13px;font-size:16px}
  .chat-heading{min-width:0}.chat-heading h1{font-size:15px;line-height:1.1;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-heading p{font-size:11px;line-height:1.15;margin:2px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .chatloja-app .header-actions.zap-actions{grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%;margin-top:2px;overflow:visible}
  .chatloja-app .header-actions.zap-actions > *{display:none!important}
  .chatloja-app .header-actions.zap-actions .catalog-mobile-btn,
  .chatloja-app .header-actions.zap-actions .cart-header-btn,
  .chatloja-app .header-actions.zap-actions #themeToggle{display:inline-flex!important;min-height:34px;height:34px;padding:0 8px;border-radius:13px;font-size:12px;gap:4px;justify-content:center;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .cart-header-btn b{min-width:18px;height:18px;font-size:10px;padding:0 5px}

  .zap-sidebar{width:min(340px,92vw)!important;box-shadow:24px 0 60px rgba(0,0,0,.42)}
  .zap-mebar{height:60px;padding:7px 9px}.me-card strong{font-size:13px;max-width:130px}.me-card span{font-size:10px;max-width:145px}.avatar,.avatar-img{width:38px;height:38px}.round-btn{width:34px;height:34px}.mini-actions{gap:5px}
  .zap-search{margin:8px 9px;padding:0 10px}.zap-search input{padding:9px 2px;font-size:13px}
  .conversation-list{padding:0 6px 8px}.conversation-section{font-size:10px;margin:8px 7px 4px}.conversation-item{border-radius:14px;padding:7px;gap:8px}.avatar.sm2,.avatar-img.sm2{width:39px;height:39px}.conversation-top strong{font-size:13px}.conversation-bottom small{font-size:11px}.conversation-body{padding-bottom:5px}.unread-badge{min-width:18px;height:18px;font-size:10px;padding:0 5px}
  .sidebar-online-block{max-height:132px;padding:8px}.compact-online{grid-template-columns:1fr 1fr;gap:5px}.compact-online .user-row{padding:5px 6px;border-radius:11px;gap:5px}.compact-online .user-row strong{font-size:10px;max-width:92px}.compact-online .user-row small{font-size:9px}.compact-online .avatar,.compact-online .avatar-img{width:23px;height:23px}

  .zap-messages{padding:9px 8px 8px;scroll-padding-bottom:72px}.message{max-width:97%;margin-bottom:7px}.bubble{border-radius:15px;padding:7px 9px}.message-text{font-size:14px;line-height:1.35}.message-foot{font-size:10px;margin-top:4px}.message-image{max-width:78vw;border-radius:12px}.chat-product-actions{padding:7px;gap:6px}.chat-product-actions strong{font-size:13px}.chat-product-actions button{padding:7px 9px;font-size:12px}
  .typing-line{padding:0 10px 5px;font-size:11px}.whatsapp-followup{margin:5px 7px 0;padding:7px 8px;font-size:12px;border-radius:12px}.whatsapp-followup button{padding:6px 9px;font-size:12px}

  .zap-composer{padding:6px 6px calc(6px + var(--mobile-bottom-safe));gap:5px;align-items:center}.icon-btn{width:34px;height:34px;font-size:16px}.send-fab{width:37px;height:37px;font-size:18px}.composer-main{border-radius:16px}.composer-main textarea{min-height:36px;max-height:94px;padding:8px 9px;font-size:14px}.emoji-panel{bottom:44px;left:-42px;width:min(300px,92vw);grid-template-columns:repeat(6,1fr);padding:7px;border-radius:16px}.emoji-panel button{height:32px;font-size:18px}.file-preview{font-size:11px;margin:4px 5px 0;padding:6px 7px}

  .product-card{grid-template-columns:54px minmax(0,1fr) auto!important;gap:7px;border-radius:14px;padding:6px}.product-img-btn{width:54px!important;height:54px!important;border-radius:12px}.product-info strong{font-size:12px!important;line-height:1.1}.product-info small{font-size:10px!important;margin:2px 0!important}.product-info b{font-size:12px!important}.product-actions{gap:4px}.mini-btn{min-width:32px;height:28px;font-size:11px;padding:0 8px}.product-filters select,.product-filters input{min-height:36px!important;border-radius:12px!important;padding:8px 10px!important;font-size:13px!important}

  .cart-modal{padding:0;align-items:stretch}.cart-dialog{width:100%;height:100dvh;max-height:none;border-radius:0;padding:10px 10px calc(12px + var(--mobile-bottom-safe));overflow-y:auto}.cart-head{padding-bottom:8px}.cart-head strong{font-size:17px}.cart-head span{font-size:11px}.cart-head button{width:34px;height:34px;font-size:22px}.cart-items{gap:6px;margin:9px 0}.cart-row{grid-template-columns:44px minmax(0,1fr) auto!important;gap:7px;padding:6px;border-radius:13px}.cart-row img{width:44px;height:44px;border-radius:10px}.cart-row-info strong{font-size:12px}.cart-row-info small{font-size:10px}.qty-box{gap:4px}.qty-box button,.remove-cart{width:27px;height:27px;font-size:13px}.remove-cart{grid-column:3;grid-row:2}.cart-total-line{padding:10px 0;margin:6px 0 10px}.cart-total-line strong{font-size:19px}.cart-form-grid{grid-template-columns:1fr!important;gap:8px}.cart-form-grid .span-2{grid-column:auto!important}.cart-form-grid label{font-size:12px;gap:5px}.cart-form-grid input,.cart-form-grid select{min-height:38px!important;border-radius:12px!important;padding:8px 10px!important;font-size:14px!important}.cart-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.cart-actions .btn{width:100%;min-height:38px;padding:0 8px;font-size:12px}.cart-actions .btn.primary{grid-column:1/-1;order:-1}

  .admin-floating{right:10px;bottom:64px}.admin-fab{width:50px;height:50px;font-size:22px}.toast{left:8px;right:8px;bottom:8px;min-width:0;padding:11px 12px;font-size:13px}
}

@media (max-width:640px){
  .auth-body{padding:10px;align-items:flex-start}.auth-shell{gap:10px}.auth-hero{padding:8px}.auth-hero h1{font-size:31px;line-height:1;margin:10px 0}.auth-hero p{font-size:14px;line-height:1.42}.auth-card{border-radius:22px;padding:16px}.auth-card h1,.auth-card h2{font-size:24px}.brand-mark{width:54px;height:54px;border-radius:18px;font-size:26px}.form-stack{gap:10px}.form-grid{gap:10px}label{font-size:13px;gap:5px}input,textarea,select{min-height:40px;border-radius:12px;padding:9px 11px;font-size:14px}.btn{min-height:38px;padding:0 12px;font-size:13px}

  .landing-header{position:sticky}.landing-nav{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px;padding:9px 10px}.landing-brand{font-size:17px;gap:8px}.brand-logo-img,.landing-brand .brand-logo-img{width:36px!important;height:36px!important;border-radius:12px}.landing-nav .inline-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.landing-nav .inline-actions .btn{min-height:34px;font-size:12px;padding:0 8px}.landing-nav .inline-actions .btn.primary{grid-column:1/-1}.landing-hero{grid-template-columns:1fr!important;gap:12px;padding:18px 10px!important}.landing-hero h1{font-size:30px;line-height:1.03;margin:8px 0 10px}.landing-hero p{font-size:14px;line-height:1.45}.pill{font-size:12px;padding:7px 10px}.landing-card{border-radius:22px;padding:13px}.landing-grid{grid-template-columns:1fr!important;padding:10px 10px 28px;gap:9px}.landing-feature,.plan-card{border-radius:18px;padding:13px}.landing-feature strong,.plan-card strong{font-size:16px}.plan-card .price{font-size:24px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:12px 8px 34px;gap:8px}.shop-card{border-radius:16px}.shop-card img{aspect-ratio:1/0.88}.shop-card-body{padding:8px}.shop-card-body strong{min-height:31px;font-size:12px;line-height:1.25}.shop-card-body small{font-size:10px;margin:4px 0}.shop-card-body b{font-size:14px;margin-bottom:7px}.shop-card-body .btn{min-height:31px;font-size:11px;border-radius:11px;padding:0 6px}

  .admin-page{padding:0 8px 12px!important;overflow-x:hidden}.admin-fixed-inner{min-height:58px;padding:7px 8px;gap:8px}.admin-brand-mini{gap:8px}.admin-brand-mini strong{font-size:14px;max-width:calc(100vw - 36px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-brand-mini small{font-size:10px}.admin-top-links{display:grid!important;grid-template-columns:repeat(3,1fr);gap:6px}.admin-top-links .btn{min-height:32px!important;padding:0 8px!important;font-size:12px!important}.admin-with-fixed-top{padding-top:125px!important}.admin-title-block{margin-bottom:8px}.admin-title-block h1{font-size:22px}.admin-title-block p{font-size:12px;line-height:1.35}.admin-tabs{position:sticky;top:118px;z-index:145;display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding:7px 0;margin:0 0 10px;background:linear-gradient(180deg,var(--bg2),rgba(255,255,255,.72));backdrop-filter:blur(14px)}.admin-tabs a{flex:0 0 auto;padding:8px 10px;font-size:12px}.admin-section{border-radius:18px;padding:10px;margin-bottom:10px}.admin-section h2{font-size:18px;margin:0 0 10px}.admin-section h3{font-size:15px}.admin-grid{grid-template-columns:1fr!important;gap:9px}.admin-grid .full{grid-column:auto!important}.table-scroll{margin-top:8px;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.admin-table{min-width:680px;font-size:11px}.admin-table th,.admin-table td{padding:7px}.inline-actions{gap:4px}.inline-actions button,.inline-actions a{padding:6px 8px;font-size:11px}.config-logo-preview{align-items:flex-start;gap:8px}.config-logo-preview img{width:54px;height:54px;border-radius:15px}
}

@media (max-width:390px){
  .chatloja-app .header-actions.zap-actions #themeToggle{font-size:0}.chatloja-app .header-actions.zap-actions #themeToggle::before{content:'Tema';font-size:12px}
  .compact-online{grid-template-columns:1fr}.sidebar-online-block{max-height:110px}.shop-grid{grid-template-columns:1fr!important}.message-text{font-size:13px}.chat-heading h1{font-size:14px}.chat-heading p{font-size:10px}.product-card{grid-template-columns:48px minmax(0,1fr) auto!important}.product-img-btn{width:48px!important;height:48px!important}.mini-btn{min-width:28px;padding:0 6px}
}
