/**
 * Carrinho WooCommerce — layout fixo (referencia Labora), independente do JIT Tailwind.
 *
 * @package Labora_Livros
 */

/* Cores referencia */
.labora-cart-page,
.labora-cart-totals,
.labora-cart-shell {
	--labora-cart-navy: #2d2d58;
	--labora-cart-accent: #f070f0;
	--labora-cart-muted: #8e8e9e;
	--labora-cart-surface: #f8f8f8;
	--labora-cart-tag: #ede8f5;
	--labora-cart-line: #e8e8ee;
	--labora-cart-row: #f0f0f5;
	color: var(--labora-cart-navy);
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* Evita quebra agressiva do WC em tabela */
@media screen and (max-width: 768px) {
	.labora-cart-page table.shop_table_responsive thead {
		display: table-header-group !important;
	}

	.labora-cart-page table.shop_table_responsive tbody tr,
	.labora-cart-page table.shop_table_responsive tbody td,
	.labora-cart-page table.shop_table_responsive tbody th {
		display: table-cell !important;
	}

	.labora-cart-page table.shop_table_responsive tr {
		display: table-row !important;
	}

	.labora-cart-page table.shop_table_responsive td::before,
	.labora-cart-page table.shop_table_responsive th::before {
		display: none !important;
	}
}

.labora-cart-page .woocommerce-cart-form {
	margin-bottom: 2.5rem;
}

.labora-cart-page table.shop_table.cart {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	background: transparent;
	margin: 0;
	border: none;
}

.labora-cart-page table.shop_table.cart thead th {
	border: none;
	border-bottom: 1px solid var(--labora-cart-line);
	padding: 0.5rem 0.75rem 1rem;
	font-size: 13px;
	font-weight: 600;
	color: var(--labora-cart-muted);
	vertical-align: bottom;
}

.labora-cart-page table.shop_table.cart tbody td {
	border: none;
	border-bottom: 1px solid var(--labora-cart-row);
	padding: 2rem 0.75rem;
	vertical-align: middle;
}

.labora-cart-page table.shop_table.cart .product-price,
.labora-cart-page table.shop_table.cart .product-subtotal {
	font-size: 15px;
	font-weight: 600;
	color: var(--labora-cart-navy);
}

.labora-cart-page table.shop_table.cart .product-price {
	text-align: center;
}

.labora-cart-page table.shop_table.cart .product-subtotal {
	text-align: right;
}

.labora-cart-page table.shop_table.cart .product-quantity {
	text-align: center;
}

.labora-cart-page table.shop_table.cart .product-name {
	font-size: 15px;
	font-weight: 700;
}

.labora-cart-page table.shop_table.cart .product-name a {
	color: var(--labora-cart-navy);
	text-decoration: none;
}

.labora-cart-page table.shop_table.cart .product-name a:hover {
	color: var(--labora-cart-accent);
}

.labora-cart-page table.shop_table.cart .product-thumbnail img {
	border-radius: 6px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	width: 72px;
	max-width: 72px;
	height: auto;
	max-height: 108px;
	object-fit: cover;
	display: block;
}

.labora-cart-page table.shop_table.cart .actions {
	border: none;
	padding: 1.5rem 0;
}

.labora-cart-page table.shop_table.cart .actions .button[name="update_cart"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Quantidade pill */
.labora-cart-page .labora-cart-qty {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem;
	border-radius: 9999px;
	border: 1px solid #d7d7df;
	background: #fff;
	padding: 0.25rem 0.35rem;
	box-sizing: border-box;
}

.labora-cart-page .labora-cart-qty .quantity {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}

.labora-cart-page .labora-cart-qty .qty {
	width: 2.5rem !important;
	min-width: 2.5rem;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 !important;
	-moz-appearance: textfield;
}

.labora-cart-page .labora-cart-qty .qty::-webkit-outer-spin-button,
.labora-cart-page .labora-cart-qty .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.labora-cart-page .labora-cart-qty-minus,
.labora-cart-page .labora-cart-qty-plus {
	flex-shrink: 0;
	width: 2.25rem;
	height: 2.25rem;
	border: none;
	border-radius: 9999px;
	background: transparent;
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--labora-cart-navy);
	cursor: pointer;
	line-height: 1;
}

.labora-cart-page .labora-cart-qty-minus:hover,
.labora-cart-page .labora-cart-qty-plus:hover {
	background: var(--labora-cart-surface);
}

/* Remover */
.labora-cart-page .product-name a.remove {
	display: inline-block;
	margin-top: 0.75rem;
	font-size: 13px;
	font-weight: 600;
	color: var(--labora-cart-navy) !important;
	text-decoration: underline;
	text-underline-offset: 2px;
	background: none !important;
	width: auto !important;
	height: auto !important;
	line-height: 1.4 !important;
}

.labora-cart-page .product-name a.remove:hover {
	color: var(--labora-cart-accent) !important;
	background: none !important;
}

/* Totais */
.labora-cart-collaterals {
	margin-top: 0;
}

.labora-cart-totals .cart_totals {
	float: none;
	width: 100%;
}

.labora-cart-totals > .cart_totals > div.relative {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
	background: var(--labora-cart-surface);
	padding: 2rem 1.25rem;
}

@media (min-width: 768px) {
	.labora-cart-totals > .cart_totals > div.relative {
		padding: 2.5rem 2rem;
	}
}

@media (min-width: 1024px) {
	.labora-cart-totals > .cart_totals > div.relative {
		padding: 3rem;
	}
}

.labora-cart-totals table.shop_table {
	width: 100%;
	border: none;
	margin: 0;
	background: transparent;
}

.labora-cart-totals table.shop_table tbody tr th,
.labora-cart-totals table.shop_table tbody tr td {
	border: none;
	border-bottom: 1px solid var(--labora-cart-line);
	padding: 0.75rem 0;
	vertical-align: top;
	font-size: 15px;
	font-weight: 600;
	color: var(--labora-cart-navy);
}

.labora-cart-totals table.shop_table tbody tr.order-total th,
.labora-cart-totals table.shop_table tbody tr.order-total td {
	border-bottom: none;
	padding-top: 1rem;
	font-size: 17px;
	font-weight: 700;
}

.labora-cart-totals table.shop_table tbody tr td {
	text-align: right;
}

.labora-cart-totals table.shop_table tbody tr th {
	text-align: left;
	padding-right: 1rem;
}

.labora-cart-totals .woocommerce-Price-amount {
	color: var(--labora-cart-navy);
}

/* Cupom no resumo */
.labora-cart-totals .labora-cart-coupon-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 13px;
	font-weight: 600;
	color: var(--labora-cart-navy);
}

