/* ==========================================================================
   MYSELF: carrinho lateral (sacola)
   ========================================================================== */
.cart-widget-side.wd-side-hidden {
  width: 440px !important;
  max-width: 100vw;
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
  box-shadow: -24px 0 60px rgba(0, 0, 0, .14);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1);
}
.cart-widget-side > .wd-heading { display: none !important; } /* o topo agora e o da sacola */
.cart-widget-side .widget_shopping_cart { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; }
.cart-widget-side .widget_shopping_cart_content { height: 100%; }

.msc {
  --v: var(--my-green, #016738);
  --v2: #014a29;
  --tinta: #141414;
  --texto: #5b605d;
  --linha: #eceeed;
  --fundo: #f6f8f7;
  --ease: cubic-bezier(.2, .8, .2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--texto);
  font-family: var(--my-font, inherit);
  font-size: 14px;
  line-height: 1.45;
}
.msc *, .msc *::before, .msc *::after { box-sizing: border-box; }
.msc p { margin: 0; }
.msc svg { display: block; width: 100%; height: 100%; }
.msc a { text-decoration: none; }
.msc button { font-family: inherit; }

/* carregando (mudanca de quantidade, remover) */
.msc::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--v), transparent);
  background-size: 50% 100%;
  opacity: 0;
  pointer-events: none;
}
.msc.is-carregando::after { opacity: 1; animation: msc-carrega 1s linear infinite; }
@keyframes msc-carrega { from { background-position: -100% 0; } to { background-position: 200% 0; } }
.msc.is-carregando .msc-rodape { opacity: .55; pointer-events: none; }

