/* T10 baseline. Everything sits in :where() (no specificity), so the theme's own rules for .pxs, .xs, .xrow and
   .sbar always win. Colors come from --eikst-pp-* variables with neutral fallbacks. */

:where(.eikst-crumbs) {
	margin: 0 0 12px;
	font-size: .9em;
}

/* Complement rows */
:where(.pxs) {
	margin-top: 16px;
	padding: 16px;
	border-radius: 16px;
	background: var(--eikst-pp-panel, rgba(0, 0, 0, .035));
}
:where(.pxs h2, .xs h2) {
	margin: 0;
	font-size: 1.15rem;
}
:where(.pxs .psub) {
	margin: 2px 0 12px;
	font-size: .9rem;
}
:where(.xs) {
	margin-top: 16px;
}
:where(.xs h5, .xs h2) {
	margin: 0 0 10px;
}
:where(.xrow) {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
	padding: 10px 12px;
	border: 1px solid var(--eikst-pp-line, rgba(0, 0, 0, .1));
	border-radius: 14px;
	background: var(--eikst-pp-bg, #fff);
}
:where(.xrow:last-child) {
	margin-bottom: 0;
}
:where(.xrow img) {
	flex: none;
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: 10px;
}
:where(.xrow .xi) {
	flex: 1;
	min-width: 0;
}
:where(.xrow .n) {
	display: -webkit-box;
	overflow: hidden;
	margin-block: -3px;
	border-block: 3px solid transparent; /* room to tap (24px+) as a border, not padding: the clip stays at the text, so a third line never peeks in */
	color: inherit;
	font-weight: 700;
	font-size: .9rem;
	line-height: 1.3;
	text-decoration: none;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
:where(.xrow .pp) {
	margin-top: 2px;
	font-family: var(--eikst-price-font, inherit);
	font-weight: var(--eikst-price-weight-row, 700);
}
:where(.xrow .pp small) {
	margin-inline-start: 6px;
	font-weight: 400;
	font-size: max(12px, .8125rem);
}
:where(.xrow .pp small .eikst-unit) {
	display: inline;
}
/* The unit line keeps the size and color of the row's small text, and never goes under 12px (the smallest size
   accessibility scans accept): its own rule (.eikst-unit: .8em, faded) would shrink and fade it a second time, and a
   theme reset such as small { font-size: 80% } can make the row's small text smaller than that. Two classes here, so it
   beats both; a theme rule with more wins. */
.xrow .eikst-unit {
	font-size: max(12px, 1em);
	opacity: 1;
}
:where(.xrow .fs[hidden]) {
	display: none;
}
:where(.xrow .xerr) {
	display: block;
	margin-top: 4px;
	color: var(--eikst-pp-error, #b42318);
	font-size: .8rem;
}
:where(.xadd) {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 6px 14px;
	border: 2px solid var(--eikst-pp-accent, currentColor);
	border-radius: 999px;
	color: var(--eikst-pp-accent, inherit);
	font-weight: 700;
	font-size: .88rem;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
:where(.xadd.done) {
	border-color: var(--eikst-pp-line, rgba(0, 0, 0, .1));
	opacity: .7;
	cursor: default;
}
:where(.xadd.is-busy) {
	opacity: .6;
	cursor: progress;
}
@media (max-width: 767.98px) {
	:where(.xadd) {
		min-height: 44px;
	}
}

/* Elementor Pro's side cart: these three rules are the exception to :where() in this file, because a theme's plain h5
   rule and link color (a { color: ... }) would beat them. The title takes the size of the product names; the name keeps
   the cart's text color and the button the site's Elementor accent, like the checkout button. */
.elementor-menu-cart__products .xs h5 {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}
.elementor-menu-cart__products .xs .xrow a.n {
	color: inherit;
}
.elementor-menu-cart__products .xs .xrow a.xadd {
	color: var(--eikst-pp-accent, var(--e-global-color-accent, currentColor));
}

/* Sticky bar: hidden above the width set in the switch (inline rule), slides up while the main button is off screen */
:where(.sbar) {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 58;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--eikst-pp-line, rgba(0, 0, 0, .1));
	background: var(--eikst-pp-bg, #fff);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
	transform: translateY(105%);
	visibility: hidden;
	transition: transform .25s, visibility .25s;
}
:where(.sbar.on) {
	transform: none;
	visibility: visible;
}
:where(.sbar img) {
	flex: none;
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 10px;
}
:where(.sbi) {
	flex: 1;
	min-width: 0;
}
:where(.sbn) {
	overflow: hidden;
	font-weight: 700;
	font-size: .92rem;
	line-height: 1.3;
	white-space: nowrap;
	text-overflow: ellipsis;
}
:where(.sbp) {
	font-family: var(--eikst-price-font, inherit);
	font-weight: var(--eikst-price-weight-big, 700);
	font-size: 1.05rem;
	line-height: 1.3;
}
:where(#sbVar) {
	margin-inline-start: 6px;
	font-weight: 600;
	font-size: .82rem;
	opacity: .75;
}
:where(.sbar.added #sbVar) {
	color: var(--eikst-pp-ok, #137a3a);
	opacity: 1;
	font-weight: 800;
}
:where(#sbBtn) {
	flex: none;
	min-height: 46px;
}
:where(#sbBtn.is-busy) {
	opacity: .6;
	cursor: progress;
}
:where(body.sb-on) {
	padding-bottom: var(--sbh, 72px);
}
:where(.eikst-need) {
	animation: eikst-need .5s ease-in-out 1;
}
@keyframes eikst-need {
	25%, 75% {
		transform: translateX(-6px);
	}
	50% {
		transform: translateX(6px);
	}
}

@media (prefers-reduced-motion: reduce) {
	:where(.sbar) {
		transition: none;
	}
	:where(.eikst-need) {
		animation: none;
	}
}

/* Side cart, "three side by side" (setting xs_mini_layout = trio): the same rows as small cards in a grid, image on top,
   then name, price and the add button across the card. Real class rules, not :where(): a theme's own .xrow rules (made
   for rows) must not pull the cards back into rows. Three columns from the narrowest phone (320) up; a card never grows
   wider than its third. */
.xs.xs-trio .xs-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}
.xs.xs-trio .xs-grid > .xrow {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	min-width: 0;
	margin: 0;
	padding: 5px;
	border-radius: 10px;
	text-align: start;
}
.xs.xs-trio .xs-grid > .xrow img {
	display: block;
	flex: none;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	border-radius: 8px;
	object-fit: contain;
}
.xs.xs-trio .xs-grid > .xrow .xi {
	flex: 1 1 auto;
	min-width: 0;
}
.xs.xs-trio .xs-grid > .xrow .n {
	font-size: 12px;
	line-height: 1.3;
	font-weight: 700;
	overflow-wrap: anywhere;
}
.xs.xs-trio .xs-grid > .xrow .pp {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.3;
}
.xs.xs-trio .xs-grid > .xrow .pp small {
	display: block;
	margin: 0;
	font-size: 12px;
}
.xs.xs-trio .xs-grid > .xrow .xadd {
	display: flex;
	width: 100%;
	min-width: 0;
	min-height: 36px;
	margin: auto 0 0;
	padding: 4px 6px;
	box-sizing: border-box;
	font-size: 13px;
	white-space: nowrap;
}
@media (max-width: 767.98px) {
	.xs.xs-trio .xs-grid > .xrow .xadd {
		min-height: 44px;
	}
}
