/* Shared customer mobile system. Desktop styles remain owned by styles.css and retail.css. */
.customer-mobile-shell {
  display: none;
}

.mobile-debug-panel {
  display: none;
}

@media (max-width: 860px) {
  :root {
    --mobile-gutter: clamp(12px, 4vw, 16px);
    --mobile-section-space: clamp(30px, 9vw, 46px);
    --mobile-card-radius: 20px;
    --mobile-green: #0b5138;
    --mobile-green-dark: #073d2b;
    --mobile-cream: #fffaf1;
    --mobile-orange: #f4a62a;
    --mobile-text: #1f241f;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  body.has-customer-mobile-shell {
    padding-top: var(--customer-mobile-header-height, 108px);
  }

  body.mobile-scroll-locked {
    position: fixed;
    top: calc(-1 * var(--mobile-lock-scroll, 0px));
    right: 0;
    left: 0;
    width: 100%;
  }

  img,
  picture,
  video,
  canvas,
  svg {
    max-width: 100%;
  }

  button,
  a,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }

  .customer-mobile-shell {
    position: relative;
    z-index: 20000;
    display: block;
  }

  .customer-mobile-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20010;
    display: grid;
    gap: 7px;
    width: 100%;
    padding: max(7px, env(safe-area-inset-top)) var(--mobile-gutter) 9px;
    background: rgba(255, 250, 241, 0.92);
    border-bottom: 1px solid rgba(11, 81, 56, 0.1);
    box-shadow: 0 8px 24px rgba(17, 54, 39, 0.1);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    backdrop-filter: blur(18px) saturate(1.12);
    transition: padding 200ms ease, background 200ms ease, box-shadow 200ms ease;
  }

  .customer-mobile-header.is-compact {
    gap: 5px;
    padding-bottom: 6px;
    background: rgba(255, 250, 241, 0.97);
    box-shadow: 0 10px 28px rgba(17, 54, 39, 0.14);
  }

  .customer-mobile-header-row {
    display: grid;
    grid-template-columns: 44px 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
  }

  .customer-mobile-menu-button,
  .customer-mobile-drawer-heading button {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(11, 81, 56, 0.15);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--mobile-green);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }

  .customer-mobile-menu-button {
    flex-direction: column;
    gap: 4px;
    padding: 0;
  }

  .customer-mobile-menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .customer-mobile-brand {
    display: grid;
    width: 52px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
  }

  .customer-mobile-brand img,
  .customer-mobile-drawer-heading img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .customer-mobile-page-name {
    min-width: 0;
    overflow: hidden;
    color: var(--mobile-text);
    font-size: 0.82rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customer-mobile-actions {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .customer-mobile-account,
  .customer-mobile-context {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 12px;
    padding: 0 9px;
    background: rgba(11, 81, 56, 0.1);
    color: var(--mobile-green);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
  }

  .customer-mobile-context {
    color: #fff;
    background: var(--mobile-green);
    cursor: pointer;
  }

  .customer-mobile-context span {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    padding-inline: 5px;
    background: var(--mobile-orange);
    color: #261706;
    font-size: 0.68rem;
  }

  .customer-mobile-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    width: 100%;
    min-width: 0;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .customer-mobile-search input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(11, 81, 56, 0.14);
    border-radius: 13px;
    padding: 0 13px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--mobile-text);
    outline: none;
  }

  .customer-mobile-search input:focus {
    border-color: var(--mobile-green);
    box-shadow: 0 0 0 3px rgba(11, 81, 56, 0.12);
  }

  .customer-mobile-search button {
    min-width: 68px;
    min-height: 44px;
    border: 0;
    border-radius: 13px;
    padding: 0 11px;
    background: var(--mobile-orange);
    color: #251706;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
  }

  .customer-mobile-header.is-compact .customer-mobile-header-row {
    min-height: 40px;
  }

  .customer-mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 20020;
    display: block;
    width: 100%;
    height: 100dvh;
    border: 0;
    background: rgba(8, 24, 18, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  .customer-mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 20030;
    display: flex;
    width: min(86vw, 340px);
    height: 100dvh;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: max(14px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    background: var(--mobile-green-dark);
    color: #fffaf1;
    box-shadow: 26px 0 60px rgba(0, 0, 0, 0.3);
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    overscroll-behavior: contain;
  }

  .customer-mobile-nav-open .customer-mobile-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .customer-mobile-nav-open .customer-mobile-drawer {
    transform: translateX(0);
  }

  .customer-mobile-drawer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 250, 241, 0.14);
  }

  .customer-mobile-drawer-heading a {
    display: block;
    width: 112px;
    height: 52px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
  }

  .customer-mobile-drawer-heading button {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0 12px;
  }

  .customer-mobile-drawer nav {
    display: grid;
    margin-top: 12px;
  }

  .customer-mobile-drawer nav a {
    display: flex;
    min-height: 50px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 250, 241, 0.11);
    color: #fffaf1;
    font-size: 1rem;
    font-weight: 750;
    text-decoration: none;
  }

  .customer-mobile-drawer nav a:focus-visible,
  .customer-mobile-drawer nav a:active {
    color: #ffd17e;
  }

  .customer-mobile-drawer-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
  }

  .customer-mobile-drawer-footer a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 250, 241, 0.1);
    color: #fffaf1;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
  }

  /* Retire page-specific customer headers on mobile. */
  .retail-home .site-header.retail-header,
  .account-page > .site-header,
  .cafe-body > .site-header,
  .search-page > .search-page-header {
    display: none !important;
  }

  .retail-home .mobile-top-stack {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
  }

  .retail-home .campaign-notice {
    position: relative;
    z-index: 2;
  }

  /* Shared mobile page sizing and rhythm. */
  .retail-container,
  .search-page-main,
  .account-main,
  .cafe-page,
  .cafe-ordering-surface,
  .cafe-my-orders,
  .cafe-confirmation {
    width: calc(100% - (2 * var(--mobile-gutter))) !important;
    max-width: 720px !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  .retail-section {
    min-height: 0 !important;
    padding: var(--mobile-section-space) 0 !important;
  }

  .retail-section-heading {
    gap: 12px;
    margin-bottom: 18px;
  }

  .retail-section-heading h2,
  .section-heading h2,
  .account-dashboard h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    line-height: 1.05;
  }

  .btn,
  .small-button,
  .text-button {
    min-height: 44px;
  }

  .mobile-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .mobile-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Homepage */
  body.retail-home main {
    min-width: 0;
  }

  body.retail-home .retail-hero.hero {
    min-height: 0 !important;
    padding: 10px 0 18px !important;
  }

  .retail-home .campaign-hero-grid {
    min-height: 0 !important;
    gap: 10px;
  }

  .retail-home .campaign-carousel,
  .retail-home .campaign-primary,
  .retail-home .campaign-secondary {
    min-width: 0;
    min-height: 0 !important;
    border-radius: var(--mobile-card-radius);
  }

  /* A flex carousel inherits the tallest hidden slide. Mobile promotions can
     have very different artwork ratios, so size the track to the active slide. */
  .retail-home .campaign-carousel-track {
    position: relative;
    display: block;
    min-height: 0 !important;
    transform: none !important;
    transition: none !important;
  }

  .retail-home .campaign-carousel .campaign-primary {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 280ms ease;
  }

  .retail-home .campaign-carousel .campaign-primary.is-active {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .retail-home .campaign-primary[data-layout="split"],
  .retail-home .campaign-primary[data-layout="product_feature"],
  .retail-home .campaign-primary[data-image-type="full_flyer"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .retail-home .campaign-primary[data-layout="split"] .campaign-primary-media,
  .retail-home .campaign-primary[data-layout="product_feature"] .campaign-primary-media,
  .retail-home .campaign-primary[data-image-type="full_flyer"] .campaign-primary-media {
    grid-column: 1;
    grid-row: 1;
  }

  .retail-home .campaign-primary[data-layout="split"] .campaign-primary-copy,
  .retail-home .campaign-primary[data-layout="product_feature"] .campaign-primary-copy,
  .retail-home .campaign-primary[data-image-type="full_flyer"] .campaign-primary-copy {
    grid-column: 1;
    grid-row: 2;
  }

  .retail-home .campaign-primary-media {
    position: relative;
    width: 100%;
    height: clamp(220px, 66vw, 310px) !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  .retail-home .campaign-primary-media img {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: var(--campaign-mobile-fit, cover);
  }

  .retail-home .campaign-primary[data-image-type="full_flyer"] .campaign-primary-media img {
    object-fit: contain;
    background: #fffaf1;
  }

  .retail-home .campaign-primary-copy {
    width: 100%;
    min-height: 0;
    gap: 7px;
    padding: 14px !important;
  }

  .retail-home .campaign-primary h1,
  .retail-home .campaign-primary h2,
  .retail-home .retail-hero h1 {
    max-width: 100%;
    margin: 0;
    font-size: clamp(2rem, 9.5vw, 2.75rem) !important;
    line-height: 1;
  }

  .retail-home .campaign-primary .hero-subtitle {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
  }

  .retail-home .campaign-primary .retail-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
  }

  .retail-home .campaign-primary .retail-hero-actions .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }

  .retail-home .campaign-carousel-controls {
    right: 9px;
    bottom: 9px;
    max-width: calc(100% - 18px);
  }

  /* Image-backed promotions become a compact, image-first card on mobile. The
     normal copy layout remains the fallback when an image is missing or fails. */
  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto;
    min-height: 0 !important;
    overflow: hidden;
    background: rgba(255, 253, 248, 0.96) !important;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .campaign-primary-media {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    display: grid;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    place-items: center;
    padding: 0 !important;
    overflow: hidden;
    background: #fffdf8;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .campaign-primary-media img {
    position: relative !important;
    inset: auto;
    display: block;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(72svh, 620px);
    min-height: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    will-change: auto !important;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .campaign-primary-scrim,
  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .campaign-flyer-support {
    display: none !important;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .campaign-primary-copy {
    grid-column: 1;
    grid-row: 3;
    display: none;
    width: 100%;
    min-height: 0;
    padding: 8px 12px 12px !important;
    background: transparent !important;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image.has-mobile-campaign-action:not(.promotion-image-unavailable) .campaign-primary-copy {
    display: block;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .campaign-primary-copy > :not(.retail-hero-actions),
  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .retail-hero-actions .btn:not(.mobile-campaign-cta) {
    display: none !important;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .retail-hero-actions {
    display: flex;
    width: 100%;
    margin: 0;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) .retail-hero-actions .mobile-campaign-cta {
    display: inline-flex;
    width: auto;
    min-height: 40px;
    padding: 8px 15px;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) > .campaign-carousel-controls {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    width: fit-content;
    height: fit-content;
    max-width: calc(100% - 24px);
    margin: 6px 0 0 12px;
    padding: 4px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 7px 20px rgba(22, 43, 30, 0.15);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) > .campaign-flyer-open {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    min-height: 34px;
    margin: 6px 12px 0 0;
    padding: 7px 10px;
    font-size: 0;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) > .campaign-flyer-open::after {
    content: "Full ad";
    font-size: 0.72rem;
  }

  .retail-home .campaign-primary.has-mobile-promotion-image:not(.promotion-image-unavailable) > .campaign-carousel-controls :is(.campaign-carousel-arrow, .campaign-carousel-toggle) {
    min-width: 32px;
    min-height: 32px;
    padding-inline: 7px;
  }

  .retail-home .campaign-primary.promotion-image-unavailable .campaign-primary-media {
    display: none;
  }

  .retail-home .service-band {
    position: relative;
    min-height: 0;
    padding: 10px 0 18px;
  }

  .retail-home .service-band-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(136px, 42vw, 166px);
    grid-template-columns: none;
    gap: 9px;
    width: calc(100% - (2 * var(--mobile-gutter))) !important;
    max-width: 720px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 26px 3px 0;
    scroll-padding-inline: 0 26px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .retail-home .service-band-grid::-webkit-scrollbar,
  .retail-home .retail-product-rail::-webkit-scrollbar,
  .account-sidebar::-webkit-scrollbar,
  .account-quick-actions::-webkit-scrollbar {
    display: none;
  }

  .retail-home .service-band-grid > * {
    min-width: 0;
    min-height: 70px;
    scroll-snap-align: start;
  }

  .retail-home .retail-department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .retail-home .retail-department-card {
    min-width: 0;
    border-radius: 16px;
  }

  .retail-home .retail-department-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .retail-home .retail-department-card span {
    min-width: 0;
    padding: 11px;
  }

  .retail-home .retail-department-card strong {
    overflow-wrap: anywhere;
  }

  .retail-home .deals-section,
  .retail-home .deals-content-grid,
  .retail-home .deals-browser,
  .retail-home .weekly-deal-results,
  .retail-home .weekly-flyer-deals {
    min-height: 0 !important;
  }

  .retail-home .deals-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
  }

  .retail-home .deals-content-grid > * {
    min-width: 0;
  }

  .retail-home .deal-discovery-toolbar.hidden,
  .retail-home .weekly-deal-results.hidden,
  .retail-home .weekly-flyer-deals.hidden,
  .retail-home .weekly-flyer-section.hidden {
    display: none !important;
  }

  .retail-home .deal-discovery-toolbar {
    gap: 9px;
    margin-bottom: 12px;
  }

  .retail-home .deal-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .retail-home .deal-filter-row::-webkit-scrollbar {
    display: none;
  }

  .retail-home .retail-product-rail,
  .retail-home .deals-content-grid > .retail-product-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 78%);
    grid-template-columns: none;
    min-height: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .retail-home .homepage-flyer-card {
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .retail-home .weekly-flyer-image-button,
  .retail-home .weekly-flyer-image-button img {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(70dvh, 640px);
    object-fit: contain;
  }

  .retail-home .cafe-feature-grid,
  .retail-home .inventory-feature,
  .retail-home .international-feature-grid,
  .retail-home .catering-feature-grid,
  .retail-home .store-card,
  .retail-home .contact-retail-grid {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
  }

  /* Account */
  .account-page .account-main {
    min-height: 0;
    padding: 18px 0 42px;
  }

  .account-page .account-auth-view {
    min-height: 0;
    align-content: start;
    gap: 18px;
    padding-top: 8px;
  }

  .account-page .account-auth-heading {
    width: 100%;
    text-align: left;
  }

  .account-page .account-auth-heading h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
    line-height: 1.03;
  }

  .account-page .account-auth-card {
    width: 100%;
    gap: 12px;
    padding: 14px;
    border-radius: var(--mobile-card-radius);
  }

  .account-page .account-form {
    gap: 12px;
    padding: 2px;
  }

  .account-page .account-form label,
  .account-page .inline-account-form label {
    min-width: 0;
  }

  .account-page .account-form input,
  .account-page .inline-account-form input {
    width: 100%;
    min-height: 48px;
  }

  .account-page .account-dashboard {
    gap: 14px;
  }

  .account-page .account-dashboard-hero {
    display: grid;
    align-items: start;
    gap: 12px;
    padding: 18px;
    border-radius: var(--mobile-card-radius);
  }

  .account-page .account-dashboard-hero .btn {
    justify-self: start;
  }

  .account-page .account-quick-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 44%);
    grid-template-columns: none;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    margin: 0;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .account-page .account-quick-actions .btn {
    width: 100%;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .account-page .account-portal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .account-page .account-sidebar {
    position: sticky;
    top: calc(var(--customer-mobile-header-height, 108px) + 6px);
    z-index: 40;
    display: flex;
    width: 100%;
    gap: 5px;
    overflow-x: auto;
    padding: 6px;
    border-radius: 16px;
    scrollbar-width: none;
  }

  .account-page .account-sidebar button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 8px 11px;
    white-space: nowrap;
  }

  .account-page .dashboard-card {
    min-width: 0;
    min-height: 0;
    padding: 16px;
    border-radius: var(--mobile-card-radius);
  }

  .account-page .dashboard-metrics,
  .account-page .account-deal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .account-page .preferred-store-card,
  .account-page .dashboard-card-heading,
  .account-page .help-actions,
  .account-page .inline-account-form,
  .account-page .verification-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-page .store-hours-pill {
    align-self: flex-start;
  }

  .account-page .account-details-list dd {
    overflow-wrap: anywhere;
  }

  /* Product search */
  .search-page .search-page-main {
    display: grid;
    gap: 22px;
    padding: 18px 0 42px;
  }

  .search-page .search-hero-panel,
  .search-page .search-results-section {
    width: 100%;
    min-width: 0;
    padding: 16px;
    border-radius: var(--mobile-card-radius);
  }

  .search-page .search-hero-panel h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
    line-height: 1.03;
  }

  .search-page .search-page-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .search-page .search-page-form input,
  .search-page .search-page-form button {
    min-height: 48px;
  }

  .search-page .search-page-form button {
    min-width: 72px;
    padding-inline: 10px;
  }

  .search-page .search-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .search-page .search-filter-bar label,
  .search-page .search-filter-bar select {
    min-width: 0;
    width: 100%;
  }

  .search-page .search-results-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .search-page .search-page-card {
    min-width: 0;
  }

  .search-page .shopping-list-fab {
    display: none;
  }

  /* Cafe ordering and checkout: one page scroll, one overlay scroll. */
  .cafe-body {
    background-attachment: scroll !important;
  }

  .cafe-body .cafe-page {
    width: 100% !important;
    max-width: none !important;
    min-height: 0;
    padding: 14px 0 calc(94px + env(safe-area-inset-bottom)) !important;
  }

  .cafe-body .cafe-ordering-surface {
    width: calc(100% - (2 * var(--mobile-gutter))) !important;
    max-width: 720px !important;
    margin-top: 0 !important;
    padding: 13px !important;
    border-radius: var(--mobile-card-radius) !important;
  }

  .cafe-body .cafe-ordering-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 10px;
  }

  .cafe-body .cafe-ordering-header h2 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    line-height: 1.04;
  }

  .cafe-body .cafe-ordering-header > .btn {
    width: 100%;
  }

  .cafe-body .menu-poster-details summary {
    min-height: 52px;
    padding: 10px 12px;
  }

  .cafe-body .menu-poster-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 0 10px 10px;
  }

  .cafe-body .menu-poster-card {
    padding: 10px;
    border-radius: 16px;
  }

  .cafe-body .menu-poster-card img {
    width: 100%;
    height: auto;
    max-height: 72dvh;
    object-fit: contain;
  }

  .cafe-body .cafe-category-nav {
    position: sticky;
    top: calc(var(--customer-mobile-header-height, 108px) + 6px) !important;
    z-index: 50;
    display: flex;
    gap: 6px;
    width: 100%;
    margin: 10px 0 14px !important;
    overflow-x: auto;
    padding: 6px;
    border-radius: 15px;
    scroll-padding-inline: 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .cafe-body .cafe-category-nav::-webkit-scrollbar {
    display: none;
  }

  .cafe-body .cafe-category-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 8px 12px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .cafe-body .cafe-order-layout,
  .cafe-body .cafe-popular-grid,
  .cafe-body .cafe-menu-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0;
  }

  .cafe-body .cafe-order-layout {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .cafe-body .cafe-menu-column,
  .cafe-body .cafe-menu-list,
  .cafe-body .cafe-menu-category {
    min-width: 0;
  }

  .cafe-body .cafe-menu-column > .cafe-section,
  .cafe-body .cafe-popular-section {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
  }

  .cafe-body .cafe-menu-category {
    padding: 12px;
    border-radius: 18px;
  }

  .cafe-body .cafe-menu-card {
    min-height: 0;
    gap: 12px;
    padding: 14px;
    border-radius: 17px;
  }

  .cafe-body .cafe-menu-card-bottom {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 10px;
  }

  .cafe-body .cafe-menu-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .cafe-body .cafe-menu-actions button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 8px;
  }

  .cafe-body .cafe-cart {
    position: fixed !important;
    inset: 0 !important;
    z-index: 21000 !important;
    display: block;
    width: 100% !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: max(10px, env(safe-area-inset-top)) var(--mobile-gutter) calc(22px + env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fffaf1 !important;
    box-shadow: none;
    opacity: 1 !important;
    pointer-events: none;
    transform: translateY(105%) !important;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.cart-drawer-open .cafe-cart {
    pointer-events: auto;
    transform: translateY(0) !important;
  }

  .cafe-body .cart-drawer-close {
    position: sticky;
    top: 0;
    z-index: 5;
    display: inline-flex;
    float: right;
    min-width: 64px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    border: 1px solid rgba(11, 81, 56, 0.28);
    border-radius: 13px;
    background: #eef5ef;
    color: var(--mobile-green);
    font-weight: 900;
  }

  .cafe-body .cart-drawer-close:hover,
  .cafe-body .cart-drawer-close:focus-visible {
    border-color: var(--mobile-green);
    background: var(--mobile-green);
    color: #fff;
  }

  .cafe-body .cafe-cart-heading {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 54px;
    margin: 0 -4px 8px;
    padding: 7px 76px 8px 4px;
    background: rgba(255, 250, 241, 0.96);
  }

  .cafe-body .cafe-cart-heading > div {
    min-width: 0;
  }

  .cafe-body #clearCartButton {
    width: auto !important;
    min-width: 54px;
    min-height: 36px;
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid rgba(143, 44, 32, 0.36);
    background: #fff0ea;
    color: #8f2c20;
    box-shadow: none;
  }

  .cafe-body #clearCartButton:hover,
  .cafe-body #clearCartButton:focus-visible {
    border-color: #9f3529;
    background: #9f3529;
    color: #fff;
  }

  .cafe-body .cafe-cart-heading h2 {
    font-size: 1.45rem;
  }

  .cafe-body .checkout-step {
    gap: 9px;
    margin-bottom: 10px;
    padding: 11px;
    border-radius: 16px;
  }

  .cafe-body .cafe-cart-items {
    max-height: none !important;
    overflow: visible !important;
    gap: 8px;
  }

  .cafe-body .cafe-cart-item {
    display: grid;
    gap: 7px;
    padding: 10px;
    border-radius: 14px;
  }

  .cafe-body .cafe-cart-item-top {
    align-items: start;
    gap: 8px;
  }

  .cafe-body .cafe-cart-item-top .text-button {
    min-height: 36px;
    padding: 5px 7px;
    font-size: 0.78rem;
  }

  .cafe-body .cafe-cart-item-top .text-button.danger {
    border: 1px solid rgba(143, 44, 32, 0.3);
    background: #fff0ea;
    color: #8f2c20;
  }

  .cafe-body .cafe-cart-item-top .text-button.danger:hover,
  .cafe-body .cafe-cart-item-top .text-button.danger:focus-visible {
    border-color: #9f3529;
    background: #9f3529;
    color: #fff;
  }

  .cafe-body .cart-option-list,
  .cafe-body .cart-note {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .cafe-body .cafe-quantity-controls {
    gap: 6px;
  }

  .cafe-body .cafe-quantity-controls button {
    width: 44px;
    height: 44px;
  }

  .cafe-body .cafe-cart-summary {
    position: sticky !important;
    top: 54px;
    bottom: auto !important;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 0 0 10px !important;
    padding: 9px !important;
    border: 1px solid rgba(11, 81, 56, 0.12);
    border-radius: 15px;
    background: rgba(255, 250, 241, 0.97) !important;
    box-shadow: 0 8px 20px rgba(17, 54, 39, 0.08);
  }

  .cafe-body .cafe-cart-summary div {
    display: grid;
    gap: 1px;
    align-content: start;
  }

  .cafe-body .cafe-cart-summary span {
    font-size: 0.68rem;
    font-weight: 800;
  }

  .cafe-body .cafe-cart-summary div:nth-child(2) span,
  .cafe-body .cafe-cart-summary div:nth-child(3) span {
    font-size: 0;
  }

  .cafe-body .cafe-cart-summary div:nth-child(2) span::after {
    content: "Tax";
    font-size: 0.68rem;
  }

  .cafe-body .cafe-cart-summary div:nth-child(3) span::after {
    content: "Total";
    font-size: 0.68rem;
  }

  .cafe-body .cafe-cart-summary strong {
    font-size: 1rem;
  }

  .cafe-body .cafe-cart-summary small {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .cafe-body .cafe-checkout-form,
  .cafe-body .cafe-payment-methods,
  .cafe-body .stripe-online-panel,
  .cafe-body .checkout-requirement-card {
    min-width: 0;
  }

  .cafe-body .checkout-actions {
    position: sticky;
    bottom: calc(-1 * env(safe-area-inset-bottom));
    z-index: 4;
    margin: 10px -4px 0;
    padding: 10px 4px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255, 250, 241, 0), #fffaf1 18%);
  }

  .cafe-body .checkout-actions .btn {
    width: 100%;
    min-height: 50px;
  }

  .cafe-body .mobile-cart-toggle {
    right: var(--mobile-gutter) !important;
    bottom: max(var(--mobile-gutter), env(safe-area-inset-bottom)) !important;
    left: var(--mobile-gutter) !important;
    z-index: 19000 !important;
    width: auto;
    max-width: 720px;
    min-height: 56px;
    margin-inline: auto;
  }

  body.cart-drawer-open .mobile-cart-toggle,
  body.cart-drawer-open .customer-mobile-header,
  body.customization-open .customer-mobile-header,
  body.cart-drawer-open .support-widget,
  body.customization-open .support-widget {
    display: none !important;
  }

  .cafe-body .cafe-my-orders,
  .cafe-body .cafe-confirmation {
    padding: var(--mobile-section-space) 0 0 !important;
  }

  .cafe-body .customization-modal {
    position: fixed;
    inset: 0;
    z-index: 22000;
    align-items: stretch;
    width: 100%;
    height: 100dvh;
    padding: 0;
  }

  .cafe-body .customization-panel {
    display: flex;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    flex-direction: column;
    overflow: hidden;
    padding: max(12px, env(safe-area-inset-top)) var(--mobile-gutter) max(14px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }

  .cafe-body .customization-heading {
    flex: 0 0 auto;
    min-height: 54px;
  }

  .cafe-body .customization-form {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .cafe-body .customization-form > .btn {
    position: sticky;
    bottom: 0;
    width: 100%;
    min-height: 50px;
  }

  /* Shared customer overlays */
  .deals-drawer,
  .flyer-modal,
  .shopping-list-drawer {
    z-index: 21000 !important;
  }

  .deals-drawer-panel,
  .shopping-list-panel {
    width: 100% !important;
    max-width: none !important;
    max-height: min(92dvh, 900px) !important;
    border-radius: 22px 22px 0 0 !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    overscroll-behavior: contain;
  }

  .flyer-modal-panel {
    width: calc(100% - (2 * var(--mobile-gutter))) !important;
    max-height: calc(100dvh - (2 * var(--mobile-gutter))) !important;
    overflow: auto;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .flyer-modal-panel img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  body.deals-drawer-open .customer-mobile-header,
  body.flyer-modal-open .customer-mobile-header,
  body.shopping-list-open .customer-mobile-header,
  body.deals-drawer-open .support-widget,
  body.flyer-modal-open .support-widget,
  body.shopping-list-open .support-widget {
    visibility: hidden;
    pointer-events: none;
  }

  body.customer-mobile-nav-open .support-widget {
    visibility: hidden;
    pointer-events: none;
  }

  .support-widget {
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    z-index: 18000 !important;
  }

  .support-toggle {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 4px !important;
  }

  .support-toggle > span {
    display: none !important;
  }

  .support-panel {
    right: 0 !important;
    bottom: 54px !important;
    width: min(calc(100vw - (2 * var(--mobile-gutter))), 390px) !important;
    max-height: min(72dvh, 620px) !important;
  }

  .mobile-debug-panel {
    position: fixed;
    right: 8px;
    bottom: 8px;
    z-index: 30000;
    display: block;
    padding: 6px 8px;
    border-radius: 7px;
    background: #111;
    color: #fff;
    font: 700 11px/1.2 monospace;
  }

  .mobile-debug-overflow {
    outline: 3px solid #e20 !important;
    outline-offset: -3px;
  }
}

@media (max-width: 360px) {
  .customer-mobile-header-row {
    grid-template-columns: 44px 46px minmax(0, 1fr) auto;
    gap: 5px;
  }

  .customer-mobile-brand {
    width: 46px;
  }

  .customer-mobile-page-name {
    display: none;
  }

  .customer-mobile-header-row {
    grid-template-columns: 44px 46px minmax(0, 1fr);
  }

  .customer-mobile-actions {
    justify-self: end;
  }

  .customer-mobile-account,
  .customer-mobile-context {
    padding-inline: 7px;
    font-size: 0.7rem;
  }

  .customer-mobile-search button {
    min-width: 54px;
    font-size: 0;
  }

  .customer-mobile-search button::before {
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
  }

  .customer-mobile-search button::after {
    width: 7px;
    height: 2px;
    margin: -4px 0 0 12px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
  }

  .retail-home .retail-department-grid {
    gap: 9px;
  }

  .retail-home .retail-department-card span {
    padding: 9px;
  }

  .cafe-body .cafe-menu-card-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) and (orientation: landscape) and (max-height: 560px) {
  body.has-customer-mobile-shell {
    padding-top: var(--customer-mobile-header-height, 60px);
  }

  .customer-mobile-header {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 48%);
    align-items: center;
  }

  .customer-mobile-header-row {
    grid-column: 1;
  }

  .customer-mobile-search {
    grid-column: 2;
  }

  .cafe-body .cafe-category-nav,
  .account-page .account-sidebar {
    top: calc(var(--customer-mobile-header-height, 60px) + 4px) !important;
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .customer-mobile-header,
  .customer-mobile-drawer,
  .customer-mobile-scrim,
  .cafe-body .cafe-cart,
  .cafe-body .customization-panel,
  .deals-drawer-panel {
    transition: none !important;
  }

  .mobile-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
