/* Pentalor cart page — v1.1.3
   Shares row components with the drawer (cart-drawer.css loads first):
   .ptl-item-qty / .ptl-dqty-* / .ptl-item-chip / .ptl-item-meta / .ptl-price-*.
   Tokens only: navy #0F172A/#1E293B, slate #64748B, muted #94A3B8,
   border #E2E8F0, light #F1F5F9, green #16A34A, error #DC2626,
   radii 999/16/10, shadow 0 10px 24px rgba(15,23,42,.12). */

/* ---------- Table ---------- */
.woocommerce-cart-form {
	margin-bottom: 8px;
}
table.ptl-cart-table {
	width: 100%;
	border: 0 !important;
	border-collapse: collapse;
}
table.ptl-cart-table thead th {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #64748B;
	text-align: left;
	padding: 0 0 12px;
	border: 0;
	border-bottom: 1px solid #E2E8F0;
	background: none;
}
table.ptl-cart-table thead th.product-quantity {
	text-align: center;
}
table.ptl-cart-table thead th.product-subtotal {
	text-align: right;
}
table.ptl-cart-table td {
	border: 0;
	background: none;
	padding: 20px 0;
	vertical-align: middle;
}
tr.ptl-cart-row td {
	border-bottom: 1px solid #E2E8F0;
}
tr.ptl-cart-row.is-busy {
	opacity: .45;
	pointer-events: none;
}

/* Product cell */
td.ptl-cp-product {
	display: flex;
	align-items: center;
	gap: 16px;
}
.ptl-cp-thumb img {
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid #E2E8F0;
	display: block;
}
.ptl-cp-info {
	min-width: 0;
}
.ptl-cp-info .ptl-item-title {
	margin: 0 0 2px;
}
.ptl-cp-info .ptl-item-title a {
	color: #0F172A;
	text-decoration: none;
}
.ptl-cp-info .ptl-item-title a:hover {
	text-decoration: underline;
}
.ptl-cp-unit {
	margin: 0 0 4px;
	font-size: 14px;
	color: #0F172A;
}
.ptl-cp-unit del {
	color: #94A3B8;
	margin-right: 6px;
}
.ptl-cp-unit ins {
	text-decoration: none;
	font-weight: 600;
}
.ptl-cp-info .ptl-item-meta {
	margin-bottom: 0;
}
.ptl-cp-info .ptl-item-chip {
	margin-top: 8px;
}

/* Quantity cell — compact pill stepper, trash aligned on the same axis */
td.ptl-cp-qty {
	text-align: center;
	white-space: nowrap;
}
td.ptl-cp-qty .ptl-item-qty {
	display: inline-flex !important;
	align-items: center;
	width: max-content !important;
	background: #fff;
	vertical-align: middle;
}
td.ptl-cp-qty .ptl-dqty-btn {
	width: 28px !important;
	height: 28px !important;
	flex: 0 0 auto;
}
td.ptl-cp-qty input.ptl-dqty-input {
	width: 36px !important;
	max-width: 36px !important;
	height: 28px !important;
	flex: 0 0 auto;
	padding: 0 !important;
	margin: 0 !important;
}
td.ptl-cp-qty .product-remove {
	display: inline-flex;
	align-items: center;
	height: 30px;
	margin-left: 10px;
	vertical-align: middle;
}
a.ptl-cp-remove {
	color: #64748B !important;
	line-height: 0;
	display: inline-flex;
	align-items: center;
	padding: 6px;
}
a.ptl-cp-remove svg {
	display: block;
}
a.ptl-cp-remove:hover {
	color: #DC2626 !important;
}

/* Total cell */
td.ptl-cp-total {
	text-align: right;
	white-space: nowrap;
}

