:root {

	/* IMAGE GALLERY */
	--product-image-border-radius: 10px;
	--product-gallery-trigger-size: 32px;
	--product-gallery-trigger-padding: var(--space-xxsmall);
	--product-gallery-trigger-offset: var(--space-normal);
	--product-gallery-trigger-z: 9;

	/* LAYOUT */
	--product-wrapper-margin-top: var(--space-large);
	--product-wrapper-margin-bottom: var(--space-xlarge);
	--product-image-column-width: 39.75%;
	--product-summary-padding-left: var(--space-xlarge);

	/* SUMMARY */
	--product-quantity-input-max-width: 70px;

	/* TABS */
	--product-tab-padding: var(--space-normal);
}

/* DO NOT EDIT BELOW THIS LINE — these are the actual styles using the above tokens. */

/* ===== WAITLIST / EXCLUSIVES: HIDE QUANTITY & OUT-OF-STOCK ===== */

:where(div.outofstock, div.product_cat-waitlist, div.product_cat-annalee-exclusives) :is(.wishlist-cart-form, .out-of-stock) {
	display: none;
}

/* ===== SINGLE PRODUCT WRAPPER ===== */

.ftm-single-product-wrapper {
	margin-bottom: var(--product-wrapper-margin-bottom);
	margin-top: var(--product-wrapper-margin-top);
	padding: 0 var(--gutter-width);
}

.ftm-single-product-inner {
	max-width: var(--max-width-wide);
	margin: 0 auto;
}

.al-product-tag-custom-heading {
	font: var(--heading-x-small);
}

/* ===== IMAGE GALLERY ===== */

/* Position context for badges and trigger button */
.ftm-single-product-images {
	position: relative;

	@media (min-width: 48.5em) {
		min-width: var(--product-image-column-width);
		max-width: var(--product-image-column-width);
	}
}

.single-product div.product .woocommerce-product-gallery {
	position: relative;
}

figure.woocommerce-product-gallery__wrapper {
	margin: 0;
}

/* Main gallery image: card-style border */
.ftm-single-product-images .woocommerce-product-gallery__image {
	border: 1px solid var(--color-border-muted);
	border-radius: var(--product-image-border-radius);
}

/* Flex viewport inherits the card border; individual images inside are borderless */
.ftm-single-product-images .flex-viewport {
	border: 1px solid var(--color-border-muted);
	border-radius: var(--product-image-border-radius);
	margin-bottom: var(--space-normal);
}

.ftm-single-product-images .flex-viewport .woocommerce-product-gallery__image {
	border: none;
	border-radius: 0;
}

/* Zoom trigger (top-right of main image) */
.ftm-single-product-images .woocommerce-product-gallery__trigger {
	background-color: var(--color-surface);
	border-radius: 50%;
	display: block;
	font-size: 0;
	padding: var(--product-gallery-trigger-padding);
	position: absolute;
	right: var(--product-gallery-trigger-offset);
	text-align: center;
	text-decoration: none;
	top: var(--product-gallery-trigger-offset);
	width: var(--product-gallery-trigger-size);
	z-index: var(--product-gallery-trigger-z);
}

.ftm-single-product-images .woocommerce-product-gallery__trigger::before {
	font: var(--icon-font);
	-webkit-font-smoothing: var(--icon-webkit-font-smoothing, antialiased);
	-moz-osx-font-smoothing: var(--icon-moz-osx-font-smoothing, grayscale);
	content: var(--icon-ftm-search-plus);
}

/* Thumbnail strip */
.ftm-single-product-images .woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
}

.ftm-single-product-images .woocommerce-product-gallery .flex-control-thumbs li {
	width: 25%; /* 4 across */

	@media (min-width: 27.5em) {
		width: 20%;
	}
}

.ftm-single-product-images .woocommerce-product-gallery .flex-control-thumbs li img {
	border: 1px solid var(--color-border-muted);
	border-radius: 4px;
	cursor: pointer;
	display: block;
	opacity: 0.65;
	transition: border-color 0.15s ease, opacity 0.15s ease;
	width: 100%;

	&.flex-active,
	&:hover {
		border-color: var(--color-primary);
		opacity: 1;
	}
}

