/* =========================================================
   Gemistry Sezane 共用變數（首頁 / 商品頁小工具）
   - 顏色、字型、字距照 Sezane；頁首 / 頁尾有各自的變數檔
   - 依賴 gemistry-boutique-fonts.css
   ========================================================= */

.gemistry-bq {
	--gemistry-bq-ink: #121212;
	--gemistry-bq-grey: #555;
	--gemistry-bq-cream: #fefcf8;
	--gemistry-bq-rule: #e1e1e1;
	--gemistry-bq-sans: "Gemistry BQ Sans", "Futura PT", Futura, "Century Gothic", sans-serif;
	--gemistry-bq-serif: "Gemistry BQ Serif", "EB Garamond", Garamond, "Times New Roman", serif;
	--gemistry-bq-ls: 1.5px;
	--gemistry-bq-ease: cubic-bezier(.76, 0, .24, 1);
}

/* 滿版：小工具一律撐滿「視窗」寬度，不受外層內距影響（WoodMart 內容區 .container 左右 15px、Elementor 容器內距）。
   margin 以父層中心往外推；--gemistry-bq-vw 由 JS 設為不含捲軸的視窗寬度（沒有 JS 時用 100vw）。
   同時解決 Elementor「直向 + 換行」容器讓小工具塌成 0 寬的問題（高度由寬度推算的小工具會消失）。
   商品主區塊、商品輪播內部仍有最大寬度 1436px 並置中。
   權重要高過 Elementor 的 .e-con > .elementor-widget { max-width: 100% } 與 width: var(--container-widget-width)，
   以及單一小工具自訂寬度產生的 .elementor-N .elementor-element.elementor-element-xxx（0,3,0），所以用 0,4,0。 */
.elementor-element.elementor-element.elementor-widget:is(.elementor-widget-gemistry-boutique-category-grid, .elementor-widget-gemistry-boutique-story, .elementor-widget-gemistry-boutique-product, .elementor-widget-gemistry-boutique-product-carousel, .elementor-widget-gemistry-boutique-catalog) {
	flex: 0 0 auto;
	width: var(--gemistry-bq-vw, 100vw);
	max-width: none;
	margin-inline: calc(50% - var(--gemistry-bq-vw, 100vw) / 2);
}

/* 主題與 Elementor 的全域按鈕樣式歸零（:where 讓各元件能覆蓋） */
.gemistry-bq-scope.gemistry-bq-scope :where(button) {
	min-width: 0;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	cursor: pointer;
}

.gemistry-bq-scope.gemistry-bq-scope :where(h1, h2, h3, p, ul, figure) { margin: 0; }

.gemistry-bq-scope.gemistry-bq-scope :where(a) {
	color: inherit;
	text-decoration: none;
}

.gemistry-bq-scope.gemistry-bq-scope :where(img) {
	display: block;
	max-width: 100%;
	height: auto;
}

.gemistry-bq .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* 編輯器提示（只在 Elementor 編輯器輸出） */
.gemistry-bq-notice {
	margin: 0;
	padding: 16px;
	border: 1px dashed #c9c4bb;
	color: #555;
	font-size: 14px;
	line-height: 1.5;
}

/* 加入購物袋送出中：按鈕保持原尺寸，文字隱藏（-webkit-text-fill-color，currentColor 仍是原本文字色），中央畫一個細線轉圈。 */
.gemistry-bq-scope.gemistry-bq-scope button.is-loading {
	position: relative;
	-webkit-text-fill-color: transparent;
	pointer-events: none;
}

.gemistry-bq-scope.gemistry-bq-scope button.is-loading > * { visibility: hidden; }

.gemistry-bq-scope.gemistry-bq-scope button.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 16px;
	height: 16px;
	margin: auto;
	border: 1px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: gemistry-bq-spin .7s linear infinite;
}

@keyframes gemistry-bq-spin {
	to { rotate: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
	.gemistry-bq-scope.gemistry-bq-scope button.is-loading::after {
		border-right-color: currentColor;
		animation: none;
		opacity: .5;
	}
}
