/* ABC Pedagógico — sacola lateral v0.11.3 */
:root {
  --abc-cart-drawer-width: 460px;
  --abc-cart-drawer-title: #1e3557;
  --abc-cart-drawer-price: #24b36b;
  --abc-cart-drawer-button: #20c86a;
  --abc-cart-drawer-button-text: #fff;
}

body.abc-cart-drawer-open {
  position: fixed;
  inset-inline: 0;
  width: 100%;
  overflow: hidden;
}

.abc-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  visibility: hidden;
}

.abc-cart-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.abc-cart-drawer__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 31, 50, .58);
  opacity: 0;
  cursor: default;
  transition: opacity .24s ease;
}

.abc-cart-drawer.is-open .abc-cart-drawer__overlay {
  opacity: 1;
}

.abc-cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(var(--abc-cart-drawer-width), calc(100vw - 28px));
  max-width: 100%;
  background: #fff;
  color: #223047;
  box-shadow: -18px 0 45px rgba(15, 31, 50, .2);
  transform: translate3d(100%, 0, 0);
  transition: transform .28s ease;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.abc-cart-drawer.is-open .abc-cart-drawer__panel {
  transform: translate3d(0, 0, 0);
}

.abc-cart-drawer__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 102px;
  padding: 24px 28px;
  border-bottom: 1px solid #e7ebf0;
  background: #fff;
}

.abc-cart-drawer__header h2 {
  margin: 0;
  color: var(--abc-cart-drawer-title);
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
}

.abc-cart-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #596b7e;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.abc-cart-drawer__close:hover,
.abc-cart-drawer__close:focus-visible {
  background: #f1f5f9;
  color: #1e3557;
}

.abc-cart-drawer__notice {
  position: absolute;
  top: 82px;
  left: 20px;
  right: 20px;
  z-index: 4;
  padding: 10px 14px;
  border-radius: 12px;
  background: #eaf9f1;
  color: #17663f;
  font-size: .92rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.abc-cart-drawer__notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.abc-cart-drawer__notice.is-error {
  background: #fff0f3;
  color: #a42645;
}

.abc-cart-drawer__dynamic,
.abc-cart-drawer__content {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.abc-cart-drawer__dynamic {
  position: relative;
  overflow: hidden;
}

.abc-cart-drawer__dynamic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(255, 255, 255, .72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease;
}

.abc-cart-drawer.is-busy .abc-cart-drawer__dynamic::after {
  opacity: 1;
  visibility: visible;
}

.abc-cart-drawer__items {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 28px 28px;
  scrollbar-width: thin;
}

.abc-cart-drawer__item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0 24px;
  border-bottom: 1px solid #e7ebf0;
}

.abc-cart-drawer__item:first-child {
  padding-top: 8px;
}

.abc-cart-drawer__item-media,
.abc-cart-drawer__item-media a {
  display: block;
}

.abc-cart-drawer__item-image {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 4px;
  object-fit: contain;
  background: #f7f8fa;
}

.abc-cart-drawer__item-info {
  min-width: 0;
}

.abc-cart-drawer__item-title {
  display: block;
  margin: 0 0 6px;
  color: #1e3557;
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.abc-cart-drawer__item-title:hover {
  color: #2f8cff;
}

.abc-cart-drawer__item-meta {
  margin: 2px 0 5px;
  color: #6b7785;
  font-size: .82rem;
}

.abc-cart-drawer__item-meta dl,
.abc-cart-drawer__item-meta p {
  margin: 0;
}

.abc-cart-drawer__item-price {
  margin: 2px 0 5px;
  color: var(--abc-cart-drawer-price);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.2;
}

.abc-cart-drawer__item-price .amount {
  color: inherit;
}

.abc-cart-drawer__remove {
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d85454;
  font: inherit;
  font-size: .98rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.abc-cart-drawer__remove:hover,
.abc-cart-drawer__remove:focus-visible {
  color: #a52e2e;
  text-decoration: underline;
}

.abc-cart-drawer__footer {
  flex: 0 0 auto;
  padding: 24px 28px calc(26px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid #e7ebf0;
  background: #fff;
  box-shadow: 0 -10px 26px rgba(15, 31, 50, .05);
}

.abc-cart-drawer__total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-bottom: 20px;
  color: #273b56;
  font-size: 1.3rem;
}

.abc-cart-drawer__total strong,
.abc-cart-drawer__total .amount {
  color: #273b56;
  font-size: 1.65rem;
  font-weight: 700;
}

.abc-cart-drawer__checkout,
.abc-cart-drawer__shop-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  padding: 15px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--abc-cart-drawer-button);
  color: var(--abc-cart-drawer-button-text);
  box-shadow: 0 14px 28px rgba(32, 200, 106, .24);
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.abc-cart-drawer__checkout:hover,
.abc-cart-drawer__shop-button:hover,
.abc-cart-drawer__checkout:focus-visible,
.abc-cart-drawer__shop-button:focus-visible {
  color: var(--abc-cart-drawer-button-text);
  filter: brightness(.96);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(32, 200, 106, .3);
}

.abc-cart-drawer__empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 30px;
  text-align: center;
}

.abc-cart-drawer__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 94px;
  height: 94px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: #edf6ff;
  color: #2f8cff;
}