/* Actions row: coupon left, native update button hidden (JS clicks it) */
tr.ptl-cp-actions-row td.actions {
	padding: 14px 0 !important;
	vertical-align: middle;
}
tr.ptl-cp-actions-row .coupon {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	vertical-align: middle;
}
/* !important: WooCommerce core pins td.actions .coupon .input-text to 80px. */
tr.ptl-cp-actions-row .coupon .input-text {
	border: 1px solid #E2E8F0 !important;
	border-radius: 999px !important;
	padding: 10px 18px !important;
	font-size: 13px !important;
	color: #0F172A;
	width: 230px !important;
	background: #fff;
}
tr.ptl-cp-actions-row .coupon .input-text::placeholder {
	color: #94A3B8;
	opacity: 1;
}
tr.ptl-cp-actions-row .coupon .input-text:focus {
	outline: none;
	border-color: #2DD4BF;
}
tr.ptl-cp-actions-row .coupon .input-text:focus::placeholder {
	color: transparent;
}
tr.ptl-cp-actions-row .coupon button {
	background: #F1F5F9 !important;
	color: #0F172A !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	padding: 10px 18px !important;
	cursor: pointer;
}
tr.ptl-cp-actions-row .coupon button:hover {
	background: #2DD4BF !important;
	color: #0F172A !important;
}
button.ptl-cp-update {
	display: none !important;
}

/* ---------- Totals block ---------- */
.cart-collaterals {
	display: flex;
	justify-content: flex-end;
}
.cart-collaterals .cart_totals {
	width: 320px;
	max-width: 100%;
	float: none;
}
/* Subtotal label sits right next to its amount */
.cart_totals .cart-subtotal th {
	text-align: right !important;
	padding-right: 16px !important;
	white-space: nowrap;
}
.cart_totals h2 {
	display: none;
}
.cart_totals table.shop_table {
	border: 0 !important;
	margin-bottom: 0;
}
.cart_totals table.shop_table td,
.cart_totals table.shop_table th {
	border: 0;
	background: none;
	padding: 6px 0;
}
/* Subtotal, large */
.cart_totals .cart-subtotal th {
	font-size: 16px;
	font-weight: 600;
	color: #0F172A;
	text-align: left;
}
.cart_totals .cart-subtotal td {
	font-size: 22px;
	font-weight: 700;
	color: #0F172A;
	text-align: right;
}
/* Free shipping everywhere + tax-inclusive prices: these rows duplicate the
   subtotal. !important: woocommerce-smallscreen.css forces tr{display:block}
   with higher specificity below 768px. */
.cart_totals tr.woocommerce-shipping-totals,
.cart_totals tr.order-total,
.cart_totals .woocommerce-shipping-destination,
.cart_totals .woocommerce-shipping-calculator {
	display: none !important;
}
.ptl-cp-note {
	margin: 2px 0 12px;
	font-size: 13px;
	color: #64748B;
	text-align: right;
}
.wc-proceed-to-checkout {
	padding: 0 !important;
	margin: 0 !important;
}
a.ptl-cp-checkout,
a.ptl-cp-checkout.button,
.wc-proceed-to-checkout a.checkout-button {
	display: block !important;
	width: 100% !important;
	background: #0F172A !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: .02em;
	text-align: center;
	text-decoration: none !important;
	padding: 16px !important;
	border-radius: 999px !important;
	border: 0 !important;
	margin: 0 0 4px !important;
	transition: background .15s;
}
a.ptl-cp-checkout:hover,
.wc-proceed-to-checkout a.checkout-button:hover {
	background: #2DD4BF !important;
	color: #0F172A !important;
}
/* Stripe Express Checkout element (Apple Pay / Google Pay / Link) below the button */
.cart_totals #wc-stripe-express-checkout-element,
.cart_totals .wc-stripe-express-checkout-element {
	margin-top: 12px;
}
.cart_totals #wc-stripe-express-checkout-button-separator {
	display: none !important;
}

/* Inline errors under the CHECKOUT button — red text, no popups, no boxes */
#ptl-cp-notice {
	margin-top: 10px;
}
#ptl-cp-notice p {
	margin: 0 0 4px;
	font-size: 14px;
	color: #DC2626;
	text-align: right;
}
/* Native notice banners are relocated into #ptl-cp-notice by cart-page.js */
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info:not(.cart-empty) {
	display: none;
}

