/* Smart Cross-Sell & Up-Sell — frontend styles.
   Theme-neutral: inherits typography, only structural styling. */

/* ---------- Sections ---------- */

.scsu-section {
	margin: 1.25em 0;
	padding: 1em;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
}

.scsu-section__title {
	margin: 0 0 0.75em;
	font-size: 1.05em;
}

.scsu-section__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

.scsu-section__list--grid {
	flex-direction: row;
	flex-wrap: wrap;
}

.scsu-section__list--grid .scsu-item {
	flex: 1 1 260px;
	max-width: 340px;
}

/* ---------- Items ---------- */

.scsu-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75em;
	padding: 0.5em;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.015);
}

.scsu-item--selected {
	border-color: currentColor;
}

.scsu-item__check {
	margin-top: 0.4em;
	flex: 0 0 auto;
}

.scsu-item__thumb {
	flex: 0 0 64px;
	display: block;
}

.scsu-item__thumb img {
	width: 64px;
	height: auto;
	max-width: 100%;
	border-radius: 4px;
	display: block;
}

.scsu-item__body {
	flex: 1 1 auto;
	min-width: 0;
}

.scsu-item__name {
	display: block;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.scsu-item__message {
	margin: 0.15em 0;
	font-size: 0.85em;
	opacity: 0.8;
}

.scsu-item__price {
	display: inline-block;
	margin: 0.15em 0.5em 0.15em 0;
}

.scsu-item__price del {
	opacity: 0.6;
}

.scsu-item__price ins {
	text-decoration: none;
	font-weight: 700;
}

.scsu-item__badge {
	display: inline-block;
	padding: 0.1em 0.5em;
	font-size: 0.75em;
	font-weight: 700;
	border-radius: 3px;
	background: #d63638;
	color: #fff;
	vertical-align: middle;
}

.scsu-item__variation {
	display: block;
	margin-top: 0.35em;
	max-width: 100%;
}

.scsu-item__add {
	flex: 0 0 auto;
	align-self: center;
	white-space: nowrap;
}

.scsu-item__add.scsu-loading {
	opacity: 0.6;
	pointer-events: none;
}

.scsu-item__add.scsu-added {
	opacity: 0.75;
}

/* ---------- Drawer ---------- */

.scsu-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.scsu-drawer--open {
	visibility: visible;
	pointer-events: auto;
}

.scsu-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.scsu-drawer--open .scsu-drawer__overlay {
	opacity: 1;
}

.scsu-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 92vw);
	background: #fff;
	color: #222;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
	transform: translateX(100%);
	transition: transform 0.25s ease;
	display: flex;
	flex-direction: column;
	padding: 1.25em;
	overflow-y: auto;
	box-sizing: border-box;
}

.scsu-drawer--open .scsu-drawer__panel {
	transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
	.scsu-drawer__panel,
	.scsu-drawer__overlay {
		transition: none;
	}
}

.scsu-drawer__close {
	position: absolute;
	top: 0.6em;
	right: 0.6em;
	background: transparent;
	border: 0;
	font-size: 1.1em;
	line-height: 1;
	cursor: pointer;
	padding: 0.4em;
	color: inherit;
}

.scsu-drawer__close:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.scsu-drawer__content {
	flex: 1 1 auto;
	margin-top: 1.5em;
}

.scsu-drawer__confirmation {
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.75em;
	border-radius: 4px;
	background: rgba(0, 128, 0, 0.08);
	margin-bottom: 1em;
}

.scsu-drawer__confirmation p {
	margin: 0;
}

.scsu-drawer__check {
	flex: 0 0 auto;
	width: 1.6em;
	height: 1.6em;
	border-radius: 50%;
	background: #1a7f37;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9em;
}

.scsu-drawer__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.scsu-drawer__footer .button {
	flex: 1 1 auto;
	text-align: center;
}

.scsu-drawer .scsu-section {
	border: 0;
	padding: 0;
	margin: 0;
}

body.scsu-noscroll {
	overflow: hidden;
}
