/* INVICTUS CELL — small-screen baseline for Android and iOS.
   Desktop layouts remain owned by their page styles. */
:root{--app-safe-top:env(safe-area-inset-top,0px);--app-safe-bottom:env(safe-area-inset-bottom,0px);--app-safe-left:env(safe-area-inset-left,0px);--app-safe-right:env(safe-area-inset-right,0px)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,svg,video{max-width:100%}
@media (max-width:900px){
  html{scroll-padding-top:calc(62px + var(--app-safe-top))}
  body{min-width:0;max-width:100%;overflow-x:clip}
  .wrap,.main,.checkout-wrapper,.left-column,.right-column,.card,.payment-card,.modal-body{min-width:0;max-width:100%}
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea{font-size:16px!important;max-width:100%;min-height:44px}
  textarea{min-height:96px}
  button,.btn,.h-btn,.icon-btn,.hamburger,.mobile-menu-btn,.bottom-nav a,.mobile-menu a.mm-link,.nav a{min-height:44px;touch-action:manipulation}
  button,a,summary{-webkit-tap-highlight-color:rgba(0,0,0,.09)}
  .main{padding-left:max(16px,var(--app-safe-left))!important;padding-right:max(16px,var(--app-safe-right))!important;padding-bottom:calc(24px + var(--app-safe-bottom))}
  .mobile-topbar,.mobile-header{padding-top:calc(10px + var(--app-safe-top))}
  .checkout-wrapper{width:100%;overflow:clip}
  .checkout-wrapper .left-column,.checkout-wrapper .right-column{width:100%;padding-inline:clamp(16px,4vw,24px)}
  .checkout-wrapper .form-row,.checkout-wrapper .bottom-actions{min-width:0}
  .checkout-wrapper .form-group,.checkout-wrapper .field,.checkout-wrapper .select-option{min-width:0;max-width:100%}
  .checkout-wrapper .opt-cost{white-space:normal;text-align:right}
  .checkout-wrapper .btn,.checkout-wrapper .bottom-actions button{min-height:48px}
  .cart-drawer,.mobile-menu,.mobile-search-overlay,.filter-sidebar{max-height:100vh;max-height:100dvh;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .cart-footer{padding-bottom:max(18px,var(--app-safe-bottom))}
  .bottom-nav{height:auto;min-height:calc(var(--bottomnav-h,60px) + var(--app-safe-bottom));padding-bottom:var(--app-safe-bottom)}
  .tabs,.table-scroll,.cat-nav{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .tabs::-webkit-scrollbar,.cat-nav::-webkit-scrollbar{display:none}
  .tabs a{min-height:44px;display:inline-flex;align-items:center;white-space:nowrap}
  .stats,.form-grid,.form-row-grid,.smtp-grid{min-width:0}
  .table-card{max-width:100%;overflow:hidden}
  .co-toast-container{bottom:calc(16px + var(--app-safe-bottom))}
  :focus-visible{outline:2px solid var(--primary,var(--accent,#222));outline-offset:2px}
}
@media (max-width:480px){
  .wrap{padding-inline:16px}
  .grid-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .grid-products .card{min-width:0}
  .grid-products .card-body{overflow-wrap:anywhere}
  .grid-products .card-foot .btn{min-height:44px}
  .checkout-wrapper .left-column,.checkout-wrapper .right-column{padding-block:22px}
  .checkout-wrapper .form-row{flex-direction:column}
  .checkout-wrapper .form-row .form-group{width:100%}
  .main{padding-left:max(16px,var(--app-safe-left))!important;padding-right:max(16px,var(--app-safe-right))!important}
  .stats{grid-template-columns:1fr}
  .card,.payment-card{max-width:100%}
}
@media (max-width:360px){
  .grid-products{gap:8px}
  .grid-products .card-body{padding:9px}
  .grid-products .card h3{font-size:12px;line-height:1.35}
  .checkout-wrapper .left-column,.checkout-wrapper .right-column{padding-inline:14px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}

@media (max-width:340px){.grid-products{grid-template-columns:1fr}.grid-products .card-thumb{height:190px}}
@media (max-width:768px){body:has(input:focus) .bottom-nav,body:has(textarea:focus) .bottom-nav{transform:translateY(120%);pointer-events:none}}
