/* ==========================================================================
   Quattro Design · cart and checkout
   ADP (Advanced Dynamic Pricing) discounts stay visible: struck original price on the line,
   discount / fee rows in red, and our savings row "חסכתם X ₪" (includes/promos.php).
   Markup: WooCommerce templates + WoodMart 8.5.7 woo-page-cart / woo-page-checkout.
   ========================================================================== */

/* ---------- Tables ---------- */
html body .shop_table {
	border: 0;
	border-radius: 0;
	color: var(--qc-ink);
}
html body .shop_table :is(th, td) {
	border-color: var(--qc-line);
	padding-block: 14px;
}
html body .shop_table thead th {
	font-size: 13px;
	font-weight: 700;
	color: var(--qc-grey);
	text-transform: none;
	letter-spacing: 0;
}
html body .woocommerce-cart-form .product-thumbnail img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background-color: var(--qc-stone);
	mix-blend-mode: darken;
	border-radius: 0;
}
html body .woocommerce-cart-form .product-name a {
	font-weight: 600;
	color: var(--qc-ink);
}
html body .woocommerce-cart-form .product-name .variation { color: var(--qc-grey); font-size: 14px; }
html body .shop_table :is(.product-price, .product-subtotal) del { color: var(--qc-grey); font-weight: 400; }
html body .shop_table :is(.product-price, .product-subtotal) ins { color: var(--qc-red); text-decoration: none; background: none; }
html body .woocommerce-cart-form .product-remove a { color: var(--qc-grey); }

/* ---------- Totals ---------- */
html body .cart_totals,
html body .woocommerce-checkout-review-order {
	padding: 24px;
	border-radius: var(--qc-radius);
	background-color: var(--qc-stone);
}
html body .cart_totals > h2,
html body #order_review_heading {
	font-family: var(--qc-font);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0;
}
html body :is(.cart_totals, .woocommerce-checkout-review-order-table) .order-total :is(th, td) {
	font-size: 18px;
	font-weight: 700;
}
/* ADP discount rows (coupon-style or fee-style) */
html body :is(.cart_totals, .woocommerce-checkout-review-order-table) :is(.cart-discount, .fee) :is(th, td) {
	color: var(--qc-red);
	font-weight: 600;
}
/* Savings row (includes/promos.php) */
html body tr.qc-savings :is(th, td) {
	color: var(--qc-red);
	font-weight: 700;
	border-top: 0;
	padding-top: 4px;
}
html body tr.qc-savings td .amount { color: inherit; }

/* ---------- Coupon ---------- */
html body .coupon :is(input.input-text, #coupon_code) { min-height: 48px; }
html body .coupon .button { min-height: 48px; }

/* ---------- Buttons: proceed / place order, pill 56px ---------- */
html body :is(.checkout-button, #place_order) {
	width: 100%;
	min-height: 56px;
	border-radius: var(--qc-pill);
	background-color: var(--qc-ink);
	color: var(--qc-white);
	font-size: 17px;
	font-weight: 600;
}
@media (hover: hover) {
	html body :is(.checkout-button, #place_order):hover { background-color: var(--qc-grey); color: var(--qc-white); }
}

/* ---------- Checkout form ---------- */
html body .woocommerce-checkout :is(h3, #ship-to-different-address) {
	font-family: var(--qc-font);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0;
}
html body .woocommerce-checkout .form-row label {
	font-size: 14px;
	font-weight: 600;
	color: var(--qc-ink);
}
html body .woocommerce-checkout .form-row .required { color: var(--qc-red); text-decoration: none; }
html body .woocommerce-checkout #payment {
	border-radius: var(--qc-radius);
	background-color: var(--qc-paper);
}
html body .woocommerce-checkout #payment .payment_box {
	background-color: var(--qc-stone);
	color: var(--qc-ink);
	border-radius: var(--qc-radius);
}
html body .woocommerce-checkout #payment .payment_box::before { display: none; }

/* Checkout steps in the page title (WoodMart) */
html body .wd-checkout-steps li { color: var(--qc-grey); text-transform: none; }
html body .wd-checkout-steps li.step-active { color: var(--qc-ink); } /* VERIFY-ON-STAGING */

