/* MF V4 approved 2026-11-12: categories only, mobile only.
 * Root marker B names the layout, not an A/B experiment. No tracking added.
 * Remove the V4 block in head.tpl to roll back. Legacy CSS is untouched.
 */
@media (max-width: 767.98px) {
  html[data-mf-category-layout="B"] body.page-category #js-product-list {
    padding: 10px 0; background: #f7f7f5; border-radius: 14px;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .products.row {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important; margin: 0 !important; padding: 0 2px !important;
    width: 100% !important; --bs-gutter-x: 0; --bs-gutter-y: 0;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .products.row > .product-miniature {
    display: flex !important; flex-direction: column !important; box-sizing: border-box !important;
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    flex: none !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; background: transparent !important;
    box-shadow: none !important; overflow: visible !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature > .card {
    position: relative !important; display: flex !important; flex-direction: column !important;
    width: 100% !important; height: 100% !important; min-width: 0 !important; padding: 0 !important;
    overflow: hidden !important; border: 1px solid #e8e5e1 !important; border-radius: 12px !important;
    background: #fff !important; box-shadow: 0 2px 5px rgba(51,39,55,.045) !important;
    transform: none !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__link {
    display: block !important; position: relative !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: #fff !important; box-shadow: none !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__image-container {
    width: 100% !important; height: auto !important; min-height: 0 !important; aspect-ratio: 3 / 4;
    margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: #fff !important; box-shadow: none !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature picture {
    display: block !important; width: 100% !important; height: 100% !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature img.product-miniature__image {
    position: static !important; width: 100% !important; height: 100% !important;
    max-height: none !important; object-fit: contain !important; transform: none !important;
    margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__infos.card-body {
    display: flex !important; flex: 1 0 auto !important; flex-direction: column !important; height: auto !important;
    min-height: 0 !important; padding: 11px 10px 12px !important; gap: 10px !important;
    border: 0 !important; background: #fff !important; box-shadow: none !important; text-align: left !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__infos__top,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__infos__bottom {
    width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important;
    flex: 0 0 auto !important; padding: 0 !important; margin: 0 !important;
    background: none !important; text-align: left !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__title {
    display: block !important; width: auto !important; min-height: 0 !important; height: auto !important;
    max-height: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important;
    font-family: inherit !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.35 !important;
    color: #423548 !important; text-align: left !important; white-space: normal !important;
    overflow-wrap: anywhere; -webkit-line-clamp: unset !important; background: none !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__infos__bottom {
    display: flex !important; flex-direction: column !important; align-items: stretch !important;
    gap: 8px !important; margin-top: auto !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__prices {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: baseline !important;
    justify-content: flex-start !important; gap: 4px 7px !important; margin: 0 !important; padding: 0 !important;
    min-height: 24px !important; height: auto !important; max-height: none !important;
    flex: 0 0 auto !important; width: 100% !important; text-align: left !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__price {
    display: inline-block !important; width: auto !important; min-width: 0 !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    font-size: 18px !important; font-weight: 750 !important; line-height: 1.3 !important;
    color: #302b32 !important; background: none !important; box-shadow: none !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__prices:has(.product-miniature__regular-price) .product-miniature__price { color: #ad3030 !important; }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__discount-price {
    display: inline-block !important; width: auto !important; min-width: 0 !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; background: none !important; line-height: 1.2 !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__regular-price {
    margin: 0 !important; font-size: 13px !important; line-height: 1.3 !important; font-weight: 500 !important;
    color: #797078 !important; text-decoration: line-through !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__description-link,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__description,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__details-link,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__quickview,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__quickview_touch,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature .quantity-button,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__infos__bottom > a.btn,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__variants:empty {
    display: none !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__infos__bottom > form {
    display: flex !important; width: 100% !important; margin: 0 !important; padding: 0 !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature button[data-button-action="add-to-cart"] {
    width: 100% !important; max-width: none !important; min-height: 44px !important; height: 44px !important;
    margin: 0 !important; padding: 8px !important; border: 1px solid #e6dece !important; border-radius: 8px !important;
    background: #faf6ee !important; color: #665333 !important; box-shadow: none !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__bag-plus,
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature__bag-plus svg {
    width: 19px !important; height: 23px !important; fill: currentColor !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature .product-flags {
    top: 7px !important; left: 7px !important; right: 38px !important; display: flex !important;
    flex-wrap: wrap !important; gap: 4px !important; margin: 0 !important; padding: 0 !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .product-miniature .product-flags .badge {
    min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 4px 6px !important;
    font-size: 11px !important; line-height: 1.2 !important; border-width: 1px !important;
    border-radius: 5px !important; box-shadow: none !important; white-space: normal !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .wishlist-button-add {
    top: 5px !important; right: 5px !important; width: 34px !important; height: 34px !important;
    min-width: 34px !important; padding: 5px !important; box-shadow: 0 1px 5px #00000012 !important;
  }
  html[data-mf-category-layout="B"] body.page-category #js-product-list .wishlist-button-add i { font-size: 21px !important; }
  html[data-mf-category-layout="B"] body.page-category #js-product-list a:focus-visible,
  html[data-mf-category-layout="B"] body.page-category #js-product-list button:focus-visible { outline: 2px solid #96733b !important; outline-offset: -2px; }
}
