/* Zestia OS customer mobile contract · candidate 1.0.06
   ------------------------------------------------------
   This stylesheet is loaded last by every customer shell. It contains only
   phone/tablet safety and density rules: business themes and the visual editor
   may change colours, type and decoration, but they may not squeeze operational
   cards or controls until their content becomes unreadable.
*/

@media (max-width: 820px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.app-body {
    max-width: 100%;
    overflow-x: clip;
  }

  body.app-body :where(.content, .home-section, .menu-section, .storefront-surface) {
    min-width: 0;
    max-width: 100%;
  }

  /* Discovery cards stay compact, but never exceed two columns. */
  body.app-body :where(.category-grid, .featured-grid, .steps-grid) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    justify-content: stretch;
    gap: clamp(10px, 3vw, 14px);
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  /* Cards with descriptions, prices, states and actions need the full row. */
  body.app-body :where(
    .product-grid,
    .promo-grid,
    .loyalty-reward-grid,
    .loyalty-cart-rewards,
    .orders-grid,
    .address-grid
  ) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    gap: 14px;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  /* Published editor documents inherit the same invariant, independently of
     the number of columns saved for desktop/tablet. */
  body.app-body :where(
    .web-design-block--category-grid,
    .web-design-block--categories
  ) > .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    overflow: visible !important;
  }

  body.app-body :where(
    .web-design-block--product-grid,
    .web-design-block--products
  ) > .featured-grid,
  body.app-body .web-design-block--offers > .promo-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    overflow: visible !important;
  }

  body.app-body :where(
    .category-grid,
    .featured-grid,
    .product-grid,
    .promo-grid,
    .loyalty-reward-grid,
    .loyalty-cart-rewards,
    .orders-grid,
    .address-grid,
    .steps-grid
  ) > * {
    min-width: 0 !important;
    max-width: 100%;
  }

  body.app-body :where(.category-card, .featured-card, .product-card, .promo-card) {
    min-width: 0 !important;
    max-width: 100%;
    overflow: hidden;
  }

  body.app-body .category-card.has-image {
    aspect-ratio: 4 / 3;
  }

  body.app-body .category-image,
  body.app-body .featured-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: var(--media-product-fit, cover);
  }

  body.app-body :where(.category-body, .featured-body) {
    min-width: 0;
    padding: 10px;
  }

  body.app-body :where(.category-body h3, .category-card__title, .featured-body strong) {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.app-body .featured-body {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  body.app-body .featured-card > .muted {
    margin: 0;
    padding-inline: 10px;
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.app-body .featured-card > :where(.button, .ghost-button) {
    width: calc(100% - 20px);
    min-width: 0;
    min-height: 44px;
    margin: auto 10px 10px;
    padding-inline: 8px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  /* Category result cards are operational, not discovery tiles.  A product
     keeps one complete row and uses a compact thumbnail so its name, price,
     description and action remain readable without an oversized poster. */
  body.app-body .featured-grid--product-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-body .featured-card--product-list {
    display: grid;
    grid-template-columns: clamp(116px, 32vw, 180px) minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 168px;
    gap: 0;
    padding: 0;
  }

  body.app-body .featured-card--product-list .featured-image {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 100%;
    height: 100%;
    min-height: 168px;
    aspect-ratio: auto;
    object-fit: var(--media-product-fit, cover);
  }

  body.app-body .featured-card--product-list .featured-body {
    grid-column: 2;
    padding: 12px 12px 5px;
    display: grid;
    align-content: start;
    gap: 4px;
  }

  body.app-body .featured-card--product-list .featured-body .price {
    justify-self: start;
    white-space: normal;
  }

  body.app-body .featured-card--product-list > .muted {
    grid-column: 2;
    max-height: 3em;
    padding-inline: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  body.app-body .featured-card--product-list > :where(.button, .ghost-button) {
    grid-column: 2;
    width: auto;
    min-height: 44px;
    margin: 8px 12px 12px;
  }

  /* Product cards become a readable, scan-friendly mobile list: one product
     per row with a stable thumbnail instead of a full-width desktop poster. */
  body.app-body .product-card--compact {
    display: grid;
    grid-template-columns: clamp(112px, 31vw, 190px) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch;
    contain-intrinsic-size: 260px;
  }

  body.app-body .product-card--compact .product-card__media-link,
  body.app-body .product-card--compact .product-media {
    width: 100%;
    height: 100% !important;
    min-height: 100%;
    aspect-ratio: auto !important;
  }

  body.app-body .product-card--compact .product-image {
    width: 100%;
    height: 100%;
    object-fit: var(--media-product-fit, cover);
  }

  body.app-body .product-body--compact {
    min-width: 0;
    padding: clamp(11px, 3vw, 15px);
    gap: 8px;
  }

  body.app-body .product-card--compact .product-title {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 5px;
  }

  body.app-body .product-card--compact .product-title h3,
  body.app-body .product-card--compact .product-title h3 a {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.app-body .product-card--compact .price {
    justify-self: start;
    white-space: normal;
  }

  body.app-body .product-card--compact .product-meta {
    max-height: 48px;
    overflow: hidden;
  }

  body.app-body .product-card--compact .product-desc--compact {
    min-height: 0;
    margin: 0;
    -webkit-line-clamp: 2;
  }

  body.app-body .product-card--compact .product-card__allergens {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  body.app-body .product-card--compact .product-card__actions {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  body.app-body .product-card--compact :where(
    .product-form--quick-add,
    .product-card__primary-action,
    .product-card__details-link
  ) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.app-body .product-card--compact .product-card__primary-action {
    min-height: 44px;
    padding-inline: 9px;
    justify-content: center;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }

  body.app-body .product-card--compact .product-card__details-link {
    min-height: 36px;
    justify-content: center;
    white-space: normal;
  }

  body.app-body .section-header {
    min-width: 0;
    align-items: end;
    gap: 8px;
  }

  body.app-body .section-header :where(h1, h2, h3, .section-count) {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.app-body.storefront-shell .topbar {
    display: none;
  }

  body.app-body.storefront-shell .site-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-areas: "brand status menu";
    align-items: center !important;
    min-height: 56px;
    padding: 5px 10px;
    gap: 8px;
  }

  body.app-body.storefront-shell .brand {
    grid-area: brand;
    min-width: 0;
    gap: 9px;
  }

  body.app-body.storefront-shell .brand--home {
    min-height: 44px;
    align-items: center;
  }

  body.app-body.storefront-shell .brand-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  body.app-body.storefront-shell .brand-copy {
    min-width: 0;
  }

  body.app-body.storefront-shell .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.app-body.storefront-shell .brand-tagline {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  body.app-body.storefront-shell .customer-nav-toggle {
    grid-area: menu;
    align-self: center;
    justify-self: end;
    margin: 0 !important;
    min-width: 42px;
    min-height: 42px;
  }

  body.app-body.storefront-shell .header-store-status {
    grid-area: status;
    justify-self: end;
  }

  body.app-body.storefront-shell .store-context-bar {
    top: 56px;
  }

  body.app-body.storefront-shell.has-compact-customer-header .store-context-bar {
    top: 52px;
  }

  body.app-body.storefront-shell .content {
    padding-right: 12px;
    padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
    padding-left: 12px;
    scroll-padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

  body.app-body.storefront-shell .site-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }

  body.app-body.storefront-shell :where([id], .product-card, .menu-section) {
    scroll-margin-top: 248px;
  }

  body.app-body.storefront-shell .menu-section .subnav {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
  }

  body.app-body.storefront-shell .menu-section .subnav__link {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  body.app-body.storefront-shell .customer-mobile-dock {
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-width: calc(100% - 16px);
  }

  body.app-body.storefront-shell .customer-mobile-dock a {
    min-width: 0;
    min-height: 46px;
    position: relative;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.app-body.storefront-shell .customer-mobile-dock .customer-nav-icon {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

  body.app-body.storefront-shell .customer-mobile-dock a > span {
    font-size: 9px;
    line-height: 1;
  }

  body.app-body.storefront-shell .customer-mobile-dock__cart strong {
    position: absolute;
    top: 2px;
    right: max(6px, calc(50% - 22px));
  }
}

@media (max-width: 600px) {
  /* On phones the photograph is a selling surface, not a narrow thumbnail.
     A 3:2 top image preserves the approved food composition and still keeps
     the quick-order controls in the same card. */
  body.app-body.storefront-shell .product-card--compact {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    contain-intrinsic-size: 540px;
  }

  body.app-body.storefront-shell
    .product-card--compact
    .product-card__media-link {
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 3 / 2 !important;
  }

  body.app-body.storefront-shell .product-card--compact .product-media {
    width: 100%;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 3 / 2 !important;
  }

  body.app-body.storefront-shell .product-card--compact .product-image {
    width: 100%;
    height: 100%;
    object-fit: var(--media-product-fit, cover);
    object-position: center;
  }

  body.app-body.storefront-shell .product-body--compact {
    grid-column: 1;
    grid-row: 2;
    padding: 14px;
    gap: 9px;
  }

  body.app-body.storefront-shell .product-card--compact .product-title {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  body.app-body.storefront-shell .product-card--compact .price {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  body.app-body :where(.category-grid, .featured-grid, .steps-grid),
  body.app-body :where(
    .web-design-block--category-grid,
    .web-design-block--categories
  ) > .category-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-body .product-card--compact {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-body .featured-card--product-list {
    grid-template-columns: 104px minmax(0, 1fr) !important;
  }

  body.app-body .product-body--compact {
    padding: 10px;
  }
}

@media (max-width: 820px) {
  /* Loaded after the generic mobile containment rules: temperature effects
     keep their deliberate overflow while every ordinary card stays clipped. */
  body.app-body.storefront-shell
    :where(.product-card--thermal-cold, .product-card--thermal-hot),
  body.app-body.storefront-shell
    :where(.product-card--thermal-cold, .product-card--thermal-hot)
    > .product-card__media-link,
  body.app-body.storefront-shell
    :where(.product-media--thermal-cold, .product-media--thermal-hot) {
    overflow: visible !important;
  }

  body.app-body.storefront-shell
    .product-card--thermal-cold.has-cutout-media {
    margin-top: 0;
  }

  body.app-body.storefront-shell
    .product-card--thermal-cold.has-cutout-media
    .product-media--cutout {
    margin-top: 0;
  }

  body.app-body.storefront-shell
    .product-card--thermal-cold
    .product-image {
    background: transparent;
  }

  body.app-body.storefront-shell
    .product-card--thermal-cold
    .zestia-thermal-media
    > .product-image,
  body.app-body.storefront-shell
    .product-card--thermal-cold
    .zestia-thermal-media
    > [data-zestia-thermal-canvas] {
    transform: none !important;
  }
}

/* This file is the final storefront stylesheet, so this rule also protects
   the thermal overscan from later template-specific media containment. */
body.app-body.storefront-shell
  .product-page__media.zestia-thermal-media[data-zestia-thermal-effect="HOT"] {
  overflow: visible;
}

/* The category rail keeps native touch scrolling, while fixed reveal controls
   make every category reachable with mouse, keyboard and assistive tech. */
body.app-body.storefront-shell .main-menu.is-scroll-controlled {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-rows: minmax(44px, auto);
  align-items: center;
  gap: 6px;
}

body.app-body.storefront-shell
  .main-menu.is-scroll-controlled
  .main-menu__list {
  grid-column: 2;
  grid-row: 1;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  padding-inline: 8px;
  scroll-padding-inline: 8px;
}

/* Centering an overflowing flex row makes half of the first and last tabs
   unreachable because browsers cannot scroll to a negative inline offset. */
body.app-body.storefront-shell
  .main-menu.is-scroll-controlled.has-overflow
  .main-menu__list {
  justify-content: flex-start !important;
}

body.app-body.storefront-shell .main-menu__scroll-button {
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--zsf-text, #f7f4ef) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--zsf-surface, #121212) 88%, var(--zsf-text, #f7f4ef) 12%);
  color: var(--zsf-text, #f7f4ef);
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.app-body.storefront-shell .main-menu__scroll-button--previous {
  grid-column: 1;
  grid-row: 1;
}

body.app-body.storefront-shell .main-menu__scroll-button--next {
  grid-column: 3;
  grid-row: 1;
}

body.app-body.storefront-shell .main-menu__scroll-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand, #c93a24) 82%, #fff 18%);
  outline-offset: -3px;
}

body.app-body.storefront-shell .main-menu__scroll-button:disabled {
  opacity: .34;
  cursor: default;
}

body.app-body.storefront-shell
  .main-menu.is-scroll-controlled:not(.has-overflow)
  .main-menu__scroll-button {
  visibility: hidden;
  pointer-events: none;
}

body.app-body.storefront-shell .main-menu__scroll-icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

body.app-body.storefront-shell .main-menu__scroll-icon--previous {
  -webkit-mask-image: url("icons/bootstrap/chevron-left.svg");
  mask-image: url("icons/bootstrap/chevron-left.svg");
}

body.app-body.storefront-shell .main-menu__scroll-icon--next {
  -webkit-mask-image: url("icons/bootstrap/chevron-right.svg");
  mask-image: url("icons/bootstrap/chevron-right.svg");
}

@media (hover: hover) {
  body.app-body.storefront-shell .main-menu__scroll-button:not(:disabled):hover {
    border-color: color-mix(in srgb, var(--brand, #c93a24) 65%, #fff 8%);
    background: color-mix(in srgb, var(--brand, #c93a24) 72%, var(--zsf-surface, #121212) 28%);
  }
}

/* Editorial flagship, rebuilt for touch screens instead of inheriting the
   tall generic poster card.  The first product keeps the cinematic hierarchy
   and the rest become a compact two-column catalogue. */
@media (max-width: 820px) {
  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--menu, .storefront-surface--products)
    .main-menu {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding: 6px;
    top: 56px;
    overflow: hidden !important;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--menu, .storefront-surface--products)
    .main-menu__list {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    padding-inline: 8px;
    justify-content: flex-start !important;
    gap: 6px;
    overflow-x: auto !important;
    overflow-y: hidden;
    scroll-padding-inline: 8px;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--menu, .storefront-surface--products)
    .main-menu__item {
    flex: 0 0 auto;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--menu, .storefront-surface--products)
    .main-menu__list::after {
    content: "";
    flex: 0 0 4px;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--menu, .storefront-surface--products)
    .main-menu__link {
    max-width: calc(100vw - 138px);
    padding-inline: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .menu-section > .section-header {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    align-items: stretch;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    align-items: stretch;
    contain-intrinsic-size: 340px;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-card__media-link,
  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-media {
    width: 100%;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 4 / 3 !important;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-body--compact {
    min-width: 0;
    padding: 11px;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-title h3,
  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-title h3 a {
    font-size: clamp(.86rem, 3.8vw, 1rem);
    line-height: 1.05;
    -webkit-line-clamp: 2;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .price {
    justify-self: start;
    text-align: left;
    white-space: nowrap;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    :is(.product-meta, .product-card__allergens, .product-card__availability) {
    display: none;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-desc--compact {
    display: -webkit-box;
    min-height: 2.7em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-card__actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:not(:first-child)
    .product-card__details-link {
    display: none;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:first-child {
    grid-column: 1 / -1;
    min-height: clamp(390px, 58svh, 480px);
    grid-template: minmax(0, 1fr) / minmax(0, 1fr) !important;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:first-child
    > :is(.product-card__media-link, .product-body--compact) {
    grid-area: 1 / 1;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:first-child
    :is(.product-card__media-link, .product-media) {
    width: 100%;
    height: 100% !important;
    min-height: 0;
    aspect-ratio: auto !important;
  }

  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-card--compact:first-child
    .product-body--compact {
    z-index: 2;
    align-self: end;
    padding: clamp(18px, 5vw, 26px);
    background: linear-gradient(180deg, transparent 0%, rgba(5, 5, 5, .72) 28%, rgba(5, 5, 5, .98) 100%);
  }

  /* The footer structure used by the editorial shell had a desktop selector
     with greater specificity than its old mobile collapse.  Reset it here so
     local-service links keep their full width and remain useful for SEO. */
  body.app-body.storefront-shell .site-footer .footer-main {
    width: 100%;
    max-width: none;
    padding-inline: 12px;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px;
  }

  body.app-body.storefront-shell .site-footer .footer-columns {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 14px;
  }

  body.app-body.storefront-shell .site-footer .footer-col {
    min-width: 0;
  }

  body.app-body.storefront-shell .site-footer .footer-col--services {
    grid-column: 1 / -1;
  }

  body.app-body.storefront-shell
    .site-footer
    .footer-col--services
    .footer-services-list {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
    align-items: stretch;
  }

  body.app-body.storefront-shell
    .site-footer
    .footer-col--services
    .footer-services-list a {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-block: 6px;
    display: flex;
    align-items: center;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  body.app-body.storefront-shell
    :is(
      .zestia-storefront-surface[data-zestia-surface="local_landing"],
      .storefront-surface--local-seo-landing-service
    )
    .home-section
    .hero-meta {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.app-body.storefront-shell
    :is(
      .zestia-storefront-surface[data-zestia-surface="local_landing"],
      .storefront-surface--local-seo-landing-service
    )
    .home-section
    .hero-meta .pill {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }
}

@media (max-width: 430px) {
  body.app-body.storefront-shell .site-header {
    grid-template-columns: 42px minmax(0, 1fr) 42px !important;
    gap: 6px;
  }

  body.app-body.storefront-shell .site-header .brand {
    width: 42px;
    max-width: 42px;
    overflow: hidden;
  }

  body.app-body.storefront-shell .header-store-status {
    width: min(100%, 174px);
    max-width: none;
    min-width: 0;
    justify-self: center;
  }

  body.app-body.storefront-shell .header-store-status__copy {
    min-width: 0;
    overflow: hidden;
  }

  body.app-body.storefront-template-editorial
    :where(.category-grid, .featured-grid, .steps-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-body.storefront-shell
    :is(
      .zestia-storefront-surface[data-zestia-surface="local_landing"],
      .storefront-surface--local-seo-landing-service
    )
    .home-section
    .hero-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 360px) {
  body.app-body.storefront-template-editorial.storefront-shell
    :is(.zestia-storefront-surface--menu, .storefront-surface--products)
    .product-grid,
  body.app-body.storefront-shell .site-footer .footer-columns,
  body.app-body.storefront-shell
    .site-footer
    .footer-col--services
    .footer-services-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-body.storefront-shell .site-footer .footer-col--services {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.app-body :where(.category-card, .featured-card, .product-card, .promo-card) {
    scroll-behavior: auto;
  }
}