/* Empty cart */
html body .cart-empty,
html body .wd-empty-block-title {
	font-family: var(--qc-font-display);
	font-weight: 300;
	color: var(--qc-ink);
}

@media (max-width: 767px) {
	html body .cart_totals,
	html body .woocommerce-checkout-review-order { padding: 16px; }
}

/* ==========================================================================
   1.9.17 · the cart page (28.10, "עמוד סל קניות לא נראה טוב"). The page (3154) now holds the cart in a shortcode
   widget (it was a text widget: wpautop wrapped the quantity buttons and the coupon in <p>/<br> and set Heebo 500
   with -0.7 spacing on everything). Here: the whole container (the hidden sidebar kept 3 of 12 columns), one row per
   pair (image · name · quantity · total · remove), one summary panel, one stepper, a thin free-shipping line.
   ========================================================================== */
html body.woocommerce-cart .wd-content-area.site-content { grid-column: 1 / -1 !important; }
html body.woocommerce-cart .entry-content .elementor-widget { text-align: start; }
html body.woocommerce-cart .cart-content-wrapper { display: flex; align-items: flex-start; gap: clamp(32px, 4.4vw, 72px); }
html body.woocommerce-cart .woocommerce-cart-form { flex: 1 1 0; min-width: 0; }
html body.woocommerce-cart .cart_totals { flex: 0 0 clamp(340px, 31%, 420px); position: sticky; top: 112px; margin: 0; }

/* free shipping: one thin line, no dashed box, no stripes */
html body:is(.woocommerce-cart, .woocommerce-checkout) .wd-shipping-progress-bar { margin: 0 0 8px; padding: 0 0 20px; border: 0 !important; border-radius: 0; }
html body:is(.woocommerce-cart, .woocommerce-checkout) .wd-free-progress-bar { padding: 0; border: 0 !important; border-radius: 0; }
html body .wd-free-progress-bar .progress-msg p { margin: 0 0 10px; font-size: 15px; color: var(--qc-ink); }
html body .wd-free-progress-bar .progress-area { height: 4px; border-radius: 2px; background: var(--qc-line); overflow: hidden; }
html body .wd-free-progress-bar .progress-bar { height: 100%; border-radius: 2px; background: var(--qc-ink) !important; background-image: none !important; animation: none !important; }

/* the rows */
html body.woocommerce-cart .woocommerce-cart-form__contents { display: block; margin: 0; border: 0; }
html body.woocommerce-cart .woocommerce-cart-form__contents thead { display: none; }
html body.woocommerce-cart .woocommerce-cart-form__contents tbody { display: block; border-top: 1px solid var(--qc-line); }
html body.woocommerce-cart .woocommerce-cart-form__contents tr.cart_item {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr) auto 112px 32px;
	grid-template-areas: "thumb name qty sub remove";
	align-items: center;
	column-gap: 24px;
	padding-block: 20px;
	border-bottom: 1px solid var(--qc-line);
}
html body.woocommerce-cart .woocommerce-cart-form__contents tr.cart_item { position: static; padding-inline: 0 !important; min-height: 0; } /* WoodMart's phone table: 115px padding + absolute image and × */
html body.woocommerce-cart tr.cart_item > td { position: static !important; display: block; width: auto !important; padding: 0 !important; border: 0 !important; background: none; text-align: start; }
html body.woocommerce-cart tr.cart_item > td::before { display: none !important; }
html body.woocommerce-cart tr.cart_item .product-thumbnail { grid-area: thumb; width: auto; }
html body.woocommerce-cart tr.cart_item .product-thumbnail img { width: 112px; max-width: none; height: 112px; border-radius: 8px; object-fit: contain; }
html body.woocommerce-cart tr.cart_item .product-name { grid-area: name; }
html body.woocommerce-cart tr.cart_item .product-name a { font-size: 16px; font-weight: 500; line-height: 1.45; color: var(--qc-ink); letter-spacing: 0; }
html body.woocommerce-cart tr.cart_item .product-price { display: none !important; }
html body.woocommerce-cart tr.cart_item .product-quantity { grid-area: qty; }
html body.woocommerce-cart tr.cart_item .product-subtotal { grid-area: sub; text-align: end; font-size: 16px; font-weight: 500; white-space: nowrap; }
html body.woocommerce-cart tr.cart_item .product-subtotal del { display: block; color: var(--qc-grey); font-size: 13px; font-weight: 400; }
html body.woocommerce-cart tr.cart_item .product-subtotal ins { color: var(--qc-ink); font-weight: 500; }
html body.woocommerce-cart tr.cart_item .product-remove { grid-area: remove; text-align: center; }
html body.woocommerce-cart tr.cart_item .product-remove a.remove { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: 0; line-height: 1; color: var(--qc-grey); } /* WoodMart draws the × as an icon; the text × doubled it */
html body.woocommerce-cart tr.cart_item .product-remove a.remove::before { font-size: 14px; }

