/* CheckoutWC side cart: one card per fixture group (plan 2026-12-02-side-cart-group-cards; drawing approved by Tim
   2026-12-02). side.js adds the rows classed ftfx-c (strip, "Includes these supplies:", total, "Other items") and
   sets .ftfx-cards on #cfw-side-cart; nothing here (but the first rule) applies without that class, so a script error leaves the side
   cart as CheckoutWC draws it. CheckoutWC's rows are reshaped, never moved: the − / + and the × stay its own.
   CheckoutWC sets three things with !important that a card must get past: a background and `color: inherit` on
   every cell (so: colours go on the rows, and the cells are made see-through with the one !important here), and
   no border on its rows (so: a card's sides on those rows are inset shadows, not borders). */
/* Not part of the cards, applies always: the cart picture beside the item count at the top of the side cart.
   CheckoutWC's "icon width" setting is empty on this site (staging and live), so it prints
   `--cfw-side-cart-icon-width: px`, the picture is 0 wide and the count stood alone (Tim, 2026-12-02). */
#cfw-side-cart .cfw-side-cart-contents-header .cfw-side-cart-quantity-wrap {
	--cfw-side-cart-icon-width: 26px;
	--cfw-side-cart-icon-color: var(--espresso-900, #200A01);
}

#cfw-side-cart.ftfx-cards {
	--ftfx-brass: var(--brass-400, #CA9E4E);
	--ftfx-ink: var(--espresso-900, #200A01);
	--ftfx-tan: #F4E7CE; /* The approved drawing's supply list; between --sand-200 and --sand-300. */
	--ftfx-hair: rgba(32, 10, 1, 0.12);
}

#cfw-side-cart.ftfx-cards table.cfw-cart-table,
#cfw-side-cart.ftfx-cards table.cfw-cart-table > tbody {
	display: block;
	width: 100%;
}

/* Lines of no group keep CheckoutWC's own look (one table per line now, so its cells still line up). */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row:not(.ftfx-g) {
	display: table;
	width: 100%;
}

/* ---- Rows side.js adds ---- */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c > td {
	display: block;
	padding: 0;
	border: 0;
	color: var(--ftfx-ink);
	text-align: left;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-head {
	margin-top: 16px;
	border: 3px solid var(--ftfx-brass);
	border-bottom: 0;
	border-radius: 6px 6px 0 0;
	background: var(--ftfx-ink);
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-head:first-child {
	margin-top: 4px;
}

#cfw-side-cart.ftfx-cards .ftfx-c-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 10px 8px 12px;
}

#cfw-side-cart.ftfx-cards .ftfx-c-label {
	min-width: 0;
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.25;
}

#cfw-side-cart.ftfx-cards button.ftfx-c-rm,
#cfw-side-cart.ftfx-cards button.ftfx-c-rm:is(:hover, :focus, :active, :disabled) {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	margin: 0;
	padding: 4px 12px;
	border: 2px solid #fff;
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	color: var(--ftfx-ink);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
}

#cfw-side-cart.ftfx-cards button.ftfx-c-rm::before {
	content: "\00D7";
	font-size: 18px;
	line-height: 1;
}

#cfw-side-cart.ftfx-cards button.ftfx-c-rm:hover {
	background: var(--brass-100, #FFF3DC);
}

#cfw-side-cart.ftfx-cards button.ftfx-c-rm:focus-visible {
	outline: 2px solid var(--ftfx-brass);
	outline-offset: 2px;
}

#cfw-side-cart.ftfx-cards button.ftfx-c-rm:disabled {
	cursor: default;
	opacity: 0.8;
}

#cfw-side-cart.ftfx-cards button.ftfx-c-rm:disabled::before {
	content: none;
}

#cfw-side-cart.ftfx-cards .ftfx-c-msg {
	margin: 0;
	padding: 0 12px 8px;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
}

