
/* Territórios em Ação 14.1 — Cesta Rápida */

html.tae-quick-cart-open,
html.tae-quick-cart-open body{
  overflow:hidden;
}

.tae-quick-cart{
  position:fixed;
  inset:0;
  z-index:999999;
  display:grid;
  grid-template-columns:1fr minmax(380px,460px);
  pointer-events:none;
  visibility:hidden;
}

.tae-quick-cart.is-open{
  pointer-events:auto;
  visibility:visible;
}

.tae-quick-cart__backdrop{
  grid-column:1/-1;
  grid-row:1;
  width:100%;
  height:100%;
  border:0;
  background:rgba(20,33,25,.48);
  opacity:0;
  cursor:default;
  transition:opacity .22s ease;
}

.tae-quick-cart.is-open .tae-quick-cart__backdrop{
  opacity:1;
}

.tae-quick-cart__panel{
  grid-column:2;
  grid-row:1;
  display:flex;
  min-width:0;
  height:100%;
  flex-direction:column;
  background:#f7f5ee;
  box-shadow:-24px 0 70px rgba(15,38,24,.2);
  outline:0;
  transform:translateX(105%);
  transition:transform .28s cubic-bezier(.2,.8,.2,1);
}

.tae-quick-cart.is-open .tae-quick-cart__panel{
  transform:translateX(0);
}

.tae-quick-cart__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:24px 26px 20px;
  border-bottom:1px solid #dce2dc;
  background:#fff;
}

.tae-quick-cart__header h2{
  margin:5px 0 0;
  color:#233128;
  font-size:29px;
  line-height:1;
}

.tae-quick-cart__header>button{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:1px solid #d6ddd6;
  border-radius:50%;
  background:#fff;
  color:#233128;
  font-size:25px;
  cursor:pointer;
}

.tae-quick-cart__content{
  display:flex;
  min-height:0;
  flex:1;
  flex-direction:column;
}

.tae-quick-cart__success{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:11px;
  align-items:center;
  margin:18px 20px 0;
  padding:12px 14px;
  border:1px solid #bfd1c1;
  border-radius:14px;
  background:#eaf4eb;
  transition:opacity .2s ease,transform .2s ease;
}

.tae-quick-cart__success.is-hiding{
  opacity:0;
  transform:translateY(-6px);
}

.tae-quick-cart__success>span{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  background:#3e6847;
  color:#fff;
  font-weight:900;
}

.tae-quick-cart__success strong,
.tae-quick-cart__success small{
  display:block;
}

.tae-quick-cart__success small{
  margin-top:2px;
  color:#637068;
  font-size:11px;
}

.tae-quick-cart__items{
  display:grid;
  gap:12px;
  overflow:auto;
  padding:18px 20px;
}

.tae-quick-cart-item{
  position:relative;
  display:grid;
  grid-template-columns:88px minmax(0,1fr);
  gap:13px;
  padding:13px;
  border:1px solid #dce2dc;
  border-radius:17px;
  background:#fff;
}

.tae-quick-cart-item__image{
  display:block;
  overflow:hidden;
  width:88px;
  height:88px;
  border-radius:13px;
  background:#edf2ed;
}

.tae-quick-cart-item__image img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.tae-quick-cart-item__body{
  min-width:0;
  padding-right:24px;
}

.tae-quick-cart-item h3{
  margin:3px 0 7px;
  color:#233128;
  font-size:15px;
  line-height:1.25;
}

.tae-quick-cart-item h3 a{
  color:inherit!important;
  text-decoration:none!important;
}

.tae-quick-cart-item p{
  margin:0;
  color:#6d766f;
  font-size:10px;
  line-height:1.4;
}

.tae-quick-cart-item__meta{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
}

.tae-quick-cart-item__meta span{
  color:#6d766f;
  font-size:10px;
}

.tae-quick-cart-item__meta strong{
  color:#233128;
  font-size:14px;
  white-space:nowrap;
}

.tae-quick-cart-item__remove{
  position:absolute;
  top:9px;
  right:10px;
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:50%;
  color:#a4463e!important;
  font-size:19px;
  text-decoration:none!important;
}

.tae-quick-cart__summary{
  margin-top:auto;
  padding:20px;
  border-top:1px solid #dce2dc;
  background:#fff;
}

