/**
 * CaterOS shop selection — buttons, bar, modal, cards.
 * Global --cateros-* tokens come from wp_head (Branding module).
 */

/* -------------------------------------------------------------------------
   Add to Selection button (single + loop)
   ------------------------------------------------------------------------- */

.cateros-add-to-selection {
	background-color: var(--cateros-primary);
	color: var(--cateros-btn-text);
	border: 1px solid var(--cateros-primary);
	padding: 10px 20px;
	border-radius: var(--cateros-radius, 8px) !important;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	font-size: 1em;
	line-height: 1.3;
	box-sizing: border-box;
}

.cateros-selection-shop .cateros-add-to-selection:hover,
.cateros-selection-shop .cateros-add-to-selection:focus,
.cateros-wizard .cateros-add-to-selection:hover,
.cateros-wizard .cateros-add-to-selection:focus,
.cateros-add-to-selection:hover,
.cateros-add-to-selection:focus {
	background-color: var(--cateros-primary) !important;
	background: var(--cateros-primary) !important;
	color: var(--cateros-btn-text) !important;
	border-color: var(--cateros-primary) !important;
}

.cateros-add-to-selection--selected:hover {
	color: var(--cateros-btn-text, #ffffff);
}

/* Selected = success (added/in selection); intentionally not primary. */
.cateros-add-to-selection--selected {
	background-color: var(--cateros-success, #16a34a);
}

.cateros-add-to-selection--selected:hover {
	background-color: var(--cateros-danger, #dc2626);
	color: var(--cateros-btn-text, #ffffff);
}

@keyframes cateros-pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
	}
}

.cateros-add-to-selection--just-selected {
	animation: cateros-pulse 0.3s ease;
}

.cateros-add-to-selection:disabled,
.cateros-add-to-selection--disabled,
.cateros-add-to-selection--disabled:hover {
	background-color: #9ca3af !important;
	color: #f3f4f6 !important;
	cursor: not-allowed !important;
	opacity: 0.85;
	transform: none;
	box-shadow: none;
}

/* -------------------------------------------------------------------------
   Product card (shop / archives / related)
   ------------------------------------------------------------------------- */

/* Selected card marker: the ✓ badge alone. The full green ring was removed —
   it read as a stuck focus outline around the whole card. */
.cateros-product-selected {
	position: relative;
	border-radius: 4px;
}

.cateros-product-selected::after {
	content: "✓";
	position: absolute;
	top: 8px;
	right: 8px;
	background: var(--cateros-success, #16a34a);
	color: var(--cateros-btn-text, #ffffff);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: bold;
	line-height: 24px;
	text-align: center;
	z-index: 2;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
   Floating cart — FAB uses branding accents; drawer uses fixed neutrals (not --cateros-secondary).
   ------------------------------------------------------------------------- */

.cateros-selection-fab {
	--cateros-cart-fab-top-bg: #ffffff;
	--cateros-cart-fab-radius: var(--cateros-radius, 8px);
}

.cateros-selection-drawer {
	--cateros-cart-surface: #ffffff;
	--cateros-cart-surface-subtle: #f8fafc;
	--cateros-cart-text: #111827;
	--cateros-cart-text-muted: #6b7280;
	--cateros-cart-border: #e5e7eb;
	--cateros-cart-icon: #374151;
}

/* -------------------------------------------------------------------------
   Floating cart button (collapsed)
   ------------------------------------------------------------------------- */

.cateros-selection-fab {
	position: fixed;
	z-index: 99990;
	right: 0;
	bottom: 100px;
	padding: 0.65rem 0 0 0.65rem;
	pointer-events: none;
}

.cateros-selection-fab[hidden] {
	display: none !important;
}

.cateros-selection-fab .cateros-selection-fab__trigger,
button.cateros-selection-fab__trigger {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin: 0;
	padding: 0;
	width: 4.85rem;
	min-width: 4.85rem;
	max-width: 4.85rem;
	border: 0;
	border-radius: var(--cateros-cart-fab-radius) 0 0 var(--cateros-cart-fab-radius);
	background: transparent;
	overflow: visible;
	box-shadow:
		0 0 10px rgba(15, 23, 42, 0.1),
		0 0 24px rgba(15, 23, 42, 0.16),
		0 0 40px rgba(15, 23, 42, 0.12);
	cursor: pointer;
	font: inherit;
	font-family: inherit;
	line-height: 1.2;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.cateros-selection-fab .cateros-selection-fab__trigger:hover,
button.cateros-selection-fab__trigger:hover {
	outline: none;
	transform: translateY(-1px);
	box-shadow:
		0 0 12px rgba(15, 23, 42, 0.12),
		0 0 28px rgba(15, 23, 42, 0.18),
		0 0 44px rgba(15, 23, 42, 0.14);
}

.cateros-selection-fab .cateros-selection-fab__trigger:focus-visible,
button.cateros-selection-fab__trigger:focus-visible {
	outline: none;
	box-shadow:
		0 0 12px rgba(15, 23, 42, 0.12),
		0 0 28px rgba(15, 23, 42, 0.18),
		0 0 44px rgba(15, 23, 42, 0.14),
		0 0 0 2px color-mix(in srgb, var(--cateros-primary, #2271B1) 28%, transparent);
}

.cateros-selection-fab__top {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	height: 3.65rem;
	padding: 0.65rem 0.5rem 0.6rem;
	background: var(--cateros-cart-fab-top-bg);
	border-radius: var(--cateros-cart-fab-radius) 0 0 0;
	box-sizing: border-box;
	z-index: 1;
}

.cateros-selection-fab__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cateros-primary, #2271B1);
}

.cateros-selection-fab__icon-svg {
	display: block;
	width: 2.125rem;
	height: 2.125rem;
	color: var(--cateros-primary, #2271B1);
}

.cateros-selection-fab__badge {
	position: absolute;
	top: -0.55rem;
	left: -0.55rem;
	right: auto;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.55rem;
	height: 1.55rem;
	min-width: 1.55rem;
	max-width: 1.55rem;
	padding: 0;
	border-radius: 50%;
	background: var(--cateros-primary, #2271B1) !important;
	color: var(--cateros-btn-text, #ffffff) !important;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	box-sizing: border-box;
	border: 2px solid #ffffff;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
	pointer-events: none;
}

.cateros-selection-fab__badge--wide {
	width: 1.7rem;
	height: 1.7rem;
	min-width: 1.7rem;
	max-width: 1.7rem;
	font-size: 0.65rem;
	letter-spacing: -0.02em;
}

.cateros-selection-fab__badge[hidden] {
	display: none !important;
}

.cateros-selection-fab__total-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 1.9rem;
	padding: 0.45rem 0.4rem 0.5rem;
	background: var(--cateros-primary, #2271B1);
	border-radius: 0 0 0 var(--cateros-cart-fab-radius);
	transition: background-color 0.15s ease;
}

.cateros-selection-fab .cateros-selection-fab__trigger:hover .cateros-selection-fab__total-bar,
.cateros-selection-fab .cateros-selection-fab__trigger:focus-visible .cateros-selection-fab__total-bar,
button.cateros-selection-fab__trigger:hover .cateros-selection-fab__total-bar,
button.cateros-selection-fab__trigger:focus-visible .cateros-selection-fab__total-bar {
	background: var(--cateros-primary-dark, #135E96);
}

.cateros-selection-fab__total {
	display: block;
	width: 100%;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--cateros-btn-text, #ffffff);
	white-space: nowrap;
	text-align: center;
	letter-spacing: 0.01em;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Basket bump: the one reaction to an add now that the card-side "Added! /
   View Basket" block is gone (2026-09-05). transform only — never position,
   width or height — so the fixed trigger never moves and nothing else on the
   page reflows. Scaling from the button's own centre grows it a few px on
   every edge, well inside the padding already reserved around it for the
   hover-lift shadow (see .cateros-selection-fab__trigger above), so it never
   reaches content it does not normally cover. shop-selection.js restarts this
   on every add — remove the class, force a reflow, re-add it — so three
   quick adds play three short bumps rather than one that queues or grows. */
@keyframes cateros-fab-bump {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.08);
	}
	100% {
		transform: scale(1);
	}
}

.cateros-selection-fab--bump .cateros-selection-fab__trigger {
	animation: cateros-fab-bump 0.35s ease-out;
}

@media (prefers-reduced-motion: reduce) {
	.cateros-selection-fab--bump .cateros-selection-fab__trigger {
		/* The badge and total still update (that is a content change, not
		   motion) — only the scale animation is withheld. */
		animation: none;
	}
}

/* -------------------------------------------------------------------------
   Selection drawer (expanded, slides from right)
   ------------------------------------------------------------------------- */

.cateros-selection-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	pointer-events: none;
	visibility: hidden;
}

.cateros-selection-drawer.is-open {
	pointer-events: auto;
	visibility: visible;
}

.cateros-selection-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.48);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.cateros-selection-drawer.is-open .cateros-selection-drawer__backdrop {
	opacity: 1;
}

.cateros-selection-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(100%, 440px);
	max-width: 100vw;
	background: var(--cateros-cart-surface);
	color: var(--cateros-cart-text);
	display: flex;
	flex-direction: column;
	box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14), -2px 0 0 rgba(15, 23, 42, 0.04);
	transform: translateX(100%);
	transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
	box-sizing: border-box;
}

.cateros-selection-drawer.is-open .cateros-selection-drawer__panel {
	transform: translateX(0);
}

.cateros-selection-drawer__root {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
}

.cateros-selection-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.25rem 1rem;
	border-bottom: 1px solid var(--cateros-cart-border);
	flex-shrink: 0;
	background: var(--cateros-cart-surface);
}

.cateros-selection-drawer__header-text {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
	min-width: 0;
}

.cateros-selection-drawer__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--cateros-cart-text);
	line-height: 1.25;
}

.cateros-selection-drawer__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: var(--cateros-primary, #2271B1) !important;
	color: var(--cateros-btn-text, #ffffff) !important;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.35;
	white-space: nowrap;
}

.cateros-cart-icon {
	display: block;
	flex-shrink: 0;
}

.cateros-selection-drawer__close,
button.cateros-selection-drawer__close {
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0;
	border: 1px solid var(--cateros-primary, #2271B1) !important;
	border-radius: 50% !important;
	background: var(--cateros-primary, #2271B1) !important;
	background-color: var(--cateros-primary, #2271B1) !important;
	color: var(--cateros-btn-text, #ffffff) !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.cateros-selection-drawer__close:hover,
.cateros-selection-drawer__close:focus-visible,
button.cateros-selection-drawer__close:hover,
button.cateros-selection-drawer__close:focus-visible {
	background: var(--cateros-primary-dark, #135E96) !important;
	background-color: var(--cateros-primary-dark, #135E96) !important;
	border-color: var(--cateros-primary-dark, #135E96) !important;
	color: var(--cateros-btn-text, #ffffff) !important;
	outline: none;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--cateros-primary, #2271B1) 25%, transparent);
}

.cateros-selection-drawer__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 0.25rem 1.25rem 1.25rem;
	-webkit-overflow-scrolling: touch;
}

.cateros-drawer-item {
	display: flex;
	gap: 1rem;
	padding: 1.1rem 0;
	border-bottom: 1px solid var(--cateros-cart-border);
	align-items: flex-start;
}

.cateros-drawer-item:last-child {
	border-bottom: 0;
}

.cateros-drawer-item__media {
	flex: 0 0 auto;
}

.cateros-drawer-item__media img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 10px;
	background: var(--cateros-cart-surface-subtle);
	border: 1px solid var(--cateros-cart-border);
}

.cateros-drawer-item__thumb-placeholder {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	background: var(--cateros-cart-surface-subtle);
	border: 1px solid var(--cateros-cart-border);
}

.cateros-drawer-item__body {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.cateros-drawer-item__name {
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.35;
	word-break: break-word;
	color: var(--cateros-cart-text);
}

.cateros-drawer-item__variation {
	font-size: 0.8125rem;
	color: var(--cateros-cart-text-muted);
	margin-top: 0.15rem;
	line-height: 1.35;
}

.cateros-drawer-item__unit {
	font-size: 0.8125rem;
	color: var(--cateros-cart-text-muted);
	margin-top: 0.1rem;
}

.cateros-drawer-item__hint {
	font-size: 0.78rem;
	color: var(--cateros-cart-text-muted);
	margin-top: 0.15rem;
	line-height: 1.4;
}

.cateros-drawer-item--missing .cateros-drawer-item__name {
	color: var(--cateros-cart-text-muted);
}

.cateros-drawer-item__controls {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
	margin-top: 0.15rem;
}

.cateros-drawer-qty {
	width: auto;
	min-width: 0;
	max-width: none;
	border: 1px solid var(--cateros-cart-border);
	border-radius: 8px;
	background: var(--cateros-cart-surface);
	grid-template-columns: 36px 44px 36px;
	box-shadow: none;
}

.cateros-drawer-qty .cateros-drawer-qty__minus {
	grid-column: 1;
	grid-row: 1;
}

.cateros-drawer-qty .cateros-drawer-qty__value {
	grid-column: 2;
	grid-row: 1;
}

.cateros-drawer-qty .cateros-drawer-qty__plus {
	grid-column: 3;
	grid-row: 1;
}

.cateros-drawer-qty .cateros-quantity-selector__btn {
	background: var(--cateros-cart-surface-subtle);
	color: var(--cateros-cart-text);
	min-height: 36px;
	border: 0;
}

.cateros-drawer-qty .cateros-quantity-selector__btn:hover:not(:disabled) {
	background: #f3f4f6;
	color: var(--cateros-cart-text);
}

.cateros-drawer-qty__value {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	padding: 0 0.35rem;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--cateros-cart-text);
	border-left: 1px solid var(--cateros-cart-border);
	border-right: 1px solid var(--cateros-cart-border);
	background: var(--cateros-cart-surface);
}

/* Scoped + !important so theme/Woo button rules cannot override bin color/border */
.cateros-selection-drawer .cateros-drawer-item__remove,
.cateros-selection-drawer button.cateros-drawer-item__remove,
.cateros-selection-drawer button.cateros-selection-remove {
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0;
	border: 1px solid var(--cateros-primary, #2271B1) !important;
	border-color: var(--cateros-primary, #2271B1) !important;
	border-radius: 8px !important;
	background: var(--cateros-cart-surface) !important;
	background-color: var(--cateros-cart-surface) !important;
	color: var(--cateros-primary, #2271B1) !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none !important;
}

.cateros-selection-drawer .cateros-drawer-item__remove svg,
.cateros-selection-drawer .cateros-drawer-item__remove .cateros-cart-icon--trash {
	display: block;
	color: var(--cateros-primary, #2271B1) !important;
}

.cateros-selection-drawer .cateros-drawer-item__remove svg path {
	stroke: currentColor !important;
}

.cateros-selection-drawer .cateros-drawer-item__remove:hover,
.cateros-selection-drawer .cateros-drawer-item__remove:focus-visible,
.cateros-selection-drawer button.cateros-drawer-item__remove:hover,
.cateros-selection-drawer button.cateros-selection-remove:hover,
.cateros-selection-drawer button.cateros-selection-remove:focus-visible {
	background: var(--cateros-primary-subtle, color-mix(in srgb, #2271B1 8%, transparent)) !important;
	background-color: var(--cateros-primary-subtle, color-mix(in srgb, #2271B1 8%, transparent)) !important;
	border-color: var(--cateros-primary-dark, #135E96) !important;
	color: var(--cateros-primary-dark, #135E96) !important;
}

.cateros-selection-drawer .cateros-drawer-item__remove:hover svg,
.cateros-selection-drawer .cateros-drawer-item__remove:focus-visible svg,
.cateros-selection-drawer .cateros-drawer-item__remove:hover .cateros-cart-icon--trash,
.cateros-selection-drawer .cateros-drawer-item__remove:focus-visible .cateros-cart-icon--trash {
	color: var(--cateros-primary-dark, #135E96) !important;
}

.cateros-selection-drawer__footer {
	flex-shrink: 0;
	padding: 1.15rem 1.25rem 1.35rem;
	border-top: 1px solid var(--cateros-cart-border);
	background: var(--cateros-cart-surface-subtle);
}

.cateros-selection-drawer__totals {
	margin-bottom: 1rem;
}

.cateros-selection-drawer__total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.2rem 0;
	font-size: 0.9rem;
	color: var(--cateros-cart-text-muted);
}

.cateros-selection-drawer__total-row .cateros-selection-drawer__total-value {
	color: var(--cateros-cart-text);
	font-weight: 500;
}

.cateros-selection-drawer__total-row--grand {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--cateros-cart-text);
	margin-top: 0.35rem;
	padding-top: 0.65rem;
	border-top: 1px solid var(--cateros-cart-border);
}

.cateros-selection-drawer__total-row--grand .cateros-selection-drawer__total-label,
.cateros-selection-drawer__total-row--grand .cateros-selection-drawer__total-value {
	color: var(--cateros-cart-text);
	font-weight: 700;
}

.cateros-selection-drawer a.cateros-selection-drawer__cta,
.cateros-selection-drawer .button.cateros-selection-drawer__cta,
.cateros-selection-drawer a.button.cateros-modal__cta {
	display: block;
	width: 100%;
	text-align: center;
	padding: 0.9rem 1.15rem !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	margin: 0 0 0.75rem !important;
	box-sizing: border-box;
	text-decoration: none !important;
	background: var(--cateros-primary, #2271B1) !important;
	background-color: var(--cateros-primary, #2271B1) !important;
	border: 2px solid var(--cateros-primary, #2271B1) !important;
	color: var(--cateros-btn-text, #ffffff) !important;
	border-radius: var(--cateros-radius, 8px) !important;
	line-height: 1.35 !important;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--cateros-primary, #2271B1) 35%, transparent);
}

.cateros-selection-drawer a.cateros-selection-drawer__cta:hover,
.cateros-selection-drawer a.cateros-selection-drawer__cta:focus,
.cateros-selection-drawer .button.cateros-selection-drawer__cta:hover,
.cateros-selection-drawer .button.cateros-selection-drawer__cta:focus {
	background: var(--cateros-primary-dark, #135E96) !important;
	background-color: var(--cateros-primary-dark, #135E96) !important;
	border-color: var(--cateros-primary-dark, #135E96) !important;
	color: var(--cateros-btn-text, #ffffff) !important;
}

.cateros-selection-drawer .cateros-selection-drawer__clear,
.cateros-selection-drawer button.cateros-selection-drawer__clear,
.cateros-selection-drawer button.cateros-modal__clear {
	display: block;
	width: 100%;
	margin: 0 !important;
	padding: 0.65rem 1rem !important;
	background: var(--cateros-cart-surface) !important;
	background-color: var(--cateros-cart-surface) !important;
	border: 1px solid #d1d5db !important;
	color: var(--cateros-cart-text) !important;
	border-radius: var(--cateros-radius, 8px) !important;
	cursor: pointer;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	box-shadow: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.cateros-selection-drawer .cateros-selection-drawer__clear:hover,
.cateros-selection-drawer .cateros-selection-drawer__clear:focus-visible,
.cateros-selection-drawer button.cateros-selection-drawer__clear:hover,
.cateros-selection-drawer button.cateros-modal__clear:hover {
	background: #f9fafb !important;
	background-color: #f9fafb !important;
	border-color: #9ca3af !important;
	color: var(--cateros-cart-text) !important;
}

.cateros-selection-drawer__empty,
.cateros-selection-drawer__loading {
	padding: 2.5rem 1.25rem;
	text-align: center;
	flex: 1 1 auto;
	color: var(--cateros-cart-text-muted);
}

.cateros-selection-drawer__empty-title {
	font-weight: 700;
	font-size: 1.05rem;
	margin: 0 0 0.5rem;
	color: var(--cateros-cart-text);
}

.cateros-selection-drawer__empty-text {
	margin: 0 0 1.25rem;
	color: var(--cateros-cart-text-muted);
	line-height: 1.5;
}

.cateros-selection-drawer__loading {
	color: var(--cateros-cart-text-muted);
}

html.cateros-selection-drawer-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.cateros-selection-fab {
		right: 0;
		bottom: 100px;
		padding: 0.55rem 0 0 0.55rem;
	}

	.cateros-selection-drawer__panel {
		width: 100%;
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cateros-selection-drawer__panel,
	.cateros-selection-drawer__backdrop {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
   Single product layout
   ------------------------------------------------------------------------- */

.cateros-selection-action {
	margin-bottom: 1rem;
}

.cateros-selection-action .cateros-add-to-selection {
	display: inline-block;
}

.cateros-selection-variable-notice,
.cateros-selection-fallback {
	margin-bottom: 1rem;
}

/* Single product: variation dropdowns stay for browsing; qty & WC add-to-cart hidden (wizard handles order). */
.cateros-selection-shop.single-product form.cart .quantity {
	display: none !important;
}

/* Hide any theme-injected WooCommerce add-to-cart buttons in selection mode (keep our `.cateros-add-to-selection`). */
.cateros-selection-shop.single-product form.cart button.single_add_to_cart_button:not(.cateros-add-to-selection),
.cateros-selection-shop.single-product form.cart a.single_add_to_cart_button:not(.cateros-add-to-selection),
.cateros-selection-shop.single-product form.cart button[name="add-to-cart"]:not(.cateros-add-to-selection),
.cateros-selection-shop.single-product form.cart input[type="submit"][name="add-to-cart"]:not(.cateros-add-to-selection) {
	display: none !important;
}

/* CaterOS replaces WC submit with type="button" Add to Selection inside variation form — keep it visible. */

.cateros-pdp-variation-nag {
	margin: 0.5rem 0 0;
	padding: 0.5rem 0.75rem;
	font-size: 0.9rem;
	color: #b45309;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-radius: 6px;
}

/* -------------------------------------------------------------------------
   Product info box (minimum / price context — no quantity on PDP)
   ------------------------------------------------------------------------- */

.cateros-product-info-box {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-left: 3px solid var(--cateros-primary, #2271B1);
	border-radius: 4px;
	padding: 12px 16px;
	margin: 16px 0;
	font-size: 14px;
	line-height: 1.6;
	clear: both;
}

.cateros-product-info-box__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
	flex-wrap: wrap;
}

.cateros-product-info-box__label {
	color: #6b7280;
}

.cateros-product-info-box__value {
	font-weight: 600;
	color: #1f2937;
}

.cateros-product-info-box__value .woocommerce-Price-amount {
	font-weight: 600;
}

.cateros-product-info-box__note {
	margin: 8px 0 0;
	font-size: 13px;
	color: #6b7280;
	font-style: italic;
}

/* Theme-safe: grid = three fixed columns (− | qty | +), never collapses or clips the + button */
.cateros-quantity-selector {
	display: grid !important;
	grid-template-columns: 36px 50px 36px;
	grid-template-rows: 36px;
	align-items: stretch;
	justify-items: stretch;
	width: 122px;
	min-width: 122px;
	max-width: 122px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	overflow: hidden;
	gap: 0 !important;
	vertical-align: middle;
	box-sizing: content-box;
}

.cateros-quantity-selector__btn,
.cateros-quantity-selector__input {
	margin: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	min-width: 0;
	width: 100%;
	max-width: none;
}

.cateros-quantity-selector__btn {
	height: 100%;
	min-height: 36px;
	border: none !important;
	background: #f3f4f6;
	color: #374151;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	padding: 0 !important;
	line-height: 1;
	font-family: inherit;
	visibility: visible !important;
	opacity: 1 !important;
	-webkit-appearance: none;
	appearance: none;
}

.cateros-quantity-selector__btn--minus {
	grid-column: 1;
	grid-row: 1;
	position: relative;
	z-index: 2;
}

.cateros-quantity-selector__btn--plus {
	grid-column: 3;
	grid-row: 1;
	position: relative;
	z-index: 2;
}

.cateros-quantity-selector__btn:hover:not(:disabled) {
	background: #e5e7eb;
}

.cateros-quantity-selector__btn:disabled {
	color: #d1d5db;
	cursor: not-allowed;
	background: #f3f4f6 !important;
}

.cateros-quantity-selector__input {
	grid-column: 2;
	grid-row: 1;
	position: relative;
	z-index: 1;
	height: 100%;
	min-height: 36px;
	border: none !important;
	border-left: 1px solid #d1d5db !important;
	border-right: 1px solid #d1d5db !important;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: #1f2937;
	background: #ffffff !important;
	padding: 0 !important;
	line-height: 36px;
	-moz-appearance: textfield;
	box-sizing: border-box;
	font-family: inherit;
}

.cateros-quantity-selector__input::-webkit-inner-spin-button,
.cateros-quantity-selector__input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.cateros-product-info-box__quantity {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	row-gap: 8px;
	column-gap: 12px;
	margin: 12px 0;
	padding: 8px 0;
}

/* Prevent flex row from shrinking the control off-screen (theme flex min-width: 0) */
.cateros-product-info-box__quantity .cateros-quantity-selector {
	flex-shrink: 0;
}

.cateros-product-info-box__subtotal {
	padding-top: 8px;
	border-top: 1px dashed #e5e7eb;
	font-weight: 600;
}

.cateros-product-info-box__subtotal-value {
	color: var(--cateros-primary, #2271B1);
	font-size: 16px;
}

.cateros-product-info-box__subtotal-value .woocommerce-Price-amount {
	color: inherit;
	font-weight: 600;
}

/* -------------------------------------------------------------------------
   Loop: minimum badge
   (Hello Elementor & similar minimal themes: CTA sits at card bottom — use
   top-left on the image/title stack so the badge does not cover the button.)
   ------------------------------------------------------------------------- */

li.product.cateros-product-card {
	position: relative;
}

/* Theme-safe: if the theme doesn't output `post_class()` on product cards, still anchor the badge. */
.woocommerce.archive ul.products li.product,
.woocommerce.archive ul.wc-block-grid__products li.wc-block-grid__product {
	position: relative;
}

.cateros-min-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	bottom: auto;
	z-index: 4;
	display: inline-block;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	color: #374151;
	background: rgba(243, 244, 246, 0.95);
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	pointer-events: none;
}
