/* Frontend cart popup styles */

body {
	scrollbar-gutter: stable both-edges;
}

body.petbuy-scroll-locked {
	position: fixed;
	width: 100%;
	overflow-y: scroll !important;
	left: 0;
	right: 0;
	padding-right: 0 !important;
}

body.petbuy-scroll-locked.modal-open {
	overflow-y: scroll !important;
	padding-right: 0 !important;
}

.petbuy-popup-surface__art {
	pointer-events: none;
}

.petbuy-popup-surface__art--paws,
.petbuy-popup-surface__art--dog {
	position: relative;
}

.petbuy-popup-surface__paw {
	position: absolute;
	z-index: 1;
}

.petbuy-popup-surface__paw--small {
	top: 4px;
	left: 153px;
}

.petbuy-popup-surface__paw--large {
	top: 31px;
	left: 165px;
}

.petbuy-popup-surface__art--dog img {
	position: absolute;
	top: -45px;
	left: -335px;
	z-index: -1;
	max-width: none;
}

:is(#carrelloPopup, #wishlistPopup) .modal-dialog {
	max-width: min(560px, calc(100vw - 16px));
	width: 100%;
	margin: 0;
	position: fixed;
	top: var(--cart-popup-top, 120px);
	left: var(--cart-popup-left, 50%);
	transform: translate3d(0, 0, 0);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease;
	z-index: 1055;
}

:is(#carrelloPopup, #wishlistPopup) .modal-content {
	border: none !important;
	border-radius: 36px !important;
	padding: 24px 40px 6px !important;
	box-shadow: 0 28px 80px rgba(0,0,0,0.22);
	background: linear-gradient(180deg, #ffffff 0%, #fff9f3 100%);
	position: relative;
	overflow: hidden;
	min-height: 0 !important;
	backdrop-filter: blur(8px);
}

#wishlistPopup .modal-content {
	overflow: hidden;
}

:is(#carrelloPopup, #wishlistPopup).cart-popup--visible .modal-dialog {
	opacity: 1;
	visibility: visible;
}

:is(#carrelloPopup, #wishlistPopup).show {
	display: block;
	visibility: visible;
	opacity: 1;
}