.tae-quick-cart__summary>div{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.tae-quick-cart__summary>div span{
  color:#6d766f;
  font-size:11px;
}

.tae-quick-cart__summary>div strong{
  color:#233128;
  font-size:25px;
  white-space:nowrap;
}

.tae-quick-cart__checkout,
.tae-quick-cart__view,
.tae-quick-cart__summary>button,
.tae-quick-cart__empty>a{
  display:flex!important;
  width:100%;
  min-height:50px;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  border-radius:13px;
  font-size:13px;
  font-weight:900;
  text-align:center;
  text-decoration:none!important;
}

.tae-quick-cart__checkout{
  border:0;
  background:#3e6847!important;
  color:#fff!important;
}

.tae-quick-cart__view{
  margin-top:9px;
  border:1px solid #3e6847;
  background:#fff;
  color:#3e6847!important;
}

.tae-quick-cart__summary>button{
  margin-top:6px;
  border:0;
  background:transparent;
  color:#52645a;
  cursor:pointer;
}

.tae-quick-cart__empty{
  display:grid;
  place-items:center;
  margin:auto;
  padding:35px;
  text-align:center;
}

.tae-quick-cart__empty>span{
  font-size:48px;
}

.tae-quick-cart__empty strong{
  margin-top:14px;
  color:#233128;
  font-size:22px;
}

.tae-quick-cart__empty p{
  max-width:320px;
  margin:9px 0 22px;
  color:#6d766f;
  font-size:12px;
  line-height:1.55;
}

.tae-quick-cart__empty>a{
  width:auto;
  min-width:210px;
  padding:0 22px;
  background:#3e6847;
  color:#fff!important;
}

.add_to_cart_button.is-adding,
.single_add_to_cart_button.is-adding{
  opacity:.75;
  cursor:wait!important;
}

@media(max-width:620px){
  .tae-quick-cart{
    grid-template-columns:42px minmax(0,1fr);
  }

  .tae-quick-cart__panel{
    grid-column:2;
  }

  .tae-quick-cart__header{
    padding:20px 18px 17px;
  }

  .tae-quick-cart__items,
  .tae-quick-cart__summary{
    padding-left:14px;
    padding-right:14px;
  }

  .tae-quick-cart-item{
    grid-template-columns:74px minmax(0,1fr);
  }

  .tae-quick-cart-item__image{
    width:74px;
    height:74px;
  }
}

@media(prefers-reduced-motion:reduce){
  .tae-quick-cart__panel,
  .tae-quick-cart__backdrop,
  .tae-quick-cart__success{
    transition:none!important;
  }
}


/* ===== Territórios em Ação 14.1.1 — carregamento seguro ===== */

body > .tae-quick-cart{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  margin:0!important;
  padding:0!important;
  z-index:2147483000!important;
}

body > .tae-quick-cart:not(.is-open){
  display:grid!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

body > .tae-quick-cart.is-open{
  visibility:visible!important;
  pointer-events:auto!important;
}

body > .tae-quick-cart .tae-quick-cart__panel{
  max-width:none!important;
  max-height:none!important;
  margin:0 0 0 auto!important;
}

body > .tae-quick-cart .tae-quick-cart__content,
body > .tae-quick-cart .tae-quick-cart__items{
  max-width:none!important;
}


/* ===== Territórios em Ação 14.1.2 — integração com cards ===== */

/* O próximo passo acontece na Cesta Rápida, não em um botão injetado no card. */
.woocommerce a.added_to_cart.wc-forward,
.woocommerce-loop-product__link + a.added_to_cart,
a.added_to_cart.wc-forward{
  display:none!important;
}

/* Preserve the original product-card footer after adding. */
.tae-product-card .add_to_cart_button,
.tae-product-card .button.product_type_simple,
.tae-product-card .button.product_type_variable{
  width:auto!important;
  min-width:0!important;
}

.tae-product-card .add_to_cart_button.is-adding{
  opacity:.7;
  pointer-events:none;
}

/* Ensure the quick cart panel is always above sticky product bars. */
body > .tae-quick-cart{
  z-index:2147483640!important;
}

body > .tae-quick-cart .tae-quick-cart__panel{
  isolation:isolate;
}


/* ===== Territórios em Ação 14.2 — Cesta Rápida completa ===== */

.tae-quick-cart-group{
  overflow:hidden;
  border:1px solid #dce2dc;
  border-radius:17px;
  background:#fff;
}

.tae-quick-cart-group__header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  padding:13px 14px;
  border-bottom:1px solid #e2e7e2;
  background:#eef4ee;
}

.tae-quick-cart-group__header>div{
  display:flex;
  min-width:0;
  flex-direction:column;
}

.tae-quick-cart-group__header>div:last-child{
  align-items:flex-end;
  text-align:right;
}

.tae-quick-cart-group__header span{
  color:#6d766f;
  font-size:9px;
}

.tae-quick-cart-group__header strong{
  margin-top:3px;
  color:#233128;
  font-size:12px;
}

.tae-quick-cart-group__items{
  display:grid;
}

.tae-quick-cart-group .tae-quick-cart-item{
  border:0;
  border-bottom:1px solid #e5e9e4;
  border-radius:0;
}

.tae-quick-cart-group .tae-quick-cart-item:last-child{
  border-bottom:0;
}

.tae-quick-cart-item__actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
}

.tae-quick-cart-quantity{
  display:grid;
  grid-template-columns:32px 42px 32px;
  align-items:center;
  overflow:hidden;
  border:1px solid #d6ddd6;
  border-radius:10px;
  background:#fff;
}

.tae-quick-cart-quantity button{
  display:grid;
  place-items:center;
  width:32px;
  height:34px;
  padding:0;
  border:0;
  background:#f2f5f1;
  color:#233128;
  font-size:17px;
  cursor:pointer;
}