/* ===== IMAGES + SUMMARY LAYOUT ===== */

.ftm-single-product-images-summary,
.ftm-single-product-images,
.ftm-single-product-images-summary .summary {
	margin: var(--space-large) 0;
}


.ftm-single-product-images-summary {

	@media (min-width: 48.5em) {
		display: flex;
	}
}

.summary {

	@media (min-width: 48.5em) {
		padding-left: var(--product-summary-padding-left);
	}
}

/* ===== SUMMARY: TITLE AND META ===== */

.ftm-bundle-badge {
	border-radius: 0.25rem;
	background-color: rgba(226, 207, 234, 0.50);
	color: var(--color-black);
	font: var(--body-small);
	font-family: body, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
	line-height: 2; /* 200% */
	letter-spacing: 0.04em;
	display: flex;
	padding: 0.5rem 0.25rem;
	justify-content: center;
	align-items: center;
	gap: 0.25rem;
	width: fit-content;
}

.summary .entry-title {
	font: var(--heading-x-small);
	text-align: center;
	margin: 0;

	@media (min-width: 48.5em) {
		text-align: inherit;
	}
}

.summary .ftm-product-sales-count {
	align-items: center;
	color: var(--color-primary);
	display: inline-flex;
	font: var(--body-small);
	gap: var(--space-xxsmall);
	letter-spacing: 0.01em;
	line-height: 1.2;
	margin: 0 0 var(--space-xsmall);
	text-transform: none;
}

.summary .ftm-product-sales-count__text {
	display: inline-block;
}

.summary .al-product-sku-reviews {
	display: flex;
	justify-content: center;

	@media (min-width: 48.5em) {
		justify-content: unset;
	}
}

.summary .yotpo-small .text-m {
	display: inline;
}

.summary .price {
	font: var(--body-large);
	font-weight: var(--typeface-weight-body-bold);
	margin: 0;
	text-align: center;

	@media (min-width: 48.5em) {
		text-align: inherit;
	}

	/* Display sale price first, regular price as a smaller superscript to the right. */
	&:has(ins) {
		align-items: baseline;
		display: inline-flex;
		gap: 0.25em;
		justify-content: center;

		@media (min-width: 48.5em) {
			justify-content: flex-start;
		}
	}

	& ins {
		order: 1;
		text-decoration: none;
	}

	& del {
		font-size: 0.65em;
		order: 2;
	}

}

/* ===== SUMMARY: STOCK STATUS ===== */

/* Hide positive in-stock label — stock-out and waitlist messaging handles it */
.summary .stock.in-stock {
	display: none;
	color: var(--color-success-400);
}

/* Suppress the ::before pseudo if stock element is empty */
.summary .stock:empty::before {
	display: none;
}

.summary .stock.out-of-stock {
	color: var(--color-error-700);
}

/* ===== SUMMARY: QUANTITY AND ADD TO CART ===== */

.summary .quantity:not(.ftm-quantity-stepper) {
	display: flex;
	justify-content: center;
	margin-top: var(--space-large);

	@media (min-width: 48.5em) {
		flex-direction: column;
		margin-right: var(--space-normal);
	}
}

.summary .quantity:not(.ftm-quantity-stepper)::before {
	content: "Qty:";
	display: block;
	margin-right: var(--space-small);
	text-transform: uppercase;

	@media (min-width: 48.5em) {
		content: "Quantity";
		margin-left: 0;
		text-transform: none;
	}
}

.summary .quantity:not(.ftm-quantity-stepper) input {
	max-width: var(--product-quantity-input-max-width);

	@media (min-width: 48.5em) {
		text-align: center;
	}
}

.single_add_to_cart_button {
	border-radius: 24px;
	margin-top: var(--space-large);
	text-transform: capitalize;
	width: 100%;

	@media (min-width: 48.5em) {
		flex: 1 0 0;
		width: auto;
	}
}