.labora-cart-totals .labora-cart-coupon-form .flex > div:first-child {
	min-height: 48px;
	border-radius: 12px;
	border: 1px solid #d7d7df;
	background: #fff;
	padding: 0.5rem 0.75rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	flex: 1;
	min-width: 0;
}

.labora-cart-totals .labora-cart-coupon-form input[type="text"] {
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
	flex: 1;
	min-width: 120px;
	font-size: 14px;
	color: var(--labora-cart-navy);
}

.labora-cart-totals .labora-cart-coupon-form button[type="submit"] {
	width: 48px;
	height: 48px;
	border-radius: 9999px;
	border: none;
	background: linear-gradient(135deg, #338e65 0%, #74ddae 100%);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.labora-cart-totals .labora-cart-coupon-form button[type="submit"]:hover {
	opacity: 0.9;
}

.labora-cart-totals .labora-cart-coupon-form span.rounded-md {
	background: var(--labora-cart-tag);
	border-radius: 6px;
	padding: 0.25rem 0.625rem;
	font-size: 12px;
	font-weight: 600;
}

/* Frete na tabela */
.labora-cart-totals .labora-cart-shipping-row ul.woocommerce-shipping-methods {
	list-style: none;
	margin: 0;
	padding: 0;
}

.labora-cart-totals .labora-cart-shipping-row .woocommerce-shipping-methods li {
	margin: 0 0 0.5rem;
}

.labora-cart-totals .labora-cart-shipping-row label {
	font-size: 14px;
	font-weight: 500;
	color: var(--labora-cart-navy);
}

/* Checkout */
.labora-cart-totals .labora-cart-checkout-btn.checkout-button {
	display: flex !important;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2rem;
	padding: 1rem 2rem !important;
	border-radius: 30px !important;
	background: linear-gradient(135deg, #338e65 0%, #74ddae 100%) !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	border: none !important;
	box-shadow: none !important;
	line-height: 1.3 !important;
}

.labora-cart-totals .labora-cart-checkout-btn.checkout-button:hover {
	opacity: 0.95;
	color: #fff !important;
	background: linear-gradient(135deg, #338e65 0%, #74ddae 100%) !important;
}

.labora-cart-totals .wc-proceed-to-checkout {
	padding: 0;
}

/* Variacoes / dl */
.labora-cart-page .product-name dl.variation {
	margin: 0.5rem 0 0;
	font-size: 13px;
	color: var(--labora-cart-muted);
	font-weight: 500;
}

.labora-cart-page .product-name dl.variation dt,
.labora-cart-page .product-name dl.variation dd {
	display: inline;
	margin: 0;
}

/* Cupom removido link */
.labora-cart-totals a.woocommerce-remove-coupon {
	color: var(--labora-cart-navy);
	font-size: 13px;
}

/* Carrinho vazio */
.labora-cart-page.labora-cart-empty {
	color: var(--labora-cart-navy);
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.labora-cart-empty-cta {
	margin-top: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 30px;
	padding: 0.75rem 2rem;
	font-size: 15px;
	font-weight: 700;
	color: #fff !important;
	background: linear-gradient(135deg, #338e65 0%, #74ddae 100%) !important;
	text-decoration: none !important;
	border: none !important;
	transition: opacity 0.15s ease;
}

.labora-cart-empty-cta:hover {
	opacity: 0.95;
	color: #fff !important;
}

.labora-cart-entry {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
}
