.alma-sc,
.alma-sc * {
	box-sizing: border-box;
}

.alma-sc__trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 6px 4px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.alma-sc__icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
}

.alma-sc__icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.alma-sc__total {
	font-weight: 500;
	white-space: nowrap;
}

.alma-sc__count {
	position: absolute;
	top: 0;
	left: 17px;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #ff8500;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.alma-sc__overlay {
	position: fixed;
	inset: 0;
	z-index: 999990;
	background: rgba(10, 18, 38, 0.48);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.24s ease, visibility 0.24s ease;
}

.alma-sc__panel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	width: min(430px, 100vw);
	height: 100vh;
	height: 100dvh;
	margin: 0;
	background: #fff;
	color: #18233d;
	box-shadow: -14px 0 44px rgba(0, 0, 0, 0.18);
	transform: translate3d(105%, 0, 0);
	visibility: hidden;
	transition: transform 0.28s ease, visibility 0.28s ease;
	overflow: hidden;
}

.alma-sc.is-open .alma-sc__overlay {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.alma-sc.is-open .alma-sc__panel {
	transform: translate3d(0, 0, 0);
	visibility: visible;
}

body.alma-sc-lock {
	overflow: hidden !important;
}

.alma-sc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 76px;
	padding: 18px 22px;
	border-bottom: 1px solid #e7eaf0;
	background: #fff;
}

.alma-sc__header h2 {
	margin: 0;
	color: #17254f;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.alma-sc__close,
.alma-sc__remove {
	border: 0;
	background: transparent;
	color: #5c667a;
	font: inherit;
	cursor: pointer;
}

.alma-sc__close {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	font-size: 38px;
	font-weight: 300;
	line-height: 1;
}

.alma-sc__notice {
	margin: 14px 18px 0;
	padding: 10px 12px;
	border: 1px solid #d83434;
	border-radius: 6px;
	background: #fff4f4;
	color: #9d1f1f;
	font-size: 14px;
}

.alma-sc__content {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	flex-direction: column;
	background: #fff;
}

.alma-sc__items-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.alma-sc__items {
	margin: 0;
	padding: 4px 22px;
	list-style: none;
}

.alma-sc__item {
	position: relative;
	display: grid;
	grid-template-columns: 82px minmax(0, 1fr) 30px;
	gap: 14px;
	align-items: start;
	padding: 18px 0;
	border-bottom: 1px solid #e7eaf0;
}

.alma-sc__thumb img {
	display: block;
	width: 82px;
	height: 82px;
	margin: 0;
	border-radius: 4px;
	object-fit: cover;
}

.alma-sc__item-info {
	min-width: 0;
}

.alma-sc__item-name {
	display: block;
	margin: 2px 0 8px;
	color: #17254f;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.alma-sc__item-name:hover {
	text-decoration: underline;
}

.alma-sc__variation,
.alma-sc__variation dl,
.alma-sc__variation p {
	margin: 0 0 7px;
	font-size: 12px;
	line-height: 1.35;
}

.alma-sc__variation dt,
.alma-sc__variation dd {
	display: inline;
	float: none;
	margin: 0 4px 0 0;
}

.alma-sc__quantity {
	color: #4c566b;
	font-size: 14px;
}

.alma-sc__remove {
	width: 30px;
	height: 30px;
	padding: 0;
	font-size: 25px;
	line-height: 1;
}

.alma-sc__remove:hover,
.alma-sc__close:hover {
	color: #d32626;
}

.alma-sc__footer {
	flex: 0 0 auto;
	padding: 18px 22px 22px;
	border-top: 1px solid #e7eaf0;
	background: #fff;
	box-shadow: 0 -10px 24px rgba(23, 37, 79, 0.05);
}

.alma-sc__subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 16px;
	font-size: 18px;
}

.alma-sc__subtotal strong {
	color: #17254f;
}

.alma-sc__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.alma-sc__button,
.alma-sc__continue {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 16px;
	border-radius: 999px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.alma-sc__button:hover,
.alma-sc__continue:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.alma-sc__button--primary,
.alma-sc__continue {
	background: #ff8500;
	color: #fff;
}

.alma-sc__button--secondary {
	border: 1px solid #243a86;
	background: #fff;
	color: #243a86;
}

.alma-sc__empty {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 14px;
	padding: 42px 24px;
	text-align: center;
}

.alma-sc__empty-icon {
	font-size: 46px;
}

.alma-sc__empty p {
	margin: 0;
	font-size: 18px;
}

.alma-sc.is-loading .alma-sc__panel::after {
	content: '';
	position: absolute;
	top: 82px;
	right: 20px;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(36, 58, 134, 0.22);
	border-top-color: #243a86;
	border-radius: 50%;
	animation: alma-sc-spin 0.7s linear infinite;
}

@keyframes alma-sc-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
	.alma-sc__total {
		display: none;
	}

	.alma-sc__panel {
		width: 100vw;
	}

	.alma-sc__actions {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.alma-sc__overlay,
	.alma-sc__panel,
	.alma-sc__button,
	.alma-sc__continue {
		transition: none;
	}
}

/* v1.1.0: reset dei pulsanti X contro gli stili globali del tema/Elementor. */
.alma-sc .alma-sc__close,
.alma-sc .alma-sc__remove {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: grid !important;
	place-items: center !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: 0;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-decoration: none !important;
	transform: none !important;
	line-height: 0 !important;
	color: #5c667a !important;
	cursor: pointer;
}

.alma-sc .alma-sc__close {
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	border-radius: 999px !important;
}

.alma-sc .alma-sc__remove {
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	min-height: 32px !important;
	border-radius: 999px !important;
}

.alma-sc .alma-sc__close svg,
.alma-sc .alma-sc__remove svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	pointer-events: none;
}

.alma-sc .alma-sc__remove svg {
	width: 19px;
	height: 19px;
}

.alma-sc .alma-sc__close:hover,
.alma-sc .alma-sc__close:focus-visible,
.alma-sc .alma-sc__remove:hover,
.alma-sc .alma-sc__remove:focus-visible {
	border: 0 !important;
	background: #f2f4f8 !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #d32626 !important;
	transform: none !important;
}

.alma-sc .alma-sc__close:focus-visible,
.alma-sc .alma-sc__remove:focus-visible {
	outline: 2px solid #243a86 !important;
	outline-offset: 2px;
}

/* Il side cart deve restare sopra ai pulsanti floating di chat. */
.alma-sc__overlay {
	z-index: 2147483645;
}

.alma-sc__panel {
	z-index: 2147483646;
}

/* Nasconde il pulsante WhatsApp solo mentre il carrello laterale e aperto. */
body.alma-sc-lock #qlwapp,
body.alma-sc-lock .qlwapp,
body.alma-sc-lock .joinchat,
body.alma-sc-lock .wa__btn_popup,
body.alma-sc-lock .whatsapp_chat_support {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.single_add_to_cart_button.alma-sc-add-loading,
.single_add_to_cart_button.alma-sc-add-loading:hover {
	cursor: wait !important;
	opacity: 0.72 !important;
}