:is(#carrelloPopup, #wishlistPopup).show .modal-dialog,
:is(#carrelloPopup, #wishlistPopup).show.cart-popup--visible .modal-dialog,
:is(#carrelloPopup, #wishlistPopup).cart-popup--visible .modal-dialog {
	opacity: 1 !important;
	visibility: visible !important;
}

:is(#carrelloPopup, #wishlistPopup) + .modal-backdrop,
:is(#carrelloPopup, #wishlistPopup) .modal-backdrop {
	display: none !important;
}

:is(#carrelloPopup, #wishlistPopup) .modal-content::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("../../../../uploads/ufficiale/background-impronte.svg") repeat;
	opacity: 0.12;
	filter: saturate(1);
	pointer-events: none;
}

:is(#carrelloPopup, #wishlistPopup) .modal-header {
	border: none;
	padding-bottom: 6px;
	align-items: center;
	position: relative;
}

:is(#carrelloPopup, #wishlistPopup) .modal-header::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 50%;
	width: 22px;
	height: 22px;
	background: url("../../../../uploads/ufficiale/impronta-cuore-grande-carrello-popup.svg") center/contain no-repeat;
	transform: translateX(-50%) rotate(-6deg);
	opacity: 0.9;
	pointer-events: none;
}

:is(#carrelloPopup #mioPopupLabel, #wishlistPopup #wishlistPopupLabel) {
	font-size: 24px;
	font-weight: 700;
	color: #2f2f2f;
	position: relative;
	padding-right: 64px;
	letter-spacing: 0.02em;
}

:is(#carrelloPopup #mioPopupLabel::before, #carrelloPopup #mioPopupLabel::after, #wishlistPopup #wishlistPopupLabel::before, #wishlistPopup #wishlistPopupLabel::after) {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	top: 6px;
	background: url("../../../../uploads/ufficiale/impronta-cuore-piccolo-carrello-popup.svg") center/contain no-repeat;
	opacity: 0.9;
}

:is(#carrelloPopup #mioPopupLabel::before, #wishlistPopup #wishlistPopupLabel::before) {
	right: 42px;
	transform: rotate(-8deg) scale(0.95);
}

:is(#carrelloPopup #mioPopupLabel::after, #wishlistPopup #wishlistPopupLabel::after) {
	right: 22px;
	transform: rotate(12deg);
}

:is(#carrelloPopup, #wishlistPopup) .modal-header a {
	font-weight: 700;
	color: #6a6a6a;
	text-decoration: none;
	font-size: 15px;
	letter-spacing: 0.01em;
}

:is(#carrelloPopup, #wishlistPopup) .modal-header a:hover {
	color: #ff7a1c;
}

:is(#carrelloPopup, #wishlistPopup) .bordo-centrato {
	height: 1px;
	width: 100%;
	background: rgba(0,0,0,0.06);
	margin: 0;
}

:is(#carrelloPopup, #wishlistPopup) .modal-body {
	padding: 0;
	margin-bottom: 0;
	flex-grow: 0;
}

:is(#carrelloPopup, #wishlistPopup) .cart-popup-items {
	max-height: 420px;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 20px;
	padding-right: 12px;
	padding-top: 6px;
	scrollbar-width: none;
}

#wishlistPopup .wishlist-popup-items {
	min-height: 0;
	transition: min-height .22s cubic-bezier(0.22, 1, 0.36, 1);
	overflow-anchor: none;
}

#wishlistPopup .wishlist-popup-items.wishlist-items--empty-transition {
	min-height: var(--wishlist-empty-min-height, 0);
}

:is(#carrelloPopup, #wishlistPopup) .cart-popup-items::-webkit-scrollbar {
	width: 0;
	height: 0;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item {
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr) 110px 88px 36px;
	align-items: center;
	width: 100%;
	padding: 14px 12px 14px 0;
	border-bottom: 1px solid rgba(0,0,0,0.06);
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	column-gap: 12px;
	animation: cartItemFade .32s ease both;
	position: relative;
	overflow: visible;
	transition: opacity .18s ease, filter .18s ease;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item:first-child {
	padding-top: 10px;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item:last-child {
	border-bottom: none;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-image {
	width: 60px;
	height: 60px;
	border-radius: 14px;
	background: #f9f6f3;
	border: 1px solid rgba(0,0,0,0.04);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(255,122,28,0.05);
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-image > a {
	display: block;
	width: 100%;
	height: 100%;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	grid-column: 5;
	justify-self: end;
	align-self: center;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-remove a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 0;
	background: transparent;
	padding: 0;
	box-shadow: none;
	transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease, background .15s ease;
	border: 1px solid transparent;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-remove a:hover {
	opacity: 0.85;
	transform: translateY(-1px);
	box-shadow: 0 0 0 2px rgba(220, 60, 60, 0.25);
	background: transparent;
	border-color: rgba(220, 60, 60, 0.4);
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	grid-column: 2;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-name {
	font-weight: 700;
	font-size: 15px;
	color: #222222;
	margin: 0;
	line-height: 1.3;
	letter-spacing: 0.01em;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-name a {
	display: block;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: inherit;
	text-decoration: none;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-name a:hover {
	color: #ff7a1c;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-delivery {
	font-size: 12px;
	color: #7c7c7c;
	line-height: 1.3;
	white-space: normal;
	overflow: visible;
}

#wishlistPopup .item-delivery.wishlist-ad-available {
	color: #2f8a3b !important;
	font-weight: 700;
}

#wishlistPopup .item-delivery.wishlist-ad-closed {
	color: #d13c3c !important;
	font-weight: 700;
}

#wishlistPopup .item-delivery.wishlist-product-available {
	color: #2f8a3b !important;
	font-weight: 700;
}

#wishlistPopup .item-delivery.wishlist-product-unavailable {
	color: #d13c3c !important;
	font-weight: 700;
}

:is(#carrelloPopup, #wishlistPopup) .item-quantity {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	background: #f7f7f7;
	border-radius: 10px;
	padding: 4px 10px;
	border: 1px solid #e5e5e5;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 6px 12px rgba(0,0,0,0.04);
	grid-column: 3;
	justify-self: start;
	position: relative;
	transition: opacity .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

:is(#carrelloPopup, #wishlistPopup) .item-quantity .quantity-button {
	width: 24px;
	height: 24px;
	border-radius: 7px;
	border: 1px solid #d2d2d2;
	background: #ffffff;
	font-size: 13px;
	line-height: 1;
	color: #555;
	padding: 0;
	box-shadow: none;
	transition: all .12s ease;
}

:is(#carrelloPopup, #wishlistPopup) .item-quantity .quantity-button:not(.is-disabled):hover {
	color: #ff7a1c;
	border-color: #f0b48d;
	box-shadow: 0 6px 14px rgba(255,122,28,0.16);
	background: #fff7f0;
}

:is(#carrelloPopup, #wishlistPopup) .item-quantity .quantity-value {
	min-width: 18px;
	text-align: center;
	font-weight: 700;
	font-size: 13px;
	color: #222;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: opacity .18s ease;
}

:is(#carrelloPopup, #wishlistPopup) .item-quantity .quantity-button.is-disabled,
:is(#carrelloPopup, #wishlistPopup) .item-quantity .quantity-button[aria-disabled="true"] {
	opacity: 0.45;
	box-shadow: none;
	cursor: not-allowed;
}

#carrelloPopup .cart-item.is-updating {
	pointer-events: none;
}

#carrelloPopup .cart-item.is-updating .item-details,
#carrelloPopup .cart-item.is-updating .item-price,
#carrelloPopup .cart-item.is-updating .item-remove {
	opacity: 0.58;
}

#carrelloPopup .cart-item.is-updating .item-quantity {
	border-color: rgba(248, 117, 55, 0.26);
	background: #fffaf5;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 18px rgba(248, 117, 55, 0.12);
}

#carrelloPopup .cart-item.is-updating .item-quantity .quantity-button,
#carrelloPopup .cart-item.is-updating .item-quantity .quantity-value {
	opacity: 0.14;
}

#carrelloPopup .cart-item.is-updating .item-quantity::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 14px;
	height: 14px;
	margin-left: -7px;
	margin-top: -7px;
	border: 2px solid #f87537;
	border-right-color: transparent;
	border-radius: 999px;
	animation: petbuyButtonSpinner 0.72s linear infinite;
}

:is(#carrelloPopup, #wishlistPopup) .item-price {
	font-weight: 700;
	color: #2d2d2d;
	margin: 0;
	min-width: 78px;
	text-align: right;
	font-size: 16px;
	white-space: nowrap;
	grid-column: 4;
	align-self: center;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-remove a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: transparent;
	border: none;
	padding: 0;
	transition: transform .15s ease, opacity .15s ease;
}

:is(#carrelloPopup, #wishlistPopup) .cart-item .item-remove a:hover {
	opacity: 1;
	transform: translateY(-2px);
}

:is(#carrelloPopup, #wishlistPopup) .wishlist-item {
	grid-template-columns: 60px minmax(0, 1fr) auto;
	column-gap: 14px;
	align-items: center;
}

#wishlistPopup .wishlist-actions {
	grid-column: 4;
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	align-items: center;
}

#wishlistPopup .wishlist-actions .btn {
	border-radius: 12px;
	font-weight: 700;
	padding: 8px 12px;
	min-width: 120px;
	font-size: 13px;
	box-shadow: 0 8px 18px rgba(255,122,28,0.16);
}