/* Loading: soften WooCommerce's blockUI overlay (no full-page spinner look) */
.woocommerce-cart .blockUI.blockOverlay {
	background: rgba(255, 255, 255, .6) !important;
	opacity: 1 !important;
}

/* ---------- Empty cart ---------- */
.woocommerce-cart .cart-empty,
.woocommerce-cart .wc-empty-cart-message .cart-empty {
	border: 0;
	background: none;
	padding: 48px 0 8px;
	margin: 0;
	font-size: 16px;
	color: #64748B;
	text-align: center;
}
.woocommerce-cart .wc-empty-cart-message + .return-to-shop,
.woocommerce-cart .return-to-shop {
	text-align: center;
	padding-bottom: 48px;
}
.woocommerce-cart .return-to-shop a.button {
	background: #0F172A !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	padding: 13px 30px !important;
	border-radius: 999px !important;
	border: 0 !important;
}
.woocommerce-cart .return-to-shop a.button:hover {
	background: #1E293B !important;
}

/* ---------- Mobile: cards + sticky totals ---------- */
@media (max-width: 767px) {
	table.ptl-cart-table thead {
		display: none;
	}
	table.ptl-cart-table,
	table.ptl-cart-table tbody,
	table.ptl-cart-table tr,
	table.ptl-cart-table td {
		display: block;
		width: 100%;
	}
	tr.ptl-cart-row {
		border-bottom: 1px solid #E2E8F0;
		padding: 16px 0;
	}
	tr.ptl-cart-row td {
		border: 0;
		padding: 0;
	}
	td.ptl-cp-product {
		margin-bottom: 12px;
	}
	.ptl-cp-thumb img {
		width: 72px;
		height: 72px;
	}
	td.ptl-cp-qty {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
	}
	td.ptl-cp-qty::before {
		content: attr(data-title);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: #64748B;
	}
	td.ptl-cp-qty > .ptl-item-qty {
		margin-left: auto;
	}
	td.ptl-cp-total {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		margin-top: 10px;
	}
	td.ptl-cp-total::before {
		content: attr(data-title);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: #64748B;
	}
	tr.ptl-cp-actions-row td.actions {
		padding: 16px 0;
	}
	tr.ptl-cp-actions-row .coupon {
		width: 100%;
	}
	tr.ptl-cp-actions-row .coupon .input-text {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
	}

	/* Sticky subtotal + checkout at the viewport bottom */
	.cart-collaterals {
		position: sticky;
		bottom: 0;
		z-index: 30;
		background: #fff;
		box-shadow: 0 -10px 24px rgba(15, 23, 42, .12);
		margin: 0 -14px;
		padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
	}
	.cart-collaterals .cart_totals {
		width: 100%;
	}
	.cart_totals .cart-subtotal th {
		padding-top: 0;
	}
	.ptl-cp-note {
		margin-bottom: 10px;
	}
}

/* ==========================================================================
   Touch targets on phones
   --------------------------------------------------------------------------
   Measured at 390px: the quantity -/+ buttons were 28x28, the remove button
   21.6x21.6, and only 10px apart. That is well under the 44x44 minimum and
   close enough together that changing the quantity easily deletes the line
   instead. Enlarged for touch only — the desktop layout is left as approved.
   ========================================================================== */
@media (max-width: 767px) {
	td.ptl-cp-qty .ptl-dqty-btn {
		width: 44px !important;
		height: 44px !important;
	}
	td.ptl-cp-qty input.ptl-dqty-input {
		height: 44px !important;
		width: 44px !important;
		max-width: 44px !important;
	}
	td.ptl-cp-qty .product-remove {
		height: 44px;
		/* 10px put the trash icon inside thumb-slop of the + button. */
		margin-left: 20px;
	}
	a.ptl-cp-remove {
		/* 21.6px glyph + 2x11px padding = ~44px of tappable area, without
		   changing the glyph itself. */
		padding: 11px !important;
		min-width: 44px;
		min-height: 44px;
		justify-content: center;
	}
}