#cfw-side-cart.ftfx-cards .ftfx-c-msg:empty {
	display: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-inc {
	border: solid var(--ftfx-brass);
	border-width: 0 3px;
	background: #fff;
	color: var(--brass-700, #7C551F);
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-inc > td {
	padding: 0 12px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

/* The fixture line is gone: the list sits right under the strip. */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-head + tr.ftfx-c-inc > td {
	padding-top: 10px;
}

/* The tan list's rounded top and bottom edges. */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-inc > td::after,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-total > td::before {
	content: "";
	display: block;
	height: 6px;
	margin-top: 6px;
	border-radius: 6px 6px 0 0;
	background: var(--ftfx-tan);
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-total > td::before {
	margin: 0 12px;
	border-radius: 0 0 6px 6px;
}

/* A group with no supplies: no list, so no bottom edge of one. */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture + tr.ftfx-c-total > td::before {
	content: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-total {
	border: 3px solid var(--ftfx-brass);
	border-top: 0;
	border-radius: 0 0 6px 6px;
	background: #fff;
}

#cfw-side-cart.ftfx-cards .ftfx-c-sum {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
	padding: 8px 12px 10px;
	border-top: 2px solid var(--ftfx-brass);
	font-size: 16px;
}

#cfw-side-cart.ftfx-cards .ftfx-c-sum b {
	font-size: 17px;
	font-weight: 700;
	white-space: nowrap;
}

/* No total to show (a fixture on its own, or a line total that can't be read): the card just closes. */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-end .ftfx-c-sum {
	display: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-end > td::before {
	margin-bottom: 12px;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-other {
	margin-top: 28px;
	border-bottom: 2px solid var(--ftfx-brass);
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-other > td {
	padding-bottom: 6px;
	font-size: 16px;
	font-weight: 800;
}

/* ---- CheckoutWC's rows inside a card ---- */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g {
	display: grid;
	box-shadow: inset 3px 0 0 var(--ftfx-brass), inset -3px 0 0 var(--ftfx-brass);
	color: var(--ftfx-ink);
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c > td,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g > td,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g > th {
	background: transparent !important;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g > td,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g > th {
	width: auto;
	padding: 0;
	border: 0;
	text-align: left;
}

/* Inside a card a line is its name, its amount and its total (Tim, decision 2a): no "ea." price, no US discount
   note. Both still show on lines of no group and in the checkout totals. */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g .cfw-items-summary-item-discount,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g .quad-cd-note {
	display: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g .cfw-cart-item-title {
	font-size: 16px;
	line-height: 1.3;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g > td.cfw-cart-item-subtotal {
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
}

/* The fixture: picture, name, line total. Its amount is set on the order page, so no − / + and no × here (the
   strip's Remove takes the whole group). */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture {
	grid-template-columns: 64px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	column-gap: 12px;
	align-items: start;
	padding: 12px 15px 10px;
	background: #fff;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture > td.cfw-cart-item-image {
	grid-area: 1 / 1 / 3 / 2;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture > td.cfw-cart-item-image img {
	display: block;
	width: 100%;
	height: auto;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture > th.cfw-cart-item-description {
	display: block;
	grid-area: 1 / 2;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture .cfw-cart-item-title {
	font-weight: 700;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture > td.cfw-cart-item-subtotal {
	grid-area: 2 / 2;
	padding-top: 2px;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture > td.cfw-cart-item-remove,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g-fixture .cfw_side_cart_item_after_data {
	display: none;
}

/* More than one of the fixture (side.js marks the strip): its amount as plain words under its name. */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-many + tr.cart-item-row.ftfx-g-fixture .cfw_side_cart_item_after_data {
	display: block;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-many + tr.cart-item-row.ftfx-g-fixture .cfw-quantity-stepper {
	display: block;
	border: 0;
	background: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-many + tr.cart-item-row.ftfx-g-fixture .cfw-quantity-stepper > button {
	display: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-many + tr.cart-item-row.ftfx-g-fixture .cfw-quantity-stepper-value-label {
	padding: 0;
	color: var(--ftfx-ink);
	font-size: 15px;
	text-decoration: none;
	pointer-events: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-many + tr.cart-item-row.ftfx-g-fixture .cfw-quantity-stepper-value-label::before {
	content: "Qty ";
}

/* A supply, in the tan list: its name on the first line; − amount +, its total and a small × (right of the total,
   where CheckoutWC's own lines have it) on the second. */
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) {
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	padding: 0 15px;
	background: linear-gradient(var(--ftfx-tan), var(--ftfx-tan)) content-box, linear-gradient(#fff, #fff) padding-box;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture)::before {
	content: "";
	grid-area: 1 / 1 / 2 / 4;
	align-self: start;
	height: 1px;
	margin: 0 10px;
	background: var(--ftfx-hair);
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.ftfx-c-inc + tr.cart-item-row.ftfx-g::before {
	content: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) > td.cfw-cart-item-image,
#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) .cfw-cart-item-data {
	display: none;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) > th.cfw-cart-item-description {
	display: contents;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) .cfw-cart-item-title {
	grid-area: 1 / 1 / 2 / 4;
	margin: 0;
	padding: 10px 10px 0;
	font-size: 15px;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) > td.cfw-cart-item-remove {
	grid-area: 2 / 3;
	padding: 0 4px 2px 2px;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) > td.cfw-cart-item-remove a.cfw-remove-item-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: #7A6A5C;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) > td.cfw-cart-item-remove a.cfw-remove-item-button:hover {
	color: var(--ftfx-ink);
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) .cfw_side_cart_item_after_data {
	grid-area: 2 / 1;
	margin: 0;
	padding: 8px 0 10px 10px;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) .cfw-quantity-stepper {
	background: #fff;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) .cfw-quantity-stepper > button {
	width: 34px;
	height: 34px;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) .cfw-quantity-stepper-value-label {
	min-width: 34px;
	font-size: 15px;
	line-height: 1;
}

#cfw-side-cart.ftfx-cards .cfw-cart-table tr.cart-item-row.ftfx-g:not(.ftfx-g-fixture) > td.cfw-cart-item-subtotal {
	grid-area: 2 / 2;
	padding: 8px 0 10px 8px;
	text-align: right;
}

/* "In your cart twice" tag + "Remove this one" under a tool's name (plan 2026-12-02-cart-confirmer). */
#cfw-side-cart .cfw-cart-item-title .ftfx-tw {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-top: 5px;
}

#cfw-side-cart .ftfx-tw .ftfx-tw-tag {
	padding: 2px 9px;
	border-radius: 3px;
	background: var(--brass-700, #7C551F);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

#cfw-side-cart button.ftfx-tw-rm,
#cfw-side-cart button.ftfx-tw-rm:is(:hover, :focus, :active, :disabled) {
	display: inline;
	width: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--espresso-900, #200A01);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

#cfw-side-cart button.ftfx-tw-rm:focus-visible {
	outline: 2px solid var(--brass-400, #CA9E4E);
	outline-offset: 2px;
}

#cfw-side-cart button.ftfx-tw-rm:disabled {
	cursor: default;
	opacity: 0.7;
}