#wishlistPopup .wishlist-cart-icon {
	width: 36px;
	height: 36px;
	border-radius: 11px;
	border: 1px solid #f2d4bd;
	background: #fff7f0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	box-shadow: 0 8px 18px rgba(255,122,28,0.12);
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
	position: relative;
	overflow: visible;
}

#wishlistPopup .wishlist-cart-icon img {
	width: 18px;
	height: 18px;
	object-fit: contain;
	display: block;
	transition: opacity .18s ease, transform .18s ease;
}

#wishlistPopup .wishlist-cart-icon:hover {
	transform: translateY(-1px);
	background: #fff1e5;
	box-shadow: 0 10px 20px rgba(255,122,28,0.18);
}

#wishlistPopup .wishlist-cart-icon.is-loading {
	pointer-events: none;
}

#wishlistPopup .wishlist-cart-icon.is-loading img {
	opacity: 0.18;
	transform: scale(0.82);
}

#wishlistPopup .wishlist-cart-icon.is-loading::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: 16px;
	height: 16px;
	margin-left: -8px;
	margin-top: -8px;
	border-radius: 999px;
	border: 2px solid rgba(248, 117, 55, 0.22);
	border-top-color: #f87537;
	animation: wishlistCartLoader .55s linear infinite;
}

@keyframes wishlistCartLoader {
	to { transform: rotate(360deg); }
}

