/* 1.0.66b p66b_drawer：購物車抽屜（Astra 側邊購物車／外掛備用抽屜）
 * 1) 抽屜在所有頁首、公告橫幅之上；頂端避開 WP 管理列與瀏海安全區；標題列（購物車＋關閉 X）固定可見。
 * 2) 刪除鈕（圓圈 X）固定在右上角自己的欄位，商品名稱右側保留空間，不再重疊。 */
html body.fz66b-dr { --fz66-dtop: calc(var(--wp-admin--admin-bar--height, 0px) + env(safe-area-inset-top, 0px)); }
@media (max-width: 600px) {
	/* WP 管理列在 600px 以下不是固定的，捲動後就離開畫面；抽屜改用 0（僅留安全區） */
	html body.fz66b-dr.fz66b-dr-scrolled { --fz66-dtop: env(safe-area-inset-top, 0px); }
}
html body.fz66b-dr .astra-cart-drawer,
html body.fz66b-dr #astra-mobile-cart-drawer {
	z-index: 2147483000 !important;
	top: var(--fz66-dtop) !important; bottom: auto !important;
	height: calc(100vh - var(--fz66-dtop)) !important; max-height: calc(100vh - var(--fz66-dtop)) !important;
	padding-top: 0 !important; /* Astra 原本用 padding 避開管理列，改由 top 處理 */
	overscroll-behavior: contain;
}
@supports (height: 100dvh) {
	html body.fz66b-dr .astra-cart-drawer,
	html body.fz66b-dr #astra-mobile-cart-drawer { height: calc(100dvh - var(--fz66-dtop)) !important; max-height: calc(100dvh - var(--fz66-dtop)) !important; }
}
html body.fz66b-dr .astra-mobile-cart-overlay { z-index: 2147482990 !important; }
html body.fz66b-dr .astra-cart-drawer .astra-cart-drawer-header {
	position: sticky !important; top: 0 !important; z-index: 6 !important; background: #fff !important;
	display: flex !important; align-items: center; flex-direction: row-reverse; justify-content: space-between; max-height: none !important; padding: .6em 1.34em !important; min-height: 3.5em;
}
html body.fz66b-dr .astra-cart-drawer .astra-cart-drawer-header .astra-cart-drawer-close { position: static !important; flex: 0 0 auto; }
html body.fz66b-dr .astra-cart-drawer .astra-cart-drawer-content { padding-top: 0 !important; }
/* 外掛備用抽屜 */
html body.fz66b-dr .fz65-drawer { z-index: 2147483000 !important; }
html body.fz66b-dr .fz65-drawer__panel { top: var(--fz66-dtop) !important; height: auto !important; bottom: 0 !important; }

/* 刪除鈕：右上自己的欄位 */
html body.fz66b-dr .astra-cart-drawer .woocommerce-mini-cart-item,
html body.fz66b-dr .fz65-drawer__body .woocommerce-mini-cart-item,
html body.fz66b-dr .widget_shopping_cart_content .woocommerce-mini-cart-item { position: relative !important; padding-right: 34px !important; }
html body.fz66b-dr .astra-cart-drawer .woocommerce-mini-cart-item a.remove,
html body.fz66b-dr .fz65-drawer__body .woocommerce-mini-cart-item a.remove,
html body.fz66b-dr .widget_shopping_cart_content .woocommerce-mini-cart-item a.remove {
	position: absolute !important; top: 12px !important; right: 0 !important; left: auto !important;
	width: 24px !important; height: 24px !important; display: inline-flex !important; align-items: center; justify-content: center;
}
html body.fz66b-dr .widget_shopping_cart_content .woocommerce-mini-cart-item a.remove svg { width: 14px !important; height: 14px !important; }
html body.fz66b-dr .widget_shopping_cart_content .woocommerce-mini-cart-item > a:not(.remove) { overflow-wrap: anywhere; }
