/**
 * compras.html — mobile (<992px).
 * Evita o stretch do layout desktop (search 320px, filtros nowrap, grid 2 colunas).
 */

.fe-mobile-only,
.compras-m-header {
  display: none;
}

@media only screen and (min-width: 992px) {
  .fe-mobile-only,
  .compras-m-header {
    display: none !important;
  }
}

@media only screen and (max-width: 991px) {
  .fe-mobile-only {
    display: block;
  }

  html,
  body.compras-list-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    background: #ededed !important;
    font-family: 'Proxima Nova', -apple-system, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  body.compras-list-page.cart-page[data-site='ML'][data-country='BR'] {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.compras-list-page #seguro-desktop-chrome,
  body.compras-list-page #seguro-desktop-site-footer {
    display: none !important;
  }

  .compras-m-header {
    display: flex !important;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-height: 48px;
    padding: 4px 12px 4px 4px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .compras-m-header__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
  }

  .compras-m-header__back img {
    width: 24px;
    height: 24px;
    display: block;
  }

  .compras-m-header__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(0, 0, 0, 0.9);
    font-family: inherit;
  }

  body.compras-list-page main#root-app.compras-list-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 24px !important;
    flex: none !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  body.compras-list-page .main-wrapper,
  body.compras-list-page .compras-main-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px 16px 24px !important;
    box-sizing: border-box !important;
  }

  body.compras-list-page .list-header-v2 {
    margin-bottom: 8px;
  }

  body.compras-list-page .list-header-v2__title {
    display: none !important;
  }

  body.compras-list-page .list-header-info-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
  }

  body.compras-list-page .list-header-filter-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  body.compras-list-page .compras-search {
    flex: 1 0 100%;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.compras-list-page .compras-search__field {
    width: 100% !important;
    max-width: 100% !important;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 0 14px;
  }

  body.compras-list-page .compras-filter-chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.compras-list-page .compras-filter-chips::-webkit-scrollbar {
    display: none;
  }

  body.compras-list-page .andes-tag--choice,
  body.compras-list-page .andes-tag--choice.andes-tag--selected,
  body.compras-list-page .andes-tag--choice[aria-pressed='true'] {
    width: auto;
    min-width: 0;
    max-width: none;
    flex-shrink: 0;
  }

  body.compras-list-page .compras-header-count-group {
    display: block;
    width: 100%;
    margin: 0;
  }

  body.compras-list-page .compras-header-divider {
    display: none !important;
  }

  body.compras-list-page .list-header__subtitles {
    width: 100%;
    margin: 0;
    white-space: normal;
  }

  body.compras-list-page .list-item-container {
    gap: 16px;
  }

  body.compras-list-page .list-item-grouper__header {
    padding: 14px 16px;
  }

  body.compras-list-page .list-item {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    column-gap: 0;
    row-gap: 12px;
    align-items: stretch;
    padding: 16px;
  }

  body.compras-list-page .list-item__product {
    gap: 12px;
    width: 100%;
  }

  body.compras-list-page .list-item__image,
  body.compras-list-page h3.list-item__image {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
  }

  body.compras-list-page .list-item__image:not(h3) {
    flex-basis: 82px;
    width: 82px;
    height: 82px;
  }

  body.compras-list-page .list-item__image img,
  body.compras-list-page h3.list-item__image .bf-ui-image--default {
    display: block;
    max-width: 100%;
    max-height: 100%;
  }

  body.compras-list-page .bf-ui-button-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    grid-column: auto;
    grid-row: auto;
  }

  body.compras-list-page .bf-ui-button-container .andes-button {
    width: 100%;
  }

  body.compras-list-page .compras-filter-menu {
    left: auto;
    right: 0;
    min-width: 200px;
    max-width: min(320px, calc(100vw - 32px));
  }
}
