/* =========================================================
   AB - LOOP SHOPTIMIZER
   Faz o nosso controle ocupar exatamente a área do botão
   original do tema (faixa verde / rodapé do card)
========================================================= */

/* o card do tema já usa position:relative, mas reforçamos */
body ul.products li.product {
  position: relative;
}

/* reserva a mesma faixa inferior do botão original */
body ul.products li.product:not(.product-category) {
  padding-bottom: 40px !important;
}

/* nosso wrapper vira o "botão do tema" */
body ul.products li.product .ab-loop-cart-control-wrap {
  position: absolute !important;
  left: 15px !important;
  right: 15px !important;
  bottom: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 3 !important;
  display: block !important;
}

/* controle ocupa toda a área */
body ul.products li.product .ab-qty-cart-control {
  width: 100% !important;
  margin: 0 !important;
}

/* botão Adicionar igualado ao CTA do tema */
body ul.products li.product .ab-add-btn.button,
body ul.products li.product .ab-qty-box {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 999px !important;
}

/* margem entre botões Unidade/Caixa e botão Adicionar no catálogo */
body ul.products li.product .wcvpc-toggle {
  margin-bottom: 10px !important;
}

body ul.products li.product .ab-add-btn.button {
  border-radius: 999px !important;
}

body ul.products li.product .ab-qty-box {
  border-radius: 999px !important;
  overflow: hidden !important;
}

/* botão adicionar */
body ul.products li.product .ab-add-btn.button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 14px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #238b5d !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 40px !important;
  text-align: center !important;
  text-decoration: none !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

/* caixa de quantidade */
body ul.products li.product .ab-qty-box {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 2px 4px !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 999px !important;
  background: #fff !important;
}

/* botões + e - */
body ul.products li.product .ab-qty-btn {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  border: none !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body ul.products li.product .ab-qty-btn.is-plus {
  background: #f4c400 !important;
  color: #222 !important;
}

body ul.products li.product .ab-qty-btn.is-minus {
  background: #eeeeee !important;
  color: #333 !important;
}

body ul.products li.product .ab-qty-btn.is-trash {
  background: #eeeeee !important;
  color: #c62828 !important;
}

body ul.products li.product .ab-qty-value {
  flex: 1 1 auto !important;
  min-width: 40px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  color: #333 !important;
  line-height: 1 !important;
}



/* manter outros botões, como Seja Notificado */
body ul.products li.product a.button.product_type_simple:not(.add_to_cart_button),
body ul.products li.product a.button.product_type_variable:not(.add_to_cart_button) {
  display: block !important;
  position: absolute !important;
  z-index: 1 !important;
  bottom: 0 !important;
  width: calc(100% - 30px) !important;
  height: 40px !important;
  padding: 0 !important;
  line-height: 40px !important;
  opacity: 1 !important;
}

/* não aplicar layout absoluto no single product */
.single-product .ab-loop-cart-control-wrap {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}

body ul.products li.product .ab-loop-cart-control-wrap .ab-add-btn.button,
body ul.products li.product .ab-loop-cart-control-wrap .ab-qty-box {
  border-radius: 999px !important;
}

/* =========================================================
   AB - SINGLE PRODUCT BUTTON
========================================================= */

.single-product .ab-single-add-to-cart-wrap,
.single-product .ab-qty-cart-control{
  display:block;
  width:260px;
  max-width:100%;
}

/* botão adicionar */
.single-product .ab-add-btn.button{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:44px;
  border:none;
  border-radius:999px;
  background:#238b5d;
  color:#fff;
  font-weight:700;
  font-size:16px;
  text-decoration:none;
  box-shadow:none;
}

/* hover */
.single-product .ab-add-btn.button:hover{
  background:#1f7c53;
  color:#fff;
}

/* caixa quantidade */
.single-product .ab-qty-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  height:44px;
  border:1px solid #d9d9d9;
  border-radius:999px;
  padding:4px;
  background:#fff;
  overflow:hidden;
}

/* botões + - */
.single-product .ab-qty-btn{
  width:36px;
  min-width:36px;
  height:36px;
  border:none;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.single-product .ab-qty-btn.is-plus{
  background:#f4c400;
  color:#222;
}

.single-product .ab-qty-btn.is-minus{
  background:#eeeeee;
  color:#333;
}

.single-product .ab-qty-btn.is-trash{
  background:#eeeeee;
  color:#c62828;
}

/* valor */
.single-product .ab-qty-value{
  flex:1;
  text-align:center;
  font-weight:700;
  font-size:18px;
  color:#333;
}

/* ocultar quantidade e botão padrão no single product */
.single-product form.cart .quantity.buttons_added,
.single-product form.cart .single_add_to_cart_button{
    display:none !important;
}

.ab-stock-limit-msg{
  margin-top:6px;
  font-size:10px;
  line-height:1;
  color:#c62828;
  text-align:center;
  font-weight:600;
}