/* Morphé product page on phones and tablets (below Astra's 922px desktop breakpoint).
   Owner's palette: red #BC1313 prices and actions, ink #1A1A1A, gold #D4AF37 thin lines. */

.mp-bar { display: none; }

@media (max-width: 921px) {

	/* Full width, white: no grey page frame around the product */
	body.single-product { background: #fff; }
	.single-product #primary { padding: 0 !important; margin: 0 !important; }
	.single-product .site-content > .ast-container { padding: 0 !important; }
	.single-product .ast-woocommerce-container { padding: 0 0 24px !important; }
	.single-product div.product { margin: 0; }
	.single-product .woocommerce-tabs, .single-product .related, .single-product .upsells { padding: 0 16px !important; }

	/* Photos edge to edge; thumbnails become thin page bars over the photo */
	.single-product .woocommerce-product-gallery { position: relative; width: 100% !important; margin: 0 !important; }
	.single-product .woocommerce-product-gallery .flex-viewport,
	.single-product .woocommerce-product-gallery__image img { width: 100%; }
	.single-product .flex-control-thumbs {
		position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 5;
		display: flex; gap: 4px; margin: 0 !important; padding: 0 !important;
	}
	.single-product .flex-control-thumbs li {
		flex: 1; width: auto !important; height: 2px; margin: 0 !important; padding: 0 !important; float: none !important;
		background: rgba(255, 255, 255, .55); box-shadow: 0 0 3px rgba(26, 26, 26, .4);
		transition: background-color .25s;
	}
	.single-product .flex-control-thumbs li:has(img.flex-active) { background: #fff; }
	.single-product .flex-control-thumbs li img { display: block; width: 100% !important; height: 28px !important; margin-top: -13px; opacity: 0 !important; cursor: pointer; }
	.single-product .woocommerce-product-gallery__trigger {
		top: 12px !important; right: 12px !important; width: 40px !important; height: 40px !important;
		border-radius: 0 !important; background: #fff !important; box-shadow: none !important;
	}

	/* Summary: category, name, price first; product meta moves to the end */
	.single-product .summary { display: flex; flex-direction: column; padding: 18px 16px 0 !important; margin: 0 !important; }
	.single-product .summary .product_meta { order: 20; margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(212, 175, 55, .45); font-size: 13px; color: #4a4646; }
	.single-product .summary .scfw-size-chart-main { order: 15; }
	.single-product .single-product-category { margin: 0 0 6px !important; font-size: 12px; line-height: 1.4; color: #4a4646; }
	.single-product .single-product-category a { color: inherit !important; }
	.single-product .summary .product_title {
		margin: 0 0 8px !important; color: #1A1A1A;
		font: 700 18px/1.3 "Manrope", system-ui, sans-serif !important; letter-spacing: .01em;
	}
	.single-product .summary > .price { margin: 0 0 14px !important; color: #BC1313 !important; font: 700 22px/1.2 "Manrope", system-ui, sans-serif !important; font-variant-numeric: tabular-nums; }
	.single-product .summary .price del { color: #4a4646 !important; font-size: 16px; font-weight: 500; opacity: 1; margin-right: 6px; }
	.single-product .summary .price ins { text-decoration: none; background: none; }
	.single-product .woocommerce-product-details__short-description { margin-bottom: 18px; font-size: 15px; line-height: 1.55; color: #4a4646; }
	.single-product .woocommerce-product-details__short-description p { margin: 0; }

	/* Colour and size choices */
	.single-product table.variations, .single-product table.variations tbody,
	.single-product table.variations tr, .single-product table.variations th, .single-product table.variations td { display: block; width: 100%; border: 0; padding: 0; background: none; }
	.single-product table.variations tr { margin-bottom: 18px; }
	.single-product table.variations th.label { margin-bottom: 10px; }
	.single-product table.variations th.label label { font: 700 14px/1 "Manrope", system-ui, sans-serif; color: #1A1A1A; }
	.single-product .cfvsw-swatches-container { display: flex; flex-wrap: wrap; gap: 8px; }
	.single-product .cfvsw-swatches-option { margin: 0 !important; }
	.single-product .cfvsw-label-option {
		min-width: 52px !important; height: 48px; padding: 0 12px; border-radius: 0 !important;
		display: inline-flex; align-items: center; justify-content: center;
		background: #fff; border: 1px solid #cfc9c9 !important; box-shadow: none !important;
		font: 600 15px/1 "Manrope", system-ui, sans-serif; color: #1A1A1A;
		transition: border-color .2s, background-color .2s, color .2s;
	}
	.single-product .cfvsw-label-option .cfvsw-swatch-inner { background: none !important; color: inherit; font: inherit; }
	.single-product .cfvsw-label-option:hover { border-color: #1A1A1A !important; }
	.single-product .cfvsw-label-option.cfvsw-selected-swatch { background: #1A1A1A; border-color: #1A1A1A !important; color: #fff; }
	/* Colour dots: bigger, with a ring for the chosen one */
	.single-product .cfvsw-swatches-option:not(.cfvsw-label-option) { min-width: 36px !important; min-height: 36px !important; padding: 3px; border: 1px solid #e3dede !important; box-shadow: none !important; }
	.single-product .cfvsw-swatches-option:not(.cfvsw-label-option) .cfvsw-swatch-inner { width: 100%; height: 100%; border-radius: 50%; }
	.single-product .cfvsw-swatches-option:not(.cfvsw-label-option).cfvsw-selected-swatch { border-color: #1A1A1A !important; box-shadow: 0 0 0 1px #1A1A1A !important; }
	/* Sold out in this colour: crossed out and not tappable-looking */
	.single-product .cfvsw-swatches-disabled,
	.single-product .cfvsw-swatches-out-of-stock { opacity: 1 !important; }
	.single-product .cfvsw-label-option.cfvsw-swatches-disabled,
	.single-product .cfvsw-label-option.cfvsw-swatches-out-of-stock { color: #b3adad; border-color: #ebe7e7 !important; text-decoration: line-through; background: #faf8f8; }
	.single-product .reset_variations { display: inline-block; margin-top: 10px; font-size: 13px; text-transform: none !important; letter-spacing: 0 !important; color: #4a4646 !important; text-decoration: underline; text-decoration-color: #D4AF37; text-underline-offset: 3px; }
	/* "Pick a size" nudge from the bottom bar */
	.single-product .variations.mp-ask th.label label { color: #BC1313; }
	.single-product .variations.mp-ask tr:last-child .cfvsw-swatches-container { animation: mp-nudge .5s cubic-bezier(.16, 1, .3, 1); }
	@keyframes mp-nudge { 25% { translate: -6px 0; } 50% { translate: 5px 0; } 75% { translate: -2px 0; } }

	.single-product .woocommerce-variation-availability .stock,
	.single-product .summary .stock { font-size: 13px; font-weight: 600; color: #BC1313; }
	.single-product .ast-stock-avail { display: none; }
	.single-product .woocommerce-variation-price .price { color: #BC1313 !important; font-weight: 700; font-size: 18px; }

	/* Quantity and add to cart: one row, thumb-sized */
	.single-product form.cart:not(.variations_form), .single-product .woocommerce-variation-add-to-cart { display: flex !important; gap: 8px; margin: 6px 0 0 !important; }
	.single-product form.cart .quantity { margin: 0 !important; }
	.single-product form.cart .quantity .qty { width: 64px; height: 52px; border: 1px solid #cfc9c9; border-radius: 0; font-size: 16px; text-align: center; }
	.single-product form.cart .single_add_to_cart_button {
		flex: 1; height: 52px; margin: 0 !important; padding: 0 16px !important; border-radius: 0 !important; box-shadow: none !important;
		background: #BC1313 !important; color: #fff !important; border: 0 !important;
		font: 700 16px/1 "Manrope", system-ui, sans-serif !important; letter-spacing: .01em; text-transform: none !important;
	}
	.single-product form.cart .single_add_to_cart_button.disabled { opacity: .45 !important; }

	/* Size guide link */
	.single-product .scfw-size-chart-main { margin: 14px 0 0 !important; }
	.single-product .scfw-size-chart-main a, .single-product .scfw-size-chart-main button {
		background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: #1A1A1A !important;
		font: 700 14px/1.4 "Manrope", system-ui, sans-serif !important; text-transform: none;
		text-decoration: underline !important; text-decoration-color: #D4AF37 !important; text-underline-offset: 4px;
	}

	/* The bottom bar */
	.mp-bar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
		display: flex; align-items: center; gap: 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		background: #fff; border-top: 1px solid #D4AF37; box-shadow: 0 -8px 24px -12px rgba(26, 26, 26, .25);
		translate: 0 110%; transition: translate .35s cubic-bezier(.16, 1, .3, 1);
	}
	.mp-bar.is-on { translate: 0 0; }
	.mp-bar__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
	.mp-bar__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 12px/1.3 "Manrope", system-ui, sans-serif; color: #4a4646; }
	.mp-bar__price { font: 700 17px/1.2 "Manrope", system-ui, sans-serif; color: #BC1313; font-variant-numeric: tabular-nums; }
	.mp-bar__price del { font-size: 13px; font-weight: 500; color: #4a4646; margin-right: 4px; }
	.mp-bar__price ins { text-decoration: none; background: none; }
	.mp-bar__price .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.mp-bar__btn,
	.mp-bar__btn:hover,
	.mp-bar__btn:focus {
		flex: none; height: 48px; padding: 0 20px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
		background: #BC1313 !important; color: #fff !important;
		font: 700 15px/1 "Manrope", system-ui, sans-serif !important; letter-spacing: .01em; text-transform: none !important; cursor: pointer;
	}
	.mp-bar__btn:active { background: #9a0f0f !important; }
	.mp-bar__btn:focus-visible { outline: 2px solid #1A1A1A; outline-offset: 2px; }
	/* Room for the bar: the phone button moves up, the page gets bottom space */
	.single-product .chaty-widget { transition: bottom .35s cubic-bezier(.16, 1, .3, 1); }
	body.mp-bar-on .chaty-widget { bottom: 84px !important; }
	body.single-product { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
	.mp-bar, .single-product .chaty-widget { transition: none; }
	.single-product .variations.mp-ask tr:last-child .cfvsw-swatches-container { animation: none; }
}
