/* ---------------------------------------------------------------------
 * Página do Carrinho — cards + resumo lateral, mobile-first
 * ------------------------------------------------------------------- */
.tc-cart-page {
  width: min(var(--tc-max), calc(100% - 2rem)); margin-inline: auto;
  padding: 2rem 0 3rem;
  display: grid; gap: 1.75rem;
}
@media (min-width: 960px) {
  .tc-cart-page { grid-template-columns: 1fr 340px; align-items: start; }
}

.tc-cart-items { display: grid; gap: 0.85rem; }

.tc-cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  grid-template-areas:
    "thumb info remove"
    "thumb qty  subtotal";
  align-items: center; gap: 0.6rem 0.9rem;
  border: 1px solid var(--tc-line); border-radius: var(--tc-radius);
  background: #fff; padding: 0.9rem;
}
@media (min-width: 640px) {
  .tc-cart-item {
    grid-template-columns: 72px 1.6fr 0.9fr 0.9fr 0.8fr auto;
    grid-template-areas: "thumb info price qty subtotal remove";
  }
}

.tc-cart-item__thumb { grid-area: thumb; }
.tc-cart-item__thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }

.tc-cart-item__info { grid-area: info; min-width: 0; }
.tc-cart-item__name { margin: 0; font-weight: 800; font-size: 0.92rem; line-height: 1.3; }
.tc-cart-item__name a { color: var(--tc-ink); }
.tc-cart-item__meta { display: grid; gap: 0.15rem; margin-top: 0.3rem; font-size: 0.78rem; color: var(--tc-muted); }
.tc-cart-item__notice { margin: 0.3rem 0 0; font-size: 0.78rem; color: var(--tc-brand); font-weight: 700; }
.tc-cart-item__price-mobile { margin: 0.35rem 0 0; font-size: 0.85rem; font-weight: 700; color: var(--tc-ink); }
@media (min-width: 640px) { .tc-cart-item__price-mobile { display: none; } }

.tc-cart-item__price { display: none; grid-area: price; font-size: 0.85rem; color: var(--tc-muted); }
@media (min-width: 640px) { .tc-cart-item__price { display: block; } }
.tc-cart-item__price .woocommerce-Price-amount { font-weight: 700; color: var(--tc-ink); }

.tc-cart-item__qty { grid-area: qty; }
.tc-cart-item__qty .quantity { display: inline-flex; }
.tc-cart-item__qty .qty {
  width: 3.4rem; height: 38px; border-radius: 8px; border: 1px solid var(--tc-line);
  text-align: center; font-weight: 700;
}

.tc-cart-item__subtotal { grid-area: subtotal; font-weight: 800; font-size: 0.9rem; color: var(--tc-ink); text-align: right; }
@media (min-width: 640px) { .tc-cart-item__subtotal { text-align: left; } }

.tc-cart-item__remove { grid-area: remove; justify-self: end; align-self: start; }
.tc-cart-item__remove-link {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 999px; background: var(--tc-paper); color: var(--tc-muted);
  font-size: 1.1rem; line-height: 1; font-weight: 700;
}
.tc-cart-item__remove-link:hover { background: var(--tc-danger); color: #fff; }

.tc-cart-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-top: 0.5rem;
}
.tc-cart-actions .input-text[name="coupon_code"] {
  height: 44px; border: 1px solid var(--tc-line); border-radius: 8px; padding: 0 1rem;
}

/* Resumo lateral */
.tc-cart-side { display: grid; gap: 1rem; }
.tc-cart-summary {
  border: 1px solid var(--tc-line); border-radius: var(--tc-radius);
  background: #fff; padding: 1.25rem;
}
@media (min-width: 960px) { .tc-cart-summary { position: sticky; top: 88px; } }
.tc-cart-summary h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.tc-cart-summary .cart_totals table,
.tc-cart-summary .cart_totals { width: 100%; }
.tc-cart-summary table.shop_table {
  border: 0; width: 100%; border-collapse: collapse; margin: 0 0 1rem;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tc-cart-summary table.shop_table th,
.tc-cart-summary table.shop_table td {
  padding: 0.6rem 0; border-bottom: 1px solid var(--tc-line);
  font-size: 0.88rem; text-align: left;
}
.tc-cart-summary table.shop_table tr:last-child th,
.tc-cart-summary table.shop_table tr:last-child td { border-bottom: 0; }
.tc-cart-summary .order-total th,
.tc-cart-summary .order-total td { font-size: 1.05rem; font-weight: 800; color: var(--tc-ink); }
.tc-cart-summary .wc-proceed-to-checkout { margin: 0; }
.tc-cart-summary .checkout-button {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 52px; border-radius: 999px; font-weight: 800; font-size: 1rem;
  background: var(--tc-brand) !important; color: #fff !important;
}
.tc-cart-summary .checkout-button:hover { background: var(--tc-brand-deep) !important; }

/* Carrinho vazio */
.tc-cart-empty__icon { font-size: 2.5rem; margin: 0 0 0.5rem; }
