/* main-cart / default — "Two columns": lines and blocks on the left, the summary card on the right (_layout.twig, et_layout columns).
   The line grid (base stylesheet: .et-cart-header, .et-cart-item__row) gets one column set for the head and the lines, the name a
   minimum width and every spare pixel; the fixed columns hold the price, the quantity control, the total and the buttons.
   A main column too narrow for that (the summary beside it, a 1200 px window, the editor preview) turns each line into the phone
   layout: the name over the whole line, the quantity and the total under it. Tokens only. */
[data-section="main-cart"][data-variant="default"] {
  --et-cart-name-min: 18rem;
  --et-cart-cols: minmax(var(--et-cart-name-min), 1fr) 6.5rem 7rem 6.5rem 5rem;
}
[data-section="main-cart"][data-variant="default"] .et-cart-layout__main { container: et-cart-main / inline-size; }
@media (min-width: 768px) {
  [data-section="main-cart"][data-variant="default"] :is(.et-cart-header, .et-cart-item__row) { grid-template-columns: var(--et-cart-cols); }
}
/* Words wrap whole; only a word longer than the line (a model code) breaks */
[data-section="main-cart"][data-variant="default"] :is(.et-cart-item__title, .et-cart-item__meta, .et-cart-item__stock) {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Below 18 (name) + 6.5 + 7 + 6.5 + 5 rem + 4 gaps + the line padding = 50rem (a 1200 px window with the summary beside):
   the phone layout of a line inside the column */
@container et-cart-main (max-width: 49.99rem) {
  [data-section="main-cart"][data-variant="default"] .et-cart-header { display: none; }
  [data-section="main-cart"][data-variant="default"] .et-cart-item__row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
  [data-section="main-cart"][data-variant="default"] .et-cart-item__product { flex: 0 0 100%; }
  [data-section="main-cart"][data-variant="default"] .et-cart-item__price { display: none; }
  [data-section="main-cart"][data-variant="default"] .et-cart-item__total { margin-left: auto; }
}