.abc-cart-drawer__empty strong {
  color: #1e3557;
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.55rem;
}

.abc-cart-drawer__empty p {
  margin: 8px 0 24px;
  color: #677587;
}

.abc-cart-drawer__shop-button {
  width: min(100%, 280px);
  min-height: 56px;
  font-size: 1.08rem;
}

body.abc-cart-drawer-enabled .woocommerce ul.products li.product .added_to_cart,
body.abc-cart-drawer-enabled .woocommerce ul.products li.product a.wc-forward {
  display: none !important;
}

@media (max-width: 782px) {
  .abc-cart-drawer__panel {
    width: calc(100vw - 28px);
  }

  .abc-cart-drawer__header {
    min-height: 92px;
    padding: 20px 24px;
  }

  .abc-cart-drawer__header h2 {
    font-size: 1.55rem;
  }

  .abc-cart-drawer__items {
    padding: 14px 24px 24px;
  }

  .abc-cart-drawer__item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0 22px;
  }

  .abc-cart-drawer__item-image {
    width: 72px;
    height: 72px;
  }

  .abc-cart-drawer__item-title {
    font-size: 1rem;
  }

  .abc-cart-drawer__footer {
    padding: 22px 24px calc(24px + env(safe-area-inset-bottom, 0));
  }

  .abc-cart-drawer__total {
    margin-bottom: 18px;
    font-size: 1.16rem;
  }

  .abc-cart-drawer__total strong,
  .abc-cart-drawer__total .amount {
    font-size: 1.48rem;
  }

  .abc-cart-drawer__checkout {
    min-height: 68px;
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .abc-cart-drawer__overlay,
  .abc-cart-drawer__panel,
  .abc-cart-drawer__notice,
  .abc-cart-drawer__dynamic::after,
  .abc-cart-drawer__checkout,
  .abc-cart-drawer__shop-button {
    transition: none !important;
  }
}

/* Remove o link auxiliar duplicado “Ver carrinho”. */
body.abc-cart-drawer-enabled .added_to_cart.wc-forward,
body.abc-cart-drawer-enabled .product .added_to_cart,
body.abc-cart-drawer-enabled .single-product .summary a.wc-forward[href*="cart"],
body.abc-cart-drawer-enabled .single-product .summary a.wc-forward[href*="carrinho"] {
  display: none !important;
}

/* Página tradicional do carrinho: contingência simples, sem tabela pesada. */
.abc-simple-cart-page {
  width: min(calc(100% - 32px), 920px);
  margin: 42px auto 72px;
}

