/* Standard listings only: loaded by header.tpl, never by home/product/cart pages.
   Keep cart data in the DOM; hide secondary details and quantity controls. */
@media (max-width: 767px) {
  #product_list.product_list {
    display: flex;
    flex-flow: row wrap;
    align-items: stretch;
    gap: 12px 10px;
    width: 100%;
    min-width: 0;
    margin: 20px 0 0;
    padding: 0;
  }

  #product_list.product_list > .wrapper-product {
    display: flex;
    flex: 0 0 calc((100% - 10px) / 2);
    flex-direction: column;
    width: calc((100% - 10px) / 2);
    min-width: 0;
    margin: 0;
    padding: 0 0 10px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    overflow-wrap: anywhere;
  }

  /* Put touch controls above the image, clear of promotion/newness badges. */
  #product_list.product_list > .wrapper-product > .action-product {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    position: static;
    margin: 4px 8px;
    opacity: 1;
    pointer-events: auto;
  }

  #product_list.product_list > .wrapper-product > .action-product > div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
  }

  #product_list.product_list > .wrapper-product > .image {
    display: block;
    flex: 0 0 auto;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  #product_list.product_list > .wrapper-product > .image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
  }

  #product_list.product_list > .wrapper-product > .image > img.list-image {
    display: none;
  }

  /* Reuse the full name, tax prices and cart buttons already in list mode. */
  #product_list.product_list > .wrapper-product > .name,
  #product_list.product_list > .wrapper-product > .price,
  #product_list.product_list > .wrapper-product > .btn-add-to-cart,
  #product_list.product_list > .wrapper-product > .content > .action-product,
  #product_list.product_list > .wrapper-product > .content > .short_description {
    display: none;
  }

  #product_list.product_list > .wrapper-product > .content,
  #product_list.product_list > .wrapper-product > .action {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 10px 8px 0;
  }

  #product_list.product_list > .wrapper-product > .content > .name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    height: 54px;
    min-height: 54px;
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    color: #000;
  }

  #product_list.product_list > .wrapper-product > .action {
    flex: 1 0 auto;
    padding-top: 4px;
  }

  #product_list.product_list .manufacturer,
  #product_list.product_list .quantity,
  #product_list.product_list .package-info,
  #product_list.product_list .package-toggle,
  #product_list.product_list .quantity-add {
    display: none;
  }

  #product_list.product_list > .wrapper-product > .action > .price {
    display: flex;
    flex-direction: column;
    position: static;
    margin: 0 0 8px;
    padding: 0;
    min-width: 0;
    font-size: 12px;
    line-height: 18px;
  }

  #product_list.product_list .price_regular,
  #product_list.product_list .price-tax {
    font-size: 17px;
    font-weight: 500;
    line-height: 20px;
  }

  #product_list.product_list .price-notax,
  #product_list.product_list .price-tax span,
  #product_list.product_list .old_price {
    position: static;
    margin: 0;
    font-size: 12px;
    line-height: 17px;
    font-weight: 400;
    color: #707070;
  }

  #product_list.product_list .old_price {
    text-decoration: line-through;
  }

  #product_list.product_list .cart-action {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding-top: 0;
    min-width: 0;
  }

  #product_list.product_list .cart-action .btn-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    height: auto;
    margin: 0;
    padding: 8px 4px;
    border-radius: 6px;
    background: #3a3a3a;
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    white-space: normal;
  }

}