/* ---------- topo ---------- */
.msc-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 16px 22px;
  border-bottom: 1px solid var(--linha);
}
.msc .msc-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--tinta);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: none;
}
.msc-titulo > svg { flex: none; width: 24px; height: 24px; color: var(--v); }
.msc-contador { padding: 3px 10px; border-radius: 999px; background: #eaf4ee; color: var(--v); font-size: 12px; font-weight: 800; }
.msc .msc-fechar {
  all: unset;
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fundo);
  color: var(--tinta);
  cursor: pointer;
  transition: background-color .2s ease, transform .3s var(--ease);
}
.msc .msc-fechar svg { width: 18px; height: 18px; }
.msc .msc-fechar:hover { background: #e9ecea; transform: rotate(90deg); }
.msc .msc-fechar:focus-visible { outline: 2px solid var(--v); outline-offset: 2px; }

/* ---------- corpo (rola) ---------- */
.msc-corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 18px; }
.msc-corpo::-webkit-scrollbar { width: 6px; }
.msc-corpo::-webkit-scrollbar-thumb { border-radius: 6px; background: #d9dedb; }

/* metas */
.msc-metas { display: grid; gap: 8px; margin-bottom: 14px; }
.msc-metas:empty { display: none; }
.msc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--fundo);
}
.msc-meta-ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: #fff; color: var(--v); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.msc-meta-txt { flex: 1; min-width: 0; }
.msc-meta-txt p { color: var(--tinta); font-size: 13px; line-height: 1.35; }
.msc-meta-txt b { color: var(--v); font-weight: 800; }
.msc-meta-txt .amount { color: var(--v); }
.msc-barra { display: block; height: 6px; margin-top: 8px; overflow: hidden; border-radius: 6px; background: #e1e7e3; }
.msc-barra i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #0b8a4f, var(--v)); transition: width .8s var(--ease); }
.msc-meta.is-ok { background: #eaf6ef; }
.msc-meta.is-ok .msc-meta-ico { background: var(--v); color: #fff; }
.msc-meta.is-ok .msc-meta-txt p b { color: var(--v2); }
.msc-passos { display: flex; gap: 6px; margin-top: 8px; }
.msc-passos i { flex: 1; height: 6px; border-radius: 6px; background: #e1e7e3; transition: background-color .4s ease; }
.msc-passos i.on { background: var(--v); }

/* ---------- itens ---------- */
.msc .msc-itens { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.msc .msc-item {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--linha);
  border-radius: 18px;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease, opacity .3s ease, transform .3s var(--ease);
}
.msc .msc-item:hover { border-color: #dfe5e1; box-shadow: 0 8px 24px rgba(0,0,0,.05); }
.msc .msc-item.is-novo { animation: msc-novo 1.6s var(--ease); }
@keyframes msc-novo {
  0% { transform: translateX(24px); opacity: 0; }
  30% { transform: none; opacity: 1; border-color: var(--v); box-shadow: 0 0 0 3px rgba(1,103,56,.15); }
  100% { border-color: var(--linha); box-shadow: none; }
}
/* durante a remocao (WooCommerce bloqueia o item) */
.msc .msc-item.blockUI, .msc .msc-item .blockUI.blockOverlay { border-radius: 18px; }
.msc-foto { display: block; align-self: start; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 12px; background: var(--fundo); }
.msc-foto img { display: block; width: 100%; height: 100% !important; object-fit: cover; border-radius: 0 !important; transition: transform .6s var(--ease); }
.msc-item:hover .msc-foto img { transform: scale(1.05); }
.msc-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msc-linha1 { display: flex; align-items: flex-start; gap: 8px; }
.msc .msc-nome { flex: 1; min-width: 0; color: var(--tinta); font-size: 14.5px; font-weight: 800; line-height: 1.3; }
.msc a.msc-nome:hover { color: var(--v); }
.msc .msc-tirar {
  position: static !important;
  display: grid !important;
  place-items: center;
  flex: none;
  width: 30px !important;
  height: 30px !important;
  margin: -4px -4px 0 0;
  padding: 6px;
  border-radius: 50%;
  background: transparent !important;
  color: #9aa19d !important;
  font-size: 0 !important;
  line-height: 0;
  transition: background-color .2s ease, color .2s ease;
}
.msc .msc-tirar::before, .msc .msc-tirar::after { display: none !important; }
.msc .msc-tirar:hover { background: #fdeceb !important; color: #c62828 !important; }
.msc-opcoes { color: var(--texto); font-size: 13px; }
.msc-qr {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 2px !important;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eef6f1;
  color: var(--v2);
  font-size: 12px;
  line-height: 1.25;
}
.msc-qr svg { flex: none; width: 15px; height: 15px; }
.msc-qr span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msc-qr b { font-weight: 700; }
.msc-extra { font-size: 12px; overflow-wrap: anywhere; }
.msc-linha2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }

/* quantidade */
.msc-qtd { display: inline-flex; align-items: center; height: 34px; padding: 3px; border: 1px solid var(--linha); border-radius: 999px; background: #fff; }
.msc .msc-qtd button {
  all: unset;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 7px;
  border-radius: 50%;
  color: var(--tinta);
  cursor: pointer;
  transition: background-color .2s ease;
}
.msc .msc-qtd button:hover:not(:disabled) { background: var(--fundo); }
.msc .msc-qtd button:disabled { color: #c9cfcb; cursor: default; }
.msc .msc-qtd button:focus-visible { outline: 2px solid var(--v); }
.msc-qtd-num { min-width: 24px; color: var(--tinta); font-size: 14px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.msc-qtd-fixa { font-size: 13px; }
.msc-preco { display: flex; flex-direction: column; align-items: flex-end; color: var(--tinta); font-size: 15px; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.msc-preco del { color: #9aa19d; font-size: 12px; font-weight: 500; }
.msc-preco .amount { color: inherit; }
.msc .msc-gratis { color: var(--v); font-weight: 800; }

/* ---------- vazia ---------- */
.msc-vazio { padding: 34px 10px 26px; text-align: center; }
.msc-vazio-ico { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 16px; padding: 22px; border-radius: 50%; background: #eaf4ee; color: var(--v); animation: msc-balanca 3s ease-in-out infinite; }
@keyframes msc-balanca { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg) translateY(-3px); } }
.msc .msc-vazio h3 { margin: 0 0 6px; color: var(--tinta); font-size: 19px; font-weight: 800; text-transform: none; }
.msc-vazio p { margin: 0 auto 20px !important; max-width: 260px; }

/* ---------- sugestoes ---------- */
.msc-sugestoes { margin-top: 22px; }
.msc .msc-sugestoes h3 { margin: 0 0 12px; color: var(--tinta); font-size: 14px; font-weight: 800; letter-spacing: .02em; text-transform: none; }
.msc-trilho {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 10px;
  margin: 0;
  padding: 2px 0 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.msc-trilho::-webkit-scrollbar { display: none; }
.msc .msc-sug { display: flex; flex-direction: column; gap: 3px; scroll-snap-align: start; color: var(--tinta); }
.msc-sug-foto { display: block; margin-bottom: 6px; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 14px; background: var(--fundo); }
.msc-sug-foto img { display: block; width: 100%; height: 100% !important; object-fit: cover; border-radius: 0 !important; transition: transform .6s var(--ease); }
.msc-sug:hover .msc-sug-foto img { transform: scale(1.06); }
.msc-sug-nome { display: -webkit-box; overflow: hidden; font-size: 12.5px; font-weight: 700; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msc-sug-preco { color: var(--v); font-size: 13px; font-weight: 800; }
.msc-sug-ver { display: inline-flex; align-items: center; gap: 4px; color: var(--texto); font-size: 12px; font-weight: 700; }
.msc-sug-ver svg { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.msc-sug:hover .msc-sug-ver { color: var(--v); }
.msc-sug:hover .msc-sug-ver svg { transform: translateX(3px); }

/* ---------- rodape ---------- */
.msc-rodape {
  flex: none;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom)) !important;
  border-top: 1px solid var(--linha);
  background: #fff;
  box-shadow: 0 -10px 30px rgba(0,0,0,.05);
  transition: opacity .25s ease;
}
.msc-rodape > * { padding-inline: 0 !important; }
.msc .msc-resumo { display: grid; gap: 4px; margin: 0 0 12px; }
.msc-resumo > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.msc-resumo dt { color: var(--texto); font-size: 13.5px; font-weight: 500; }
.msc-resumo dd { margin: 0; color: var(--tinta); font-size: 14px; font-weight: 700; text-align: right; }
.msc-resumo .amount { color: inherit; }
.msc-desconto dd, .msc-desconto dt { color: var(--v) !important; }
.msc-calc { color: var(--texto); font-size: 12.5px; font-weight: 500; }
.msc-total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed #dde2df; }
.msc-total dt { color: var(--tinta); font-size: 16px; font-weight: 800; }
.msc-total dd { font-size: 20px; font-weight: 800; line-height: 1.1; }
.msc-total small { display: block; margin-top: 3px; color: var(--texto); font-size: 12px; font-weight: 500; }

.msc .msc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--v);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(1,103,56,.28);
  transition: background-color .25s ease, transform .25s var(--ease), box-shadow .25s ease;
}
.msc .msc-btn svg { width: 18px; height: 18px; }
.msc .msc-btn:hover { background: var(--v2); color: #fff; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(1,103,56,.32); }
.msc .msc-btn-linha { display: inline-flex; width: auto; background: transparent; color: var(--v); box-shadow: inset 0 0 0 1.5px var(--v); }
.msc .msc-btn-linha:hover { background: var(--v); color: #fff; box-shadow: none; }
.msc-acoes { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.msc .msc-continuar, .msc .msc-ver {
  all: unset;
  color: var(--tinta);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #c9cfcb;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.msc .msc-continuar:hover, .msc .msc-ver:hover { color: var(--v); text-decoration-color: var(--v); }
.msc .msc-continuar:focus-visible, .msc .msc-ver:focus-visible { outline: 2px solid var(--v); outline-offset: 3px; }
.msc-seguro { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px !important; color: #8a918d; font-size: 11.5px; }
.msc-seguro svg { width: 13px; height: 13px; }
.msc-rodape .shortcut-button-mini-cart:empty { display: none; }

/* celular: ocupa a tela toda */
@media (max-width: 480px) {
  .cart-widget-side.wd-side-hidden { width: 100vw !important; }
  .msc-topo { padding: 14px 14px 12px 18px; }
  .msc-corpo { padding: 12px 14px 16px; }
  .msc .msc-item { grid-template-columns: 76px 1fr; gap: 12px; padding: 10px; }
  .msc-rodape { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important; }
  .msc .msc-btn { min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .msc .msc-item.is-novo, .msc-vazio-ico, .msc.is-carregando::after { animation: none; }
}