.abc-simple-cart-page__inner {
  overflow: hidden;
  border: 1px solid #e7ebf0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(34, 48, 71, .09);
}

.abc-simple-cart-page h1 {
  margin: 0;
  padding: 26px 30px;
  border-bottom: 1px solid #e7ebf0;
  color: #1e3557;
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.1;
  text-align: center;
}

.abc-simple-cart-page__items {
  padding: 8px 30px;
}

.abc-simple-cart-page__item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid #edf0f3;
}

.abc-simple-cart-page__item:last-child {
  border-bottom: 0;
}

.abc-simple-cart-page__media,
.abc-simple-cart-page__media a {
  display: block;
}

.abc-simple-cart-page__image {
  display: block;
  width: 92px;
  height: 92px;
  border-radius: 10px;
  background: #f7f8fa;
  object-fit: contain;
}

.abc-simple-cart-page__details {
  min-width: 0;
}

.abc-simple-cart-page__name {
  display: block;
  color: #1e3557;
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.abc-simple-cart-page__price {
  margin-top: 6px;
  color: #24b36b;
  font-size: 1.22rem;
  font-weight: 800;
}

.abc-simple-cart-page__remove {
  display: inline-block;
  margin-top: 6px;
  color: #cf4a4a;
  text-decoration: none;
}

.abc-simple-cart-page__remove:hover,
.abc-simple-cart-page__remove:focus-visible {
  color: #a52e2e;
  text-decoration: underline;
}

.abc-simple-cart-page__footer {
  padding: 26px 30px 30px;
  border-top: 1px solid #e7ebf0;
  background: #fbfcfd;
}

.abc-simple-cart-page__total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #273b56;
  font-size: 1.35rem;
}

.abc-simple-cart-page__total strong,
.abc-simple-cart-page__total .amount {
  color: #273b56;
  font-size: 1.75rem;
  font-weight: 800;
}

.abc-simple-cart-page__primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 14px 22px;
  border-radius: 14px;
  background: var(--abc-cart-drawer-button);
  color: var(--abc-cart-drawer-button-text);
  box-shadow: 0 14px 28px rgba(32, 200, 106, .22);
  font-family: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.abc-simple-cart-page__empty {
  padding: 50px 30px;
  text-align: center;
}

.abc-simple-cart-page__empty p {
  margin: 0 0 22px;
  color: #677587;
  font-size: 1.12rem;
}

@media (max-width: 640px) {
  .abc-simple-cart-page {
    width: min(calc(100% - 20px), 920px);
    margin: 24px auto 42px;
  }

  .abc-simple-cart-page__inner {
    border-radius: 17px;
  }

  .abc-simple-cart-page h1 {
    padding: 20px 18px;
    font-size: 2rem;
  }

  .abc-simple-cart-page__items {
    padding: 4px 18px;
  }

  .abc-simple-cart-page__item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
  }

  .abc-simple-cart-page__image {
    width: 72px;
    height: 72px;
  }

  .abc-simple-cart-page__name {
    font-size: 1rem;
  }

  .abc-simple-cart-page__price {
    font-size: 1.08rem;
  }

  .abc-simple-cart-page__footer {
    padding: 22px 18px 24px;
  }

  .abc-simple-cart-page__primary {
    min-height: 56px;
    font-size: 1.08rem;
  }
}

/* Mensagem clara quando o material já está na sacola. */
.abc-cart-inline-message {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 9px 12px;
  border: 1px solid #f0c84b;
  border-radius: 10px;
  background: #fff8d8;
  color: #38445a;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.abc-cart-inline-message.is-error {
  border-color: #e5a2a2;
  background: #fff0f0;
  color: #8b2525;
}

body.single-product form.cart .abc-cart-inline-message {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .abc-cart-inline-message {
    padding: 8px 10px;
    font-size: .86rem;
  }
}
