/**
 * Animalart: página do carrinho (`[woocommerce_cart]`). Contrato
 * docs/plans/2026-11-11-carrinho-layout.md; manual docs/CART-PAGE-UI.md.
 * Porta da sacola da Camisas (tema/assets/css/modules/sacola.css de lá), com
 * os tokens da Animalart e o mesmo acabamento do checkout (checkout.css).
 *
 * Só CSS sobre a marcação nativa do WooCommerce e do Composite Products: sem
 * override de template, sem gancho que mova HTML. O `functions.php` desliga o
 * `woocommerce-layout.css` e o `woocommerce-smallscreen.css`; o que eles davam
 * ao carrinho (resumo ao lado, tabela responsiva com `data-title`) está aqui.
 *
 * Filhos do Composite (linhas "Anel N: Cor", "Tigela: Nome"): o CSS não cria
 * nem esconde controle. Quantidade em texto e ausência do "×" vêm do próprio
 * Composite (SENTINEL 32.3).
 *
 * Escopo: `body.woocommerce-cart` + `.animalart-page-shell__content` (o
 * conteúdo do `page.php`), para não vazar no minicart. Pesos: 400 e 900.
 */

body.woocommerce-cart {
	--ca-esp-1: 4px;
	--ca-esp-2: 8px;
	--ca-esp-3: 12px;
	--ca-esp-4: 16px;
	--ca-esp-5: 24px;
	--ca-esp-6: 32px;
	--ca-esp-8: 48px;
	--ca-borda: 1px;
	--ca-campo: 48px;
	--ca-botao: 52px;
	--ca-alvo: 44px;
	--ca-miniatura: 64px;
	--ca-miniatura-filho: 40px;
	--ca-recuo-filho: 24px;
	--ca-resumo: 380px;
	--ca-largura: none; /* a largura vem do .page-container, igual à do header */
	--ca-fs-base: 1rem;
	--ca-fs-ui: 0.9375rem;
	--ca-fs-micro: 0.8125rem;
	--ca-raio-cartao: var(--animalart-ui-radius-card, 18px);
	--ca-raio-campo: var(--animalart-radius-md, 8px);
	--ca-raio-botao: var(--animalart-ui-radius-control, 999px);
	--ca-tinta: var(--animalart-ink, #171717);
	--ca-suave: var(--animalart-muted, #666666);
	--ca-papel: var(--animalart-paper, #ffffff);
	--ca-fundo: var(--animalart-surface-muted, #f7f7f7);
	--ca-linha: var(--animalart-line, #e5e5e5);
	--ca-linha-forte: var(--animalart-line-strong, rgba(23, 23, 23, 0.28));
	--ca-foco: var(--animalart-focus, #171717);
	--ca-cta: var(--animalart-yellow, #ffcd00);
	--ca-cta-suave: var(--animalart-yellow-soft, #fff9d6);

	background: var(--ca-fundo);
}

/* ---------- Página: largura do checkout e título pequeno ---------- */
/* Mesma largura útil do header (2026-11-12). */
body.woocommerce-cart .page-container {
	max-width: var(--animalart-header-largura, 1330px);
	padding-block: var(--ca-esp-6) var(--ca-esp-8);
}

@media (min-width: 783px) {
	body.woocommerce-cart .page-container {
		padding-inline: 1em;
	}
}

body.woocommerce-cart .animalart-breadcrumbs,
body.woocommerce-cart .animalart-page-shell__header,
body.woocommerce-cart .animalart-page-shell__content {
	max-width: var(--ca-largura);
	margin-inline: auto;
}

body.woocommerce-cart .animalart-page-shell__header {
	margin-bottom: var(--ca-esp-5);
}

body.woocommerce-cart .animalart-page-shell__header .page-container__title {
	margin: 0;
	font-family: var(--animalart-font-display, 'Brandon Grotesque', Arial, sans-serif);
	font-size: 2em;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: 0;
}

body.woocommerce-cart .animalart-page-shell__content {
	font-size: var(--ca-fs-base);
	line-height: 1.5;
}

/* ---------- Grade: itens à esquerda, resumo à direita ---------- */
body.woocommerce-cart .animalart-page-shell__content .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--ca-resumo);
	align-items: start;
	gap: var(--ca-esp-5) var(--ca-esp-6);
	color: var(--ca-tinta);
	font-family: var(--animalart-font-body, 'Brandon Grotesque', Arial, sans-serif);
}

/* Avisos, carrinho vazio e o que um plugin puser nos ganchos: largura toda. */
body.woocommerce-cart .animalart-page-shell__content .woocommerce > * {
	grid-column: 1 / -1;
	min-width: 0;
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce > .woocommerce-cart-form {
	grid-column: 1;
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce > .cart-collaterals {
	grid-column: 2;
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce-notices-wrapper {
	width: 100%;
	margin: 0;
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce-notices-wrapper:empty {
	display: none;
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce-notices-wrapper > :last-child {
	margin-bottom: 0;
}

/* ---------- Cartão dos itens ---------- */
body.woocommerce-cart .animalart-page-shell__content .woocommerce-cart-form {
	box-sizing: border-box;
	margin: 0;
	padding: var(--ca-esp-2) var(--ca-esp-5);
	border: var(--ca-borda) solid var(--ca-linha);
	border-radius: var(--ca-raio-cartao);
	background: var(--ca-papel);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	border-radius: 0;
	font-size: var(--ca-fs-ui);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart th,
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td {
	padding: var(--ca-esp-4) var(--ca-esp-3);
	border: 0;
	border-top: var(--ca-borda) solid var(--ca-linha);
	background: transparent;
	text-align: left;
	vertical-align: middle;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart thead th {
	padding-block: var(--ca-esp-3);
	border-top: 0;
	color: var(--ca-suave);
	font-size: var(--ca-fs-micro);
	font-weight: 400;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr > :first-child {
	padding-left: 0;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr > :last-child {
	padding-right: 0;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart .product-remove {
	width: var(--ca-alvo);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart .product-thumbnail {
	width: var(--ca-miniatura);
	min-width: 0;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-thumbnail a {
	display: block;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-thumbnail img {
	display: block;
	width: var(--ca-miniatura);
	max-width: none;
	height: var(--ca-miniatura);
	border-radius: var(--ca-raio-campo);
	background: var(--ca-fundo);
	box-shadow: none;
	object-fit: cover;
}

/* `break-word` (e não `anywhere`): não encolhe a largura mínima da coluna. */
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name {
	min-width: 0;
	overflow-wrap: break-word;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name > a {
	color: var(--ca-tinta);
	font-weight: 900;
	text-decoration: none;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name > a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Dados do item ("Cor: Branco") e linhas do comedouro na mesma linha. */
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name dl {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 2px var(--ca-esp-1);
	width: auto;
	margin: var(--ca-esp-1) 0 0;
	color: var(--ca-suave);
	font-size: var(--ca-fs-micro);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name dl dt,
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name dl dd,
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name dl dd p {
	float: none;
	margin: 0;
	padding: 0;
	font-weight: 400;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name dl dd {
	color: var(--ca-tinta);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-name dl dd a {
	color: inherit;
	font-weight: inherit;
	text-underline-offset: 3px;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-price,
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-subtotal {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart .product-subtotal {
	text-align: right;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-subtotal {
	font-weight: 900;
}

/* O WooCommerce pinta o preço em 700; aqui vale o peso de quem o contém. */
body.woocommerce-cart .animalart-page-shell__content .woocommerce-Price-amount {
	font-weight: inherit;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart .product-quantity {
	text-align: center;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.product-quantity .quantity {
	display: inline-flex;
}

body.woocommerce-cart .animalart-page-shell__content .quantity input.qty {
	box-sizing: border-box;
	width: 64px;
	height: var(--ca-campo);
	padding: 0 var(--ca-esp-1);
	border: var(--ca-borda) solid var(--ca-linha-forte);
	border-radius: var(--ca-raio-campo);
	background: var(--ca-papel);
	color: var(--ca-tinta);
	font-family: inherit;
	font-size: var(--ca-fs-base);
	text-align: center;
}

body.woocommerce-cart .animalart-page-shell__content .quantity input.qty:focus {
	border-color: var(--ca-tinta);
	outline: 2px solid var(--ca-foco);
	outline-offset: 1px;
}

/* "×" pequeno. O `!important` da cor é obrigatório: o WooCommerce põe
   `color: var(--wc-red) !important` (e `#fff !important` no hover) em
   `.woocommerce a.remove` (client/legacy/css/woocommerce.scss, conferido em
   2026-11-11). */
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ca-suave) !important;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart a.remove:hover {
	background: var(--ca-fundo);
	color: var(--ca-tinta) !important;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart a.remove:focus-visible {
	outline: 2px solid var(--ca-foco);
	outline-offset: 2px;
}

/* ---------- Comedouro (Composite): filhos agrupados sob o pai ---------- */
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_container_table_item:has(+ tr.component_table_item) > td {
	padding-bottom: var(--ca-esp-2);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item > td {
	padding-top: var(--ca-esp-1);
	padding-bottom: var(--ca-esp-1);
	border-top: 0;
	color: var(--ca-suave);
	font-size: var(--ca-fs-micro);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item:not(:has(+ tr.component_table_item)) > td {
	padding-bottom: var(--ca-esp-4);
}

/* Navegador sem `:has()`: todos os filhos ganham um respiro um pouco maior,
   para o último não encostar na divisória do item seguinte. */
@supports not selector(:has(+ *)) {
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_container_table_item > td {
		padding-bottom: var(--ca-esp-2);
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item > td {
		padding-bottom: var(--ca-esp-2);
	}
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item td.product-thumbnail {
	padding-left: var(--ca-recuo-filho);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item td.product-thumbnail img {
	width: var(--ca-miniatura-filho);
	height: var(--ca-miniatura-filho);
	margin-left: auto;
}

/* O Composite recua o nome do filho com 30 px; o recuo aqui já vem da foto. */
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item .component_table_item_indent {
	padding-left: 0;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item td.product-name,
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item td.product-name > a {
	color: var(--ca-tinta);
	font-weight: 400;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item td.product-name dl {
	margin: 0;
	font-size: inherit;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.component_table_item td.product-subtotal {
	font-weight: 400;
}

/* Seta do Composite ao lado do preço do filho: ruído visual. */
body.woocommerce-cart .animalart-page-shell__content .component_table_item_price::after,
body.woocommerce-cart .animalart-page-shell__content .component_table_item_subtotal::after {
	content: none;
}

/* ---------- Cupom e atualizar: uma faixa sob a tabela ---------- */
body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions {
	padding: var(--ca-esp-4) 0;
	text-align: right;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions::after {
	content: '';
	display: table;
	clear: both;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--ca-esp-2);
	float: left;
	max-width: 100%;
	padding: 0;
	border: 0;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon input.input-text {
	box-sizing: border-box;
	flex: 0 1 220px;
	width: 220px;
	min-width: 0;
	height: var(--ca-campo);
	margin: 0;
	padding: 0 var(--ca-esp-4);
	border: var(--ca-borda) solid var(--ca-linha-forte);
	border-radius: var(--ca-raio-botao);
	background: var(--ca-papel);
	color: var(--ca-tinta);
	font-family: inherit;
	font-size: var(--ca-fs-base);
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon input.input-text::placeholder {
	color: var(--ca-suave);
	opacity: 1;
}

body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon input.input-text:focus {
	border-color: var(--ca-tinta);
	outline: 2px solid var(--ca-foco);
	outline-offset: 1px;
}

/* ---------- Botões nativos (cupom, atualizar, calcular, voltar) ---------- */
body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button,
body.woocommerce-cart .animalart-page-shell__content .woocommerce a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--ca-campo);
	margin: 0;
	padding: 0 var(--ca-esp-5);
	border: var(--ca-borda) solid var(--ca-tinta);
	border-radius: var(--ca-raio-botao);
	background: var(--ca-papel);
	color: var(--ca-tinta);
	font-family: var(--animalart-font-display, 'Brandon Grotesque', Arial, sans-serif);
	font-size: var(--ca-fs-ui);
	font-weight: 900;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
	transition: background-color 0.2s var(--animalart-ui-ease, ease), color 0.2s var(--animalart-ui-ease, ease), border-color 0.2s var(--animalart-ui-ease, ease);
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button:hover,
body.woocommerce-cart .animalart-page-shell__content .woocommerce a.button:hover {
	background: var(--ca-tinta);
	color: var(--ca-papel);
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button:focus-visible,
body.woocommerce-cart .animalart-page-shell__content .woocommerce a.button:focus-visible {
	outline: 2px solid var(--ca-foco);
	outline-offset: 2px;
}

/* "Atualizar carrinho": claro, sem contorno forte. Desligado até mudar algo. */
body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button[name="update_cart"] {
	border-color: var(--ca-linha);
	background: var(--ca-fundo);
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button[name="update_cart"]:hover:not(:disabled) {
	border-color: var(--ca-tinta);
	background: var(--ca-tinta);
	color: var(--ca-papel);
}

body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button:disabled,
body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button:disabled[disabled] {
	padding: 0 var(--ca-esp-5);
	border-color: var(--ca-linha);
	background: var(--ca-fundo);
	color: var(--ca-suave);
	cursor: not-allowed;
	opacity: 1;
}

/* ---------- Resumo ---------- */
body.woocommerce-cart .animalart-page-shell__content .cart-collaterals {
	display: grid;
	gap: var(--ca-esp-5);
	width: 100%;
	margin: 0;
}

body.woocommerce-cart .animalart-page-shell__content .cart-collaterals::before,
body.woocommerce-cart .animalart-page-shell__content .cart-collaterals::after {
	content: none;
}

body.woocommerce-cart .animalart-page-shell__content .cart-collaterals .cart_totals,
body.woocommerce-cart .animalart-page-shell__content .cart-collaterals .cross-sells {
	box-sizing: border-box;
	float: none;
	width: 100%;
	margin: 0;
	padding: var(--ca-esp-5);
	border: var(--ca-borda) solid var(--ca-linha);
	border-radius: var(--ca-raio-cartao);
	background: var(--ca-papel);
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals h2,
body.woocommerce-cart .animalart-page-shell__content .cross-sells h2 {
	margin: 0 0 var(--ca-esp-3);
	font-family: var(--animalart-font-display, 'Brandon Grotesque', Arial, sans-serif);
	font-size: 1.125rem;
	font-weight: 900;
	line-height: 1.3;
	letter-spacing: 0;
}

/* Linhas em flex, como o resumo do checkout: rótulo à esquerda, valor à
   direita; o Envio quebra e as opções e a calculadora usam a largura toda. */
body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table,
body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table tbody {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	font-size: var(--ca-fs-ui);
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table tr {
	display: flex;
	justify-content: space-between;
	gap: 0 var(--ca-esp-3);
	border-top: var(--ca-borda) solid var(--ca-linha);
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table tr:first-child {
	border-top: 0;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table th,
body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table td {
	display: block;
	padding: var(--ca-esp-3) 0;
	border: 0;
	background: transparent;
	font-weight: 400;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table th {
	text-align: left;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table td {
	font-variant-numeric: tabular-nums;
	text-align: right;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals tr.woocommerce-shipping-totals {
	flex-wrap: wrap;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals tr.woocommerce-shipping-totals > td {
	flex: 1 1 100%;
	padding-top: 0;
	text-align: left;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals tr.order-total th,
body.woocommerce-cart .animalart-page-shell__content .cart_totals tr.order-total td {
	padding-top: var(--ca-esp-4);
	font-size: var(--ca-fs-base);
	font-weight: 900;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals tr.order-total strong {
	font-weight: 900;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals small,
body.woocommerce-cart .animalart-page-shell__content .cart_totals .includes_tax {
	color: var(--ca-suave);
	font-size: var(--ca-fs-micro);
}

/* Envio: opções, destino e "Calcular entrega". */
body.woocommerce-cart .animalart-page-shell__content .cart_totals ul#shipping_method {
	display: grid;
	gap: var(--ca-esp-1);
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals ul#shipping_method li {
	display: flex;
	align-items: center;
	gap: var(--ca-esp-2);
	margin: 0;
	padding: 0;
	line-height: 1.4;
	text-indent: 0;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals ul#shipping_method li input {
	flex: none;
	margin: 0;
	accent-color: var(--ca-tinta);
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals ul#shipping_method li label {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0 var(--ca-esp-3);
	min-height: var(--ca-alvo);
	margin: 0;
	cursor: pointer;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .woocommerce-shipping-destination {
	margin: var(--ca-esp-2) 0 0;
	color: var(--ca-suave);
	font-size: var(--ca-fs-micro);
	text-align: left;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals form.woocommerce-shipping-calculator {
	margin: var(--ca-esp-1) 0 0;
	text-align: left;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-button {
	display: inline-flex;
	align-items: center;
	min-height: var(--ca-alvo);
	margin: 0;
	color: var(--ca-tinta);
	font-weight: 900;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-button::after {
	content: none;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form {
	margin: 0;
	padding: var(--ca-esp-2) 0 0;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form p.form-row {
	float: none;
	width: 100%;
	margin: 0 0 var(--ca-esp-2);
	padding: 0;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .select2-container {
	width: 100% !important;
	max-width: 100%;
}

/* 16 px: abaixo disso o iOS dá zoom ao focar o campo. */
body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .input-text,
body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form select,
body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .select2-container .select2-selection--single {
	box-sizing: border-box;
	width: 100%;
	height: var(--ca-campo);
	min-height: var(--ca-campo);
	padding: 0 var(--ca-esp-3);
	border: var(--ca-borda) solid var(--ca-linha-forte);
	border-radius: var(--ca-raio-campo);
	background: var(--ca-papel);
	color: var(--ca-tinta);
	font-family: inherit;
	font-size: var(--ca-fs-base);
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0 var(--ca-esp-5) 0 0;
	color: var(--ca-tinta);
	line-height: calc(var(--ca-campo) - 2px);
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .select2-container .select2-selection--single .select2-selection__arrow {
	top: var(--ca-esp-3);
	right: var(--ca-esp-2);
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .input-text:focus,
body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form select:focus,
body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .select2-selection--single:focus-visible,
body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .select2-container--focus .select2-selection--single,
body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form .select2-container--open .select2-selection--single {
	border-color: var(--ca-tinta);
	outline: 2px solid var(--ca-foco);
	outline-offset: 1px;
}

body.woocommerce-cart .animalart-page-shell__content .cart_totals .shipping-calculator-form button.button {
	width: 100%;
}

/* CTA da marca: amarelo com texto preto, como o `#place_order` do checkout.
   Sem isto o `.button.alt` do `woocommerce-general.css` pinta de roxo. */
body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout {
	margin: 0;
	padding: var(--ca-esp-4) 0 0;
}

body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout .button.alt {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: var(--ca-botao);
	margin: 0;
	padding: var(--ca-esp-3) var(--ca-esp-4);
	border: 0;
	border-radius: var(--ca-raio-botao);
	background: var(--ca-cta);
	color: var(--ca-tinta);
	font-family: var(--animalart-font-display, 'Brandon Grotesque', Arial, sans-serif);
	font-size: var(--ca-fs-base);
	font-weight: 900;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s var(--animalart-ui-ease, ease), color 0.2s var(--animalart-ui-ease, ease);
}

body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout .button.alt:hover {
	background: var(--ca-tinta);
	color: var(--ca-cta);
}

body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout a.checkout-button:focus-visible,
body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout .button.alt:focus-visible {
	outline: 2px solid var(--ca-foco);
	outline-offset: 2px;
}

/* Bloqueio do WooCommerce enquanto recalcula: no raio do cartão. */
body.woocommerce-cart .animalart-page-shell__content .blockUI.blockOverlay {
	border-radius: var(--ca-raio-cartao);
}

/* ---------- Carrinho vazio ---------- */
body.woocommerce-cart .animalart-page-shell__content .return-to-shop {
	margin: 0;
}

body.woocommerce-cart .animalart-page-shell__content .return-to-shop a.button.wc-backward {
	width: auto;
}

/* ---------- Telas largas: resumo fixo ao rolar ----------
   Com teto de altura e rolagem própria: em tela baixa (ou com calculadora de
   frete aberta e venda cruzada) o resumo nunca fica cortado. */
@media (min-width: 1025px) {
	body.woocommerce-cart .animalart-page-shell__content .cart-collaterals {
		position: sticky;
		top: var(--ca-esp-5);
		max-height: calc(100vh - var(--ca-esp-8));
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

/* ---------- Tablet (783 a 1024 px) ----------
   Ao lado do resumo a tabela ficaria espremida (nome quebrando letra a letra):
   uma coluna, tabela inteira e o resumo embaixo, à direita. */
@media (max-width: 1024px) {
	body.woocommerce-cart .animalart-page-shell__content .woocommerce {
		grid-template-columns: minmax(0, 1fr);
	}

	body.woocommerce-cart .animalart-page-shell__content .woocommerce > .woocommerce-cart-form,
	body.woocommerce-cart .animalart-page-shell__content .woocommerce > .cart-collaterals {
		grid-column: 1;
	}

	body.woocommerce-cart .animalart-page-shell__content .woocommerce > .cart-collaterals {
		justify-self: end;
		width: min(100%, 440px);
	}
}

@media (prefers-reduced-motion: reduce) {
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart a.remove,
	body.woocommerce-cart .animalart-page-shell__content .woocommerce button.button,
	body.woocommerce-cart .animalart-page-shell__content .woocommerce a.button,
	body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout a.checkout-button {
		transition: none;
	}
}

/* ---------- Celular (até 782 px, breakpoint do tema) ----------
   O `woocommerce-smallscreen.css` está desligado no `functions.php`; a tabela
   responsiva (rótulo do `data-title`) é desenhada aqui. */
@media (max-width: 782px) {
	body.woocommerce-cart .page-container {
		padding: 6vw 4vw 12vw;
	}

	body.woocommerce-cart .animalart-page-shell__header {
		margin-bottom: var(--ca-esp-4);
	}

	/* 6vw como o checkout, mas sem passar dos 32 px do desktop perto de 782 px. */
	body.woocommerce-cart .animalart-page-shell__header .page-container__title {
		font-size: min(calc(6vw * var(--animalart-escala-celular, 1)), 32px);
	}

	body.woocommerce-cart .animalart-page-shell__content .woocommerce {
		grid-template-columns: minmax(0, 1fr);
		row-gap: var(--ca-esp-4);
	}

	body.woocommerce-cart .animalart-page-shell__content .woocommerce > .cart-collaterals {
		justify-self: stretch;
		width: 100%;
	}

	body.woocommerce-cart .animalart-page-shell__content .woocommerce-cart-form {
		padding: 0 var(--ca-esp-4);
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart,
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tbody {
		display: block;
		width: 100%;
	}

	/* Cabeçalho fora da vista, mas lido por leitor de tela (o `carrinho.js`
	   repõe os papéis de tabela que o `display: block` tira). */
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart {
		position: relative;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	/* Item: foto à esquerda; nome e "×" em cima; preço, quantidade e subtotal
	   em linhas com o rótulo do WooCommerce. */
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item {
		display: grid;
		grid-template-columns: var(--ca-miniatura) minmax(0, 1fr) var(--ca-alvo);
		column-gap: var(--ca-esp-3);
		padding: var(--ca-esp-4) 0;
		border-top: var(--ca-borda) solid var(--ca-linha);
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tbody > tr.cart_item:first-child {
		border-top: 0;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td {
		display: block;
		padding: 0;
		border: 0;
		text-align: left;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-thumbnail {
		display: block;
		grid-column: 1;
		grid-row: 1 / span 4;
		width: auto;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-name {
		grid-column: 2;
		grid-row: 1;
		align-self: center;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-remove {
		grid-column: 3;
		grid-row: 1;
		width: auto;
		text-align: right;
	}

	/* Preço unitário fica de fora no celular, como na Camisas: o subtotal já
	   mostra o valor da linha. */
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-price {
		display: none;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-quantity,
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-subtotal {
		display: flex;
		grid-column: 2 / -1;
		justify-content: space-between;
		align-items: center;
		gap: var(--ca-esp-3);
		margin-top: var(--ca-esp-2);
		text-align: right;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-price::before,
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-quantity::before,
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td.product-subtotal::before {
		content: attr(data-title);
		float: none;
		color: var(--ca-suave);
		font-size: var(--ca-fs-micro);
		font-weight: 400;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item > td:empty {
		display: none;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart a.remove {
		width: var(--ca-alvo);
		height: var(--ca-alvo);
		margin: calc(var(--ca-esp-3) * -1) calc(var(--ca-esp-3) * -1) 0 0;
	}

	/* Filhos do comedouro: compactos e recuados sob o pai, sem divisória. */
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_container_table_item:has(+ tr.component_table_item) {
		padding-bottom: var(--ca-esp-2);
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item {
		grid-template-columns: var(--ca-miniatura-filho) minmax(0, 1fr) auto;
		align-items: center;
		padding: var(--ca-esp-1) 0 var(--ca-esp-1) var(--ca-recuo-filho);
		border-top: 0;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item:not(:has(+ tr.component_table_item)) {
		padding-bottom: var(--ca-esp-4);
	}

	/* Sem `:has()`: respiro igual em todos os filhos. */
	@supports not selector(:has(+ *)) {
		body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item {
			padding-bottom: var(--ca-esp-2);
		}
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item > td.product-thumbnail {
		grid-row: 1;
		padding-left: 0;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item > td.product-thumbnail img {
		margin-left: 0;
	}

	/* Preço e subtotal do filho vêm vazios do Composite quando o anel não tem
	   preço próprio (o valor está no pai); a célula vazia só abriria espaço. */
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item > td.product-price,
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item > td.product-subtotal,
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item > td.product-remove {
		display: none;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item > td.product-quantity {
		grid-column: 3;
		grid-row: 1;
		justify-content: flex-end;
		gap: 2px;
		margin: 0;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr.cart_item.component_table_item > td.product-quantity::before {
		content: '\00d7';
	}

	/* Faixa de cupom: campo e "Aplicar" na linha, "Atualizar" embaixo. */
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart tr:not(.cart_item) {
		display: block;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions {
		display: grid;
		gap: var(--ca-esp-2);
		padding: var(--ca-esp-4) 0;
		border-top: var(--ca-borda) solid var(--ca-linha);
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions::before,
	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions::after {
		content: none;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon {
		float: none;
		flex-wrap: nowrap;
		width: 100%;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon input.input-text {
		flex: 1 1 auto;
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions .coupon button.button {
		flex: none;
		padding-inline: var(--ca-esp-4);
	}

	body.woocommerce-cart .animalart-page-shell__content table.shop_table.cart td.actions > button.button {
		width: 100%;
	}

	body.woocommerce-cart .animalart-page-shell__content .cart-collaterals .cart_totals {
		padding: var(--ca-esp-4);
	}

	/* O resumo continua tabela de duas colunas: sem o rótulo do `data-title`. */
	body.woocommerce-cart .animalart-page-shell__content .cart_totals table.shop_table td::before {
		content: none;
	}

	body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout a.checkout-button,
	body.woocommerce-cart .animalart-page-shell__content .wc-proceed-to-checkout .button.alt {
		min-height: 56px;
	}
}