#wishlistPopup .wishlist-cart-icon.is-transfer-source {
	visibility: hidden;
}

.wishlist-transfer-ghost {
	position: fixed;
	left: 0;
	top: 0;
	margin: 0;
	pointer-events: none;
	z-index: 2000;
	transform: translate3d(0, 0, 0) scale(1);
	opacity: 1;
	filter: drop-shadow(0 6px 12px rgba(255,122,28,0.22));
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease, filter 0.32s ease;
	will-change: transform, opacity;
	backface-visibility: hidden;
	contain: paint;
}

.wishlist-transfer-ghost img {
	display: block;
	backface-visibility: hidden;
}

.wishlist-transfer-ghost.is-animating {
	transform: translate3d(var(--wishlist-transfer-x, 30px), var(--wishlist-transfer-y, -42px), 0) scale(0.72);
	opacity: 0;
	filter: drop-shadow(0 10px 18px rgba(255,122,28,0.26));
}

#wishlistPopup .cart-item.wishlist-send-row {
	position: relative;
	pointer-events: none;
}

#wishlistPopup .cart-item.wishlist-send-row.is-transfer-placeholder {
	opacity: 0;
}

#wishlistPopup .cart-item.wishlist-send-row.is-transfer-placeholder + .bordo-centrato {
	opacity: 0;
}

.wishlist-transfer-row-ghost {
	position: fixed;
	margin: 0;
	pointer-events: none;
	z-index: 2000;
	background: rgba(255, 255, 255, 0.94);
	border-radius: 18px;
	box-shadow: 0 14px 28px rgba(27, 31, 35, 0.1);
	animation: none !important;
	will-change: transform, opacity;
	backface-visibility: hidden;
	contain: layout paint style;
}

.wishlist-transfer-row-ghost.is-animating {
	animation: wishlistRowOverlayExit 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

#wishlistPopup .cart-item.wishlist-row-reflow {
	will-change: transform;
}

@keyframes wishlistRowOverlayExit {
	0% {
		opacity: 0.96;
		transform: translate3d(0, 0, 0);
		filter: saturate(1);
	}
	22% {
		opacity: 0.42;
		transform: translate3d(-8px, 0, 0);
	}
	40% {
		opacity: 0.18;
		transform: translate3d(6px, 0, 0);
	}
	100% {
		opacity: 0;
		transform: translate3d(0, 18px, 0);
		filter: saturate(0.92);
	}
}

#carrelloPopup .cart-item.cart-remove-row {
	position: relative;
	overflow: hidden;
	max-height: var(--cart-remove-height, 120px);
	pointer-events: none;
	animation: cartPopupRemoveRow 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cartPopupRemoveRow {
	0% {
		max-height: var(--cart-remove-height, 120px);
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
		filter: saturate(1);
	}
	40% {
		transform: translate3d(10px, 0, 0) scale(0.992);
		opacity: 0.72;
		filter: saturate(1.04);
	}
	100% {
		max-height: 0;
		padding-top: 0;
		padding-bottom: 0;
		border-bottom-width: 0;
		transform: translate3d(0, -14px, 0) scale(0.984);
		opacity: 0;
		filter: saturate(0.9);
	}
}

#wishlistPopup .wishlist-actions .btn.btn-outline-secondary {
	box-shadow: none;
	border-color: #d8d8d8;
	color: #4a4a4a;
}

#wishlistPopup .wishlist-actions .btn.btn-outline-secondary:hover {
	border-color: #ffb381;
	color: #ff7a1c;
	background: #fff7f0;
}

#wishlistPopup .wishlist-actions .wishlist-added {
	background: #e9f8ef;
	color: #2f6f45;
	border-color: #c7ebd4;
	box-shadow: none;
}

#wishlistPopup .wishlist-price {
	text-align: left;
}

#wishlistPopup .wishlist-price-old {
	color: #999;
	text-decoration: line-through;
	margin-right: 6px;
	display: inline-block;
	font-size: 13px;
}

#wishlistPopup .wishlist-price-new {
	font-weight: 800;
	color: #1f1f1f;
	font-size: 15px;
}

#wishlistPopup .wishlist-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	margin-right: 6px;
	background: #ffe6d6;
	color: #ff7a1c;
	letter-spacing: 0.01em;
}

