/* 1.0.65zx #16：桌機購物車兩欄、結帳頁開關與發票選項（開關 p65zx_cartdesk） */

/* 手機：欄位容器不影響排列（與 1.0.65zw 相同） */
html body.fzzw-cart .fzzx-main,
html body.fzzw-cart .fzzx-side { display: contents; }
html body.fzzw-cart .fzzx-main > *,
html body.fzzw-cart .fzzx-side > * { order: 20; margin: 0 !important; }

@media (min-width: 992px) {
	/* 覆蓋 1.0.65w 的三欄格線與 1.0.65zw 的 720px 單欄 */
	html body.fzzw-cart .woocommerce.fzzx-root {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) 380px !important;
		grid-template-rows: auto auto 1fr !important;
		gap: 16px 24px !important;
		align-items: start !important;
		max-width: 1160px !important;
		width: 100% !important;
		margin: 0 auto !important;
		padding: 8px 0 40px !important;
	}
	html body.fzzw-cart .woocommerce.fzzx-root > .fzzw-top,
	html body.fzzw-cart .woocommerce.fzzx-root > .woocommerce-notices-wrapper { grid-column: 1 / -1 !important; grid-row: auto !important; }
	html body.fzzw-cart .woocommerce.fzzx-root > .woocommerce-notices-wrapper { order: 0 !important; }
	html body.fzzw-cart .fzzx-main { display: flex !important; flex-direction: column; gap: 12px; grid-column: 1 !important; grid-row: auto !important; min-width: 0; }
	html body.fzzw-cart .fzzx-side { display: flex !important; flex-direction: column; gap: 12px; grid-column: 2 !important; grid-row: auto !important; position: sticky; top: 24px; min-width: 0; }
	html body.admin-bar.fzzw-cart .fzzx-side { top: 56px; }
	html body.fzzw-cart .fzzx-main > *,
	html body.fzzw-cart .fzzx-side > * { width: auto !important; max-width: none !important; float: none !important; grid-column: auto !important; grid-row: auto !important; }
	html body.fzzw-cart .fzzx-side .cart-collaterals { display: contents !important; }
	html body.fzzw-cart .fzzx-side .cart_totals { width: 100% !important; }
	/* Astra 的 .entry-content／容器寬度 */
	html body.fzzw-cart .ast-container,
	html body.fzzw-cart #primary { max-width: 1240px !important; width: 100% !important; }
	html body.fzzw-cart .entry-content { max-width: none !important; }
	/* 推薦商品：桌機改四欄格線 */
	html body.fzzw-cart .fzzx-main .fz65v-recs__list { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; overflow: visible !important; scroll-snap-type: none !important; }
	html body.fzzw-cart .fzzx-main .fz65v-rec { flex: none !important; width: auto !important; }
	/* 購物車商品列：桌機版較寬 */
	html body.fzzw-cart .fzzx-main table.cart tr.cart_item { grid-template-columns: 96px minmax(0, 1fr) auto 24px; }
	html body.fzzw-cart .fzzx-main table.cart td.product-thumbnail img { width: 96px !important; height: 96px !important; }
}

/* ---------- 結帳頁 ---------- */

/* (1) 收件人同訂購人資訊 開關：留在卡片內距內、靠右 */
html body.fzzw-checkout .fzzw-c-recv .fzzw-card__body { overflow: hidden; }
html body.fzzw-checkout h3.fz65-has-same,
html body.fzzw-checkout #ship-to-different-address { display: flex !important; align-items: center; width: 100% !important; max-width: 100% !important; margin: 8px 0 !important; padding: 0 !important; box-sizing: border-box; float: none !important; }
html body.fzzw-checkout .fz65-same { box-sizing: border-box; width: 100% !important; max-width: 100% !important; min-width: 0; margin: 0 !important; padding: 0 !important; justify-content: space-between !important; }
html body.fzzw-checkout .fz65-same__sw { flex: 0 0 44px !important; width: 44px !important; height: 26px !important; margin: 0 0 0 auto !important; box-sizing: border-box; overflow: hidden; }
html body.fzzw-checkout .fz65-same__sw::after { box-sizing: border-box; }
html body.fzzw-checkout .fz65-same > :not(.fz65-same__sw) { min-width: 0; flex: 1 1 auto; text-align: left; }

/* (2) 發票開立對象等單選欄：圓點與文字同一行，樣式同送貨方式選項框 */
html body.fzzw-checkout .fzzw-c-inv .form-row .woocommerce-input-wrapper,
html body.fzzw-checkout #fuzzy-tax-id-fields .form-row .woocommerce-input-wrapper { display: flex !important; flex-direction: column; gap: 8px; }
html body.fzzw-checkout .fzzw-card input[type="radio"].input-radio + label,
html body.fzzw-checkout .fzzw-card .woocommerce-input-wrapper > input[type="radio"] + label { display: inline !important; margin: 0 !important; }
html body.fzzw-checkout .fzzw-card .fzzx-radio { display: flex !important; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid #D7DAE0; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; line-height: 1.4; color: var(--zw-ink, #111827); margin: 0 !important; }
html body.fzzw-checkout .fzzw-card .fzzx-radio.is-on { border-color: var(--zw-blue, #4E6CF5); box-shadow: 0 0 0 1px var(--zw-blue, #4E6CF5) inset; }
html body.fzzw-checkout .fzzw-card .fzzx-radio input[type="radio"] { position: static !important; opacity: 1 !important; margin: 0 !important; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--zw-blue, #4E6CF5); }
html body.fzzw-checkout .fzzw-card .fzzx-radio label { display: inline !important; margin: 0 !important; padding: 0 !important; font-weight: 400 !important; cursor: pointer; }
html body.fzzw-checkout .fzzw-card .fzzx-radio .optional,
html body.fzzw-checkout .fzzw-card .fzzx-radio label .optional { display: none !important; }
html body.fzzw-checkout .fzzw-card .form-row:has(.fzzx-radio) > label .optional { display: none !important; }
html body.fzzw-checkout h3.fz65-has-same > label.checkbox { display: none !important; }
@media (min-width: 992px) {
	html body.fzzw-cart .fzzx-main .fzzw-couponcard { order: 5 !important; }
	html body.fzzw-cart .fzzx-main .fz65w-pick { order: 6 !important; }
	html body.fzzw-cart .fzzx-main .fz65v-recs { order: 7 !important; }
}
/* 開關圓鈕超出：1.0.65a 用 translateX(18px)、1.0.65zw 用 left:21px，兩者疊加使圓鈕跑到開關外 → 只保留 left。 */
html body.fzzw-checkout .fz65-same .fz65-same__sw::after,
html body.fzzw-checkout .fz65-same[aria-checked="true"] .fz65-same__sw::after { transform: none !important; }
