.wc-mobile-variant-preview,
.wc-mobile-purchase-bar {
	display: none;
}

@media (max-width: 767px) {
	html:has(body.wc-mobile-sheet-open),
	body.wc-mobile-sheet-open {
		overflow: hidden;
	}

	body.single-product.wc-mobile-variation-ready {
		padding-bottom: calc(66px + env(safe-area-inset-bottom));
	}

	body.single-product button.wc-mobile-variant-preview {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		min-height: 56px;
		margin: 0 0 16px;
		padding: 8px 12px;
		border: 1px solid #e1e5eb;
		border-radius: 10px;
		background: #fff;
		color: #20252c;
		font: inherit;
		font-size: 0.875rem;
		text-align: start;
	}

	.wc-mobile-variant-preview__images {
		display: flex;
		flex: 0 0 auto;
		gap: 4px;
		max-width: 46%;
		overflow: hidden;
	}

	.wc-mobile-variant-preview__images img {
		flex: 0 0 34px;
		width: 34px;
		height: 34px;
		border-radius: 5px;
		object-fit: cover;
	}

	.wc-mobile-variant-preview__selection {
		flex: 1 1 auto;
		min-width: 0;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.wc-mobile-variant-preview__count {
		flex: 0 0 auto;
		color: #5f6b78;
		white-space: nowrap;
	}

	.wc-mobile-variant-preview__chevron {
		flex: 0 0 7px;
		width: 7px;
		height: 7px;
		margin-inline-end: 2px;
		transform: rotate(45deg);
		border-top: 1.5px solid #5f6b78;
		border-right: 1.5px solid #5f6b78;
	}

	.wc-mobile-sheet {
		position: fixed;
		inset: auto 0 0;
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		max-height: 88vh;
		max-height: min(88dvh, 760px);
		margin: 0;
		padding: 0;
		overflow: hidden;
		border: 0;
		border-radius: 18px 18px 0 0;
		background: #fff;
		color: #20252c;
	}

	.wc-mobile-sheet[open] {
		animation: wc-mobile-sheet-enter 190ms ease-out;
		translate: 0 var(--wc-mobile-sheet-drag, 0px);
		transition: translate 150ms ease-out;
	}

	.wc-mobile-sheet.wc-mobile-sheet--dragging[open] {
		transition: none;
	}

	.wc-mobile-sheet::backdrop {
		background: rgb(15 22 34 / 52%);
	}

	body.single-product .product .wc-mobile-sheet > form.variations_form {
		display: flex;
		flex-direction: column;
		width: 100%;
		height: var(--wc-mobile-sheet-height, auto);
		max-height: 88vh;
		max-height: min(88dvh, 760px);
		margin: 0;
		overflow: hidden;
	}

	.wc-mobile-sheet__handle {
		display: grid;
		flex: 0 0 28px;
		place-items: center;
		touch-action: none;
		cursor: grab;
	}

	.wc-mobile-sheet__handle::before {
		width: 36px;
		height: 4px;
		border-radius: 999px;
		background: #aab2bc;
		content: '';
	}

	.wc-mobile-sheet--dragging .wc-mobile-sheet__handle {
		cursor: grabbing;
	}

	.wc-mobile-sheet__header {
		position: relative;
		display: flex;
		align-items: center;
		flex: 0 0 auto;
		gap: 12px;
		padding: 4px 16px 14px;
		border-bottom: 1px solid #e8ebef;
	}

	.wc-mobile-sheet__header h2 {
		margin: 0 40px 10px 0;
		font-size: 1.1rem;
		font-weight: 650;
		line-height: 1.3;
	}

	.wc-mobile-sheet__title:focus,
	.wc-mobile-image-viewer__photo:focus {
		outline: none;
	}

	.wc-mobile-sheet__details {
		flex: 1 1 auto;
		min-width: 0;
	}

	body.single-product button.wc-mobile-sheet__image-open {
		display: block;
		flex: 0 0 68px;
		width: 68px;
		height: 68px;
		padding: 0;
		overflow: hidden;
		border: 1px solid #e8ebef;
		border-radius: 8px;
		background: #fff;
		cursor: zoom-in;
	}

	body.single-product button.wc-mobile-sheet__image-open[hidden] {
		display: none;
	}

	.wc-mobile-sheet__image {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.wc-mobile-image-viewer {
		position: fixed;
		inset: 0;
		box-sizing: border-box;
		width: 100%;
		height: 100%;
		height: 100dvh;
		max-width: none;
		max-height: none;
		margin: 0;
		padding: calc(56px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
		border: 0;
		background: #171a20;
	}

	.wc-mobile-image-viewer[open] {
		display: grid;
		grid-template: minmax(0, 1fr) / minmax(0, 1fr);
		place-items: center;
	}

	.wc-mobile-image-viewer__photo {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	body.single-product button.wc-mobile-image-viewer__close {
		position: absolute;
		top: calc(8px + env(safe-area-inset-top));
		inset-inline-end: 12px;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: #353a44;
		color: #fff;
		font: 26px/1 system-ui, sans-serif;
	}

	.wc-mobile-sheet__price {
		display: block;
		min-height: 1.25em;
		margin-bottom: 6px;
		color: #20252c;
		font-size: clamp(0.875rem, 4.4vw, 1.125rem);
		font-weight: 650;
		line-height: 1.25;
		white-space: nowrap;
	}

	.wc-mobile-sheet__price del {
		color: #5f6b78;
		font-size: 0.875em;
	}

	.wc-mobile-sheet__stock {
		min-width: 0;
		color: #5f6b78;
		font-size: 0.8125rem;
	}

	.wc-mobile-sheet__quantity-row {
		display: flex;
		align-items: center;
		gap: 8px;
		min-height: 46px;
	}

	.wc-mobile-sheet__quantity-row > .wc-mobile-quantity {
		flex: 0 0 auto;
	}

	body.single-product button.wc-mobile-sheet__close {
		position: absolute;
		inset: 7px 7px auto auto;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: #20252c;
		font: 24px/1 system-ui, sans-serif;
	}

	.wc-mobile-sheet__options {
		flex: 1 1 auto;
		min-height: 0;
		padding: 14px 16px 18px;
		overflow-y: auto;
		overscroll-behavior-y: contain;
	}

	body.single-product form.variations_form .wc-mobile-sheet__options .variations {
		width: 100%;
		margin: 0;
		border: 0;
	}

	.wc-mobile-sheet__options .variations :is(tbody, tr, th, td) {
		display: block;
	}

	.wc-mobile-sheet__options .variations tr + tr {
		margin-top: 16px;
	}

	body.single-product form.variations_form .wc-mobile-sheet__options .variations :is(.label, .value) {
		width: auto;
		padding: 0;
		text-align: start;
	}

	body.single-product form.variations_form .wc-mobile-sheet__options .variations .label {
		margin-bottom: 8px;
	}

	.wc-mobile-sheet__options .cfvsw-swatches-container {
		gap: 7px;
	}

	.wc-mobile-sheet__options .cfvsw-label-option {
		display: flex;
		flex: 0 0 100%;
		align-items: center;
		justify-content: flex-start;
		gap: 9px;
		min-height: 44px;
		padding: 5px 10px;
		border-radius: 8px;
		text-align: start;
	}

	.wc-mobile-sheet__options .cfvsw-selected-swatch {
		background: #f1f6fc;
	}

	.wc-mobile-sheet__options .cfvsw-label-option .cfvsw-swatch-inner {
		min-width: 0;
		overflow-wrap: anywhere;
	}

	.wc-mobile-sheet__option-image {
		flex: 0 0 32px;
		width: 32px;
		height: 32px;
		border-radius: 4px;
		object-fit: cover;
		pointer-events: none;
	}

	.wc-mobile-sheet > form.variations_form > .single_variation_wrap {
		flex: 0 0 auto;
		padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
		border-top: 1px solid #e8ebef;
		background: #fff;
	}

	body.single-product .wc-mobile-sheet form.variations_form .wc-product-purchase-actions > .single_add_to_cart_button:is(.disabled, :disabled) {
		border-color: #efc9b3;
		background: #f8e2d5;
		color: #784225;
		opacity: 1;
	}

	body.single-product .wc-mobile-sheet form.variations_form .wc-product-purchase-actions > .wc-product-buy-now:disabled {
		border-color: #c5d5ee;
		background: #e1ebf9;
		color: #345276;
		opacity: 1;
	}

	.wc-mobile-sheet .single_variation_wrap > .single_variation,
	.wc-mobile-sheet .woocommerce-variation-add-to-cart > .wc-variation-quantity {
		position: absolute !important;
		width: 1px !important;
		height: 1px !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.wc-mobile-sheet .woocommerce-variation-add-to-cart > .wc-variation-quantity {
		visibility: hidden;
	}

	.wc-mobile-purchase-bar {
		position: fixed;
		z-index: 900;
		right: 0;
		bottom: 0;
		left: 0;
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-items: center;
		gap: 10px;
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
		border-top: 1px solid #e1e5eb;
		background: #fff;
		box-shadow: 0 -4px 18px rgb(19 30 43 / 9%);
	}

	body.single-product .wc-mobile-purchase-bar button.wc-mobile-purchase-bar__open {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		width: 100%;
		min-height: 46px;
		padding: 6px 8px;
		border: 0;
		border-radius: 8px;
		background: var(--ast-global-color-0, #ff630b);
		color: #fff;
		font: inherit;
		font-size: 0.875rem;
		font-weight: 650;
		line-height: 1.2;
	}

	.wc-mobile-purchase-bar__open .wc-product-purchase-icon {
		flex: 0 0 18px;
		width: 18px;
		height: 18px;
		font-size: 18px;
		line-height: 18px;
		pointer-events: none;
	}

	.wc-mobile-quantity {
		display: inline-grid;
		grid-template-columns: repeat(3, minmax(38px, 1fr));
		align-items: center;
		justify-items: stretch;
		width: max-content;
		border: 1px solid #e1e5eb;
		border-radius: 8px;
		background: #fff;
		vertical-align: middle;
	}

	body.single-product .wc-mobile-quantity > button,
	.wc-mobile-quantity > output {
		display: grid;
		place-items: center;
		min-width: 38px;
		min-height: 44px;
		margin: 0;
		padding: 0 4px;
		border: 0;
		border-radius: 0;
		background: transparent;
		color: #20252c;
		font: inherit;
		font-weight: 600;
	}

	.wc-mobile-quantity > output {
		border-inline: 1px solid #e1e5eb;
		font-variant-numeric: tabular-nums;
	}

	body.single-product .wc-mobile-quantity > button:disabled {
		color: #8a8f98;
	}

	body.single-product :is(button.wc-mobile-variant-preview, button.wc-mobile-sheet__close, button.wc-mobile-sheet__image-open, .wc-mobile-quantity > button):focus-visible {
		outline: 2px solid #173b71;
		outline-offset: -2px;
	}

	body.single-product button.wc-mobile-image-viewer__close:focus-visible {
		outline: 2px solid #fff;
		outline-offset: 2px;
	}
}

@keyframes wc-mobile-sheet-enter {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.wc-mobile-sheet[open] {
		animation: none;
		transition: none;
	}
}
