/**
 * Carlo Rino Shop The Look Popup — Figma "Popup/Shop The Look" (node 587:8879)
 *
 * Off-canvas panel that slides in from the right (624px), matching wishlist/compare popups.
 */

/* ── Overlay ────────────────────────────────────────────── */

.cr-stl-popup {
	display: block !important;
	position: fixed !important;
	inset: 0 !important;
	z-index: 999996 !important;
	visibility: hidden !important;
	opacity: 0 !important;
	transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.cr-stl-popup--open {
	visibility: visible !important;
	opacity: 1 !important;
}

.cr-stl-popup__overlay {
	position: absolute !important;
	inset: 0 !important;
	background: rgba(0, 0, 0, 0.4) !important;
	cursor: pointer !important;
}

/* ── Panel (624px slide-in from right) ───────────────── */

.cr-stl-popup__panel {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 39rem !important;
	max-width: 100vw !important;
	background: #fff !important;
	border-radius: 0.25rem 0 0 0.25rem !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	box-shadow: -0.25rem 0 1.5rem rgba(0, 0, 0, 0.1) !important;
	transform: translateX(100%) !important;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cr-stl-popup--open .cr-stl-popup__panel {
	transform: translateX(0) !important;
}

/* ── Header ────────────────────────────────────────────── */

.cr-stl-popup__header {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 1.25rem !important;
	padding: 1.25rem 1.25rem 1.25rem 4rem !important;
	position: relative !important;
	z-index: 2 !important;
	flex-shrink: 0 !important;
	backdrop-filter: blur(0.312rem) !important;
	-webkit-backdrop-filter: blur(0.312rem) !important;
	background: rgba(255, 255, 255, 0.8) !important;
	border-bottom: 0.062rem solid #e7e7e7 !important;
}

.cr-stl-popup__title {
	flex: 1 !important;
	margin: 0 !important;
	font-family: "Lora", Georgia, serif !important;
	font-weight: 400 !important;
	font-size: 1.5rem !important;
	line-height: 1.32 !important;
	color: #333 !important;
	text-align: center !important;
}

.cr-stl-popup__close {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 1.5rem !important;
	height: 1.5rem !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	cursor: pointer !important;
	color: #333 !important;
	flex-shrink: 0 !important;
	position: absolute !important;
	right: 1.25rem !important;
	top: 1.25rem !important;
}

.cr-stl-popup__close .cr-icon {
	display: block !important;
	width: 1.5rem !important;
	height: 1.5rem !important;
	pointer-events: none !important;
}

/* ── Body (scrollable product grid) ────────────────────── */

.cr-stl-popup__body {
	flex: 1 !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	padding: 6rem 1.5rem 1.25rem !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 6.25rem !important;
}

.cr-stl-popup__grid {
	width: 100% !important;
}

.cr-stl-popup__loading,
.cr-stl-popup__empty {
	font-family: "Quicksand", "Segoe UI", sans-serif !important;
	font-size: 1rem !important;
	color: #888 !important;
	text-align: center !important;
	padding: 2.5rem 0 !important;
	margin: 0 !important;
}

/* 2-column product grid — Figma: 4px column gap, 40px row gap.
   Scoped to beat .woocommerce ul.products { repeat(4) } on shop pages. */
.cr-stl-popup .cr-stl-popup__products,
body.woocommerce .cr-stl-popup .cr-stl-popup__products,
.woocommerce .cr-stl-popup .cr-stl-popup__products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	grid-auto-rows: 32rem !important;
	row-gap: 2.5rem !important;
	column-gap: 0.25rem !important;
	align-items: stretch !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	clear: both !important;
	float: none !important;
}

.cr-stl-popup .cr-stl-popup__products::before,
.cr-stl-popup .cr-stl-popup__products::after {
	display: none !important;
	content: none !important;
}

.cr-stl-popup .cr-stl-popup__products > li,
.cr-stl-popup .cr-stl-popup__products > li.product,
body.woocommerce .cr-stl-popup .cr-stl-popup__products > li.product {
	display: flex !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	clear: none !important;
	box-sizing: border-box !important;
}

/* ── Popup product card — Figma Card/Product (node 587:8916) ───────────
   Row 512px · card gap 16px · pb 40px · image flex-grow · colors only */

.cr-stl-popup .cr-product-card,
.cr-stl-popup .cr-product-card--stl-popup {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 1rem !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: 32rem !important;
	padding-bottom: 2.5rem !important;
	box-sizing: border-box !important;
	position: relative !important;
	overflow: hidden !important;
	border-radius: 0.125rem !important;
}

.cr-stl-popup .cr-product-card__image-wrap {
	position: relative !important;
	flex: 1 1 0 !important;
	width: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	background: #faf8f6 !important;
	border-radius: 0.125rem !important;
	overflow: hidden !important;
}

.cr-stl-popup .cr-product-card__image-link,
.cr-stl-popup .cr-product-card__image-inner {
	position: absolute !important;
	inset: 0 !important;
}

.cr-stl-popup .cr-product-card__img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
}

