/* Carrinho CDC — usa os tokens de checkout.css. Mobile primeiro. */
.cdct-cart .cdct-main { padding-bottom: 110px; }
@media (min-width: 960px) { .cdct-cart .cdct-main { padding-bottom: 40px; } }
.cdct-cart__title { font-size: 24px; font-weight: 800; margin: 0 0 14px; }

/* Grade: itens | resumo */
.cdct-cart .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cdct-cart .woocommerce > * { min-width: 0; }
@media (min-width: 960px) {
	.cdct-cart .woocommerce { grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
	.cdct-cart .woocommerce > .woocommerce-notices-wrapper,
	.cdct-cart .woocommerce > .cdct-cart__title,
	.cdct-cart .woocommerce > .cdct-split,
	.cdct-cart .woocommerce > .cart-empty,
	.cdct-cart .woocommerce > .return-to-shop { grid-column: 1 / -1; }
	.cdct-cart .cart-collaterals { position: sticky; top: 16px; }
}
.cdct-cart .woocommerce-notices-wrapper:empty { display: none; }

/* Itens em cards */
.cdct-cart .woocommerce-cart-form { background: var(--cdct-card); border: 1px solid var(--cdct-line); border-radius: var(--cdct-r); padding: 4px 18px; }
.cdct-cart table.cart { width: 100%; border: 0; border-collapse: collapse; margin: 0; }
.cdct-cart table.cart thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.cdct-cart table.cart tr.cart_item {
	display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas: "img name remove" "img price price" "img qty sub";
	gap: 4px 14px; padding: 16px 0; border-bottom: 1px solid var(--cdct-line-2); align-items: center;
}
.cdct-cart table.cart td { display: block; padding: 0; border: 0; background: none; text-align: left; }
.cdct-cart table.cart td::before { display: none !important; }
.cdct-cart td.product-thumbnail { grid-area: img; align-self: start; }
.cdct-cart td.product-thumbnail img { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--cdct-line-2); border-radius: 8px; background: #fff; display: block; }
.cdct-cart td.product-name { grid-area: name; font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.cdct-cart td.product-name a { color: var(--cdct-ink); text-decoration: none; }
.cdct-cart td.product-name a:hover { text-decoration: underline; }
.cdct-cart td.product-name dl.variation { font-weight: 400; font-size: 13px; color: var(--cdct-muted); margin: 4px 0 0; }
.cdct-cart td.product-name dl.variation dt, .cdct-cart td.product-name dl.variation dd, .cdct-cart td.product-name dl.variation p { display: inline; margin: 0; }
.cdct-cart td.product-name .backorder_notification { font-size: 13px; color: var(--cdct-warn); font-weight: 600; }
.cdct-cart td.product-price { grid-area: price; font-size: 14px; color: var(--cdct-muted); }
.cdct-cart td.product-quantity { grid-area: qty; }
.cdct-cart td.product-subtotal { grid-area: sub; font-weight: 800; font-size: 16px; text-align: right; }
.cdct-cart td.product-remove { grid-area: remove; align-self: start; }
.cdct-cart td.product-remove a.remove {
	display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1;
	color: var(--cdct-muted) !important; text-decoration: none; background: transparent;
}
.cdct-cart td.product-remove a.remove:hover { background: var(--cdct-err-50); color: var(--cdct-err) !important; }
.cdct-cart tr.cart_item:has(.variation-Entrega) { background: linear-gradient(90deg, #fff4e0, transparent 70%); box-shadow: inset 4px 0 0 #e08a00; padding-left: 10px; margin-left: -18px; padding-right: 0; }

/* Quantidade − n + */
.cdct-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--cdct-line); border-radius: 99px; overflow: hidden; background: #fff; }
.cdct-qty input.qty { width: 44px; min-height: 40px; border: 0 !important; text-align: center; font: inherit; font-weight: 700; font-size: 16px; -moz-appearance: textfield; padding: 0; background: none; box-shadow: none !important; }
.cdct-qty input.qty::-webkit-outer-spin-button, .cdct-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cdct-qty__b { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; font-weight: 700; color: var(--cdct-primary); cursor: pointer; }
.cdct-qty__b:hover { background: var(--cdct-primary-50); }
.cdct-cart .quantity label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* Linha de ações: cupom recolhido; "Atualizar carrinho" some (atualiza sozinho) */
.cdct-cart table.cart tr:last-child { display: block; }
.cdct-cart table.cart td.actions { display: block; padding: 14px 0 12px; }
.cdct-cart td.actions > [name="update_cart"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.cdct-cart td.actions .coupon { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; max-width: 460px; }
.cdct-cart td.actions .coupon[hidden] { display: none; }
.cdct-cart td.actions .coupon label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.cdct-cart td.actions .coupon input { width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-size: 16px; border: 1.5px solid var(--cdct-line); border-radius: var(--cdct-r-sm); }
.cdct-cart td.actions .coupon .button { min-height: 48px; background: var(--cdct-ink-2); }

/* Resumo */
.cdct-cart .cart_totals { background: var(--cdct-card); border: 1px solid var(--cdct-line); border-radius: var(--cdct-r); padding: 18px 20px; width: 100% !important; float: none !important; }
.cdct-cart .cart_totals h2 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.cdct-cart .cart_totals table { width: 100%; border: 0; border-collapse: collapse; margin: 0 0 14px; }
.cdct-cart .cart_totals th, .cdct-cart .cart_totals td { padding: 10px 0; border: 0; border-top: 1px solid var(--cdct-line-2); vertical-align: top; text-align: left; background: none; font-size: 15px; }
.cdct-cart .cart_totals td { text-align: right; }
.cdct-cart .cart_totals th { color: var(--cdct-ink-2); font-weight: 600; width: 35%; }
.cdct-cart .cart_totals tr.shipping th, .cdct-cart .cart_totals tr.woocommerce-shipping-totals th { display: block; width: auto; border: 0; padding-bottom: 4px; }
.cdct-cart .cart_totals tr.shipping td, .cdct-cart .cart_totals tr.woocommerce-shipping-totals td { display: block; text-align: left; border-top: 0; padding-top: 0; }
.cdct-cart .cart_totals tr.shipping, .cdct-cart .cart_totals tr.woocommerce-shipping-totals { display: block; border-top: 1px solid var(--cdct-line-2); padding-top: 8px; }
.cdct-cart .cart_totals .order-total th, .cdct-cart .cart_totals .order-total td { font-size: 20px; font-weight: 800; color: var(--cdct-ink); }
.cdct-cart .cart_totals .order-total small { display: block; font-size: 12px; font-weight: 400; color: var(--cdct-muted); }

/* Opções de frete no carrinho (cards compactos) */
.cdct-cart ul#shipping_method, .cdct-cart ul.woocommerce-shipping-methods { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 8px; }
.cdct-cart ul#shipping_method li { position: relative; margin: 0; }
.cdct-cart ul#shipping_method li input[type=radio] { position: absolute; left: 12px; top: 14px; width: 18px; height: 18px; margin: 0; accent-color: var(--cdct-primary); }
.cdct-cart ul#shipping_method li label { display: block; padding: 11px 12px 11px 40px; border: 1.5px solid var(--cdct-line); border-radius: var(--cdct-r-sm); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.cdct-cart ul#shipping_method li input[type=radio]:checked + label { border-color: var(--cdct-primary); background: var(--cdct-primary-50); }
.cdct-cart ul#shipping_method li input[type=hidden] + label { padding-left: 12px; }
.cdct-cart .woocommerce-shipping-destination { font-size: 13.5px; color: var(--cdct-muted); margin: 4px 0; }
.cdct-cart .woocommerce-shipping-calculator .shipping-calculator-button { display: none; }

/* Calcular frete (1 campo) */
.cdct-calc { margin: 6px 0 2px; }
.cdct-calc .shipping-calculator-form { display: block !important; }
.cdct-calc__label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 6px; color: var(--cdct-ink); }
.cdct-calc__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.cdct-calc__row input { width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; border: 1.5px solid var(--cdct-line); border-radius: var(--cdct-r-sm); }
.cdct-calc__row input:focus { outline: none; border-color: var(--cdct-primary); box-shadow: 0 0 0 3px rgba(15, 112, 183, .18); }
.cdct-calc__row .button { min-height: 46px; padding: 0 16px; background: var(--cdct-ink-2); }
.cdct-calc__where { margin: 6px 0 0; font-size: 13.5px; color: var(--cdct-ink-2); }
.cdct-calc__where:empty { display: none; }
.cdct-calc__where.is-err { color: var(--cdct-err); font-weight: 700; }
.cdct-cart .cart_totals .cdct-nocep { font-size: 13px; }

/* Botões e confiança */
.cdct-cart .wc-proceed-to-checkout { padding: 0; margin: 0; }
.cdct-cart a.cdct-go { width: 100%; min-height: 56px; font-size: 18px; background: var(--cdct-ok); }
.cdct-cart a.cdct-go:hover { background: #126631; }
.cdct-cart-trust { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; color: var(--cdct-ink-2); }
.cdct-cart-trust li { display: inline-flex; align-items: center; gap: 5px; }
.cdct-cart-trust svg { color: var(--cdct-ok); }
.cdct-continue { display: block; text-align: center; margin-top: 12px; font-weight: 700; font-size: 15px; }

/* Cross-sells */
.cdct-cart .cross-sells { margin-top: 18px; }
.cdct-cart .cross-sells h2 { font-size: 16px; font-weight: 800; }
.cdct-cart .cross-sells ul.products { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cdct-cart .cross-sells ul.products li { margin: 0 !important; width: auto !important; float: none !important; font-size: 14px; }
.cdct-cart .cross-sells ul.products img { width: 100%; height: auto; border-radius: 8px; }

/* Barra fixa (celular) */
.cdct-cartbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--cdct-line);
	box-shadow: 0 -6px 20px rgba(16, 40, 70, .08); transition: transform .2s;
}
.cdct-cartbar.is-hidden { transform: translateY(110%); }
.cdct-cartbar__total { display: flex; flex-direction: column; line-height: 1.15; }
.cdct-cartbar__total span { font-size: 12.5px; color: var(--cdct-muted); }
.cdct-cartbar__total strong { font-size: 19px; font-weight: 800; }
.cdct-cartbar .cdct-go { flex: 1; min-height: 50px; font-size: 16px; }
@media (min-width: 960px) { .cdct-cartbar { display: none; } }

/* Carrinho vazio */
.cdct-cart .cart-empty { background: var(--cdct-card); border: 1px solid var(--cdct-line); border-radius: var(--cdct-r); padding: 32px 20px; text-align: center; font-size: 17px; font-weight: 700; }
.cdct-cart .return-to-shop { text-align: center; }
.cdct-cart .return-to-shop .button { min-width: 260px; }

/* Carregando (blockUI) */
.cdct-cart .blockUI.blockOverlay { background: rgba(255, 255, 255, .6) !important; }

@media (max-width: 420px) {
	.cdct-cart .woocommerce-cart-form { padding: 2px 12px; }
	.cdct-cart table.cart tr.cart_item { grid-template-columns: 68px minmax(0, 1fr) auto; gap: 4px 10px; }
	.cdct-cart td.product-thumbnail img { width: 68px; height: 68px; }
	.cdct-cart tr.cart_item:has(.variation-Entrega) { margin-left: -12px; }
}

/* Resumo: tabela vira lista flexível (frete ocupa a largura toda) */
.cdct-cart .cart_totals table, .cdct-cart .cart_totals tbody { display: block; width: 100%; }
.cdct-cart .cart_totals tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--cdct-line-2); }
.cdct-cart .cart_totals th, .cdct-cart .cart_totals td { display: block; border: 0 !important; width: auto !important; }
.cdct-cart .cart_totals tr.shipping, .cdct-cart .cart_totals tr.woocommerce-shipping-totals { flex-direction: column; align-items: stretch; gap: 0; }
.cdct-cart .cart_totals tr.shipping td, .cdct-cart .cart_totals tr.woocommerce-shipping-totals td { width: 100% !important; }
.cdct-cart .woocommerce-shipping-destination { display: none; }
