/*!
 * Storzen — Cart Cross-Sell Popup
 */

/* ── Modal ──────────────────────────────────────────────────────────── */
.sz-xs-modal {
	position: fixed;
	inset: 0;
	z-index: 9998;
	pointer-events: none;
	visibility: hidden;
}
.sz-xs-modal.is-open {
	pointer-events: auto;
	visibility: visible;
}
.sz-xs-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	opacity: 0;
	transition: opacity .25s ease;
}
.sz-xs-modal.is-open .sz-xs-modal__overlay { opacity: 1; }
.sz-xs-modal__panel {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(.94);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
	width: 92vw;
	max-width: 760px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .25s ease;
}
.sz-xs-modal.is-open .sz-xs-modal__panel {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
}

.sz-xs-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid #f3f4f6;
}
.sz-xs-modal__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}
.sz-xs-modal__close {
	background: transparent;
	border: 0;
	width: 32px;
	height: 32px;
	font-size: 24px;
	line-height: 1;
	color: #6b7280;
	border-radius: 6px;
	cursor: pointer;
}
.sz-xs-modal__close:hover { background: #f3f4f6; color: #111827; }

.sz-xs-modal__body {
	flex: 1;
	overflow: auto;
	padding: 18px 22px;
}
.sz-xs-modal__footer {
	padding: 14px 22px;
	border-top: 1px solid #f3f4f6;
	display: flex;
	justify-content: center;
}
.sz-xs-modal__skip {
	background: transparent;
	border: 0;
	color: #6b7280;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	padding: 6px 14px;
	border-radius: 6px;
	transition: background .15s ease, color .15s ease;
}
.sz-xs-modal__skip:hover { background: #f3f4f6; color: #1f2937; }

.sz-xs-loading,
.sz-xs-empty {
	text-align: center;
	padding: 40px 20px;
	color: #6b7280;
	font-size: 14px;
}

/* ── Suggestion lists ───────────────────────────────────────────────── */
.sz-xs-list--grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}
.sz-xs-list--list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.sz-xs-list--list .sz-xs-item {
	flex-direction: row;
	gap: 12px;
}
.sz-xs-list--list .sz-xs-item__thumb {
	flex: 0 0 88px;
	aspect-ratio: 1;
}
.sz-xs-list--list .sz-xs-item__body {
	flex: 1;
}
.sz-xs-list--carousel {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 4px;
}
.sz-xs-list--carousel .sz-xs-item {
	flex: 0 0 200px;
	scroll-snap-align: start;
}

/* ── Suggestion card ────────────────────────────────────────────────── */
.sz-xs-item {
	position: relative;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.sz-xs-item:hover {
	border-color: #d1d5db;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}
.sz-xs-item__discount {
	position: absolute;
	top: 6px;
	left: 6px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 7px;
	border-radius: 4px;
	z-index: 1;
}
.sz-xs-item__thumb {
	display: block;
	aspect-ratio: 1;
	background: #f9fafb;
	overflow: hidden;
}
.sz-xs-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sz-xs-item__body {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.sz-xs-item__name {
	font-size: 13px;
	font-weight: 600;
	color: #1f2937;
	text-decoration: none;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 36px;
}
.sz-xs-item__name:hover { color: #FF3636; }
.sz-xs-item__price {
	font-size: 13px;
	font-weight: 700;
	color: #111827;
}
.sz-xs-item__price del { color: #9ca3af; font-weight: 500; margin-right: 4px; }
.sz-xs-item__rating { font-size: 11px; }
.sz-xs-item__rating .star-rating { font-size: 12px; }

.sz-xs-item__atc {
	background: #FF3636;
	color: #fff;
	border: 0;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	margin-top: auto;
	transition: background .15s ease;
}
.sz-xs-item__atc:hover { background: #E62E2E; }
.sz-xs-item__atc:disabled { background: #d1d5db; cursor: wait; }
.sz-xs-item__atc.is-added {
	background: #16a34a;
}

/* Mobile */
@media (max-width: 600px) {
	.sz-xs-modal__panel { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
	.sz-xs-modal__body { padding: 14px 16px; }
	.sz-xs-list--grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.sz-xs-item__name { font-size: 12px; min-height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.sz-xs-modal__overlay,
	.sz-xs-modal__panel,
	.sz-xs-item { transition: none !important; }
}

body.sz-xs-modal-open { overflow: hidden; }
