/* ============================================================
   Beurre WooCommerce — mobile-first refinements
   Layered over the Elementor-rendered single product template
   and the standard WooCommerce shop archive.
   ============================================================ */

/* ---------- Mobile sticky add-to-basket bar ---------- */
.beurre-mobile-atc {
	position: fixed;
	bottom: -120px; /* hidden by default */
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	border-top: 1px solid var(--theme-color-bd_color, #E3E1D6);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	padding: 12px 16px max(12px, env(safe-area-inset-bottom));
	display: flex;
	align-items: center;
	gap: 12px;
	transition: bottom 0.25s ease-out;
	font-family: var(--theme-font-p_font-family, 'Work Sans', sans-serif);
}
.beurre-mobile-atc--visible {
	bottom: 0;
}
.beurre-mobile-atc__title {
	flex: 1;
	min-width: 0;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--theme-color-title, #1F242E);
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.beurre-mobile-atc__price {
	display: block;
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--theme-color-meta, #B2B0A8);
	margin-top: 2px;
}
.beurre-mobile-atc__btn {
	background: var(--theme-color-link, #A44027);
	color: #fff;
	border: none;
	border-radius: 30px;
	padding: 12px 22px;
	font-family: var(--theme-font-button_font-family, 'Lexend', sans-serif);
	font-size: 0.95rem;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	min-height: 44px;
	transition: background-color 0.2s ease, transform 0.1s ease;
}
.beurre-mobile-atc__btn:disabled {
	background: var(--theme-color-meta, #B2B0A8);
	cursor: not-allowed;
}
.beurre-mobile-atc__btn:active {
	transform: scale(0.98);
}
@media (min-width: 901px) {
	.beurre-mobile-atc {
		display: none !important;
	}
}

/* ---------- Variation as buttons ---------- */
.beurre-variation-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 16px;
}
.beurre-variation-button {
	background: #fff;
	border: 1.5px solid var(--theme-color-bd_color, #E3E1D6);
	color: var(--theme-color-title, #1F242E);
	border-radius: 999px;
	padding: 10px 18px;
	font-family: var(--theme-font-p_font-family, 'Work Sans', sans-serif);
	font-size: 0.95rem;
	font-weight: 500;
	cursor: pointer;
	min-height: 44px;
	min-width: 60px;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.beurre-variation-button:hover {
	border-color: var(--theme-color-link, #A44027);
}
.beurre-variation-button[aria-pressed="true"] {
	background: var(--theme-color-link, #A44027);
	border-color: var(--theme-color-link, #A44027);
	color: #fff;
}
.beurre-variation-button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.beurre-variation-label {
	display: block;
	font-family: var(--theme-font-button_font-family, 'Lexend', sans-serif);
	font-size: 0.85rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--theme-color-meta, #B2B0A8);
	margin-bottom: 4px;
}

/* When buttons are active, hide the original variation table */
.beurre-variations-as-buttons table.variations,
.beurre-variations-as-buttons table.variations tbody,
.beurre-variations-as-buttons table.variations tr,
.beurre-variations-as-buttons table.variations td,
.beurre-variations-as-buttons table.variations th {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
}
.beurre-variations-as-buttons table.variations select {
	display: none !important;
}
.beurre-variations-as-buttons .reset_variations {
	display: none !important;
}

/* ---------- Shop archive: mobile card refinements ---------- */
@media (max-width: 768px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr);
		gap: 14px !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	.woocommerce ul.products li.product,
	.woocommerce-page ul.products li.product {
		width: auto !important;
		float: none !important;
		margin: 0 !important;
		padding: 14px !important;
		clear: none !important;
	}
	.woocommerce ul.products li.product img,
	.woocommerce-page ul.products li.product img {
		aspect-ratio: 1 / 1;
		object-fit: cover;
		width: 100%;
		height: auto;
		margin-bottom: 10px;
	}
	.woocommerce ul.products li.product .woocommerce-loop-product__title,
	.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
		font-size: 0.95rem !important;
		line-height: 1.3;
		padding: 0 !important;
		margin-bottom: 6px;
	}
	.woocommerce ul.products li.product .price,
	.woocommerce-page ul.products li.product .price {
		font-size: 1rem !important;
		display: block;
	}
	.woocommerce ul.products li.product .button,
	.woocommerce-page ul.products li.product .button {
		display: block;
		width: 100%;
		margin-top: 10px !important;
		padding: 10px !important;
		font-size: 0.85rem !important;
		min-height: 44px;
	}
	/* Single H1 — hide the duplicate "All Products" inside the page content
	   when WC's "Shop" header is also present. */
	body.woocommerce-shop .woocommerce-products-header__title {
		display: none;
	}
}

/* ---------- Single product: mobile typography + spacing ---------- */
@media (max-width: 768px) {
	body.single-product .product_title {
		font-size: 1.6rem !important;
		line-height: 1.2;
		margin-bottom: 8px !important;
	}
	body.single-product .price {
		font-size: 1.4rem !important;
		margin-bottom: 16px !important;
	}
	body.single-product form.cart {
		flex-direction: column;
		gap: 12px;
	}
	body.single-product form.cart .quantity {
		width: 100%;
		justify-content: center;
	}
	body.single-product form.cart .single_add_to_cart_button {
		width: 100%;
		min-height: 48px;
	}
	body.single-product .woocommerce-tabs ul.tabs {
		display: flex;
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
	}
	body.single-product .woocommerce-tabs ul.tabs li {
		flex: 0 0 auto;
	}

	/* Add space at the page bottom so sticky bar doesn't cover content */
	body.single-product main,
	body.single-product .elementor-location-single {
		padding-bottom: 96px;
	}
}