#wishlistPopup .wishlist-badge--ad {
	background: #e5ecff;
	color: #3252cc;
}

#wishlistPopup .wishlist-badge--gift {
	background: #ffefe6;
	color: #ff7a1c;
}

#wishlistPopup .wishlist-gift {
	color: #ff7a1c;
	font-weight: 800;
	letter-spacing: 0.01em;
}

#wishlistPopup .wishlist-counter {
	background: #fff3eb;
	color: #ff7a1c;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 800;
	border-radius: 999px;
	vertical-align: middle;
	box-shadow: inset 0 0 0 1px rgba(255,122,28,0.12);
}

#wishlistPopup .wishlist-image-fallback {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #fff3eb 0%, #ffe0cc 100%);
	border-radius: 12px;
	box-shadow: inset 0 0 0 1px rgba(255,122,28,0.1);
}

:is(#wishlistPopup .wishlist-cat, #wishlistPopup .wishlist-cat__img) {
	display: none;
}

#wishlistPopup .wishlist-item .item-remove {
	position: static;
	transform: none;
	right: auto;
	top: auto;
	width: auto;
	height: auto;
	grid-column: 5;
	justify-self: end;
}

#wishlistPopup .wishlist-item .item-remove button {
	border: none;
	background: transparent;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	transition: transform .15s ease, opacity .15s ease;
}

#wishlistPopup .wishlist-item .item-remove button:hover {
	opacity: 0.9;
	transform: translateY(-2px);
}

.wishlist-pulse {
	animation: wishlistPulse .55s ease;
}

/* Wishlist filters */
.wishlist-filters {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: center;
	padding: 10px 6px 4px;
}

.wishlist-filter-btn {
	border: 1px solid #ffd5b6;
	background: #fff7f0;
	color: #c0540f;
	font-weight: 700;
	font-size: 13px;
	padding: 8px 14px;
	border-radius: 12px;
	transition: all .15s ease;
	box-shadow: 0 8px 16px rgba(255,122,28,0.12);
	min-width: 92px;
	text-align: center;
}

.wishlist-filter-btn:hover {
	border-color: #ffb37d;
	color: #ff7116;
	box-shadow: 0 10px 18px rgba(255,122,28,0.16);
}

.wishlist-filter-btn.is-active {
	background: linear-gradient(135deg, #ff8a3c 0%, #ff7116 100%);
	border-color: #ff7116;
	color: #fff;
	box-shadow: 0 14px 26px rgba(255,122,28,0.26);
}

/* Wishlist toast */
/* Nascondi i messaggi WooCommerce */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-notices-wrapper,
.woocommerce-store-notice,
.custom-notification {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

@keyframes wishlistPulse {
	0% { transform: scale(1); }
	40% { transform: scale(1.08); }
	70% { transform: scale(0.96); }
	100% { transform: scale(1); }
}

:is(#carrelloPopup, #wishlistPopup) .cart-popup-summary {
	border-top: 1px solid rgba(0,0,0,0.06);
	padding-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	position: relative;
}

:is(#carrelloPopup, #wishlistPopup) .cart-popup-summary::before {
	content: none;
}

:is(#carrelloPopup, #wishlistPopup) .cart-popup-summary .summary-row {
	display: flex;
	justify-content: space-between;
	font-size: 15px;
	color: #383838;
	position: relative;
	letter-spacing: 0.01em;
}

:is(#carrelloPopup, #wishlistPopup) .cart-popup-summary .summary-row:last-child {
	font-weight: 800;
	font-size: 17px;
	color: #1f1f1f;
}

:is(#carrelloPopup, #wishlistPopup) .cart-popup-summary .summary-row:last-child::after {
	content: none;
}

.cart-popup-decoration {
	position: absolute;
	right: 18px;
	top: 18px;
	z-index: 0;
	opacity: 0.9;
	pointer-events: none;
}

.cart-popup-decoration img {
	display: block;
	width: 46px;
	height: auto;
	filter: drop-shadow(0 4px 8px rgba(0,0,0,0.05));
}

.cart-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(255,255,255,0.08);
	backdrop-filter: blur(2px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
	z-index: 1045;
}

.cart-popup-overlay.is-active {
	opacity: 1;
	pointer-events: auto;
}

:is(#carrelloPopup, #wishlistPopup).cart-popup--empty .cart-popup-items {
	max-height: none;
	overflow: hidden;
	padding-right: 0;
}

:is(#carrelloPopup, #wishlistPopup).cart-popup--empty .modal-body {
	display: flex;
	justify-content: center;
}

#carrelloPopup.cart-popup--empty .modal-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px 32px 20px !important;
}

#carrelloPopup.cart-popup--empty .cart-popup-items {
	width: 100%;
	display: flex;
	justify-content: center;
}

