/* =========================================================
   VERSITECH — MOBILE-FIX.CSS
========================================================= */

/* ---------- MOBILE VIEWPORT UNLOCK ---------- */
html,body{
  max-width:100vw!important;
  overflow-x:hidden!important;
  box-sizing:border-box!important;
}
body.catalog-page .catalog-header-store .catalog-logo{
  min-width:0!important;
  max-width:100%!important;
  padding:0 10px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.catalog-page .catalog-header-store .store-search-shell{
  min-width:0!important;
  max-width:100%!important;
}
body.catalog-page .store-department-grid,
body.catalog-page .catalog-product-grid{
  min-width:0!important;
}

/* ---------- MOBILE HEADER AND HERO LAYOUT ---------- */
@media(max-width:1023px){
  body.catalog-page .catalog-header-store{
    width:100%;max-width:100%;min-width:0;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:58px 56px 44px!important;
    gap:0!important;padding:0 4vw!important;
  }
  body.catalog-page .catalog-header-store .catalog-logo{
    position:static;transform:none;height:auto;
    grid-column:1;grid-row:1;justify-self:start;
  }
  body.catalog-page .catalog-header-store .catalog-header-actions{
    grid-column:2!important;grid-row:1!important;
    padding:0!important;justify-self:end;
  }
  body.catalog-page .catalog-header-store .store-search-shell{
    grid-column:1/-1!important;grid-row:2!important;
    display:grid;grid-template-columns:76px minmax(0,1fr) 48px!important;
    width:100%!important;height:48px!important;
    margin:0!important;align-self:center;box-sizing:border-box;
  }
  body.catalog-page .catalog-header-store .store-search-shell select,
  body.catalog-page .catalog-header-store .store-search-shell input,
  body.catalog-page .catalog-header-store .store-search-shell button{
    width:100%;min-width:0;max-width:100%;height:100%;box-sizing:border-box;
  }
  body.catalog-page .catalog-header-store .catalog-nav{
    grid-column:1/-1!important;grid-row:3!important;
    width:100%!important;min-width:0;max-width:100%;
    margin:0!important;padding:0!important;box-sizing:border-box;
    display:flex;flex-direction:row;flex-wrap:nowrap;
    justify-content:flex-start!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;
    overscroll-behavior-x:contain;touch-action:pan-x pan-y;
    height:44px;align-self:stretch;
  }
  body.catalog-page .catalog-header-store .catalog-nav::-webkit-scrollbar{display:none}
  body.catalog-page .catalog-header-store .catalog-nav > a{
    flex:0 0 auto;white-space:nowrap;
  }
  body.catalog-page .store-hero,
  body.catalog-page .catalog-hero-inner{
    grid-template-columns:minmax(0,1fr)!important;
  }
  body.catalog-page .store-hero-copy{min-width:0;width:100%}
  body.catalog-page .store-hero-media,
  body.catalog-page .catalog-hero-media{
    width:100%;max-width:100%;box-sizing:border-box;
    justify-self:stretch;
  }
}

/* ---------- DESKTOP HEADER LAYOUT ---------- */
@media(min-width:1024px){
  body.catalog-page .store-hero{
    grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr)!important;
  }
  body.catalog-page .catalog-hero-inner{
    grid-template-columns:minmax(0,1fr) minmax(0,.95fr)!important;
  }
  body.catalog-page .catalog-header-store{
    grid-template-columns:minmax(140px,200px) minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    padding:14px 4vw 0!important;
    gap:0 16px!important;
  }
  body.catalog-page .catalog-header-store .catalog-logo{
    grid-column:1!important;
    grid-row:1!important;
  }
  body.catalog-page .catalog-header-store .store-search-shell{
    grid-column:2!important;
    grid-row:1!important;
    height:56px!important;
    width:100%!important;
    max-width:100%!important;
    border-radius:14px!important;
    display:grid;grid-template-columns:110px minmax(0,1fr) 64px!important;
    box-sizing:border-box;
  }
  body.catalog-page .catalog-header-store .store-search-shell select,
  body.catalog-page .catalog-header-store .store-search-shell input,
  body.catalog-page .catalog-header-store .store-search-shell button{
    height:100%;box-sizing:border-box;
  }
  body.catalog-page .catalog-header-store .store-search-shell input{
    font-size:17px!important;
    padding:0 22px!important;
  }
  body.catalog-page .catalog-header-store .store-search-shell select{
    min-width:110px!important;
    font-size:14px!important;
  }
  body.catalog-page .catalog-header-store .store-search-shell button{
    min-width:64px!important;
    font-size:22px!important;
  }
  body.catalog-page .catalog-header-store .catalog-header-actions{
    grid-column:3!important;
    grid-row:1!important;
    padding:0!important;
  }
  body.catalog-page .catalog-header-store .catalog-nav{
    grid-column:1/-1!important;
    grid-row:2!important;
    margin:10px 0 0!important;
    padding:0!important;
    width:100%;min-width:0;box-sizing:border-box;
    overflow-x:auto!important;
    justify-content:flex-start!important;
  }
}

/* ---------- DEPARTMENT TILE AND INSTALL PROMPT CONTAINMENT ---------- */
body.catalog-page .store-department-grid > .photo-dept-card{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  grid-template-columns:minmax(0,1fr);
}
body.catalog-page .store-department-grid > .photo-dept-card > div{
  grid-column:1;
  justify-self:stretch;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow-wrap:anywhere;
}
body.catalog-page .vt-app-install{
  left:auto;
  right:max(16px,env(safe-area-inset-right));
  width:min(360px,calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  box-sizing:border-box;
}
body.catalog-page .vt-app-install > div{
  flex:1 1 0;
  min-width:0;
  overflow-wrap:anywhere;
}
body.catalog-page .vt-app-install strong,
body.catalog-page .vt-app-install small{
  white-space:normal;
}
body.catalog-page .vt-app-install button{
  flex:0 0 auto;
}
