/**
 * Layali Cart Upsell.
 *
 * Styled entirely from the Layali design tokens, so each fork (Layali, SLD,
 * STAD, Amorci) picks up its own palette with no per-site CSS. Every token has
 * a literal fallback in case the block renders before tokens.css.
 */

.ly-cu {
	margin: 14px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var( --ly-color-border, rgba( 0, 0, 0, .12 ) );
}

.ly-cu[hidden] {
	display: none;
}

.ly-cu--checkout {
	margin: 0 0 24px;
	padding: 18px;
	border: 1px solid var( --ly-color-border, rgba( 0, 0, 0, .12 ) );
	border-radius: 10px;
	background: var( --ly-color-surface, #fff );
}

.ly-cu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.ly-cu__title {
	font-family: var( --ly-text-heading, var( --ly-font-display, inherit ) );
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var( --ly-color-primary, #53225e );
}

.ly-cu__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ly-cu__item {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ly-cu__thumb {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	overflow: hidden;
	background: var( --ly-color-bg, #f6f6f6 );
}

.ly-cu__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ly-cu__info {
	flex: 1 1 auto;
	min-width: 0;
}

.ly-cu__name {
	display: block;
	font-size: .85rem;
	line-height: 1.25;
	color: var( --ly-color-text, inherit );
	text-decoration: none;
	/* Two lines maximum so a long product name cannot push the drawer layout. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ly-cu__name:hover {
	text-decoration: underline;
}

.ly-cu__price {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 3px;
	font-size: .85rem;
	color: var( --ly-color-text, inherit );
}

.ly-cu__price del {
	opacity: .55;
	font-size: .8em;
}

.ly-cu__price ins {
	text-decoration: none;
	font-weight: 700;
}

.ly-cu__badge {
	font-size: .68rem;
	font-weight: 700;
	line-height: 1;
	padding: 3px 5px;
	border-radius: 4px;
	background: var( --ly-color-secondary, var( --ly-color-primary, #53225e ) );
	color: var( --ly-color-text-on-primary, #fff );
}

/* Double class so the Elementor kit's global button background cannot repaint
   this bare <button> — a bare <button> inherits the kit style, an <a> does not. */
.ly-cu .ly-cu__add.ly-cu__add {
	flex: 0 0 auto;
	appearance: none;
	border: 1px solid var( --ly-color-primary, #53225e );
	background: transparent;
	color: var( --ly-color-primary, #53225e );
	font-size: .78rem;
	font-weight: 700;
	line-height: 1;
	padding: 8px 12px;
	border-radius: 999px;
	cursor: pointer;
	transition: background var( --ly-duration-fast, .15s ) ease, color var( --ly-duration-fast, .15s ) ease;
}

.ly-cu .ly-cu__add.ly-cu__add:hover:not( [disabled] ) {
	background: var( --ly-color-primary, #53225e );
	color: var( --ly-color-text-on-primary, #fff );
}

.ly-cu .ly-cu__add.ly-cu__add[disabled] {
	opacity: .6;
	cursor: default;
}

/* Keep the ring: never replace focus styling with box-shadow:none. */
.ly-cu .ly-cu__add.ly-cu__add:focus-visible {
	outline: 2px solid var( --ly-color-focus-ring, var( --ly-color-primary, #53225e ) );
	outline-offset: 2px;
}

@media ( prefers-reduced-motion: reduce ) {
	.ly-cu .ly-cu__add.ly-cu__add {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
   Checkout order bumps.

   Chrome (dashed frame, highlighted header bar, headline colour) is intentional
   and NOT taken from the brand tokens: an order bump has to read as an
   interruption, not as part of the page. The two colours are settings-driven so
   each store can tune them without touching CSS.
--------------------------------------------------------------------------- */

.ly-cu--checkout {
	/* The bump supplies its own frame per offer. */
	border: 0;
	padding: 0;
	background: none;
	margin: 0 0 18px;
}

.ly-cu-bump {
	border: 2px dashed var( --ly-cu-accent, #0a7d33 );
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 14px;
	background: #fff;
}

.ly-cu-bump:last-child {
	margin-bottom: 0;
}

.ly-cu-bump.is-busy {
	opacity: .65;
	pointer-events: none;
}

.ly-cu-bump__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: var( --ly-cu-headbg, #fbf8a4 );
}

.ly-cu-bump__check {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	cursor: pointer;
	accent-color: var( --ly-cu-accent, #0a7d33 );
}

.ly-cu-bump__headline {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-weight: 800;
	font-size: .95rem;
	line-height: 1.3;
	color: var( --ly-cu-accent, #0a7d33 );
	cursor: pointer;
}

.ly-cu-bump__price {
	flex: 0 0 auto;
	font-size: .95rem;
	white-space: nowrap;
	color: #1f1f1f;
}

.ly-cu-bump__price del {
	opacity: .6;
	margin-right: 6px;
	font-weight: 400;
}

.ly-cu-bump__price ins {
	text-decoration: none;
	font-weight: 700;
}

.ly-cu-bump__body {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 18px;
}

.ly-cu-bump__thumb {
	flex: 0 0 96px;
	width: 96px;
	border: 1px solid rgba( 0, 0, 0, .12 );
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.ly-cu-bump__thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.ly-cu-bump__desc {
	flex: 1 1 auto;
	min-width: 0;
	font-size: .92rem;
	line-height: 1.6;
	color: #1f1f1f;
}

.ly-cu-bump__desc p {
	margin: 0 0 .7em;
}

.ly-cu-bump__desc p:last-child {
	margin-bottom: 0;
}

.ly-cu-bump__check:focus-visible {
	outline: 2px solid var( --ly-cu-accent, #0a7d33 );
	outline-offset: 2px;
}

@media ( max-width: 600px ) {
	.ly-cu-bump__head {
		flex-wrap: wrap;
	}

	.ly-cu-bump__price {
		width: 100%;
		padding-left: 30px;
	}

	.ly-cu-bump__body {
		gap: 12px;
		padding: 14px;
	}

	.ly-cu-bump__thumb {
		flex-basis: 72px;
		width: 72px;
	}
}