#carrelloPopup.cart-popup--empty .modal-footer,
#carrelloPopup.cart-popup--empty .cart-popup-summary {
	display: none !important;
}

:is(#carrelloPopup, #wishlistPopup) .modal-footer {
	border: none;
	padding: 14px 0 10px !important;
	margin: 0;
}

:is(#carrelloPopup, #wishlistPopup) #cart-popup-checkout {
	background: linear-gradient(90deg, #ff8a3c 0%, #ff7116 100%);
	border: none;
	color: #fff;
	font-weight: 800;
	font-size: 17px;
	padding: 16px 22px;
	border-radius: 16px;
	box-shadow: 0 18px 35px rgba(255,122,28,0.35);
	transition: transform .15s ease, box-shadow .15s ease;
	display: block;
	width: 100%;
}

:is(#carrelloPopup, #wishlistPopup) #cart-popup-checkout:hover {
	transform: translateY(-1px);
	box-shadow: 0 22px 40px rgba(255,122,28,0.4);
}

#wishlistPopup .wishlist-popup-footer .btn {
	background: linear-gradient(90deg, #ff8a3c 0%, #ff7116 100%);
	border: none;
	color: #fff;
	font-weight: 800;
	font-size: 17px;
	padding: 16px 22px;
	border-radius: 16px;
	box-shadow: 0 18px 35px rgba(255,122,28,0.35);
	transition: transform .15s ease, box-shadow .15s ease;
	display: block;
	width: 100%;
}

#wishlistPopup .wishlist-popup-footer .btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 22px 40px rgba(255,122,28,0.4);
}

.cart-popup-empty {
	padding: 24px 16px;
	border-radius: 20px;
	background: linear-gradient(180deg, #ffffff 0%, #fff8f0 100%);
	border: none;
	text-align: center;
	box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

#wishlistPopup .cart-popup-empty.wishlist-empty-enter {
	opacity: 0;
	transform: translate3d(0, 14px, 0);
}

#wishlistPopup .cart-popup-empty.wishlist-empty-enter.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition: opacity .24s ease, transform .24s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-popup-empty .continue-shopping-btn {
	margin-bottom: 0;
	width: 100%;
}

.cart-popup-empty img {
	animation: cartEmptyFloat 6s ease-in-out infinite;
}

#carrelloPopup .cart-popup-empty--cart {
	max-width: 360px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#carrelloPopup .cart-popup-empty--cart img {
	max-width: 180px;
}

/* pulsanti empty state come wishlist */
.cart-popup-empty .btn,
.cart-popup-empty .continue-shopping-btn {
	animation: cartEmptyGradient 4s ease-in-out infinite, cartEmptyGlow 3.4s ease-in-out infinite;
	transition: transform .15s ease, box-shadow .15s ease, background-position .4s ease;
	background: linear-gradient(120deg, #ff8a3c, #ff7116, #ff8a3c);
	background-size: 220% 220%;
	font-weight: 800;
	border-radius: 16px;
	padding: 16px 22px;
	box-shadow: 0 18px 35px rgba(255,122,28,0.35);
	border: none;
}

.cart-popup-empty .btn:hover,
.cart-popup-empty .continue-shopping-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 22px 40px rgba(255,122,28,0.4);
	background-position: 90% 50%;
}

#carrelloPopup .cart-popup-empty--cart .cart-empty-cta {
	align-self: stretch;
}
:is(#carrelloPopup #mioPopupLabel::before, #carrelloPopup #mioPopupLabel::after, #wishlistPopup #wishlistPopupLabel::before, #wishlistPopup #wishlistPopupLabel::after,
#carrelloPopup .modal-header::after, #wishlistPopup .modal-header::after,
#carrelloPopup .cart-popup-summary::before, #wishlistPopup .cart-popup-summary::before,
#carrelloPopup .cart-popup-summary .summary-row:last-child::after, #wishlistPopup .cart-popup-summary .summary-row:last-child::after) {
	animation: cartPawWiggle 5s ease-in-out infinite;
}