/* Product info — Figma Text Group (gap 8) + Color Selected (gap 4), 16px between */
.cr-stl-popup .cr-product-card__info {
	display: flex !important;
	flex-direction: column !important;
	flex: 0 0 auto !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 1rem !important;
	width: 100% !important;
	min-height: calc((1rem * 1.52 * 2) + 0.5rem + (0.75rem * 1.34) + 1rem + 1rem) !important;
	padding: 0 !important;
	text-align: center !important;
}

.cr-stl-popup .cr-product-card__info-link {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 0.5rem !important;
	width: 100% !important;
	flex: 0 0 auto !important;
}

.cr-stl-popup .cr-product-card__title {
	font-family: "Lora", Georgia, serif !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 1.52 !important;
	color: #333 !important;
	text-align: center !important;
	margin: 0 !important;
	width: 100% !important;
	/* min-height: calc(16px * 1.52 * 2) !important; */
	display: -webkit-box !important;
	-webkit-box-orient: vertical !important;
	-webkit-line-clamp: 2 !important;
	line-clamp: 2 !important;
	overflow: hidden !important;
}

.cr-stl-popup .cr-product-card__price {
	display: block !important;
	float: none !important;
	text-align: center !important;
	width: 100% !important;
	min-height: calc(0.75rem * 1.34) !important;
	margin: 0 !important;
	padding: 0 !important;
	font-family: "Quicksand", "Segoe UI", sans-serif !important;
	font-size: 0.75rem !important;
	font-weight: inherit !important;
	line-height: 1.34 !important;
	color: inherit !important;
	background: transparent !important;
}

.cr-stl-popup .cr-product-card__price-old {
	color: #888 !important;
	text-decoration: line-through !important;
	letter-spacing: 0.037rem !important;
}

.cr-stl-popup .cr-product-card__price-current {
	color: #333 !important;
}

/* Figma popup shows color swatches only — no size row */
.cr-stl-popup .cr-product-card__sizes {
	display: none !important;
}

.cr-stl-popup .cr-product-card__variants {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0 !important;
	width: 100% !important;
	min-height: 1rem !important;
	flex: 0 0 1rem !important;
}

.cr-stl-popup .cr-product-card__colors {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.25rem !important;
	min-height: 1rem !important;
	flex: 0 0 1rem !important;
}

.cr-stl-popup .cr-product-card__color-swatch {
	width: 1rem !important;
	height: 1rem !important;
	padding: 0.125rem !important;
	border-radius: 50% !important;
}

/* Slider indicator — full-width track at image bottom (Figma) */
.cr-stl-popup .cr-product-card__slider-indicator {
	position: absolute !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	z-index: 3 !important;
	height: 0.062rem !important;
	padding: 0 !important;
	margin: 0 !important;
}

.cr-stl-popup .cr-product-card__slider-track {
	display: block !important;
	width: 100% !important;
	height: 0.062rem !important;
	background: #e7e7e7 !important;
	position: relative !important;
}

.cr-stl-popup .cr-product-card__slider-progress {
	display: block !important;
	height: 0.062rem !important;
	background: #333 !important;
}

/* Action buttons — slide in from right on image hover (same as shop cards) */
.cr-stl-popup .cr-product-card__actions-top {
	padding: 0.75rem !important;
	pointer-events: none !important;
	overflow: hidden !important;
}

.cr-stl-popup .cr-product-card__action-btns {
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateX(calc(100% + 0.75rem)) !important;
	pointer-events: none !important;
	gap: 0.25rem !important;
	transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.3s ease, gap 0.3s ease !important;
}

.cr-stl-popup .cr-product-card__wishlist,
.cr-stl-popup .cr-product-card__compare,
.cr-stl-popup .cr-product-card__cart {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translateX(0.75rem) !important;
	max-width: 1.5rem !important;
	width: 1.5rem !important;
	padding: 0.25rem !important;
	margin: 0 !important;
	backdrop-filter: blur(0.312rem) !important;
	-webkit-backdrop-filter: blur(0.312rem) !important;
	transition:
		opacity 0.25s ease,
		visibility 0.25s ease,
		transform 0.3s ease,
		max-width 0.3s ease,
		width 0.3s ease,
		padding 0.3s ease,
		margin 0.3s ease !important;
}

