/* Tesla Fire Systems cart - Luma-pattern layout (herbertwilliams.com reference). */

.woocommerce-cart .tfs-cart__title {
	font-size: 28px;
	font-weight: 900;
	text-align: center;
	margin: 0 0 1.75rem;
}

.woocommerce-cart .tfs-cart {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 2rem;
	align-items: start;
}
.woocommerce-cart .tfs-cart__form { grid-column: 1; }
.woocommerce-cart .tfs-cart__summary { grid-column: 2; }
.woocommerce-cart .tfs-cart__crosssells { grid-column: 1 / -1; }

/* ---- Item table ---- */
.woocommerce-cart .tfs-cart__head,
.woocommerce-cart .tfs-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 120px 130px 120px;
	gap: 1rem;
	align-items: start;
}

.woocommerce-cart .tfs-cart__head {
	font-size: 14px;
	font-weight: 700;
	color: #333;
	padding: 0 0 .9rem;
	border-bottom: 1px solid #c2c2c2;
}
.woocommerce-cart .tfs-cart__head .tfs-col-price,
.woocommerce-cart .tfs-cart__head .tfs-col-qty,
.woocommerce-cart .tfs-cart__head .tfs-col-sub { text-align: center; }

.woocommerce-cart .tfs-row {
	position: relative;
	padding: 1.5rem 0;
	border-bottom: 1px solid #e3e3e3;
}
.woocommerce-cart .tfs-row--gift { background: #fafcfa; }

.woocommerce-cart .tfs-col-item { display: flex; gap: 1.25rem; align-items: flex-start; }
.woocommerce-cart .tfs-row__media { flex: 0 0 120px; }
.woocommerce-cart .tfs-row__media img { width: 120px; height: auto; display: block; }

.woocommerce-cart .tfs-row__name { font-size: 14px; line-height: 1.45; color: #000; }
.woocommerce-cart .tfs-row__name a { color: #000; text-decoration: none; }
.woocommerce-cart .tfs-row__name a:hover { text-decoration: underline; }

.woocommerce-cart .tfs-row__badge {
	display: inline-block;
	margin-top: .4rem;
	padding: .1rem .5rem;
	background: #e7f5ec;
	color: #1f8a4c;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.woocommerce-cart .tfs-row__meta { font-size: 12px; color: #6b7580; }

.woocommerce-cart .tfs-col-price,
.woocommerce-cart .tfs-col-sub {
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	color: #c8102e;
	padding-top: .2rem;
}

/* Quantity stepper */
.woocommerce-cart .tfs-col-qty { display: flex; justify-content: center; padding-top: .1rem; }
.woocommerce-cart .tfs-stepper { display: inline-flex; align-items: stretch; }
.woocommerce-cart .tfs-stepper__btn {
	width: 30px;
	height: 36px;
	border: 0;
	background: #000;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}
.woocommerce-cart .tfs-stepper__btn:hover { background: #2b2b2b; }
.woocommerce-cart .tfs-stepper .quantity { margin: 0; }
.woocommerce-cart .tfs-stepper input.qty {
	width: 50px;
	height: 36px;
	text-align: center;
	border: 1px solid #c2c2c2;
	border-left: 0;
	border-right: 0;
	border-radius: 0;
	-moz-appearance: textfield;
}
.woocommerce-cart .tfs-stepper input.qty::-webkit-outer-spin-button,
.woocommerce-cart .tfs-stepper input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.woocommerce-cart .tfs-gift-qty { display: inline-block; height: 36px; line-height: 36px; font-weight: 600; color: #6b7580; }

/* Remove control - small icon bottom right of the row */
.woocommerce-cart .tfs-row__remove { position: absolute; right: 0; bottom: 1rem; }
.woocommerce-cart .tfs-row__remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	color: #c8102e !important;
	font-size: 1.1rem;
	text-decoration: none;
	background: none !important;
}
.woocommerce-cart .tfs-row--gift .tfs-row__remove { display: none; }

/* ---- Actions ---- */
.woocommerce-cart .tfs-cart__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-start;
	justify-content: space-between;
	padding: 1.5rem 0 0;
}
.woocommerce-cart .tfs-discount__toggle {
	background: none;
	border: 0;
	padding: 0;
	font-size: 14px;
	color: #000;
	cursor: pointer;
}
.woocommerce-cart .tfs-discount__toggle::after { content: " \25BE"; }
.woocommerce-cart .tfs-discount__panel { display: flex; gap: .5rem; margin-top: .75rem; }
.woocommerce-cart .tfs-discount__panel[hidden] { display: none; }
.woocommerce-cart .tfs-discount__panel .input-text { height: 40px; border: 1px solid #c2c2c2; border-radius: 3px; padding: 0 .75rem; }

.woocommerce-cart .tfs-cart__update,
.woocommerce-cart .tfs-discount__panel .button {
	background: #000;
	color: #fff;
	border: 0;
	border-radius: 3px;
	height: 40px;
	padding: 0 1.25rem;
	font-size: 14px;
	font-weight: 400;
}
.woocommerce-cart .tfs-cart__update:hover,
.woocommerce-cart .tfs-discount__panel .button:hover { background: #2b2b2b; color: #fff; }
.woocommerce-cart .tfs-cart__update[disabled] { opacity: .45; }

/* ---- Summary panel ---- */
.woocommerce-cart .tfs-cart__summary .cart_totals {
	background: #f5f5f5;
	border: 0;
	border-radius: 0;
	padding: 20px 20px 25px;
	width: 100% !important;
	float: none !important;
}
.woocommerce-cart .tfs-cart__summary .cart_totals > h2 {
	font-size: 24px;
	font-weight: 300;
	margin: 0 0 1rem;
}
.woocommerce-cart .tfs-cart__summary .shop_table { table-layout: auto; width: 100%; border: 0; margin: 0; background: none; }
.woocommerce-cart .tfs-cart__summary .shop_table th,
.woocommerce-cart .tfs-cart__summary .shop_table td {
	border: 0;
	border-bottom: 1px solid #e3e3e3;
	padding: .7rem 0;
	font-size: 14px;
	font-weight: 400;
	background: none;
}
.woocommerce-cart .tfs-cart__summary .shop_table th { width: 58%; text-align: left; white-space: normal; padding-right: .75rem; }
.woocommerce-cart .tfs-cart__summary .shop_table td { width: 42%; text-align: right; white-space: nowrap; }
.woocommerce-cart .tfs-cart__summary .order-total th,
.woocommerce-cart .tfs-cart__summary .order-total td {
	border-bottom: 0;
	font-size: 18px;
	font-weight: 700;
	padding-top: 1rem;
}
.woocommerce-cart .tfs-cart__summary .shipping-calculator-button { font-weight: 700; color: #000; }

.woocommerce-cart .tfs-cart__summary .wc-proceed-to-checkout { padding: 1.25rem 0 0; }
.woocommerce-cart .tfs-cart__summary .checkout-button {
	display: block;
	width: 100%;
	height: 56px;
	line-height: 56px;
	padding: 0;
	text-align: center;
	background: #000;
	color: #fff;
	font-size: 18px;
	font-weight: 400;
	border-radius: 3px;
}
.woocommerce-cart .tfs-cart__summary .checkout-button:hover { background: #2b2b2b; color: #fff; }

/* ---- Cross-sells ---- */
.woocommerce-cart .tfs-cart__crosssells { margin-top: 2.5rem; }
.woocommerce-cart .tfs-cart__crosssells ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	float: none;
}
.woocommerce-cart .tfs-cart__crosssells ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }

@media (max-width: 900px) {
	.woocommerce-cart .tfs-cart { grid-template-columns: minmax(0, 1fr); }
	.woocommerce-cart .tfs-cart__form,
	.woocommerce-cart .tfs-cart__summary { grid-column: 1; }
	.woocommerce-cart .tfs-cart__summary { order: -1; }
	.woocommerce-cart .tfs-cart__head { display: none; }
	.woocommerce-cart .tfs-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: .75rem; }
	.woocommerce-cart .tfs-col-item { grid-column: 1 / -1; }
	.woocommerce-cart .tfs-col-price,
	.woocommerce-cart .tfs-col-qty,
	.woocommerce-cart .tfs-col-sub { text-align: left; justify-content: flex-start; }
	.woocommerce-cart .tfs-col-price::before,
	.woocommerce-cart .tfs-col-sub::before {
		content: attr(data-label) ": ";
		font-weight: 400;
		color: #6b7580;
		margin-right: .35rem;
	}
	.woocommerce-cart .tfs-row__media { flex: 0 0 88px; }
	.woocommerce-cart .tfs-row__media img { width: 88px; }
}

/* Keep Woo quantity wrapper inline inside the stepper */
.woocommerce-cart .tfs-stepper .quantity { display: flex !important; align-items: stretch; margin: 0 !important; width: auto !important; float: none !important; max-width: none !important; border: 0 !important; background: none !important; }
.woocommerce-cart .tfs-stepper .quantity input.qty { margin: 0 !important; box-shadow: none !important; }
.woocommerce-cart .tfs-stepper .quantity::before, .woocommerce-cart .tfs-stepper .quantity::after { display: none !important; }
.woocommerce-cart .tfs-stepper .quantity label, .woocommerce-cart .tfs-stepper .screen-reader-text { position: absolute !important; left: -9999px !important; }

/* Reference uses a black checkout button; site CSS forces red, so override hard */
body.woocommerce-cart .tfs-cart__summary .wc-proceed-to-checkout a.checkout-button { background: #000 !important; background-color: #000 !important; color: #fff !important; border: 0 !important; border-radius: 3px !important; }
body.woocommerce-cart .tfs-cart__summary .wc-proceed-to-checkout a.checkout-button:hover { background: #2b2b2b !important; background-color: #2b2b2b !important; color: #fff !important; }
body.woocommerce-cart .tfs-cart__update, body.woocommerce-cart .tfs-discount__panel .button { background: #000 !important; color: #fff !important; }

/* Elementor post-94.css sets this red with equal specificity and !important; outrank it */
body.woocommerce-cart .tfs-cart__summary .cart_totals .wc-proceed-to-checkout a.checkout-button.button { background: #000 !important; background-color: #000 !important; color: #fff !important; border-radius: 3px !important; }
body.woocommerce-cart .tfs-cart__summary .cart_totals .wc-proceed-to-checkout a.checkout-button.button:hover { background: #2b2b2b !important; background-color: #2b2b2b !important; color: #fff !important; }

/* ===== FINAL RESPONSIVE PASS - overrides all earlier media blocks ===== */
@media (min-width: 783px) {
  .woocommerce-cart .tfs-cart { grid-template-columns: minmax(0, 1fr) 340px !important; }
  .woocommerce-cart .tfs-cart__form { grid-column: 1 !important; }
  .woocommerce-cart .tfs-cart__summary { grid-column: 2 !important; order: 0 !important; position: sticky; top: 1.5rem; }
  .woocommerce-cart .tfs-cart__head { display: grid !important; grid-template-columns: minmax(0, 1fr) 110px 120px 110px !important; }
  .woocommerce-cart .tfs-row { grid-template-columns: minmax(0, 1fr) 110px 120px 110px !important; }
  .woocommerce-cart .tfs-col-item { grid-column: auto !important; }
  .woocommerce-cart .tfs-col-price, .woocommerce-cart .tfs-col-sub { text-align: center !important; }
  .woocommerce-cart .tfs-col-qty { justify-content: center !important; }
  .woocommerce-cart .tfs-col-price::before, .woocommerce-cart .tfs-col-sub::before { content: none !important; }
}

/* Header cells are labels, not prices - never red or bold-red */
.woocommerce-cart .tfs-cart__head .tfs-col-price,
.woocommerce-cart .tfs-cart__head .tfs-col-qty,
.woocommerce-cart .tfs-cart__head .tfs-col-sub { color: #333 !important; font-weight: 700 !important; font-size: 14px !important; padding-top: 0 !important; }

/* Two-column cart only when there is genuinely room; below that stack the
   summary above the items, which is what the reference site does too. */
@media (max-width: 1099px) {
  .woocommerce-cart .tfs-cart { grid-template-columns: minmax(0, 1fr) !important; }
  .woocommerce-cart .tfs-cart__form { grid-column: 1 !important; order: 1 !important; }
  .woocommerce-cart .tfs-cart__summary { grid-column: 1 !important; order: 0 !important; position: static !important; }
}
@media (min-width: 1100px) {
  .woocommerce-cart .tfs-cart { grid-template-columns: minmax(0, 1fr) 340px !important; }
  .woocommerce-cart .tfs-cart__form { grid-column: 1 !important; order: 0 !important; }
  .woocommerce-cart .tfs-cart__summary { grid-column: 2 !important; order: 0 !important; position: sticky !important; top: 1.5rem; }
}

/* wpautop injects <br> between the header spans; each one eats a grid cell */
.woocommerce-cart .tfs-cart__head br,
.woocommerce-cart .tfs-row br,
.woocommerce-cart .tfs-cart__table > br,
.woocommerce-cart .tfs-cart__actions br { display: none !important; }
.woocommerce-cart .tfs-cart__head > *:empty, .woocommerce-cart .tfs-row > *:empty { display: none !important; }

/* ===== 2026-08-31 remove control + consolidated mobile (<=782px) ===== */
.woocommerce-cart .tfs-row__remove a.remove,
.woocommerce-cart .tfs-row__remove a.tfs-remove{
	display:inline-flex !important;align-items:center;justify-content:center;
	width:30px;height:30px;border-radius:3px;font-size:0;line-height:0;
	color:#d32b43 !important;background:none !important;text-decoration:none !important;
}
.woocommerce-cart .tfs-row__remove a.remove:hover{background:#f5f5f5 !important;color:#8f1327 !important;}
.woocommerce-cart .tfs-row__remove svg{display:block;width:16px;height:16px;}
.woocommerce-cart .tfs-row--gift .tfs-row__remove{display:none !important;}
.woocommerce-cart .tfs-cart__summary .cart_totals h2{
	background:none !important;border:0 !important;padding:0 0 .9rem !important;
	font-size:24px !important;font-weight:300 !important;
}
@media (min-width:783px){
	.woocommerce-cart .tfs-row__remove{grid-column:4 !important;justify-self:end;padding-top:.4rem;}
}
@media (max-width:782px){
	.woocommerce-cart .tfs-cart{grid-template-columns:minmax(0,1fr) !important;}
	.woocommerce-cart .tfs-cart__form{order:1 !important;grid-column:1 !important;}
	.woocommerce-cart .tfs-cart__summary{order:0 !important;grid-column:1 !important;position:static !important;margin-bottom:1.75rem;}
	.woocommerce-cart .tfs-cart__head{display:none !important;}
	.woocommerce-cart .tfs-row{display:block !important;padding:1.15rem 0 !important;}
	.woocommerce-cart .tfs-col-item{display:flex !important;gap:.9rem;align-items:flex-start;margin:0 0 .6rem !important;width:auto !important;}
	.woocommerce-cart .tfs-row__media{flex:0 0 84px;width:84px;margin:0 !important;}
	.woocommerce-cart .tfs-row__media img{width:84px;height:auto;display:block;}
	.woocommerce-cart .tfs-row__name{font-size:14px;line-height:1.35;}
	.woocommerce-cart .tfs-col-price,
	.woocommerce-cart .tfs-col-qty,
	.woocommerce-cart .tfs-col-sub{
		display:flex !important;align-items:center;justify-content:space-between;gap:1rem;
		padding:.45rem 0 !important;border-top:1px solid #eee;text-align:right !important;width:auto !important;
	}
	.woocommerce-cart .tfs-col-price::before,
	.woocommerce-cart .tfs-col-qty::before,
	.woocommerce-cart .tfs-col-sub::before{
		content:attr(data-label);display:block !important;flex:0 0 auto;
		font-size:13px;font-weight:700;color:#333;text-align:left;
	}
	.woocommerce-cart .tfs-col-qty .tfs-stepper{margin-left:auto;}
	.woocommerce-cart .tfs-row__remove{display:flex !important;justify-content:flex-end;padding-top:.5rem;}
	.woocommerce-cart .tfs-row--gift .tfs-row__remove{display:none !important;}
	.woocommerce-cart .tfs-cart__actions{display:flex !important;flex-direction:column;align-items:stretch;gap:.6rem;}
	.woocommerce-cart .tfs-cart__actions > p{margin:0 !important;width:100%;}
	.woocommerce-cart .tfs-cart__actions button[name="update_cart"]{width:100% !important;}
	.woocommerce-cart .tfs-cart__title{font-size:24px !important;}
}
@media (max-width:782px){.woocommerce-cart .tfs-row__remove{position:static !important;top:auto !important;right:auto !important;bottom:auto !important;left:auto !important;width:auto !important;}}
.woocommerce-cart .tfs-row__remove a.remove,.woocommerce-cart .tfs-row__remove a.tfs-remove{opacity:1 !important;border:0 !important;box-shadow:none !important;}
.woocommerce-cart .tfs-row__remove a.remove::before,.woocommerce-cart .tfs-row__remove a.remove::after,.woocommerce-cart .tfs-row__remove a.tfs-remove::before,.woocommerce-cart .tfs-row__remove a.tfs-remove::after{content:none !important;display:none !important;border:0 !important;}

/* hide redundant floating cart bubble on the cart page (overlaps totals) */
body.woocommerce-cart .xoo-wsc-basket{display:none !important;}

/* ---- us2 : Proceed to checkout - page wraps the button in <p><br> (wpautop); neutralise + outrank woocommerce-grid padding/line-height ---- */
html body.woocommerce-cart .tfs-cart__summary .cart_totals .wc-proceed-to-checkout p{ margin:0 !important; padding:0 !important; }
html body.woocommerce-cart .tfs-cart__summary .cart_totals .wc-proceed-to-checkout a.checkout-button.button br{ display:none !important; }
html body.woocommerce-cart .tfs-cart__summary .cart_totals .wc-proceed-to-checkout a.checkout-button.button{
  display:block !important; width:100% !important; height:56px !important; line-height:56px !important;
  padding:0 !important; margin:0 !important; font-size:18px !important; text-align:center !important; box-sizing:border-box !important; transition:none !important;
}

/* ---- us7 : mobile cart totals rows span the full card (desktop 42% td width was leaking into the responsive table) ---- */
@media (max-width:782px){
  html body.woocommerce-cart .tfs-cart__summary .shop_table tr td{ width:100% !important; display:flex !important; justify-content:space-between !important; align-items:center !important; text-align:right !important; padding:.85rem 0 !important; box-sizing:border-box !important; }
  html body.woocommerce-cart .tfs-cart__summary .shop_table tr td::before{ float:none !important; text-align:left !important; font-weight:600 !important; }
}

/* ---- 2026-09-04 : desktop cart totals table overflowed the 340px summary card ---- */
@media (min-width:783px){
html body.woocommerce-cart .tfs-cart__summary .shop_table{ table-layout:fixed !important; width:100% !important; max-width:100% !important; }
html body.woocommerce-cart .tfs-cart__summary .shop_table th{ width:52% !important; white-space:normal !important; overflow-wrap:anywhere !important; line-height:1.35 !important; vertical-align:top !important; }
html body.woocommerce-cart .tfs-cart__summary .shop_table td{ width:48% !important; white-space:normal !important; overflow-wrap:anywhere !important; line-height:1.35 !important; vertical-align:top !important; text-align:right !important; }
html body.woocommerce-cart .tfs-cart__summary .shop_table td .woocommerce-shipping-destination,
html body.woocommerce-cart .tfs-cart__summary .shop_table td .shipping-calculator-button{ display:block !important; white-space:normal !important; }
}