/* Hide quantity for retired designs */
.product_tag-retired-designs .summary .quantity {
	display: none;
}

.ftm-single-product-quantity-and-button {

	@media (min-width: 48.5em) {

		align-items: flex-end;
		display: flex;
		gap: 1rem;
	}
}

/* ===== QUANTITY PILL STEPPER =====
 * Scoped to .summary so stale WC cart fragments with .ftm-quantity-stepper
 * in the mini-cart or cart table never receive pill styling.
 * ===== */

.summary .ftm-quantity-stepper {
	align-items: center;
	border: 1px solid var(--color-border-muted);
	border-radius: 24px;
	display: flex;
	flex-direction: row;
	gap: 0;
	overflow: hidden;
	width: fit-content;

	input[type="number"],
	input[type="text"] {
		-moz-appearance: textfield;
		appearance: textfield;
		background: transparent;
		border: none;
		border-radius: 0;
		box-shadow: none;
		font: var(--body-normal);
		height: auto;
		min-width: 2.5rem;
		padding: 0.4em 0.25em;
		text-align: center;
		width: 3rem;

		&::-webkit-inner-spin-button,
		&::-webkit-outer-spin-button {
			appearance: none;
		}

		&:focus {
			outline: 2px solid var(--color-primary);
			outline-offset: -2px;
		}
	}
}

.summary .ftm-qty-btn {
	background: transparent;
	border: none;
	border-radius: 0;
	color: var(--color-text-body);
	cursor: pointer;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1;
	padding: 0.35em 0.75em;
	transition: background-color 0.15s, color 0.15s;

	/* Quiet, neutral hover — a stepper is a control, not a brand CTA, so it
	   gets the subtle surface tint (matching toggles) instead of a red fill. */
	&:hover {
		background-color: var(--color-surface-subtle);
		color: var(--color-text-body);
	}

	&:focus-visible {
		outline: 2px solid var(--color-primary);
		outline-offset: -2px;
	}

	&:disabled {
		cursor: not-allowed;
		opacity: 0.4;
	}
}

.summary .ftm-qty-minus {
	border-right: 1px solid var(--color-border-muted);
}

.summary .ftm-qty-plus {
	border-left: 1px solid var(--color-border-muted);
}

.summary .ftm-quantity-static .ftm-qty-display {
	font: var(--body-normal);
}

/* ===== TABS ===== */

.ftm-product-description-heading {
	font: var(--label-large);
    font-weight: 700;
	margin-bottom: var(--space-xsmall);
	margin-top: var(--space-normal);
}

.ftm-facial-expression-notice {
	color: var(--color-text-muted, var(--color-text-body));
	font: var(--body-small);
	font-size: 0.875rem;
	font-style: italic;
	margin-top: var(--space-xsmall);
}

.single-product .woocommerce-tabs ul.tabs {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: left;
}

.single-product .woocommerce-tabs ul.tabs li {
	display: block;
	margin: 0;
	position: relative;
}

.single-product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: var(--product-tab-padding) 0;
}

.single-product .woocommerce-tabs .panel h2:first-of-type {
	margin-bottom: var(--product-tab-padding);
}

/* Up-sells & related products on single product pages */

.single-product .up-sells.products ul.products,
.single-product .related.products ul.products {
	column-gap: 1rem;
	row-gap: 1.25rem;

	@media (min-width: 40rem) {
		column-gap: 1.25rem;
		row-gap: 1.5rem;
	}
}

.single-product .up-sells.products li.product,
.single-product .related.products li.product {
	height: 100%;
}

.single-product .up-sells.products .woocommerce-LoopProduct-link,
.single-product .related.products .woocommerce-LoopProduct-link {
	display: block;
	flex: 1;
	margin-bottom: var(--space-xsmall);
}

.upsells.products .add_to_cart_button,
.related.products .add_to_cart_button {
	width: fit-content;
}

.single-product section.up-sells.upsells.products li.product,
.single-product section.related.products li.product {
	display: flex;
	flex-direction: column;
}