.tae-quick-cart-quantity input{
  display:block!important;
  width:42px!important;
  min-width:42px!important;
  height:34px!important;
  margin:0!important;
  padding:0 2px!important;
  border:0!important;
  border-left:1px solid #d6ddd6!important;
  border-right:1px solid #d6ddd6!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  color:#233128!important;
  font-size:12px!important;
  font-weight:850!important;
  text-align:center!important;
  -moz-appearance:textfield;
}

.tae-quick-cart-quantity input::-webkit-inner-spin-button,
.tae-quick-cart-quantity input::-webkit-outer-spin-button{
  margin:0;
  -webkit-appearance:none;
}

.tae-quick-cart-item__subtotal{
  color:#233128;
  font-size:13px;
  white-space:nowrap;
}

.tae-quick-cart-item__single{
  color:#6d766f;
  font-size:10px;
}

.tae-quick-cart-item.is-updating{
  opacity:.55;
  pointer-events:none;
}

.tae-quick-cart-item.is-updating::after{
  position:absolute;
  inset:0;
  content:"";
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.68),transparent);
  animation:taeQuickCartUpdating 1s linear infinite;
  transform:translateX(-100%);
}

@keyframes taeQuickCartUpdating{
  to{transform:translateX(100%)}
}

.tae-quick-cart__notice{
  margin:14px 20px 0;
  padding:11px 13px;
  border-radius:12px;
  font-size:11px;
  font-weight:750;
  line-height:1.45;
  transition:opacity .2s ease,transform .2s ease;
}

.tae-quick-cart__notice.is-success{
  border:1px solid #bdd0bf;
  background:#eaf4eb;
  color:#31563a;
}

.tae-quick-cart__notice.is-error{
  border:1px solid #e4bbb6;
  background:#fff0ee;
  color:#923d36;
}

.tae-quick-cart__notice.is-hiding{
  opacity:0;
  transform:translateY(-5px);
}

@media(max-width:620px){
  .tae-quick-cart-group__header{
    align-items:flex-start;
  }

  .tae-quick-cart-item__actions{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media(prefers-reduced-motion:reduce){
  .tae-quick-cart-item.is-updating::after{
    animation:none!important;
  }
}


/* ===== Territórios em Ação 14.2.5 — quantidade da cesta lateral ===== */

/*
 * O controle pertence à cesta rápida deste plugin.
 * As regras abaixo neutralizam estilos globais de inputs do tema,
 * WooCommerce e plugins de checkout.
 */
.tae-quick-cart-item__actions{
  display:grid!important;
  grid-template-columns:max-content minmax(92px,max-content)!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  width:100%!important;
  min-width:0!important;
}

.tae-quick-cart-quantity{
  display:flex!important;
  flex:0 0 auto!important;
  width:124px!important;
  min-width:124px!important;
  max-width:124px!important;
  height:42px!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border:1px solid #cfd8d0!important;
  border-radius:12px!important;
  background:#fff!important;
  white-space:nowrap!important;
}

.tae-quick-cart-quantity button{
  display:flex!important;
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:#f2f5f1!important;
  color:#233128!important;
  font-family:inherit!important;
  font-size:20px!important;
  font-weight:500!important;
  line-height:1!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}

.tae-quick-cart-quantity input[data-tae-quick-cart-qty]{
  display:block!important;
  flex:0 0 42px!important;
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
  height:40px!important;
  min-height:40px!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-left:1px solid #cfd8d0!important;
  border-right:1px solid #cfd8d0!important;
  border-radius:0!important;
  outline:0!important;
  background:#fff!important;
  box-shadow:none!important;
  color:#233128!important;
  font-family:inherit!important;
  font-size:15px!important;
  font-weight:850!important;
  line-height:40px!important;
  text-align:center!important;
  text-indent:0!important;
  opacity:1!important;
  visibility:visible!important;
  appearance:textfield!important;
  -moz-appearance:textfield!important;
  -webkit-appearance:none!important;
}

.tae-quick-cart-quantity input[data-tae-quick-cart-qty]::-webkit-inner-spin-button,
.tae-quick-cart-quantity input[data-tae-quick-cart-qty]::-webkit-outer-spin-button{
  display:none!important;
  margin:0!important;
  -webkit-appearance:none!important;
}

.tae-quick-cart-item__subtotal{
  min-width:92px!important;
  justify-self:end!important;
  color:#233128!important;
  font-size:14px!important;
  font-weight:850!important;
  line-height:1.2!important;
  text-align:right!important;
  white-space:nowrap!important;
}

@media(max-width:620px){
  .tae-quick-cart-item__body{
    padding-right:18px!important;
  }

  .tae-quick-cart-item__actions{
    grid-template-columns:124px minmax(82px,max-content)!important;
    gap:10px!important;
  }
}

@media(max-width:430px){
  .tae-quick-cart-item__actions{
    grid-template-columns:1fr!important;
    justify-items:start!important;
  }

  .tae-quick-cart-item__subtotal{
    justify-self:start!important;
    text-align:left!important;
  }
}