@media (max-width: 991px) {
	.petbuy-popup-surface__art--dog {
		display: none;
	}

	.petbuy-popup-surface__paw--small {
		left: 118px;
	}

	.petbuy-popup-surface__paw--large {
		left: 130px;
	}

	:is(#carrelloPopup, #wishlistPopup) .modal-dialog {
		position: fixed;
		top: 30px;
		left: 50%;
		transform: translateX(-50%);
		margin: 0;
		max-width: 92%;
	}

	:is(#carrelloPopup, #wishlistPopup) .modal-content {
		padding: 22px 26px 24px;
	}

	:is(#carrelloPopup, #wishlistPopup) .cart-popup-items {
		max-height: 320px;
	}

	:is(#carrelloPopup, #wishlistPopup) .cart-item {
		grid-template-columns: 64px 1fr 120px minmax(70px,auto) 28px;
		column-gap: 10px;
	}

	#wishlistPopup .wishlist-item {
		grid-template-columns: 64px 1fr;
		grid-template-rows: auto auto auto;
		row-gap: 8px;
	}

	#wishlistPopup .wishlist-item .wishlist-right,
	#wishlistPopup .wishlist-item .wishlist-price,
	#wishlistPopup .wishlist-actions,
	#wishlistPopup .wishlist-item .item-remove {
		grid-column: 2;
	}

	#wishlistPopup .wishlist-cart-icon {
		width: 34px;
		height: 34px;
		border-radius: 10px;
	}
}

@keyframes cartItemFade {
	0% {opacity: 0; transform: translateY(12px);}
	100% {opacity: 1; transform: translateY(0);}
}

@keyframes cartEmptyFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

@keyframes cartEmptyGlow {
	0% { box-shadow: 0 8px 18px rgba(255,122,28,0.12); }
	50% { box-shadow: 0 14px 28px rgba(255,122,28,0.24); }
	100% { box-shadow: 0 8px 18px rgba(255,122,28,0.12); }
}

@keyframes cartEmptyGradient {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* Wishlist alignment fixes */
#wishlistPopup .wishlist-item {
	align-items: center;
}

#wishlistPopup .wishlist-right {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
}

#wishlistPopup .wishlist-item .wishlist-price {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin: 0;
	min-width: 90px;
}

#wishlistPopup .wishlist-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

#wishlistPopup .wishlist-contact-icon {
	width: 36px;
	height: 36px;
	border-radius: 11px;
	border: 1px solid #d8d8d8;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

#wishlistPopup .wishlist-contact-icon img {
	width: 18px;
	height: 18px;
	object-fit: contain;
	display: block;
}

#wishlistPopup .wishlist-contact-icon:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 20px rgba(0,0,0,0.12);
	border-color: #ffb37d;
}

#wishlistPopup .wishlist-cart-icon {
	display: inline-flex;
	vertical-align: middle;
	margin-right: 2px;
}

#wishlistPopup .wishlist-item .item-remove {
	position: static !important;
	transform: none !important;
	right: auto !important;
	top: auto !important;
	width: 36px;
	height: 36px;
	justify-self: end;
	align-self: center;
	border-radius: 12px;
	border: 1px solid transparent;
	transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

#wishlistPopup .wishlist-item .item-remove button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 8px;
	border: none;
	background: transparent;
	padding: 0;
	transition: transform .15s ease, opacity .15s ease;
}

#wishlistPopup .wishlist-item .item-remove button img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

#wishlistPopup .wishlist-item .item-remove button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	box-shadow: none;
	background: transparent;
}

#wishlistPopup .wishlist-item .item-remove:hover {
	box-shadow: 0 0 0 2px rgba(220, 60, 60, 0.25);
	border-color: rgba(220, 60, 60, 0.4);
	transform: translateY(-1px);
}

@keyframes cartPawWiggle {
	0%, 100% { transform: translateY(0) rotate(0); opacity: 1; }
	25% { transform: translateY(-1px) rotate(-4deg); opacity: 0.92; }
	50% { transform: translateY(1px) rotate(3deg); opacity: 1; }
	75% { transform: translateY(-0.5px) rotate(-2deg); opacity: 0.95; }
}
:is(#carrelloPopup, #wishlistPopup) .cart-item .item-remove {
	position: absolute;
	right: -10px;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
}
