/* Classic [woocommerce_cart] and [woocommerce_checkout] – the live site needs them (TM EPO engraving,
   Checkout Field Editor Pro, FunnelKit). Same look as the block version: white page, beige rounded cards. */

.woocommerce-cart .woocommerce, .woocommerce-checkout .woocommerce { --wm-card-pad: 24px 28px; --wm-field: #d9d0bf; }
.woocommerce-cart .woocommerce-notices-wrapper:empty, .woocommerce-checkout .woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-cart .woocommerce-message, .woocommerce-cart .woocommerce-info,
.woocommerce-checkout .woocommerce-message, .woocommerce-checkout .woocommerce-info {
	background: #fff; border: 1px solid #e6dfd1; border-top: 3px solid var(--wm-sand); border-radius: var(--wm-radius); color: var(--wm-text); font-size: 14px;
}
.woocommerce-cart .woocommerce-info::before, .woocommerce-checkout .woocommerce-info::before,
.woocommerce-cart .woocommerce-message::before { color: var(--wm-brand-navy); }

/* Shared: inputs, selects, buttons */
.woocommerce-cart .woocommerce input.input-text, .woocommerce-checkout .woocommerce input.input-text,
.woocommerce-checkout .woocommerce textarea, .woocommerce-checkout .woocommerce select,
.woocommerce-checkout .select2-container .select2-selection--single {
	background: #fff; border: 1px solid var(--wm-field); border-radius: 8px; min-height: 46px; padding: 10px 14px; font-size: 15px; color: var(--wm-text); box-shadow: none;
}
.woocommerce-checkout .woocommerce textarea { min-height: 90px; }
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered { line-height: 24px; padding: 0; }
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow { height: 44px; right: 8px; }
.woocommerce-cart .woocommerce input.input-text:focus, .woocommerce-checkout .woocommerce input.input-text:focus,
.woocommerce-checkout .woocommerce textarea:focus, .woocommerce-checkout .woocommerce select:focus {
	outline: none; border-color: var(--wm-brand-blue); box-shadow: 0 0 0 3px rgba(35, 57, 118, .15);
}
.woocommerce-cart .woocommerce button.button, .woocommerce-cart .woocommerce a.button,
.woocommerce-checkout .woocommerce button.button, .woocommerce-checkout .woocommerce a.button {
	background: #fff; color: var(--wm-brand-navy); border: 1px solid var(--wm-brand-navy); border-radius: 8px; font-weight: 600; padding: 12px 18px; text-decoration: none;
}
.woocommerce-cart .woocommerce button.button:hover, .woocommerce-checkout .woocommerce button.button:hover { background: var(--wm-brand-navy); color: #fff; }
.woocommerce-cart .woocommerce button.button:disabled, .woocommerce-cart .woocommerce button.button:disabled[disabled] { opacity: .45; padding: 12px 18px; }
.woocommerce-cart .woocommerce .checkout-button, .woocommerce-checkout .woocommerce #place_order {
	display: block; width: 100%; background: var(--wm-brand-navy) !important; color: #fff !important; border: 0; border-radius: 8px;
	font-size: 16px; font-weight: 600; padding: 16px 20px; text-align: center; text-decoration: none;
}
.woocommerce-cart .woocommerce .checkout-button:hover, .woocommerce-checkout .woocommerce #place_order:hover { background: var(--wm-brand-blue) !important; }

/* ---------- Cart ---------- */
.woocommerce-cart .woocommerce-cart-form { background: var(--wm-cream); border-radius: var(--wm-radius); padding: var(--wm-card-pad); margin-bottom: 20px; }
.woocommerce-cart table.shop_table.cart { border: 0; margin: 0; border-collapse: collapse; background: transparent; }
.woocommerce-cart table.shop_table.cart thead { display: none; }
.woocommerce-cart table.shop_table.cart tbody { display: block; }
.woocommerce-cart table.shop_table.cart tr.cart_item {
	display: grid; grid-template-columns: 88px auto 1fr auto; grid-template-areas: "thumb name name sub" "thumb price price ." "thumb qty rem ."; column-gap: 16px; row-gap: 4px;
	padding: 18px 0; border-bottom: 1px solid #e6dfd1; align-items: center;
}
.woocommerce-cart table.shop_table.cart td { display: block; border: 0; padding: 0; background: transparent !important; text-align: left !important; }
.woocommerce-cart table.shop_table.cart td::before { display: none !important; }
.woocommerce-cart table.cart td.product-thumbnail { grid-area: thumb; align-self: start; }
.woocommerce-cart table.cart td.product-thumbnail img { width: 88px; height: 88px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; box-sizing: border-box; }
.woocommerce-cart table.cart td.product-name { grid-area: name; font-size: 15px; }
.woocommerce-cart table.cart td.product-name a { color: var(--wm-brand-navy); text-decoration: none; font-weight: 500; }
.woocommerce-cart table.cart td.product-name a:hover { text-decoration: underline; }
.woocommerce-cart table.cart td.product-name dl.variation, .woocommerce-cart table.cart td.product-name .tc-epo-metadata,
.woocommerce-cart table.cart td.product-name .tm-cart-edit-options { font-size: 12px; color: #4a5263; margin: 4px 0 0; }
.woocommerce-cart table.cart td.product-price { grid-area: price; font-size: 13px; color: #4a5263; }
.woocommerce-cart table.cart td.product-quantity { grid-area: qty; margin-top: 6px; }
.woocommerce-cart table.cart td.product-quantity .quantity input.qty { width: 74px; min-height: 40px; border: 1px solid var(--wm-field); border-radius: 8px; background: #fff; text-align: center; }
.woocommerce-cart table.cart td.product-remove { grid-area: rem; margin-top: 6px; }
.woocommerce-cart table.cart td.product-remove a.remove {
	display: inline-flex; align-items: center; justify-content: center; width: auto; height: 40px; padding: 0 4px; border-radius: 0;
	color: #4a5263 !important; font-size: 0 !important; background: none !important;
}
.woocommerce-cart table.cart td.product-remove a.remove::before {
	content: ""; width: 18px; height: 18px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.woocommerce-cart table.cart td.product-remove a.remove:hover { color: var(--wm-red) !important; }
.woocommerce-cart table.cart td.product-subtotal { grid-area: sub; align-self: start; font-weight: 600; color: var(--wm-brand-navy); font-size: 15px; white-space: nowrap; }
/* Engraving / gift bag rows that TM EPO adds under the pen */
.woocommerce-cart table.shop_table.cart tr.cart_item[class*="tm-epo-cart-row-product"]:not(.tm-epo-cart-row-product-noepo) td.product-thumbnail img { width: 56px; height: 56px; margin-left: 32px; }
/* Coupon + update row */
.woocommerce-cart table.shop_table.cart tr:not(.cart_item) { display: block; }
.woocommerce-cart table.cart td.actions { display: flex !important; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding-top: 18px !important; }
.woocommerce-cart table.cart td.actions .coupon { display: flex; gap: 10px; flex: 1 1 320px; }
.woocommerce-cart table.cart td.actions .coupon label { display: none; }
.woocommerce-cart table.cart td.actions .coupon #coupon_code { flex: 1; width: auto; min-width: 0; margin: 0; }
.woocommerce-cart table.cart td.actions > .button { float: none; }

/* Totals card */
.woocommerce-cart .cart-collaterals { width: 100%; }
.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: 100%; background: var(--wm-cream); border-radius: var(--wm-radius); padding: var(--wm-card-pad); box-sizing: border-box; }
.woocommerce-cart .cart-collaterals .cart_totals h2 { font-family: "Roboto", sans-serif; font-size: 20px; font-weight: 500; color: var(--wm-brand-navy); margin: 0 0 8px; }
.woocommerce-cart .cart_totals table.shop_table { border: 0; margin: 0 0 18px; background: transparent; border-collapse: collapse; }
.woocommerce-cart .cart_totals table.shop_table th, .woocommerce-cart .cart_totals table.shop_table td {
	border: 0; border-top: 1px solid #e6dfd1; padding: 14px 0; background: transparent !important; font-size: 14px; vertical-align: top;
}
.woocommerce-cart .cart_totals table.shop_table th { font-weight: 400; color: #4a5263; width: 40%; }
.woocommerce-cart .cart_totals table.shop_table td { text-align: right; }
.woocommerce-cart .cart_totals tr.order-total th, .woocommerce-cart .cart_totals tr.order-total td { font-size: 20px; color: var(--wm-brand-navy); font-weight: 500; }
.woocommerce-cart .cart_totals tr.order-total td strong { font-weight: 600; }
.woocommerce-cart .cart_totals #shipping_method { margin: 0; list-style: none; }
.woocommerce-cart .cart_totals #shipping_method li { margin: 0 0 6px; }
.woocommerce-cart .cart_totals .woocommerce-shipping-destination, .woocommerce-cart .cart_totals .shipping-calculator-button { font-size: 12px; color: #4a5263; }
.woocommerce-cart .wc-proceed-to-checkout { padding: 0; }
.woocommerce-cart .cart-empty.woocommerce-info { font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; border: 0; background: var(--wm-cream); color: var(--wm-brand-navy); }
.woocommerce-cart .return-to-shop .button { background: var(--wm-brand-navy) !important; color: #fff !important; }

@media (max-width: 767px) {
	.woocommerce-cart .woocommerce, .woocommerce-checkout .woocommerce { --wm-card-pad: 16px; }
	.woocommerce-cart table.shop_table.cart tr.cart_item { grid-template-columns: 64px auto 1fr auto; column-gap: 12px; }
	.woocommerce-cart table.cart td.product-thumbnail img { width: 64px; height: 64px; }
}

/* The generic page box (border + padding around .woocommerce) is not used here – the cards are the boxes. */
.woocommerce-cart .page-content > .woocommerce, .woocommerce-checkout .page-content > .woocommerce { border: 0; padding: 0; background: transparent; box-shadow: none; }
.woocommerce-cart table.shop_table.cart, .woocommerce-cart table.shop_table.cart tbody, .woocommerce-cart table.shop_table.cart tr { width: 100%; max-width: 100%; box-sizing: border-box; }
.woocommerce-cart table.shop_table.cart td.product-thumbnail { display: block !important; }
.woocommerce-cart table.cart td.product-name { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) {
	.woocommerce-cart table.shop_table.cart tr.cart_item { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "thumb name name" "thumb price sub" "thumb qty rem"; }
	.woocommerce-cart table.cart td.product-subtotal { align-self: center; text-align: right !important; }
	.woocommerce-cart table.cart td.product-remove { justify-self: end; }
	.woocommerce-cart table.cart td.actions .coupon { flex-basis: 100%; }
	.woocommerce-cart table.cart td.actions > .button { width: 100%; }
	.woocommerce-cart table.cart td.actions .coupon .button { flex: 0 0 auto; padding: 12px 14px; }
}
.woocommerce-cart table.shop_table.cart { display: block; }
.woocommerce-cart table.cart td.actions { width: 100%; box-sizing: border-box; }
.woocommerce-cart table.cart td.actions .coupon { min-width: 0; max-width: 100%; }