.cr-stl-popup .cr-product-card__image-wrap:hover .cr-product-card__action-btns {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
}

.cr-stl-popup .cr-product-card__image-wrap:hover:not(.has-wishlist-active) .cr-product-card__wishlist,
.cr-stl-popup .cr-product-card__image-wrap:hover:not(.has-wishlist-active) .cr-product-card__compare,
.cr-stl-popup .cr-product-card__image-wrap:hover:not(.has-wishlist-active) .cr-product-card__cart {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
}

/* Active wishlist — heart pinned; compare/cart slide in on hover */
.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:not(:hover) .cr-product-card__action-btns {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
	gap: 0 !important;
}

.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:not(:hover) .cr-product-card__wishlist.is-active {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
}

.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:not(:hover) .cr-product-card__compare,
.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:not(:hover) .cr-product-card__cart {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	max-width: 0 !important;
	width: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin: 0 !important;
	transform: translateX(0.75rem) !important;
}

.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:hover .cr-product-card__action-btns {
	gap: 0.25rem !important;
}

.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:hover .cr-product-card__wishlist {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
	transition-delay: 0s !important;
}

.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:hover .cr-product-card__compare {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
	max-width: 1.5rem !important;
	width: 1.5rem !important;
	padding: 0.25rem !important;
	transition-delay: 0.05s !important;
}

.cr-stl-popup .cr-product-card__image-wrap.has-wishlist-active:hover .cr-product-card__cart {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateX(0) !important;
	max-width: 1.5rem !important;
	width: 1.5rem !important;
	padding: 0.25rem !important;
	transition-delay: 0.1s !important;
}

/* Slider arrows on image hover */
.cr-stl-popup .cr-product-card--has-slider .cr-product-card__image-wrap:hover .cr-product-card__slider-btn,
.cr-stl-popup .cr-product-card--has-slider .cr-product-card__image-wrap:focus-within .cr-product-card__slider-btn {
	opacity: 1 !important;
	visibility: visible !important;
}

/* ── Footer CTA ────────────────────────────────────────── */

.cr-stl-popup__footer {
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	padding: 1.5rem !important;
	backdrop-filter: blur(0.312rem) !important;
	-webkit-backdrop-filter: blur(0.312rem) !important;
	background: #fff !important;
	border-top: 0.062rem solid #e7e7e7 !important;
	flex-shrink: 0 !important;
	z-index: 2 !important;
}

.cr-stl-popup__btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.625rem !important;
	width: 100% !important;
	padding: 0.75rem 1rem !important;
	border: 0.062rem solid #e81f76 !important;
	border-radius: 0.125rem !important;
	font-family: "Quicksand", "Segoe UI", sans-serif !important;
	font-weight: 500 !important;
	font-size: 1rem !important;
	line-height: 1.52 !important;
	text-decoration: none !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	backdrop-filter: blur(0.312rem) !important;
	-webkit-backdrop-filter: blur(0.312rem) !important;
	background: #e81f76 !important;
	color: #fff !important;
	transition: background 0.2s ease, border-color 0.2s ease !important;
}

.cr-stl-popup__btn:hover:not(:disabled) {
	background: #d01a67 !important;
	border-color: #d01a67 !important;
}

.cr-stl-popup__btn:disabled {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
}

.cr-stl-popup__btn .cr-icon {
	flex-shrink: 0 !important;
	pointer-events: none !important;
}

.cr-stl-popup__btn svg path {
	stroke: #fff !important;
}

.cr-stl-popup__btn.is-loading {
	pointer-events: none !important;
	opacity: 0.7 !important;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 720px) {
	.cr-stl-popup__panel {
		width: 100vw !important;
		border-radius: 0 !important;
	}

	.cr-stl-popup__header {
		padding: 1rem 1rem 1rem 3rem !important;
	}

	.cr-stl-popup__title {
		font-size: 1.125rem !important;
	}

	.cr-stl-popup__body {
		padding: 5rem 1rem 1.25rem !important;
		bottom: 6.25rem !important;
	}

	.cr-stl-popup .cr-stl-popup__products,
	body.woocommerce .cr-stl-popup .cr-stl-popup__products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		grid-auto-rows: 22.5rem !important;
		column-gap: 0.25rem !important;
		row-gap: 0.25rem !important;
	}

	.cr-stl-popup .cr-product-card,
	.cr-stl-popup .cr-product-card--stl-popup {
		max-height: 22.5rem !important;
		min-height: 0 !important;
		padding-bottom: 2.5rem !important;
	}

	.cr-stl-popup__footer {
		padding: 1rem !important;
	}
}