/* one stepper: − 1 + in a single box */
html body.woocommerce-cart .woocommerce-cart-form .quantity { display: inline-flex; align-items: stretch; height: 44px; border: 1px solid var(--qc-line); border-radius: var(--qc-pill, 6px); overflow: hidden; background: var(--qc-white, #fff); }
html body.woocommerce-cart .woocommerce-cart-form .quantity :is(.minus, .plus) { width: 40px; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--qc-ink); font-size: 18px; line-height: 1; box-shadow: none; }
html body.woocommerce-cart .woocommerce-cart-form .quantity .qty { width: 36px; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; text-align: center; font-size: 15px; -moz-appearance: textfield; }
html body.woocommerce-cart .woocommerce-cart-form .quantity .qty::-webkit-inner-spin-button,
html body.woocommerce-cart .woocommerce-cart-form .quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* coupon + update */
html body.woocommerce-cart tr.wd-cart-action-row { display: block; }
html body.woocommerce-cart tr.wd-cart-action-row td.actions { display: block; padding: 24px 0 0 !important; border: 0 !important; }
html body.woocommerce-cart .cart-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
html body.woocommerce-cart .cart-actions .coupon { display: flex; gap: 8px; flex: 0 1 420px; margin: 0; padding: 0; border: 0 !important; }
html body.woocommerce-cart .cart-actions .coupon #coupon_code { flex: 1 1 auto; min-width: 0; height: 48px; border-radius: var(--qc-pill, 6px); }
html body.woocommerce-cart .cart-actions .button { height: 48px; min-height: 48px; padding-inline: 20px; border-radius: var(--qc-pill, 6px); font-size: 15px; }
html body.woocommerce-cart .cart-actions .coupon .button { background: var(--qc-ink); color: var(--qc-white, #fff); }
html body.woocommerce-cart .cart-actions [name="update_cart"] { background: none; border: 1px solid var(--qc-line); color: var(--qc-ink); }
html body.woocommerce-cart .cart-actions [name="update_cart"]:disabled { opacity: .45; }

/* the summary: one panel, no inner frame */
html body.woocommerce-cart .cart_totals { padding: 28px; border-radius: var(--qc-radius-surface, 16px); background: var(--qc-stone); }
html body.woocommerce-cart .cart_totals .cart-totals-inner { padding: 0; border: 0; background: none; box-shadow: none; }
html body.woocommerce-cart .cart_totals h2 { margin: 0 0 16px; font-family: var(--qc-font-display); font-size: 24px; font-weight: 300; }
html body.woocommerce-cart .cart_totals table.shop_table { display: block; margin: 0 0 20px; }
html body.woocommerce-cart .cart_totals table.shop_table tbody { display: block; }
html body.woocommerce-cart .cart_totals table.shop_table tr { display: flex; flex-direction: row !important; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 !important; padding-block: 14px; border-top: 1px solid var(--qc-line); border-bottom: 0 !important; }
html body.woocommerce-cart .cart_totals table.shop_table tr:first-child { border-top: 0; padding-top: 0; }
html body.woocommerce-cart .cart_totals table.shop_table :is(th, td) { display: block !important; width: auto; padding: 0 !important; border: 0 !important; background: none; white-space: nowrap; font-size: 15px; }
html body.woocommerce-cart .cart_totals table.shop_table th { flex: 0 1 auto; width: auto !important; font-weight: 400; color: var(--qc-grey); text-align: start !important; }
html body.woocommerce-cart .cart_totals table.shop_table td { flex: 0 1 auto; width: auto !important; text-align: end !important; color: var(--qc-ink); }
html body.woocommerce-cart .cart_totals table.shop_table td::before { display: none !important; }
html body.woocommerce-cart .cart_totals tr.shipping td { flex: 1 1 100%; white-space: normal; text-align: start !important; }
html body.woocommerce-cart .cart_totals #shipping_method { margin: 6px 0 0; padding: 0; list-style: none; }
html body.woocommerce-cart .cart_totals #shipping_method li { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; text-align: start; }
html body.woocommerce-cart .cart_totals #shipping_method input { width: 18px; height: 18px; margin: 0; accent-color: var(--qc-ink); }
html body.woocommerce-cart .cart_totals #shipping_method label { margin: 0; font-size: 15px; font-weight: 400; }
html body.woocommerce-cart .cart_totals .woocommerce-shipping-destination { margin: 4px 0 6px; font-size: 13px; color: var(--qc-grey); }
html body.woocommerce-cart .cart_totals .shipping-calculator-button { font-size: 13px; font-weight: 400; color: var(--qc-ink); text-decoration: underline; text-underline-offset: 3px; }
html body.woocommerce-cart .cart_totals tr.order-total :is(th, td) { font-size: 20px; font-weight: 600; color: var(--qc-ink); }
html body.woocommerce-cart .cart_totals tr.qc-savings { padding-top: 0; border-top: 0; }
html body.woocommerce-cart .cart_totals tr.qc-savings :is(th, td) { font-size: 14px; font-weight: 500; color: var(--qc-ink); }
html body.woocommerce-cart .cart_totals .wc-proceed-to-checkout { margin: 0; padding: 0; }
html body.woocommerce-cart .cart_totals .checkout-button { margin: 0; }

/* the pair builder under the rows */
html body.woocommerce-cart .qc-pairs--cart { margin-top: 32px; }

@media (max-width: 1024px) {
	html body.woocommerce-cart .cart-content-wrapper { flex-direction: column; align-items: stretch; }
	html body.woocommerce-cart .cart_totals { flex: none; position: static; width: 100%; }
}
@media (max-width: 767px) {
	/* phone: a compact card per pair: image | name + remove / quantity + total */
	html body.woocommerce-cart .woocommerce-cart-form__contents tr.cart_item {
		grid-template-columns: 80px minmax(0, 1fr) 28px;
		grid-template-areas: "thumb name remove" "thumb foot foot";
		column-gap: 14px;
		row-gap: 10px;
		align-items: start;
		padding-block: 16px;
	}
	html body.woocommerce-cart tr.cart_item .product-thumbnail img { width: 80px; height: 80px; }
	html body.woocommerce-cart tr.cart_item .product-name a { font-size: 15px; }
	/* quantity and total share the second line: quantity at the start, total at the end */
	html body.woocommerce-cart tr.cart_item .product-quantity { grid-area: foot; justify-self: start; align-self: center; }
	html body.woocommerce-cart tr.cart_item .product-subtotal { grid-area: foot; justify-self: end; align-self: center; }
	html body.woocommerce-cart tr.cart_item .product-remove a.remove { width: 28px; height: 28px; }
	html body.woocommerce-cart .woocommerce-cart-form .quantity { height: 40px; }
	html body.woocommerce-cart .cart-actions .coupon { flex: 1 1 100%; }
	html body.woocommerce-cart .cart_totals { padding: 20px; }
}

/* ==========================================================================
   1.9.17 · the checkout page (28.10, "תתקן אותו"). Same story as the cart: the page (3155) now holds the checkout in a
   shortcode widget (the text widget set bold Assistant with +0.4 spacing on the whole form), the hidden sidebar's
   3 columns go back to the form, the details on the right, the order in one panel on the left.
   ========================================================================== */
html body.woocommerce-checkout .wd-content-area.site-content { grid-column: 1 / -1 !important; }
html body.woocommerce-checkout .entry-content .elementor-widget { text-align: start; }
html body.woocommerce-checkout form.checkout { display: flex; align-items: flex-start; gap: clamp(32px, 4.4vw, 72px); }
html body.woocommerce-checkout form.checkout #customer_details { flex: 1 1 0; min-width: 0; max-width: none; padding: 0; }
html body.woocommerce-checkout form.checkout .checkout-order-review { flex: 0 0 clamp(360px, 38%, 480px); max-width: none; margin: 0; }
html body.woocommerce-checkout .woocommerce-form-coupon-toggle { margin-block-end: 24px; }

/* headings: the display face, light, like "סה״כ בסל הקניות" */
html body.woocommerce-checkout :is(.woocommerce-billing-fields > h3, .woocommerce-additional-fields > h3, #order_review_heading) {
	margin: 0 0 16px;
	font-family: var(--qc-font-display);
	font-size: 24px;
	font-weight: 300;
	text-align: start;
	letter-spacing: 0;
}
html body.woocommerce-checkout #ship-to-different-address { font-family: var(--qc-font); font-size: 17px; font-weight: 500; }
html body.woocommerce-checkout :is(.woocommerce-shipping-fields, .woocommerce-additional-fields) { margin-block-start: 24px; }

/* the order: one panel, rows like the cart summary */
html body.woocommerce-checkout #order_review { padding: 28px; border-radius: var(--qc-radius-surface, 16px); background: var(--qc-stone); }
html body.woocommerce-checkout .checkout-order-review::before,
html body.woocommerce-checkout .checkout-order-review::after { display: none !important; } /* WoodMart's zigzag receipt edge */
html body.woocommerce-checkout #order_review .wd-table-wrapper { padding: 0; background: none; box-shadow: none !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table { display: block; margin: 0 0 20px; border: 0; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table thead { display: none; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table :is(tbody, tfoot) { display: block; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tr {
	display: flex;
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 16px;
	margin: 0 !important;
	padding: 14px 0 !important;
	border-top: 1px solid var(--qc-line);
	border-bottom: 0 !important;
}
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody tr:first-child { border-top: 0; padding-top: 0 !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table :is(th, td) { display: block !important; width: auto !important; padding: 0 !important; border: 0 !important; background: none; font-size: 15px; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table :is(th, td)::before { display: none !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table th { flex: 0 1 auto; font-weight: 400; color: var(--qc-grey); text-align: start !important; white-space: nowrap; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table td { flex: 0 1 auto; text-align: end !important; color: var(--qc-ink); white-space: nowrap; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.cart_item td.product-name { flex: 1 1 0; min-width: 0; white-space: normal; text-align: start !important; font-weight: 500; line-height: 1.45; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-quantity { font-weight: 400; color: var(--qc-grey); }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total { font-weight: 500; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total del { display: block; color: var(--qc-grey); font-size: 13px; font-weight: 400; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total ins { color: var(--qc-ink); }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.shipping td { flex: 1 1 100%; white-space: normal; text-align: start !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table #shipping_method { margin: 6px 0 0; padding: 0; list-style: none; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table #shipping_method li { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; text-align: start; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table #shipping_method input { width: 18px; height: 18px; margin: 0; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table #shipping_method label { margin: 0; font-size: 15px; font-weight: 400; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.order-total :is(th, td) { font-size: 20px; font-weight: 600; color: var(--qc-ink); }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.qc-savings { padding-top: 0 !important; border-top: 0; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.qc-savings :is(th, td) { font-size: 14px; font-weight: 500; color: var(--qc-ink); }
html body.woocommerce-checkout #payment { padding: 0; background: none; border-radius: 0; }
html body.woocommerce-checkout #payment .woocommerce-privacy-policy-text p { font-size: 13px; line-height: 1.6; color: var(--qc-grey); }

@media (max-width: 1024px) {
	html body.woocommerce-checkout form.checkout { flex-direction: column; align-items: stretch; }
	html body.woocommerce-checkout form.checkout .checkout-order-review { flex: none; width: 100%; }
}
@media (max-width: 767px) {
	html body.woocommerce-checkout #order_review { padding: 20px; }
}
