/* Public order page: stable catalog and mobile layout fixes. */
html body .public-order-page .public-order-catalog {
  display: flex !important;
  min-height: 0 !important;
  flex-direction: column !important;
}

html body .public-order-page .public-order-product-grid {
  min-height: 0 !important;
  max-height: min(68vh, 760px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  align-content: start !important;
  padding-right: 4px !important;
  scrollbar-width: thin;
  scrollbar-color: #76bcb5 transparent;
}

html body .public-order-page .public-order-product-grid::-webkit-scrollbar {
  width: 9px;
}

html body .public-order-page .public-order-product-grid::-webkit-scrollbar-track {
  background: transparent;
}

html body .public-order-page .public-order-product-grid::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #76bcb5;
}

@media (max-width: 900px) {
  html body .public-order-page .public-order-product-grid {
    max-height: min(62vh, 640px) !important;
  }
}

@media (max-width: 620px) {
  html body .public-order-page {
    padding: 10px 10px 32px !important;
  }

  html body .public-order-page .public-order-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px !important;
  }

  html body .public-order-page .public-order-brand {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
  }

  html body .public-order-page .public-order-brand img {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    border-radius: 50% !important;
  }

  html body .public-order-page .public-order-brand > div {
    min-width: 0 !important;
    width: auto !important;
  }

  html body .public-order-page .public-order-brand strong,
  html body .public-order-page .public-order-brand span {
    display: block !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
    line-height: 1.16 !important;
  }

  html body .public-order-page .public-order-brand strong {
    font-size: 14px !important;
  }

  html body .public-order-page .public-order-brand span {
    font-size: 11px !important;
  }

  html body .public-order-page .public-order-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 8px !important;
  }

  html body .public-order-page .public-order-header-actions button,
  html body .public-order-page .public-order-header-actions a {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
  }

  html body .public-order-page .public-order-hero {
    margin-top: 10px !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  html body .public-order-page .public-order-hero h1 {
    font-size: 24px !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
  }

  html body .public-order-page .public-order-shop-selector {
    margin-bottom: 12px !important;
  }

  html body .public-order-page .public-order-catalog {
    padding: 12px !important;
    border-radius: 16px !important;
  }

  html body .public-order-page .public-order-product-grid {
    grid-template-columns: 1fr !important;
    max-height: 54svh !important;
    padding-right: 3px !important;
  }

  html body .public-order-page .public-order-product-media {
    height: 122px !important;
  }

  html body .public-order-page .public-order-product-copy {
    min-height: 0 !important;
    padding: 10px 11px !important;
  }

  html body .public-order-page .public-order-product-card footer {
    align-items: center !important;
    flex-direction: row !important;
  }
}
