/* MARIVO FOOD V55.28.4 — compact mobile catalogue cards.
   Presentation only. Campaign rules, prices, cart, stock and desktop stay intact. */
@media (max-width: 899px) {
  #productsScreen .product-list {
    gap: 9px;
    padding: 8px 10px calc(162px + env(safe-area-inset-bottom));
  }

  #productsScreen .product-card {
    display: grid;
    grid-template-columns: clamp(108px, 35%, 172px) minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 0;
    padding: 10px;
    border: 1.5px solid #cbdfe5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(6, 59, 99, .07);
  }

  #productsScreen .product-card > .product-art {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: 100%;
    height: clamp(128px, 36vw, 178px);
    min-height: 0;
    padding: 4px;
    border: 1px solid #e5eef0;
    border-radius: 13px;
    background: linear-gradient(155deg, #fff, #f2f9fa);
  }

  #productsScreen .product-body {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
    align-items: stretch;
  }

  #productsScreen .product-card h3 {
    order: 0;
    min-width: 0;
    /* Reserve two lines for short names; long names remain fully readable. */
    min-height: 2.42em;
    margin: 0 0 4px;
    font-size: clamp(14px, 3.8vw, 17px);
    line-height: 1.21;
    font-weight: 850;
    color: #103e58;
    overflow-wrap: anywhere;
  }

  #productsScreen .product-pack {
    order: 1;
    align-self: flex-start;
    margin: 0 0 4px;
    padding: 2px 7px;
    font-size: 10px;
  }

  #productsScreen .product-card .price {
    order: 2;
    grid-column: auto;
    width: 100%;
    margin: 2px 0 4px;
    padding: 0;
    border: 0;
    line-height: 1.14;
    text-align: left;
  }
  #productsScreen .price-main {
    font-size: clamp(18px, 4.8vw, 22px);
    line-height: 1.18;
    font-weight: 900;
    color: #007e81;
  }
  #productsScreen .price-fx {
    margin-top: 2px;
    font-size: 10.5px;
    line-height: 1.25;
  }
  #productsScreen .vat-included {
    margin: 2px 0 0;
    font-size: 10px;
  }
  #productsScreen .cash-price-note {
    margin-top: 2px;
    font-size: 10.5px;
  }

  #productsScreen .stock-line {
    order: 3;
    grid-column: auto;
    width: 100%;
    margin: 3px 0 7px;
    font-size: 11.5px;
    line-height: 1.24;
    color: #357a78;
    font-weight: 750;
  }
  #productsScreen .stock-line.zero { color: #b33f3f; }
  #productsScreen .stock-line.low {
    color: #a55b18;
    font-weight: 850;
  }

  #productsScreen .qty {
    order: 4;
    grid-column: auto;
    width: 100%;
    min-width: 0;
    min-height: 45px;
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 3px;
    border: 1px solid #bdd9de;
    border-radius: 13px;
    background: #f1f8f9;
  }
  #productsScreen .qty button {
    flex: 0 0 35px;
    width: 35px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 850;
    touch-action: manipulation;
  }
  #productsScreen .qty button:first-child {
    background: #fff;
    border: 1px solid #d6e6e8;
    color: #35687a;
  }
  #productsScreen .qty button:last-child {
    flex-basis: 39px;
    width: 39px;
    background: #00878c;
    color: #fff;
    box-shadow: 0 3px 7px rgba(0, 119, 130, .2);
  }
  #productsScreen .qty button:focus-visible {
    outline: 2px solid #064c70;
    outline-offset: 2px;
  }
  #productsScreen .qty button:disabled {
    opacity: .38;
    box-shadow: none;
    cursor: not-allowed;
  }
  #productsScreen .qty span {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(13.5px, 3.65vw, 17px);
    line-height: 1.15;
    font-weight: 900;
    text-align: center;
    color: #0b3955;
    white-space: nowrap;
  }

  #productsScreen .selected-total {
    order: 5;
    grid-column: auto;
    width: 100%;
    min-width: 0;
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.3;
    text-align: left;
  }
  #productsScreen .product-description-text {
    order: 6;
    grid-column: auto;
    margin: 7px 0 0;
    font-size: 11px;
    line-height: 1.32;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    color: #6c8290;
  }
  #productsScreen .product-description-text.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }
  #productsScreen .product-description-toggle {
    order: 7;
    grid-column: auto;
    min-height: 20px;
    margin: 1px 0 0;
    font-size: 10.5px;
  }

  #productsScreen .product-card.soldout .qty {
    grid-column: auto;
    border-color: #d8e0e2;
    background: #f2f4f5;
  }
  #productsScreen .product-card.soldout .qty[aria-disabled="true"] {
    opacity: .58;
    filter: grayscale(1);
  }
  #productsScreen .product-card.soldout .qty button:disabled {
    background: #e1e6e8;
    border-color: #d3dadd;
    color: #6e818b;
    box-shadow: none;
  }
  #productsScreen .stock-alert-button {
    order: 8;
    grid-column: auto;
    margin-top: 7px;
    min-height: 40px;
  }

  #productsScreen .soldout-badge { top: 5px; left: 5px; }
}

@media (max-width: 359px) {
  #productsScreen .product-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
  }
  #productsScreen .product-card > .product-art { height: 128px; }
  #productsScreen .product-card h3 { font-size: 13.5px; }
  #productsScreen .price-main { font-size: 17px; }
  #productsScreen .qty button { flex-basis: 31px; width: 31px; }
  #productsScreen .qty button:last-child { flex-basis: 35px; width: 35px; }
  #productsScreen .qty span { font-size: 13px; }
}
