/* Vitrine moderna — camada visual progressiva sobre o tema legado. */

.body-estabelecimento {
  background: var(--slj-background, #f7f8f7);
  color: var(--slj-background-text, #1c2521);
}

.body-estabelecimento .middle > .container {
  max-width: 1180px;
}

.banners {
  overflow: hidden;
  border-radius: 22px;
  margin: 22px 0 32px;
  box-shadow: 0 12px 32px rgba(24, 40, 33, .10);
}

.banners img,
.banners iframe {
  display: block;
  width: 100%;
  border-radius: 22px;
}

.categoria {
  margin-bottom: 38px;
}

.categoria .title {
  color: #17211d;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.25px;
}

.categoria .vertudo {
  font-weight: 600;
}

.categoria .produto,
.novoproduto {
  background: #fff;
  border: 1px solid #e7ece9;
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(24, 40, 33, .06);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.categoria .produto:hover,
.novoproduto:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(24, 40, 33, .11);
}

.categoria .produto .capa {
  border-radius: 16px;
  background-size: cover !important;
  background-color: #eef2ef !important;
}

/* Mantém os textos dos cards afastados da borda sem alterar foto ou botão. */
.categoria .produto .slj-product-name {
  margin-right: 12px;
  margin-left: 12px;
}

/* O tema legado inseria uma quebra entre "Por" e "apenas". */
.categoria .produto .apenas {
  white-space: nowrap;
}

.categoria .produto .apenas br {
  display: none !important;
}

.categoria .produto .detalhes {
  border-radius: 10px;
  margin: 10px;
}

/* No computador, a grade antiga usava floats: cards com alturas diferentes
   faziam o item seguinte ocupar a primeira lacuna disponível e quebravam a
   sequência visual. CSS Grid preserva as quatro colunas e a ordem dos itens. */
@media (min-width: 992px) {
  .categoria .produtos > .row > .tv-infinite {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .categoria .produtos > .row > .tv-infinite > .col-infinite {
    float: none;
    width: auto;
    min-width: 0;
  }

  .categoria .produtos > .row > .tv-infinite > .col-infinite > .produto {
    height: 100%;
  }
}

.footer {
  background: #f7f9f8;
  border-top: 4px solid var(--slj-primary, #27293e);
}

.footer-info {
  padding: 30px 0 26px !important;
  background: #f7f9f8 !important;
  color: #26332d !important;
}

.slj-company-footer {
  display: grid;
  max-width: 760px;
  margin: 0 auto;
  gap: 8px;
  text-align: center;
}

.slj-company-footer strong {
  display: block;
  font-size: 17px;
}

.slj-company-footer p {
  margin: 0;
}

.slj-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  margin-top: 12px;
}

.slj-legal-links a,
.slj-legal-links span {
  color: #26332d !important;
  font-weight: 600;
}

.slj-platform-credit {
  display: block;
  margin-top: 10px;
  color: #53645b !important;
  opacity: 1;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.slj-footer-catalog .footer-info {
  padding-top: 20px !important;
  padding-bottom: 18px !important;
}

.slj-footer-catalog .slj-company-footer {
  gap: 5px;
}

.slj-footer-catalog .slj-platform-credit {
  margin-top: 4px;
}

.slj-footer-catalog .social:empty {
  display: none;
}

.footer .social {
  margin-top: 16px;
  padding: 0;
}

.footer .social a {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin: 0 4px;
  place-items: center;
  border: 1px solid #dfe6e2;
  border-radius: 50%;
  background: #fff;
  color: var(--slj-primary, #27293e) !important;
}

.slj-mobile-navigation {
  display: none;
}

.slj-floating-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 17px;
  border-radius: 999px;
  background: var(--slj-secondary, var(--slj-primary));
  color: var(--slj-secondary-contrast, #fff) !important;
  box-shadow: 0 10px 28px rgba(20, 32, 27, .22);
  font-weight: 600;
}

@media (max-width: 991px) {
  .body-estabelecimento {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .slj-floating-chat {
    display: none !important;
  }

  .slj-floating-chat span {
    display: none;
  }

  .header .top {
    min-height: 56px;
    box-shadow: none;
  }

  .slj-mobile-hero {
    width: 100%;
    background: var(--slj-background, #f7f8f7);
  }

  .slj-mobile-hero .cover {
    height: 224px;
    border-radius: 0 0 26px 26px;
    overflow: hidden;
    background-size: cover !important;
    background-position: center !important;
  }

  .slj-mobile-hero .cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 35%, rgba(0, 0, 0, .38));
  }

  .slj-mobile-hero .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .slj-mobile-hero .grudado {
    position: relative;
    z-index: 2;
    margin-top: -64px;
    padding: 0 22px;
  }

  .slj-mobile-hero .avatar,
  .slj-mobile-hero .avatar .holder {
    width: 88px;
    height: 88px;
  }

  .slj-mobile-hero .avatar {
    position: relative !important;
    left: auto;
    right: auto;
    margin: 0 auto !important;
  }

  .slj-mobile-hero .avatar .holder {
    margin: 0 !important;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 30, 25, .18);
  }

  .slj-mobile-hero .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .slj-mobile-hero .app-infos {
    width: calc(100% - 24px);
    position: relative;
    z-index: 1;
    margin: 12px auto 18px;
    padding: 24px 18px 18px;
    border: 1px solid #e4e9e6;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(24, 40, 33, .08);
  }

  .slj-mobile-hero .app-infos .title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
  }

  .slj-mobile-hero .app-infos .description {
    display: -webkit-box;
    margin-top: 7px;
    overflow: hidden;
    color: #66716b;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .slj-mobile-hero .app-infos .btn {
    border: 0;
    min-height: 36px;
  }

  .slj-mobile-hero #installButton,
  .slj-mobile-hero #showInstructionsButton {
    border: 1px solid #e0e6e2 !important;
    border-radius: 12px;
    padding: 8px 11px;
  }

  .slj-mobile-hero .info-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .slj-mobile-hero .info-badge {
    width: auto;
    margin: 0;
    padding: 10px;
    border: 1px solid #e5eae7;
    border-radius: 14px;
  }

  .body-estabelecimento .middle {
    padding-top: 0;
  }

  .body-estabelecimento .middle > .container {
    width: 100%;
    padding: 0 14px;
  }

  .body-estabelecimento .clearline {
    display: none;
  }

  .search-bar-mobile {
    margin: 0 0 12px;
    border: 1px solid #e2e8e4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(24, 40, 33, .06);
  }

  .slj-category-strip,
  .slj-category-strip .tv-infinite-menu {
    box-shadow: none !important;
  }

  .search-bar-mobile form input {
    min-height: 48px;
    padding-left: 16px;
  }

  .tv-infinite-menu {
    display: flex;
    gap: 8px;
    box-sizing: border-box;
    padding: 4px 12px 8px;
    overflow-x: auto;
    scroll-padding-inline: 12px;
    scrollbar-width: none;
  }

  .tv-infinite-menu::-webkit-scrollbar {
    display: none;
  }

  .tv-infinite-menu a {
    flex: 0 0 auto;
    border: 0 !important;
    border-radius: 999px;
    background: #e9eeeb;
    padding: 9px 14px;
  }

  .tv-infinite-menu a.active {
    background: var(--slj-primary);
    color: var(--slj-primary-contrast) !important;
  }

  .slj-ai-order-preview {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 76px;
    width: calc(100% - 16px);
    margin: 4px auto 18px;
    padding: 13px 14px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(24, 40, 33, .12);
    color: inherit;
    text-decoration: none;
  }

  .slj-ai-order-preview:hover,
  .slj-ai-order-preview:focus {
    color: inherit;
    text-decoration: none;
  }

  .slj-ai-order-icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .2);
    font-size: 21px;
  }

  .slj-ai-order-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
  }

  .slj-ai-order-copy strong {
    font-size: 15px;
  }

  .slj-ai-order-copy span {
    font-size: 12px;
    opacity: .88;
  }

  .slj-ai-order-preview small {
    grid-column: 2;
    justify-self: start;
    margin-top: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
  }

  .slj-minimum-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: calc(100% - 44px);
    margin: -8px auto 16px;
    color: #66716b;
    font-size: 12px;
    line-height: 1.3;
  }

  .slj-minimum-order i {
    font-size: 15px;
  }

  .banners {
    margin: 4px 0 26px;
    border-radius: 18px;
  }

  .banners img,
  .banners iframe {
    min-height: 170px;
    max-height: 260px;
    border-radius: 18px;
    object-fit: cover;
  }

  .categoria {
    margin-bottom: 30px;
  }

  .categoria .title {
    font-size: 19px;
  }

  .produtos .tv-infinite {
    display: flex;
    gap: 12px;
    padding: 2px 0 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .produtos .tv-infinite::-webkit-scrollbar {
    display: none;
  }

  .produtos .tv-infinite .col-infinite {
    flex: 0 0 72%;
    max-width: 270px;
    padding: 0;
    scroll-snap-align: start;
  }

  .categoria .produto {
    min-height: 100%;
    padding: 9px;
  }

  .categoria .produto .capa {
    min-height: 190px;
  }

  .categoria .tv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .categoria .tv-grid > .col-md-3 {
    float: none;
    width: auto;
    min-width: 0;
    padding: 0;
  }

  .categoria .tv-grid > .col-md-3:nth-child(odd) {
    grid-column: 1;
  }

  .categoria .tv-grid > .col-md-3:nth-child(even) {
    grid-column: 2;
  }

  .categoria .tv-grid .produto {
    min-height: 0;
    padding: 8px;
  }

  .categoria .tv-grid .produto .capa {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 1 / 1;
    margin: 0 0 7px;
    border-radius: 14px;
    background-position: center !important;
    background-size: cover !important;
  }

  .categoria .tv-grid .slj-product-name {
    display: -webkit-box;
    min-height: 0;
    max-height: 42px;
    margin: 0 3px 6px;
    overflow: hidden;
    color: #222b27;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .categoria .tv-grid .produto .valor_anterior {
    margin: 3px 3px 0 !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .categoria .tv-grid .produto .apenas {
    display: none !important;
  }

  .categoria .tv-grid .produto .valor {
    margin: 3px !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
  }

  .categoria .tv-grid .produto .detalhes {
    margin: 8px 0 0 !important;
    padding: 9px 5px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  .novalistagem .col-xs-12 {
    padding-left: 0;
    padding-right: 0;
  }

  .novoproduto {
    margin-bottom: 12px;
    padding: 14px;
  }

  /* A grade legada usa margens negativas do Bootstrap. No celular elas
     anulavam o respiro da vitrine e cortavam texto e foto nas bordas. */
  .categoria > .row,
  .categoria > .produtos > .row,
  .novalistagem,
  .novoproduto > a > .row {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .categoria > .produtos > .row,
  .novalistagem {
    max-width: 100%;
  }

  .novoproduto > a > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    align-items: center;
    gap: 16px;
  }

  .novoproduto > a > .row > .npr,
  .novoproduto > a > .row > .col-xs-5 {
    float: none;
    width: auto;
    min-width: 0;
    padding: 0;
  }

  /* Fix the visual order explicitly because the legacy Bootstrap columns can
     otherwise be auto-placed in reverse order by the mobile grid. */
  .novoproduto > a > .row > .npr {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .novoproduto > a > .row > .col-xs-5 {
    grid-column: 2;
    grid-row: 1;
    width: 112px;
  }

  .novoproduto .nome,
  .novoproduto .descricao,
  .novoproduto .preco {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .novoproduto .preco {
    margin-top: 10px !important;
  }

  .novoproduto .capa {
    width: 112px;
    height: 112px;
    max-width: 112px;
    min-width: 0;
    margin-left: auto;
  }

  .novoproduto .capa img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .slj-category-drag-hint {
    display: block;
    margin: -2px 12px 7px;
    color: #74817b;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    text-align: right;
  }

  .footer-info {
    padding: 24px 18px calc(92px + env(safe-area-inset-bottom)) !important;
  }

  /* Keep the complete catalog footer above the fixed mobile navigation. */
  .slj-footer-catalog .footer-info {
    padding: 24px 18px calc(106px + env(safe-area-inset-bottom)) !important;
  }

  /* Give the result counter and its label a clear, consistent separation. */
  .categoria.no-bottom-mobile > .row > .col-xs-6:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .categoria.no-bottom-mobile > .row > .col-xs-6:first-child .counter {
    flex: 0 0 auto;
    margin-right: 0;
  }

  .slj-mobile-navigation {
    position: fixed;
    z-index: 999;
    right: 0;
    bottom: 0;
    left: 0;
    /* Bootstrap aplica display:block!important em visible-xs/visible-sm. */
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    height: calc(66px + env(safe-area-inset-bottom));
    min-height: 66px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #dfe6e2;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 24px rgba(24, 40, 33, .08);
  }

  .slj-mobile-navigation.slj-mobile-navigation-three {
    grid-template-columns: repeat(3, 1fr);
  }

  .slj-mobile-navigation a {
    display: flex !important;
    width: auto !important;
    min-width: 0;
    height: 66px;
    margin: 0 !important;
    padding: 7px 3px 6px !important;
    float: none !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: #6d7772;
    font-size: 11px;
    line-height: 1.05;
    text-align: center;
    text-decoration: none !important;
  }

  .slj-mobile-navigation a i {
    font-size: 20px;
  }

  .slj-mobile-navigation .active {
    background: var(--slj-primary) !important;
    color: var(--slj-primary-contrast) !important;
  }

  .slj-mobile-navigation .active i {
    color: var(--slj-primary-contrast) !important;
  }

  .slj-mobile-navigation span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .slj-company-footer p,
  .slj-legal-links {
    overflow-wrap: anywhere;
  }
}

.slj-order-tabs {
  display: flex;
  width: min(420px, calc(100% - 28px));
  margin: 14px auto 22px;
  padding: 4px;
  border-radius: 14px;
  background: #e9eeeb;
}

.slj-order-tabs a {
  flex: 1;
  padding: 10px 8px;
  border-radius: 11px;
  color: #536159;
  text-align: center;
  text-decoration: none;
}

.slj-order-tabs a.active {
  background: var(--slj-primary);
  color: var(--slj-primary-contrast, #fff);
}

.slj-orders-empty {
  display: flex;
  max-width: 440px;
  margin: 24px auto;
  padding: 30px 20px;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #e3e8e5;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.slj-orders-empty i { font-size: 32px; color: var(--slj-primary); }
.slj-orders-empty strong { font-size: 17px; }
.slj-orders-empty span { color: #66716b; }

@media (max-width: 991px) {
  .shop-bag > .lni,
  .shop-bag a > .lni {
    color: inherit;
    font-size: 30px;
  }
}

@media (max-width: 360px) {
  .slj-ai-order-preview small {
    display: none;
  }

  .produtos .tv-infinite .col-infinite {
    flex-basis: 82%;
  }
}

/* Fallback para WebKit/iOS: alguns navegadores mantêm a altura legada da
   capa mesmo com aspect-ratio. Limita o ajuste apenas à grade de itens da
   página de categorias/promoções em telefones. */
@media (max-width: 480px) {
  .categoria .tv-grid .produto .capa {
    height: calc(50vw - 37px) !important;
    min-height: 120px !important;
    max-height: 196px !important;
    aspect-ratio: auto;
  }
}
