html, body {
  min-width: 0;
  min-height: 0;
  overflow-x: clip;
  overflow-y: visible;
}

body.landing-page,
body.landing-page .landing-wrapper,
body.landing-page .landing-wrapper > main {
  min-height: 0 !important;
}

[hidden] {
  display: none !important;
}

body.landing-page .landing-wrapper,
body.landing-page .landing-wrapper > main {
  min-height: 0;
}

body.landing-page .discovery-section {
  margin: 0;
}

body.landing-page .landing-active-stores__grid {
  scrollbar-width: none;
}

body.landing-page .landing-active-stores__grid::-webkit-scrollbar {
  display: none;
}

body.landing-page .discovery-panel:has(.discovery-autocomplete-menu.is-open) {
  padding-bottom: 310px !important;
}

body.clone-search-active .landing-active-stores {
  display: none;
}

body.clone-search-active .discovery-results-shell.is-location-results {
  display: grid;
  width: min(100%, 1100px);
  margin: 0 auto 12px;
  padding: 14px;
  gap: 12px;
  border: 1px solid rgba(247, 202, 80, .58);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 38px rgba(38, 56, 87, .09);
  overflow: visible;
}

body.clone-search-active .discovery-results-head {
  position: static;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-radius: 15px;
  background: #f7f8fa;
  box-shadow: none;
}

body.clone-search-active .company-results-grid.is-location-list {
  width: 100%;
  padding: 0;
  overflow: visible;
  contain: none;
  cursor: auto;
}

body.clone-search-active .company-location-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 10px;
  margin: 0;
}

body.clone-search-active .company-location-item {
  grid-template-columns: 54px minmax(0, 1fr) !important;
  min-height: 78px;
  padding: 10px 14px;
  gap: 14px;
  border-color: rgba(224, 228, 235, .96);
  border-radius: 14px;
  box-shadow: 0 5px 14px rgba(38, 56, 87, .08);
}

.clone-store-actions { display: flex; align-items: center; gap: 7px; padding: 8px 12px 12px; }
.clone-store-actions > * { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 10px; border-radius: 9px; font: inherit; font-size: .72rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.clone-favorite-button { border: 1px solid #e5bed1; color: #bd2457; background: #fff4f8; cursor: pointer; }
.clone-favorite-button[aria-pressed="true"] { border-color: #bd2457; color: #fff; background: #bd2457; }
.clone-favorite-button:disabled { opacity: .6; cursor: wait; }
.clone-open-store { border: 1px solid #263857; color: #fff; background: #263857; }
body.clone-search-active .company-location-item { align-items: center; }
body.clone-search-active .company-location-item .clone-store-actions { grid-column: 1 / -1; padding: 0; }
body.landing-page .landing-active-store-card .clone-store-actions { width: 100%; box-sizing: border-box; }

/* O carrossel deve mostrar cards inteiros dentro do iframe estreito. */
body.landing-page .landing-active-stores,
body.landing-page .landing-active-stores__header,
body.landing-page .landing-active-stores__title,
body.landing-page .landing-active-stores__grid,
body.landing-page .landing-active-stores__title h2 {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.landing-page .landing-active-stores__title h2 {
  width: 100% !important;
  overflow-wrap: break-word;
  text-wrap: balance;
}

body.landing-page .landing-active-store-card__cover small {
  min-width: 0 !important;
  max-width: calc(100% - 8px) !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.landing-page .landing-active-store-card .clone-store-actions {
  min-width: 0;
  flex-wrap: wrap;
}

body.landing-page .landing-active-store-card .clone-store-actions > * {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 767px) {
  body.landing-page .landing-active-stores__title h2 {
    font-size: clamp(1.1rem, 3.6vw, 1.45rem) !important;
    line-height: 1.18 !important;
  }

  body.landing-page .landing-active-stores__grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding-inline: 0 !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  body.landing-page .landing-active-store-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: clamp(195px, 30vw, 210px) !important;
  }

  body.landing-page .landing-active-store-card[hidden] {
    display: none !important;
  }

  body.landing-page .landing-active-store-card__cover {
    flex: 0 0 66px !important;
    height: 66px !important;
  }

  body.landing-page .landing-active-store-card__cover small {
    max-width: 92% !important;
    padding: 4px 6px !important;
    font-size: .56rem !important;
    line-height: 1.05 !important;
  }

  body.landing-page .landing-active-store-card__body {
    flex: 1 1 auto !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    column-gap: 5px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 7px 6px 20px !important;
  }

  body.landing-page .landing-active-store-card__avatar {
    grid-row: 1 !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    border-width: 2px !important;
  }

  body.landing-page .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-long .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xl .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xxl .landing-active-store-card__copy strong {
    grid-row: 1 !important;
    align-self: center !important;
    max-height: 3.3em !important;
    margin: 0 !important;
    font-size: .72rem !important;
    line-height: 1.1 !important;
    letter-spacing: -.02em !important;
    overflow: hidden !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  body.landing-page .landing-active-store-card__copy span,
  body.landing-page .landing-active-store-card--name-long .landing-active-store-card__copy span,
  body.landing-page .landing-active-store-card--name-xl .landing-active-store-card__copy span,
  body.landing-page .landing-active-store-card--name-xxl .landing-active-store-card__copy span {
    left: 6px !important;
    right: 6px !important;
    bottom: 4px !important;
    gap: 3px !important;
    font-size: .62rem !important;
  }

  body.landing-page .landing-active-store-card .clone-store-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 3px 5px 6px;
  }

  body.landing-page .landing-active-store-card .clone-store-actions > * {
    width: 100%;
    min-height: 27px;
    padding: 0 2px;
    border-radius: 7px;
    font-size: .62rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 767px) {
  body.landing-page .landing-active-stores__button:disabled {
    opacity: .45;
    cursor: default;
  }
}

@media (min-width: 301px) and (max-width: 340px) {
  body.landing-page .landing-active-store-card__body {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    column-gap: 3px !important;
  }

  body.landing-page .landing-active-store-card__avatar {
    width: 32px !important;
    height: 32px !important;
  }

  body.landing-page .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-long .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xl .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xxl .landing-active-store-card__copy strong {
    font-size: .59rem !important;
  }

  body.landing-page .landing-active-store-card .clone-store-actions > * {
    font-size: .51rem;
  }
}

@media (max-width: 300px) {
  body.landing-page .landing-active-stores__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.landing-page .landing-active-store-card {
    height: 215px !important;
  }
}

@media (max-width: 300px) {
  form#landingSearchForm .discovery-filter-row--main {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  form#landingSearchForm .discovery-filter-row--main [data-autocomplete="state"],
  form#landingSearchForm .discovery-filter-row--main [data-autocomplete="city"],
  form#landingSearchForm .discovery-filter-row--main > .discovery-select-control--category {
    grid-column: 1 !important;
  }
}

body.clone-search-active .company-location-avatar {
  width: 54px;
  height: 54px;
}

body.clone-search-active .company-location-copy strong {
  font-size: .92rem;
}

body.clone-search-active .company-location-copy small {
  font-size: .74rem;
}

/* A busca no iframe precisa de um campo inteiro e alvos de toque separados no celular. */
@media (max-width: 640px) {
  form#landingSearchForm .discovery-query-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px !important;
    gap: 8px !important;
  }

  form#landingSearchForm .discovery-query-row .discovery-query-field {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  form#landingSearchForm .discovery-query-row .discovery-query-field input {
    min-width: 0;
    width: 100%;
  }

  form#landingSearchForm .discovery-query-row .discovery-inline-reset {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: none !important;
  }

  form#landingSearchForm .discovery-query-row .discovery-inline-reset span {
    display: inline !important;
  }

  form#landingSearchForm .discovery-query-row .discovery-submit {
    grid-column: 2 !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    touch-action: manipulation;
  }
}

