/* Compact public menu cards for phones. The bottom navigation and admin
   editing retain their existing structure and behaviour. */
@media (max-width: 383px) {
  /* Match the active checkout rule so the retained navigation can fit. */
  body:not(.front-admin-editing) .bottom-order-btn:not(.disabled) {
    min-width: 0;
  }

  body:not(.front-admin-editing) .restaurant-identity {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  body:not(.front-admin-editing) .section-heading-row {
    padding: 14px 12px 8px;
  }

  body:not(.front-admin-editing) .section-title {
    font-size: 25px;
  }

  body:not(.front-admin-editing) .products-list {
    gap: 8px !important;
    padding: 0 8px 12px;
  }

  body:not(.front-admin-editing) .category-divider {
    margin: 14px 4px 2px;
    font-size: 14px;
  }

  body:not(.front-admin-editing) .product-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    grid-template-rows: minmax(116px, auto);
    gap: 10px;
    min-height: 136px;
    padding: 9px;
    border-radius: 16px;
    align-items: stretch;
    box-shadow: 0 5px 16px rgba(43, 24, 48, .055);
  }

  body:not(.front-admin-editing) .product-info {
    grid-column: 2;
    grid-row: 1;
    order: initial;
    min-width: 0;
    min-height: 0;
    padding: 1px 0 0;
  }

  body:not(.front-admin-editing) .product-info h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    font-size: 16px;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.front-admin-editing) .product-desc {
    margin: 0 0 6px;
    color: #59616e;
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  body:not(.front-admin-editing) .product-bottom-row {
    min-width: 0;
    padding-right: 84px;
  }

  body:not(.front-admin-editing) .product-price {
    font-size: 18px;
    line-height: 1.1;
  }

  body:not(.front-admin-editing) .product-price span {
    font-size: 11px;
  }

  body:not(.front-admin-editing) .product-media {
    display: contents;
  }

  body:not(.front-admin-editing) .product-img {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    width: 104px;
    height: 100%;
    min-height: 116px;
    max-height: 140px;
    border-radius: 13px;
  }

  body:not(.front-admin-editing) .add-btn {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 3;
    width: auto;
    min-width: 78px;
    height: 38px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12.5px;
    box-shadow: none;
  }

  body:not(.front-admin-editing) .add-btn span {
    display: inline;
  }

  body:not(.front-admin-editing) .server-product-badge {
    font-size: 10px;
  }
}

@media (max-width: 350px) {
  body:not(.front-admin-editing) .product-card {
    grid-template-columns: 92px minmax(0, 1fr) !important;
  }

  body:not(.front-admin-editing) .product-img {
    width: 92px;
  }

  body:not(.front-admin-editing) .add-btn {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  body:not(.front-admin-editing) .add-btn span {
    display: none;
  }

  body:not(.front-admin-editing) .product-bottom-row {
    padding-right: 48px;
  }
}
