.crs-bus {
	--crs-accent: #b5215a;
	--crs-title: #3a2a2f;
	--crs-muted: #8a7f82;
	--crs-line: #eadfdc;
	position: relative;
	width: 100%;
	max-width: 340px;
}
.crs-bus *, .crs-bus *::before, .crs-bus *::after { box-sizing: border-box; }

/* ----- Campo de búsqueda ----- */
.crs-bus__form { position: relative; display: flex; align-items: center; margin: 0; }
.crs-bus .crs-bus__input {
	width: 100%; height: 44px; margin: 0; padding: 0 46px 0 44px;
	background: #f6f2ef; color: var(--crs-title);
	border: 1px solid var(--crs-line); border-radius: 999px;
	font: inherit; font-size: 15px; box-shadow: none; -webkit-appearance: none; appearance: none;
	transition: border-color .15s ease, background .15s ease;
}
.crs-bus .crs-bus__input::placeholder { color: #9a8f92; opacity: 1; }
.crs-bus .crs-bus__input::-webkit-search-cancel-button,
.crs-bus .crs-bus__input::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.crs-bus .crs-bus__input:focus { outline: none; background: #fff; border-color: var(--crs-accent); }

.crs-bus__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #7a6a6e; display: flex; pointer-events: none; }

.crs-bus .crs-bus__clear {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; padding: 0; margin: 0;
	background: transparent; color: #7a6a6e; border: 0; border-radius: 50%; box-shadow: none; cursor: pointer;
}
.crs-bus .crs-bus__clear:hover { background: #ece3df; color: var(--crs-accent); }
.crs-bus__clear[hidden], .crs-bus__spinner[hidden], .crs-bus__panel[hidden] { display: none !important; }

.crs-bus__spinner {
	position: absolute; right: 40px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
	border: 2px solid #e3d6d2; border-top-color: var(--crs-accent); border-radius: 50%;
	animation: crs-bus-spin .7s linear infinite;
}
@keyframes crs-bus-spin { to { transform: rotate(360deg); } }

/* ----- Desplegable ----- */
.crs-bus__panel {
	position: absolute; z-index: 99999; top: calc(100% + 8px); right: 0;
	width: max(100%, 440px); max-width: calc(100vw - 24px); max-height: 72vh; overflow-y: auto;
	padding: 6px 18px 14px;
	background: #fff; color: var(--crs-title);
	border: 1px solid var(--crs-line); border-radius: 16px;
	box-shadow: 0 18px 44px rgba(58, 42, 47, .16);
	text-align: left; line-height: 1.35;
}
.crs-bus__label {
	margin: 16px 0 4px; padding-bottom: 5px;
	border-bottom: 1px solid var(--crs-line);
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--crs-muted);
}
.crs-bus a.crs-bus__item {
	display: flex; align-items: center; gap: 12px;
	padding: 9px 8px; margin: 0 -8px;
	border-radius: 10px; color: var(--crs-title); text-decoration: none;
}
.crs-bus a.crs-bus__item:hover, .crs-bus a.crs-bus__item.is-active { background: #fbf3f0; color: var(--crs-title); }

.crs-bus__cat { flex-direction: column; align-items: flex-start !important; gap: 1px !important; }
.crs-bus__cat-name { font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.crs-bus__cat-in { font-size: 13px; color: var(--crs-muted); }

.crs-bus__thumb { flex: none; width: 38px; height: 38px; padding: 2px; background: #fff; border: 1px solid var(--crs-line); border-radius: 8px; object-fit: contain; }
.crs-bus__name { flex: 1; min-width: 0; font-size: 15px; }
.crs-bus__name strong, .crs-bus__cat-name strong { color: var(--crs-accent); font-weight: 700; }
.crs-bus__oos { margin-left: 6px; font-size: 12px; color: var(--crs-muted); }
.crs-bus__price { flex: none; text-align: right; font-size: 15px; white-space: nowrap; }
.crs-bus__price del { display: block; font-size: 12px; color: var(--crs-muted); }
.crs-bus__price ins { text-decoration: none; background: none; font-weight: 600; }
.crs-bus__price .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.crs-bus a.crs-bus__all {
	display: block; margin: 12px -8px 0; padding: 10px 8px;
	border-top: 1px solid var(--crs-line);
	font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	color: var(--crs-accent); text-decoration: none; text-align: center;
}
.crs-bus a.crs-bus__all:hover, .crs-bus a.crs-bus__all.is-active { background: #fbf3f0; color: var(--crs-accent); text-decoration: underline; }

.crs-bus__empty { margin: 16px 0 6px; font-size: 15px; color: var(--crs-muted); }

@media (max-width: 600px) {
	.crs-bus { max-width: none; }
	.crs-bus__panel { width: 100%; right: 0; max-height: 65vh; }
}
