/* v567 Customer tablet sales UX
   Public ordering only. Restores full usable width when checkout is a sheet,
   keeps the landing page compact, and uses viewport/content width rather than device identity. */

body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"]{
  --customer-content-gutter-v567:clamp(12px,2.2vw,28px);
  --customer-content-max-v567:1240px;
}

/* Keep the customer header below the fixed operating-status bar instead of competing with it. */
body.shop-page.has-store-status-v290[data-staff-table-order="false"][data-staff-quick-order="false"] .shop-header{
  top:var(--store-status-height-v290,0px);
}

@media (min-width:761px) and (max-width:1279px){
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .shop-header{
    width:100%;
    min-height:0;
    padding:12px var(--customer-content-gutter-v567)!important;
    display:grid!important;
    grid-template-columns:minmax(220px,1fr) auto;
    grid-template-areas:"brand nav" "mode mode";
    align-items:center!important;
    gap:10px 16px;
  }
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .brand-lockup{grid-area:brand;min-width:0}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-nav-v306{grid-area:nav;min-width:0;margin:0!important;justify-content:flex-end}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .mode-switch{
    grid-area:mode;
    width:min(100%,520px)!important;
    margin:0!important;
    justify-self:start;
    padding:6px!important;
  }
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .mode-btn{min-height:42px;padding:10px 18px}

  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .premium-hero{
    width:min(var(--customer-content-max-v567),calc(100% - (2 * var(--customer-content-gutter-v567))))!important;
    max-width:var(--customer-content-max-v567)!important;
    min-height:300px!important;
    margin:16px auto 18px!important;
    padding:30px!important;
    border-radius:30px!important;
    grid-template-columns:minmax(0,1.35fr) minmax(220px,.65fr)!important;
    align-items:end!important;
    gap:22px;
  }
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-copy{padding:0!important;min-width:0}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-copy h1{
    font-size:clamp(42px,5.5vw,66px)!important;
    max-width:12ch!important;
    margin:14px 0 12px!important;
  }
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-copy p{font-size:17px!important;line-height:1.45;margin:0}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-actions{margin-top:18px}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-card{
    display:block!important;
    width:auto!important;
    margin:0!important;
    padding:18px!important;
    border-radius:22px!important;
  }
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-card strong{font-size:22px!important}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-location-v306{margin-top:14px;padding:10px 11px;border-radius:18px}

  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-benefits-v212{
    width:min(var(--customer-content-max-v567),calc(100% - (2 * var(--customer-content-gutter-v567))))!important;
    max-width:var(--customer-content-max-v567)!important;
    margin:0 auto 20px!important;
    padding:0!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px!important;
  }
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .benefit-v212{padding:11px 12px!important;min-width:0}

  /* Critical tablet fix: when checkout is a sheet, never reserve an empty desktop-cart column. */
  body.shop-page.category-first-v496[data-staff-table-order="false"][data-staff-quick-order="false"] .shop-shell,
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .shop-shell{
    display:block!important;
    width:min(var(--customer-content-max-v567),calc(100% - (2 * var(--customer-content-gutter-v567))))!important;
    max-width:var(--customer-content-max-v567)!important;
    margin:0 auto 76px!important;
    padding:0!important;
  }
  body.shop-page.category-first-v496[data-staff-table-order="false"][data-staff-quick-order="false"] .menu-column{display:block!important;width:100%!important;max-width:none!important}
  body.shop-page.category-first-v496[data-staff-table-order="false"][data-staff-quick-order="false"] .menu-toolbar{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(260px,360px)!important;
    gap:16px!important;
    align-items:end!important;
    margin:14px 0!important;
  }
  body.shop-page.category-first-v496[data-staff-table-order="false"][data-staff-quick-order="false"] .search-box{width:100%!important;min-width:0!important;margin:0!important}

  body.shop-page.category-first-v496[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-category-grid-v494{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
    gap:14px!important;
  }
  body.shop-page.category-first-v497[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-category-card-v494{
    min-height:244px!important;
    grid-template-rows:132px 1fr!important;
    border-radius:24px!important;
  }
  body.shop-page.category-first-v497[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-category-info-v494{padding:13px 14px!important;gap:6px!important}
  body.shop-page.category-first-v497[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-category-info-v494 strong{font-size:19px!important}

  body.shop-page.category-first-v496.category-selected-v494[data-staff-table-order="false"][data-staff-quick-order="false"] .menu-grid,
  body.shop-page.category-first-v496.category-searching-v494[data-staff-table-order="false"][data-staff-quick-order="false"] .menu-grid{
    display:grid!important;
    width:100%!important;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr))!important;
    gap:16px!important;
  }

  /* Cart is a centered responsive sheet throughout this content range. */
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] #mobile-cart-button.mobile-cart-button[style*="flex"]{
    display:flex!important;
    width:min(560px,calc(100% - 32px))!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
    bottom:max(16px,env(safe-area-inset-bottom,0px))!important;
  }
}

/* Narrow tablets / split view: keep everything one clean content column without oversized hero copy. */
@media (min-width:761px) and (max-width:879px){
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .shop-header{
    grid-template-columns:1fr;
    grid-template-areas:"brand" "nav" "mode";
  }
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-nav-v306{justify-content:flex-start;width:100%}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .premium-hero{grid-template-columns:1fr!important;padding:26px!important}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .hero-card{display:none!important}
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .customer-benefits-v212{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.shop-page.category-first-v496[data-staff-table-order="false"][data-staff-quick-order="false"] .menu-toolbar{grid-template-columns:1fr!important}
}

/* Large workspaces have room for the inline cart. Explicitly undo sheet-only presentation. */
@media (min-width:1280px){
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] #mobile-cart-button{display:none!important}
}

@media (prefers-reduced-motion:reduce){
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] *{scroll-behavior:auto!important}
}