body.clone-search-active .discovery-popular-row {
  margin-top: 12px;
}

/* Cards compactos dentro da largura do Meu Trilista. */
@media (min-width: 768px) {
  body.landing-page .landing-active-store-card__cover {
    height: 96px !important;
  }

  body.landing-page .landing-active-store-card__cover small {
    padding: 6px 10px !important;
    font-size: .7rem !important;
  }

  body.landing-page .landing-active-store-card__body {
    grid-template-columns: 94px minmax(0, 1fr) !important;
    grid-template-rows: 96px 1fr !important;
    min-height: 142px !important;
    height: 142px !important;
    column-gap: 8px !important;
    padding: 14px 12px 12px !important;
  }

  body.landing-page .landing-active-store-card__avatar {
    width: 90px !important;
    height: 90px !important;
    margin: 0 !important;
  }

  body.landing-page .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-long .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xl .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xxl .landing-active-store-card__copy strong {
    font-size: .9rem !important;
    margin-top: 0 !important;
  }

  body.landing-page .landing-active-store-card__copy span {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    font-size: .75rem !important;
  }

  body.landing-page .landing-active-store-card .clone-store-actions {
    gap: 6px;
    padding: 5px 9px 9px;
  }

  body.landing-page .landing-active-store-card .clone-store-actions > * {
    min-height: 31px;
    padding: 0 6px;
    font-size: .66rem;
  }
}

@media (min-width: 1024px) {
  body.landing-page .landing-active-stores__grid {
    gap: 12px !important;
  }

  body.landing-page .landing-active-store-card {
    flex: 0 0 calc((100% - 36px) / 4) !important;
    min-width: 0 !important;
    max-width: calc((100% - 36px) / 4) !important;
  }
}

@media (max-width: 767px) and (min-width: 341px) {
  body.landing-page .landing-active-store-card__body {
    grid-template-columns: 50px minmax(0, 1fr) !important;
    column-gap: 7px !important;
  }

  body.landing-page .landing-active-store-card__avatar {
    width: 50px !important;
    height: 50px !important;
  }

  body.landing-page .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-long .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xl .landing-active-store-card__copy strong,
  body.landing-page .landing-active-store-card--name-xxl .landing-active-store-card__copy strong {
    font-size: .68rem !important;
  }
}

@media (max-width: 640px) {
  body.clone-search-active .discovery-results-shell.is-location-results {
    padding: 4px;
  }

  body.clone-search-active .company-location-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  body.clone-search-active .company-location-item {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    min-height: 74px;
    padding: 8px 9px;
    gap: 8px;
    border-radius: 9px;
  }
  body.clone-search-active .company-location-item .clone-store-actions { grid-column: 1 / -1; }

  body.clone-search-active .company-location-avatar {
    width: 38px;
    height: 38px;
  }

  body.clone-search-active .company-location-item > i {
    display: none;
  }
}
