/**
 * Carlo Rino — Single Product Sticky Bar
 * Figma: Floating cart (node 1517:25445)
 */

/* Hide Astra default sticky bar when custom bar is active */
.cr-single-product-layout .ast-sticky-add-to-cart {
	display: none !important;
}

.cr-single-product-sticky-sentinel {
	display: block;
	width: 100%;
	height: 0.062rem;
	margin: 0;
	padding: 0;
	border: 0;
	pointer-events: none;
	visibility: hidden;
}

.cr-single-product-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 120;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(100%);
	transition:
		opacity 0.25s ease,
		visibility 0.25s ease,
		transform 0.25s ease;
}

.cr-single-product-sticky.is-visible {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.cr-single-product-sticky__frame {
	padding: 1.5rem 1rem;
	filter: drop-shadow(0 0 0.312rem rgba(51, 51, 51, 0.2));
}

.cr-single-product-sticky__inner {
	display: flex;
	align-items: flex-end;
	gap: 2rem;
	width: 100%;
	padding: 1.5rem 1rem;
	background: var(--cr-white, #fff);
	border-radius: 0.125rem;
}

.cr-single-product-sticky__product {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-width: 0;
}

.cr-single-product-sticky__identity {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-width: 0;
	flex: 1 1 auto;
}

.cr-single-product-sticky__thumb {
	position: relative;
	flex-shrink: 0;
	width: 2.5rem;
	height: 3.062rem;
	background: var(--cr-cream, #faf7f6);
	overflow: hidden;
}

.cr-single-product-sticky__thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cr-single-product-sticky__title {
	margin: 0;
	font-family: var(--cr-font-heading, "Lora", Georgia, serif);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--cr-black, #333);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cr-single-product-sticky__pricing {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	flex-wrap: wrap;
	white-space: nowrap;
}

.cr-single-product-sticky__stock {
	flex: 1 0 100%;
	font-family: var(--cr-font-body, "Quicksand", "Segoe UI", sans-serif);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.34;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cr-grey, #888);
}

.cr-single-product-sticky__stock[hidden] {
	display: none;
}

.cr-single-product-sticky__price-old {
	font-family: var(--cr-font-heading, "Lora", Georgia, serif);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--cr-grey, #888);
	text-decoration: line-through;
}

.cr-single-product-sticky__price-old[hidden],
.cr-single-product-sticky__price-discount[hidden] {
	display: none;
}

.cr-single-product-sticky__price-current {
	font-family: var(--cr-font-heading, "Lora", Georgia, serif);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--cr-black, #333);
}

.cr-single-product-sticky__price-current .woocommerce-Price-amount,
.cr-single-product-sticky__price-old .woocommerce-Price-amount {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
}

.cr-single-product-sticky__price-discount {
	font-family: var(--cr-font-body, "Quicksand", "Segoe UI", sans-serif);
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.34;
	color: var(--cr-pink, #e81f76);
}

.cr-single-product-sticky__cta {
	display: flex;
	align-items: stretch;
	gap: 0.25rem;
	flex-shrink: 0;
}

.cr-single-product-sticky__variations {
	display: flex;
	align-items: stretch;
	gap: 0.25rem;
}

.cr-single-product-sticky__variation {
	display: flex;
	flex: 0 0 auto;
	max-width: 100%;
	margin: 0;
}

.cr-single-product-sticky__variation-select {
	width: max-content;
	min-width: 12rem;
	max-width: 100%;
	field-sizing: content;
	min-height: 3.125rem;
	margin: 0;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	border: 0.062rem solid var(--cr-border, #e7e7e7);
	border-radius: 0.125rem;
	background-color: var(--cr-cream, #faf7f6);
	color: var(--cr-black, #333);
	font-family: var(--cr-font-body, "Quicksand", "Segoe UI", sans-serif);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.52;
	cursor: pointer;
}

.cr-single-product-sticky__variation-select:focus {
	border-color: var(--cr-pink, #e81f76);
	outline: 0.062rem solid var(--cr-pink, #e81f76);
	outline-offset: -0.062rem;
}

.cr-single-product-sticky__qty {
	display: flex;
	align-items: stretch;
	width: 9rem;
	padding: 0.25rem;
	background: var(--cr-cream, #faf7f6);
	border: 0.062rem solid var(--cr-border, #e7e7e7);
	border-radius: 0.125rem;
}

.cr-single-product-sticky__qty-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	padding: 0.5rem;
	border: 0;
	border-radius: 0.125rem;
	background: transparent;
	color: var(--cr-black, #333);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.cr-single-product-sticky__qty-btn:hover {
	background: rgba(0, 0, 0, 0.04);
}

.cr-single-product-sticky__qty-btn svg {
	display: block;
	width: 1.5rem;
	height: 1.5rem;
}

.cr-single-product-sticky__qty-value {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	padding: 0.5rem 0;
	font-family: var(--cr-font-body, "Quicksand", "Segoe UI", sans-serif);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.52;
	color: var(--cr-black, #333);
	text-align: center;
}

.cr-single-product-sticky__add-to-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	width: 20rem;
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 0.125rem;
	background: var(--cr-pink, #e81f76);
	color: var(--cr-white, #fff);
	font-family: var(--cr-font-body, "Quicksand", "Segoe UI", sans-serif);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.52;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
	backdrop-filter: blur(0.312rem);
	-webkit-backdrop-filter: blur(0.312rem);
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.cr-single-product-sticky__add-to-cart:hover {
	background: #d01a68;
}

.cr-single-product-sticky__add-to-cart:disabled,
.cr-single-product-sticky__add-to-cart.is-out-of-stock {
	background: #b0b0b0;
	cursor: not-allowed;
}

.cr-single-product-sticky__add-to-cart:disabled:hover,
.cr-single-product-sticky__add-to-cart.is-out-of-stock:hover {
	background: #b0b0b0;
}

.cr-single-product-sticky__add-to-cart.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.cr-single-product-sticky__add-to-cart svg {
	display: block;
	width: 1.5rem;
	height: 1.5rem;
	flex-shrink: 0;
}

.cr-single-product-sticky__add-to-cart svg path {
	fill: currentColor;
}

/* Offset when WP admin bar is visible */
.admin-bar .cr-single-product-sticky {
	bottom: 0;
}

@media (max-width: 1200px) {
	.cr-single-product-sticky__inner {
		gap: 1.25rem;
	}

	.cr-single-product-sticky__add-to-cart {
		width: 16.25rem;
	}
}

@media (max-width: 992px) {
	.cr-single-product-sticky__frame {
		padding: 1rem;
	}

	.cr-single-product-sticky__inner {
		flex-wrap: wrap;
		align-items: center;
		gap: 1rem;
		padding: 1rem;
	}

	.cr-single-product-sticky__product {
		flex: 1 1 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.cr-single-product-sticky__identity {
		width: 100%;
	}

	.cr-single-product-sticky__cta {
		flex: 1 1 100%;
		flex-wrap: wrap;
		width: 100%;
	}

	.cr-single-product-sticky__variations {
		flex: 1 1 100%;
	}

	.cr-single-product-sticky__variation {
		flex: 0 1 auto;
		min-width: 0;
	}

	.cr-single-product-sticky__variation-select {
		width: auto;
		max-width: 100%;
	}

	.cr-single-product-sticky__qty {
		flex: 1 1 auto;
	}

	.cr-single-product-sticky__add-to-cart {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}
}

@media (max-width: 768px) {
	.cr-single-product-sticky,
	.cr-single-product-sticky.is-visible {
		display: none !important;
	}
}
