/* =========================================================
   CARRITO - INFINITUM 3D
========================================================= */

.cart-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe4ee;
  border-radius: 13px;
  background: #ffffff;
  color: var(--dark);
  font-size: 21px;
  cursor: pointer;
  transition: 0.25s ease;
}

.cart-button:hover {
  border-color: #bfcce3;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(30, 50, 100, 0.1);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  background: var(--blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 2998;
  background: rgba(10, 18, 45, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2999;
  width: min(430px, 100%);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: -20px 0 60px rgba(20, 30, 70, 0.18);
  transform: translateX(105%);
  transition: transform 0.35s ease;
}

.cart-panel.active {
  transform: translateX(0);
}

.cart-header {
  min-height: 82px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf0f6;
}

.cart-header h2 {
  font-size: 23px;
  font-weight: 900;
}

.cart-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #f2f5fa;
  color: var(--dark);
  font-size: 20px;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.cart-empty {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--text);
}

.cart-empty-icon {
  font-size: 48px;
}

.cart-item {
  padding: 15px 0;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 15px;
  border-bottom: 1px solid #edf0f5;
}

.cart-item-image {
  width: 82px;
  height: 82px;
  padding: 8px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #f4f7fc;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info h3 {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 900;
}

.cart-item-price {
  color: var(--blue);
  font-weight: 900;
}

.cart-item-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-quantity {
  display: flex;
  align-items: center;
  border: 1px solid #dfe5ef;
  border-radius: 50px;
  overflow: hidden;
}

.cart-quantity button {
  width: 34px;
  height: 32px;
  border: none;
  background: #ffffff;
  cursor: pointer;
  font-size: 18px;
}

.cart-quantity span {
  width: 30px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.cart-remove {
  border: none;
  background: none;
  color: #e74c3c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cart-footer {
  padding: 20px 22px 25px;
  border-top: 1px solid #e8ecf3;
  background: #ffffff;
}

.cart-total-row {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-total-label {
  font-size: 16px;
  font-weight: 800;
}

.cart-total-price {
  color: var(--dark);
  font-size: 24px;
  font-weight: 900;
}

.cart-checkout {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 50px;
  background: var(--blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.cart-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(22, 119, 255, 0.25);
}

.cart-checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.add-cart-button {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--blue);
  border-radius: 50px;
  background: #ffffff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.add-cart-button:hover {
  background: var(--blue);
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .cart-panel {
    width: 100%;
  }

  .cart-item {
    grid-template-columns: 70px 1fr;
  }

  .cart-item-image {
    width: 70px;
    height: 70px;
  }
}


/* =========================================================
   CARRINHO · CONTINUAR A COMPRAR
========================================================= */

.cart-shop-products,
.cart-continue-shopping {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(22, 119, 255, 0.22);
  border-radius: 50px;
  background: #f4f8ff;
  color: var(--blue, #1677ff);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.cart-shop-products {
  width: auto;
  min-width: 180px;
  margin-top: 14px;
  padding: 0 22px;
}

.cart-shop-products:hover,
.cart-continue-shopping:hover {
  border-color: rgba(22, 119, 255, 0.42);
  background: #eaf2ff;
  transform: translateY(-1px);
}

.cart-continue-shopping {
  margin-bottom: 10px;
}

.cart-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   CARRINHO · resumo, categoria, stock e rodapé
========================================================= */

.cart-item-category {
  display: block;
  margin: 2px 0 4px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7c8aa5;
}

.cart-item-each {
  font-size: 11px;
  font-weight: 700;
  opacity: .7;
}

.cart-item-line {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: .85;
}

.cart-item-line b {
  font-weight: 900;
}

.cart-item-stock {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
}

.cart-item-stock.low {
  background: rgba(255, 200, 87, .18);
  color: #b27a00;
}

.cart-item-stock.out {
  background: rgba(255, 116, 168, .16);
  color: #c9345f;
}

.cart-quantity button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.cart-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(120, 140, 180, .35);
}

.cart-summary[hidden] {
  display: none;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #6c7893;
}

.cart-summary-row strong {
  font-weight: 800;
  color: inherit;
}

.cart-secure-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #7c8aa5;
}

.cart-secure-note[hidden] {
  display: none;
}

/* ---------- tema escuro ---------- */

body.site-dark .cart-footer {
  background: #08132a !important;
  border-top-color: rgba(117, 166, 255, .16) !important;
}

body.site-dark .cart-total-label {
  color: #a9b8d2 !important;
}

body.site-dark .cart-total-price {
  color: #f4f8ff !important;
}

body.site-dark .cart-summary {
  border-bottom-color: rgba(117, 166, 255, .22);
}

body.site-dark .cart-summary-row {
  color: #9eabc3;
}

body.site-dark .cart-summary-row strong {
  color: #e9f1ff;
}

body.site-dark .cart-item-category {
  color: #7f93b3;
}

body.site-dark .cart-item-line {
  color: #c4d3ea;
}

body.site-dark .cart-item-stock.low {
  background: rgba(255, 200, 87, .14);
  color: #ffd27a;
}

body.site-dark .cart-item-stock.out {
  background: rgba(255, 116, 168, .14);
  color: #ff9fc0;
}

body.site-dark .cart-secure-note {
  color: #8fa1bc;
}

body.site-dark .cart-continue-shopping {
  background: transparent !important;
  border-color: rgba(117, 166, 255, .35) !important;
  color: #cfe6ff !important;
}

body.site-dark .cart-continue-shopping:hover {
  background: rgba(99, 210, 255, .1) !important;
}

/* Casilla de aceitação dos termos no carrinho */
.cart-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #6c7893;
  cursor: pointer;
}

.cart-terms[hidden] {
  display: none;
}

.cart-terms input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #1677ff;
  cursor: pointer;
}

.cart-terms a {
  color: #1677ff;
  font-weight: 800;
}

body.site-dark .cart-terms {
  color: #a9b8d2;
}

body.site-dark .cart-terms a {
  color: #63d2ff;
}
