﻿/* ART ROCK — COMPRA FLUTUANTE: VISUAL PRETO, BOTAO VERDE E MINIATURA V3
Substituir o CSS visual V2. Todas as paginas exceto checkout. Sem tags <style>.
Manter o JavaScript da compra flutuante instalado.
*/

body.pagina-produto #corpo .resumo-flutuante.ar-pdp-sticky.ar-pdp-sticky-show {
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr) !important;
  grid-template-areas: "photo name" "photo option" "actions actions" !important;
  gap: 4px 12px !important;
  align-items: start !important;
  width: min(340px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 140px) !important;
  right: 16px !important;
  bottom: 96px !important;
  padding: 15px !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 12px !important;
  background: #000 !important;
  box-shadow: 0 6px 24px #00000035 !important;
  color: #fff !important;
  font-family: inherit !important;
  text-align: left !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .image {
  grid-area: photo;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 68px !important;
  height: 74px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #343434 !important;
  border-radius: 8px !important;
  background: #f8f8f8 !important;
  overflow: hidden !important;
  aspect-ratio: auto !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .nome-produto {
  grid-area: name;
  align-self: end !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-width: 0 !important;
  margin: 1px 20px 0 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

body.pagina-produto #corpo .ar-pdp-sticky-option {
  grid-area: option;
  align-self: start;
  min-width: 0 !important;
  margin: 0 !important;
  color: #98efbb !important;
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  text-align: left !important;
  display: inline-block !important;
  justify-self: start;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 5px 7px !important;
  border: 1px solid #2d6a47 !important;
  border-radius: 5px !important;
  background: #10291b !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .acoes-produto.ar-pdp-sticky-selected {
  grid-area: actions;
  display: grid !important;
  grid-template-columns: minmax(90px, .85fr) minmax(160px, 1.25fr) !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 8px 0 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid #282828 !important;
}

/* Recupera o preco que o ajuste de preco fixo da PDP ocultava. */
body.pagina-produto #corpo .ar-pdp-sticky .acoes-produto .precos-wrap {
  display: block !important;
  visibility: visible !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .preco-produto {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .preco-produto > div:first-child {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  margin: 0 !important;
}

body.pagina-produto #corpo .ar-pdp-sticky s.preco-venda {
  display: block !important;
  margin: 0 !important;
  color: #b7b7b7 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

body.pagina-produto #corpo .ar-pdp-sticky strong.preco-promocional,
body.pagina-produto #corpo .ar-pdp-sticky strong.preco-venda {
  display: block !important;
  margin: 0 !important;
  color: #fff !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .comprar {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .comprar .botao-comprar {
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 10px 8px !important;
  border: 1px solid #36c5c4 !important;
  border-radius: 7px !important;
  background: #36c5c4 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  white-space: normal !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .resumo-flutuante-close {
  top: 6px !important;
  right: 6px !important;
  left: auto !important;
  width: 26px !important;
  height: 26px !important;
  padding: 8px !important;
  border-radius: 50% !important;
  background: #252525 !important;
  color: #fff !important;
}

@media (max-width: 767px) {
  body.pagina-produto #corpo .resumo-flutuante.ar-pdp-sticky.ar-pdp-sticky-show {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    grid-template-areas: "photo name" "photo option" "actions actions" !important;
    gap: 4px 10px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: var(--ar-pdp-dock, 0px) !important;
    width: auto !important;
    max-height: 45vh !important;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 10px 10px 0 0 !important;
  }

  body.pagina-produto #corpo .ar-pdp-sticky .image {
    display: flex !important;
    width: 52px !important;
    height: 56px !important;
  }

  body.pagina-produto #corpo .ar-pdp-sticky .nome-produto {
    display: -webkit-box !important;
    align-self: end !important;
    margin: 0 26px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    text-overflow: ellipsis !important;
  }

  body.pagina-produto #corpo .ar-pdp-sticky-option {
    font-size: 11px !important;
    line-height: 1.35 !important;
    padding: 4px 6px !important;
  }

  body.pagina-produto #corpo .ar-pdp-sticky .acoes-produto.ar-pdp-sticky-selected {
    grid-template-columns: minmax(85px, .8fr) minmax(180px, 1.2fr) !important;
    gap: 10px !important;
    margin-top: 6px !important;
    padding: 0 !important;
    border-top: 0 !important;
  }

  body.pagina-produto #corpo .ar-pdp-sticky .resumo-flutuante-close {
    top: 5px !important;
    right: 5px !important;
  }

  body.pagina-produto.ar-pdp-sticky-open .li-whatsapp {
    bottom: calc(var(--ar-pdp-sticky-space, 120px) + 12px) !important;
  }

  /* O video reaparece assim que a barra deixa de estar aberta. */
  body.pagina-produto.ar-pdp-sticky-open widde-floating-block {
    display: none !important;
  }
}

@media (max-width: 380px) {
  body.pagina-produto #corpo .ar-pdp-sticky .acoes-produto.ar-pdp-sticky-selected {
    grid-template-columns: minmax(0, .75fr) minmax(160px, 1.25fr) !important;
  }

  body.pagina-produto #corpo .ar-pdp-sticky strong.preco-promocional,
  body.pagina-produto #corpo .ar-pdp-sticky strong.preco-venda {
    font-size: 17px !important;
  }

  body.pagina-produto #corpo .ar-pdp-sticky .comprar .botao-comprar {
    font-size: 11px !important;
  }
}
/* Controles sobre o fundo preto. */
body.pagina-produto #corpo .ar-pdp-sticky .resumo-flutuante-close svg {
  fill: currentColor !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .comprar .botao-comprar:hover {
  background: #157347 !important;
  border-color: #157347 !important;
}

body.pagina-produto #corpo .ar-pdp-sticky .comprar .botao-comprar:focus-visible {
  outline: 2px solid #98efbb !important;
  outline-offset: 3px;
}

