/**
 * Shared purchase-surface styles, loaded site-wide (see inc/enqueue.php)
 * because Quick Shop's product cards can appear on any page:
 *  - .ecommoda-size-swatch  — the SAME square swatch used by the Single
 *    Product page (elementor-single-product.css re-declares it scoped
 *    under .ecommoda-single-product-main so its own Elementor controls can
 *    still override it there) and the mobile Size Picker sheet.
 *  - .ecommoda-purchase-button — the Add to Cart / Buy Now button pair,
 *    shared by the Single Product page's injected Buy Now button, the
 *    mobile Sticky Bar, and this Quick Shop modal.
 *  - the Quick Shop modal shell itself.
 */

html.ecommoda-scroll-lock,
html.ecommoda-scroll-lock body {
	overflow: hidden !important;
}

.ecommoda-size-swatch {
	align-items: center;
	aspect-ratio: 1 / 1;
	background: transparent;
	border: 1px solid #ddd;
	border-radius: 3px;
	box-sizing: border-box;
	color: #333;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-family: inherit;
	font-size: 14px;
	height: 44px;
	justify-content: center;
	line-height: 1;
	min-height: 44px;
	min-width: 44px;
	padding: 0;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
	width: 44px;
}

.ecommoda-size-swatch:hover,
.ecommoda-size-swatch:focus-visible {
	border-color: #333;
	color: #333;
	outline: none;
}

.ecommoda-size-swatch:focus-visible {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

.ecommoda-size-swatch.is-selected {
	background-color: #333;
	border-color: #333;
	color: #fff;
}

.ecommoda-size-swatch:disabled,
.ecommoda-size-swatch.is-unavailable {
	color: #e02020;
	cursor: not-allowed;
	text-decoration: line-through;
}

.ecommoda-purchase-button {
	align-items: center;
	appearance: none;
	border-radius: 8px;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	flex: 1 1 auto;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	height: 40px;
	justify-content: center;
	line-height: 1;
	min-height: 40px;
	padding: 0 18px;
	transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}

.ecommoda-purchase-button--cart {
	background: #fff;
	border: 1px solid #222;
	color: #222;
}

.ecommoda-purchase-button--cart:hover,
.ecommoda-purchase-button--cart:focus-visible {
	background: #222;
	color: #fff;
}

.ecommoda-purchase-button--buy-now {
	background: #222;
	border: 1px solid #222;
	color: #fff;
}

.ecommoda-purchase-button--buy-now:hover,
.ecommoda-purchase-button--buy-now:focus-visible {
	background: #000;
}

.ecommoda-purchase-button:disabled {
	cursor: not-allowed;
	opacity: .5;
	pointer-events: none;
}

/* Quick Shop modal shell */

.ecommoda-quick-shop {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	position: fixed;
	z-index: 100070;
}

.ecommoda-quick-shop[hidden] { display: none; }

.ecommoda-quick-shop__backdrop {
	background: rgba(0,0,0,.55);
	inset: 0;
	position: absolute;
}

.ecommoda-quick-shop__dialog {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0,0,0,.25);
	max-height: 90vh;
	max-width: 860px;
	overflow-y: auto;
	position: relative;
	width: 92%;
}

.ecommoda-quick-shop__close {
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	padding: 8px 12px;
	position: absolute;
	right: 6px;
	top: 4px;
	z-index: 1;
}

.ecommoda-quick-shop__loading {
	padding: 60px 20px;
	text-align: center;
}

.ecommoda-quick-shop__body {
	display: grid;
	gap: 0;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.ecommoda-quick-shop__media {
	background: #f5f5f5;
}

.ecommoda-quick-shop__image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ecommoda-quick-shop__info {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	padding: 32px 28px;
}

.ecommoda-quick-shop__title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 10px;
}

.ecommoda-quick-shop__sizes {
	margin: 8px 0 18px;
}

.ecommoda-quick-shop__sizes-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
}

.ecommoda-quick-shop__actions {
	display: flex;
	gap: 10px;
	margin-top: 8px;
}

.ecommoda-quick-shop__view-details {
	color: #222;
	font-size: 13px;
	margin-top: 16px;
	text-align: center;
	text-decoration: underline;
}

.ecommoda-quick-shop__error {
	padding: 40px 20px;
	text-align: center;
}

@media (max-width: 767px) {
	.ecommoda-quick-shop__dialog {
		border-radius: 16px 16px 0 0;
		bottom: 0;
		max-height: 92vh;
		max-width: none;
		position: fixed;
		width: 100%;
	}

	.ecommoda-quick-shop {
		align-items: flex-end;
	}

	.ecommoda-quick-shop__body {
		grid-template-columns: 1fr;
	}

	.ecommoda-quick-shop__media {
		max-height: 260px;
		overflow: hidden;
	}

	.ecommoda-quick-shop__info {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ecommoda-size-swatch,
	.ecommoda-purchase-button {
		transition: none;
	}
}
