/* ==========================================================================
   Bulk Card Search — aspecto de aplicación.
   Todo va acotado a .bcs-app y las propiedades que el tema suele pisar
   (colores de enlace, bordes y rellenos de formularios, botones) van con
   !important a propósito.
   ========================================================================== */

.bcs-app {
	--bcs-ink: #151515;
	--bcs-muted: #6d6d72;
	--bcs-line: #ececef;
	--bcs-soft: #f5f5f7;
	--bcs-accent: #e96400;
	--bcs-ok: #2e7d32;
	--bcs-ko: #c62828;
	--bcs-radius: 14px;

	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	width: 100%;
	box-sizing: border-box;
	color: var(--bcs-ink);
	font-size: 15px;
	line-height: 1.45;
}

.bcs-app *,
.bcs-app *::before,
.bcs-app *::after { box-sizing: border-box; }

.bcs-app [hidden] { display: none !important; }

@media (min-width: 1025px) {
	.bcs-app { grid-template-columns: minmax(280px, 21%) minmax(0, 1fr); align-items: start; }
	.bcs-side { position: sticky; top: 24px; }
}

/* Neutraliza estilos globales del tema */
.bcs-app button,
.bcs-app input,
.bcs-app select,
.bcs-app textarea {
	font-family: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	min-height: 0 !important;
}
.bcs-app a { text-decoration: none !important; }

/* ---------------------------------------------------------------- Panel lateral */

.bcs-panel {
	background: #fff;
	border: 1px solid var(--bcs-line);
	border-radius: var(--bcs-radius);
	padding: 20px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .05);
}

.bcs-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }

.bcs-app .bcs-panel-title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: var(--bcs-ink) !important;
}

.bcs-help { margin: 0 0 12px !important; font-size: 13px; color: var(--bcs-muted); }

.bcs-app textarea#bcs-decklist {
	display: block;
	width: 100% !important;
	min-height: 360px !important;
	resize: vertical;
	padding: 14px !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 11px !important;
	background: #fafafb !important;
	color: var(--bcs-ink) !important;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
	font-size: 13px !important;
	line-height: 1.65 !important;
	outline: none !important;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.bcs-app textarea#bcs-decklist:focus {
	border-color: var(--bcs-accent) !important;
	background: #fff !important;
	box-shadow: 0 0 0 4px rgba(233, 100, 0, .12) !important;
}

.bcs-keys {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin: 10px 0 14px !important;
	font-size: 12px;
	color: var(--bcs-muted);
}
.bcs-keys .bcs-dot { opacity: .5; margin: 0 2px; }
.bcs-app kbd {
	font: inherit;
	font-size: 11px;
	line-height: 1.4;
	padding: 1px 6px;
	color: #333;
	background: #fff;
	border: 1px solid #dcdce0;
	border-bottom-width: 2px;
	border-radius: 5px;
}

/* ---------------------------------------------------------------- Botones */

.bcs-app .bcs-btn {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	height: 42px !important;
	padding: 0 18px !important;
	border: 1px solid transparent !important;
	border-radius: 11px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.bcs-app .bcs-btn:active { transform: scale(.98); }
.bcs-app .bcs-btn svg { width: 17px; height: 17px; flex: none; }

.bcs-app .bcs-btn-primary { background: var(--bcs-ink) !important; color: #fff !important; }
.bcs-app .bcs-btn-primary:hover { background: #000 !important; }
.bcs-app .bcs-btn-primary:disabled { background: #c4c4c8 !important; cursor: not-allowed; }

.bcs-app .bcs-btn-ghost { background: #fff !important; color: var(--bcs-ink) !important; border-color: #e3e3e6 !important; }
.bcs-app .bcs-btn-ghost:hover { background: var(--bcs-soft) !important; border-color: #d2d2d6 !important; }

.bcs-app .bcs-btn-block { width: 100% !important; }

.bcs-app .bcs-btn.is-loading { color: transparent !important; pointer-events: none; }
.bcs-app .bcs-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bcs-spin .7s linear infinite;
}

.bcs-app .bcs-link-btn {
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: var(--bcs-muted) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	cursor: pointer;
}
.bcs-app .bcs-link-btn:hover { color: var(--bcs-ink) !important; }

.bcs-sel-count { opacity: .7; font-weight: 500; }

/* ---------------------------------------------------------------- Estado vacío */

.bcs-empty {
	padding: 70px 24px;
	text-align: center;
	color: var(--bcs-muted);
	border: 1px dashed #dcdce0;
	border-radius: var(--bcs-radius);
	background: linear-gradient(180deg, #fcfcfd, #fff);
}
.bcs-empty svg { width: 46px; height: 46px; color: #c6c6cc; margin-bottom: 14px; }
.bcs-app .bcs-empty h4 { margin: 0 0 6px !important; font-size: 18px !important; font-weight: 700 !important; color: var(--bcs-ink) !important; }
.bcs-empty p { margin: 0 auto !important; max-width: 420px; font-size: 14px; }

/* ---------------------------------------------------------------- Barra de resultados */

.bcs-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}

.bcs-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #efeff2; border-radius: 13px; }

.bcs-app .bcs-tab {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	height: 38px !important;
	padding: 0 16px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: transparent !important;
	color: var(--bcs-muted) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.bcs-app .bcs-tab:hover { color: var(--bcs-ink) !important; }
.bcs-app .bcs-tab.is-active {
	background: #fff !important;
	color: var(--bcs-ink) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 1px rgba(0, 0, 0, .04) !important;
}

.bcs-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 21px;
	padding: 0 7px;
	border-radius: 999px;
	background: #e2e2e6;
	color: #45454a;
	font-size: 12px;
	font-weight: 700;
}
.bcs-tab[data-tab="in"].is-active .bcs-count { background: #e4f3e6; color: var(--bcs-ok); }
.bcs-tab[data-tab="out"].is-active .bcs-count { background: #fbe6e6; color: var(--bcs-ko); }

.bcs-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- Rejilla: 6 / 3 / 2 */

.bcs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .bcs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1025px) { .bcs-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; } }

/* ---------------------------------------------------------------- Tarjeta */

.bcs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 10px 10px 12px;
	background: #fff;
	border: 1px solid var(--bcs-line);
	border-radius: var(--bcs-radius);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
	animation: bcs-in .35s ease backwards;
}
.bcs-card:hover { transform: translateY(-3px); border-color: #e2e2e6; box-shadow: 0 12px 30px rgba(0, 0, 0, .08); }
.bcs-card.is-off { opacity: .45; }

.bcs-media { display: block; position: relative; }

.bcs-app img.bcs-img {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	aspect-ratio: 488 / 680;
	object-fit: cover;
	border-radius: 4.7% / 3.5% !important;
	background: var(--bcs-soft);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.bcs-card.is-out img.bcs-img { filter: grayscale(.6); opacity: .7; }

.bcs-info { display: flex; flex-direction: column; flex: 1; gap: 3px; padding: 12px 2px 0; text-align: center; }

.bcs-app .bcs-card a.bcs-title,
.bcs-app .bcs-card a.bcs-title:visited {
	color: var(--bcs-ink) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
}
.bcs-app .bcs-card a.bcs-title:hover { color: var(--bcs-accent) !important; }

.bcs-en { font-size: 13px; font-style: italic; line-height: 1.3; color: #8a8a90; }

.bcs-app .bcs-price,
.bcs-app .bcs-price * {
	margin-top: 4px;
	color: var(--bcs-ink) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	background: none !important;
}
.bcs-app .bcs-price * { margin-top: 0; }

.bcs-app p.bcs-stock { margin: 2px 0 0 !important; font-size: 13px !important; font-weight: 600 !important; }
.bcs-app p.bcs-stock.is-ok { color: var(--bcs-ok) !important; }
.bcs-app p.bcs-stock.is-ko { color: var(--bcs-ko) !important; }

/* Casilla de selección, sobre la imagen */
.bcs-app .bcs-check { position: absolute; top: 18px; left: 18px; z-index: 3; margin: 0 !important; cursor: pointer; }
.bcs-app .bcs-check input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; }
.bcs-check-ui {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	border: 1.5px solid rgba(0, 0, 0, .18);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
	transition: background-color .15s, border-color .15s, transform .15s;
}
.bcs-check-ui::after {
	content: "";
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
	opacity: 0;
}
.bcs-check input:checked + .bcs-check-ui { background: var(--bcs-ok); border-color: var(--bcs-ok); }
.bcs-check input:checked + .bcs-check-ui::after { opacity: 1; }
.bcs-check:hover .bcs-check-ui { transform: scale(1.06); }
.bcs-check input:focus-visible + .bcs-check-ui { outline: 2px solid var(--bcs-accent); outline-offset: 2px; }

/* Controles de compra */
.bcs-controls { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f2; }

.bcs-app select.bcs-variant {
	width: 100% !important;
	height: 34px !important;
	padding: 0 28px 0 10px !important;
	border: 1px solid #e4e4e8 !important;
	border-radius: 9px !important;
	background: #fafafb url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23888'><path d='M5.5 7.5l4.5 5 4.5-5z'/></svg>") no-repeat right 9px center / 11px !important;
	color: #444 !important;
	font-size: 12px !important;
	line-height: 32px !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	text-overflow: ellipsis;
	cursor: pointer;
}

.bcs-vlabel { font-size: 12px; line-height: 1.35; color: var(--bcs-muted); text-align: center; }

.bcs-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.bcs-stepper {
	display: inline-flex;
	align-items: center;
	height: 32px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e4e4e8;
	border-radius: 999px;
}
.bcs-app .bcs-stepper button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 30px !important;
	height: 30px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	cursor: pointer;
}
.bcs-app .bcs-stepper button[data-step="-1"] { color: var(--bcs-ko) !important; }
.bcs-app .bcs-stepper button[data-step="1"] { color: var(--bcs-ok) !important; }
.bcs-app .bcs-stepper button:hover { background: var(--bcs-soft) !important; }
.bcs-app .bcs-stepper button:disabled { opacity: .28; cursor: default; background: transparent !important; }

.bcs-app input.bcs-qty {
	width: 3ch !important;
	min-width: 0 !important;
	height: 30px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--bcs-ink) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield !important;
}
.bcs-app input.bcs-qty::-webkit-outer-spin-button,
.bcs-app input.bcs-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.bcs-req { font-size: 11.5px; white-space: nowrap; color: #9a9aa0; }

.bcs-badge {
	align-self: center;
	padding: 2px 9px;
	border-radius: 999px;
	background: #fff3ea;
	color: var(--bcs-accent);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------- Paginación */

.bcs-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0 6px; }
.bcs-app .bcs-pages button {
	min-width: 38px !important;
	height: 38px !important;
	padding: 0 12px !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--bcs-ink) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer;
}
.bcs-app .bcs-pages button:hover { background: var(--bcs-soft) !important; }
.bcs-app .bcs-pages button.is-active { background: var(--bcs-ink) !important; border-color: var(--bcs-ink) !important; color: #fff !important; }

/* ---------------------------------------------------------------- Sin stock / fuera de catálogo */

.bcs-none {
	padding: 44px 20px;
	text-align: center;
	color: var(--bcs-muted);
	border: 1px dashed #dcdce0;
	border-radius: var(--bcs-radius);
}

.bcs-missing { margin-top: 28px; padding: 20px 22px; background: #fafafb; border: 1px solid var(--bcs-line); border-radius: var(--bcs-radius); }
.bcs-app .bcs-missing h4 { margin: 0 0 4px !important; font-size: 15px !important; font-weight: 700 !important; color: var(--bcs-ink) !important; }
.bcs-missing p { margin: 0 0 14px !important; font-size: 13px; color: var(--bcs-muted); }
.bcs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bcs-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #fff;
	border: 1px solid #e5e5e9;
	border-radius: 999px;
	font-size: 13px;
	color: #333;
}
.bcs-chip b { font-weight: 600; color: var(--bcs-muted); }

/* ---------------------------------------------------------------- Carga */

.bcs-skel { padding: 10px; background: #fff; border: 1px solid var(--bcs-line); border-radius: var(--bcs-radius); }
.bcs-skel i {
	display: block;
	height: 11px;
	margin: 9px auto 0;
	border-radius: 6px;
	background: linear-gradient(90deg, #efeff2 25%, #f8f8fa 50%, #efeff2 75%);
	background-size: 200% 100%;
	animation: bcs-shimmer 1.2s infinite linear;
}
.bcs-skel i:nth-child(1) { height: auto; aspect-ratio: 488 / 680; margin: 0; border-radius: 4.7% / 3.5%; }
.bcs-skel i:nth-child(2) { width: 80%; margin-top: 14px; }
.bcs-skel i:nth-child(3) { width: 55%; }
.bcs-skel i:nth-child(4) { width: 65%; }

/* ---------------------------------------------------------------- Aviso flotante */

.bcs-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: calc(100vw - 32px);
	padding: 13px 18px;
	border-radius: 13px;
	background: #151515;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 16px);
	transition: opacity .22s ease, transform .22s ease;
}
.bcs-toast.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.bcs-toast a { color: #ffb27a !important; font-weight: 700; white-space: nowrap; text-decoration: none !important; }

/* ---------------------------------------------------------------- Móvil y tablet */

@media (max-width: 1024px) {
	.bcs-app textarea#bcs-decklist { min-height: 220px !important; }
}

@media (max-width: 767px) {
	.bcs-app { gap: 20px; }
	.bcs-panel { padding: 16px; }
	.bcs-toolbar { flex-direction: column; align-items: stretch; }
	.bcs-tabs { width: 100%; }
	.bcs-app .bcs-tab { flex: 1; justify-content: center; }
	.bcs-actions .bcs-btn { flex: 1; }
	.bcs-card { padding: 8px 8px 10px; }
	.bcs-app .bcs-check { top: 14px; left: 14px; }
	.bcs-app .bcs-card a.bcs-title { font-size: 14px !important; }
	.bcs-qty-row { flex-direction: column; gap: 4px; }
}

/* ---------------------------------------------------------------- Animaciones */

@keyframes bcs-spin { to { transform: rotate(360deg); } }
@keyframes bcs-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes bcs-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.bcs-card, .bcs-skel i, .bcs-toast { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   [cartas-sueltas] — buscador con sugerencias y catálogo completo
   ========================================================================== */

.bcs-searchbox { position: relative; }

.bcs-searchbox .bcs-search-ico {
	position: absolute;
	top: 50%;
	left: 14px;
	z-index: 1;
	width: 17px;
	height: 17px;
	color: #9a9aa0;
	transform: translateY(-50%);
	pointer-events: none;
}

.bcs-app input#bcs-q {
	display: block;
	width: 100% !important;
	height: 48px !important;
	padding: 0 42px !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 12px !important;
	background: #fafafb !important;
	color: var(--bcs-ink) !important;
	font-size: 15px !important;
	line-height: 48px !important;
	outline: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.bcs-app input#bcs-q::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.bcs-app input#bcs-q:focus {
	border-color: var(--bcs-accent) !important;
	background: #fff !important;
	box-shadow: 0 0 0 4px rgba(233, 100, 0, .12) !important;
}

.bcs-app .bcs-q-clear {
	position: absolute;
	top: 50%;
	right: 9px;
	z-index: 1;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 30px !important;
	height: 30px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #9a9aa0 !important;
	font-size: 20px !important;
	line-height: 1 !important;
	transform: translateY(-50%);
	cursor: pointer;
}
.bcs-app .bcs-q-clear:hover { background: var(--bcs-soft) !important; color: var(--bcs-ink) !important; }

.bcs-app ul.bcs-suggest {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	z-index: 60;
	max-height: 360px;
	margin: 0 !important;
	padding: 6px !important;
	overflow-y: auto;
	list-style: none !important;
	background: #fff;
	border: 1px solid var(--bcs-line);
	border-radius: 13px;
	box-shadow: 0 18px 44px rgba(0, 0, 0, .13);
	animation: bcs-in .15s ease backwards;
}
.bcs-app ul.bcs-suggest li {
	display: flex;
	flex-direction: column;
	gap: 1px;
	margin: 0 !important;
	padding: 9px 12px !important;
	list-style: none !important;
	border-radius: 9px;
	cursor: pointer;
}
.bcs-app ul.bcs-suggest li::before,
.bcs-app ul.bcs-suggest li::marker { content: none !important; }
.bcs-app ul.bcs-suggest li strong { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--bcs-ink); }
.bcs-app ul.bcs-suggest li small { font-size: 12px; font-style: italic; color: var(--bcs-muted); }
.bcs-app ul.bcs-suggest li mark { padding: 0; background: #ffe7d4; color: inherit; border-radius: 3px; }
.bcs-app ul.bcs-suggest li:hover,
.bcs-app ul.bcs-suggest li.is-active { background: var(--bcs-soft); }

.bcs-browse .bcs-keys { margin-top: 12px !important; line-height: 1.5; }

.bcs-query {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: -6px 0 18px;
	font-size: 14px;
	color: var(--bcs-muted);
}
.bcs-query strong { color: var(--bcs-ink); }
.bcs-app .bcs-query button {
	height: 26px !important;
	padding: 0 11px !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--bcs-muted) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	cursor: pointer;
}
.bcs-app .bcs-query button:hover { color: var(--bcs-ink) !important; border-color: #cfcfd4 !important; }

/* En el catálogo nada viene marcado: las no seleccionadas se ven normales y las elegidas se resaltan. */
.bcs-browse .bcs-card.is-off { opacity: 1; }
.bcs-browse .bcs-card.is-selected {
	border-color: var(--bcs-ok);
	box-shadow: 0 0 0 2px rgba(46, 125, 50, .16), 0 12px 30px rgba(0, 0, 0, .07);
}

.bcs-pages .bcs-ellipsis { display: inline-flex; align-items: center; padding: 0 4px; color: var(--bcs-muted); }
.bcs-app .bcs-pages button.bcs-nav { font-size: 16px !important; }
.bcs-app .bcs-pages button:disabled { opacity: .35; cursor: default; }

/* Indicador de carga visible también en los botones claros (Compartir). */
.bcs-app .bcs-btn-ghost.is-loading::after { border-color: rgba(0, 0, 0, .15); border-top-color: var(--bcs-ink); }

/* ==========================================================================
   Filtros desplegables ([cartas-sueltas])
   ========================================================================== */

.bcs-side { display: flex; flex-direction: column; gap: 16px; }
.bcs-browse .bcs-side { position: static; } /* Con filtros el panel crece: sin fijar, para no cortar las listas. */

.bcs-filter-panel { display: flex; flex-direction: column; gap: 10px; }
.bcs-filter-panel .bcs-panel-head { margin-bottom: 2px; }

.bcs-dd { position: relative; }

.bcs-app .bcs-dd-btn {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100% !important;
	min-height: 52px !important;
	padding: 8px 12px 8px 14px !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 12px !important;
	background: #fafafb !important;
	color: var(--bcs-ink) !important;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.bcs-app .bcs-dd-btn:hover { border-color: #d2d2d6 !important; background: #fff !important; }
.bcs-app .bcs-dd.is-open .bcs-dd-btn {
	border-color: var(--bcs-accent) !important;
	background: #fff !important;
	box-shadow: 0 0 0 4px rgba(233, 100, 0, .12) !important;
}
.bcs-app .bcs-dd.has-value .bcs-dd-btn { background: #fff !important; border-color: #cfd8cf !important; }

.bcs-dd-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bcs-dd-label { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--bcs-muted); }
.bcs-dd-value { overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; color: #9a9aa0; }
.bcs-dd.has-value .bcs-dd-value { color: var(--bcs-ink); }
.bcs-dd-chev { flex: none; width: 14px; height: 14px; color: #9a9aa0; transition: transform .2s; }
.bcs-dd.is-open .bcs-dd-chev { transform: rotate(180deg); }

.bcs-dd-pop {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	z-index: 70;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--bcs-line);
	border-radius: 13px;
	box-shadow: 0 18px 44px rgba(0, 0, 0, .14);
	animation: bcs-in .15s ease backwards;
}

.bcs-app input.bcs-dd-search {
	display: block;
	width: calc(100% - 16px) !important;
	height: 38px !important;
	margin: 8px !important;
	padding: 0 12px !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 9px !important;
	background: #fafafb !important;
	color: var(--bcs-ink) !important;
	font-size: 14px !important;
	outline: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}
.bcs-app input.bcs-dd-search:focus { border-color: var(--bcs-accent) !important; background: #fff !important; }

.bcs-app ul.bcs-dd-list {
	max-height: 290px;
	margin: 0 !important;
	padding: 6px !important;
	overflow-y: auto;
	list-style: none !important;
}
.bcs-app ul.bcs-dd-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 !important;
	padding: 9px 11px !important;
	list-style: none !important;
	border-radius: 9px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--bcs-ink);
	cursor: pointer;
}
.bcs-app ul.bcs-dd-list li::before,
.bcs-app ul.bcs-dd-list li::marker { content: none !important; }
.bcs-app ul.bcs-dd-list li:hover { background: var(--bcs-soft); }
.bcs-app ul.bcs-dd-list li.is-on { font-weight: 600; }
.bcs-app ul.bcs-dd-list li mark { padding: 0; background: #ffe7d4; color: inherit; border-radius: 3px; }
.bcs-app ul.bcs-dd-list li.bcs-dd-msg { justify-content: center; color: var(--bcs-muted); cursor: default; }
.bcs-app ul.bcs-dd-list li.bcs-dd-msg:hover { background: none; }

/* Selección simple: marca a la derecha. Selección múltiple: casilla a la izquierda. */
.bcs-dd[data-multi="0"] .bcs-dd-opt.is-on::after {
	content: "";
	flex: none;
	width: 5px;
	height: 10px;
	margin-left: 4px;
	border: solid var(--bcs-ok);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.bcs-dd-box {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1.5px solid #cfcfd4;
	border-radius: 5px;
	background: #fff;
	transition: background-color .15s, border-color .15s;
}
.bcs-dd-box::after {
	content: "";
	width: 4px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
	opacity: 0;
}
.bcs-dd-opt.is-on .bcs-dd-box { background: var(--bcs-ok); border-color: var(--bcs-ok); }
.bcs-dd-opt.is-on .bcs-dd-box::after { opacity: 1; }

.bcs-dd-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-top: 1px solid #f0f0f2; }
.bcs-app .bcs-dd-foot button {
	flex: 1;
	height: 36px !important;
	padding: 0 12px !important;
	border-radius: 9px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer;
}
.bcs-app .bcs-dd-reset { border: 1px solid #e3e3e6 !important; background: #fff !important; color: var(--bcs-muted) !important; }
.bcs-app .bcs-dd-reset:hover { color: var(--bcs-ink) !important; }
.bcs-app .bcs-dd-apply { border: 0 !important; background: var(--bcs-ink) !important; color: #fff !important; }
.bcs-app .bcs-dd-apply:hover { background: #000 !important; }

/* Etiquetas de filtros activos sobre las cartas */
.bcs-app .bcs-query .bcs-fchip {
	display: inline-flex !important;
	align-items: center;
	gap: 5px;
	height: 28px !important;
	border-color: #dfe6df !important;
	background: #f3f8f3 !important;
	color: #2f4f31 !important;
	font-weight: 500 !important;
}
.bcs-app .bcs-query .bcs-fchip strong { font-weight: 700; }
.bcs-app .bcs-query .bcs-fchip span { font-size: 15px; line-height: 1; opacity: .6; }
.bcs-app .bcs-query .bcs-fchip:hover span { opacity: 1; }

/* ==========================================================================
   Ordenar por (junto a las pestañas)
   ========================================================================== */

.bcs-toolbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bcs-sort { display: inline-flex; align-items: center; gap: 6px; }
.bcs-sort-label { font-size: 13px; white-space: nowrap; color: var(--bcs-muted); }

.bcs-app select.bcs-sort-select {
	width: auto !important;
	height: 38px !important;
	padding: 0 30px 0 12px !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 10px !important;
	background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23888'><path d='M5.5 7.5l4.5 5 4.5-5z'/></svg>") no-repeat right 10px center / 11px !important;
	color: var(--bcs-ink) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 36px !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	cursor: pointer;
}
.bcs-app select.bcs-sort-select:focus { border-color: var(--bcs-accent) !important; outline: none !important; }

.bcs-app .bcs-sort-dir {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 38px !important;
	height: 38px !important;
	padding: 0 !important;
	border: 1px solid #e3e3e6 !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--bcs-ink) !important;
	cursor: pointer;
}
.bcs-app .bcs-sort-dir:hover { background: var(--bcs-soft) !important; border-color: #d2d2d6 !important; }
.bcs-sort-dir svg { width: 17px; height: 17px; transition: transform .2s ease; }
.bcs-sort-dir[data-dir="desc"] svg { transform: rotate(180deg); }

@media (max-width: 767px) {
	.bcs-toolbar-left { flex-direction: column; align-items: stretch; }
	.bcs-sort { width: 100%; }
	.bcs-app select.bcs-sort-select { flex: 1; width: 100% !important; }
}

/* Número de cartas de cada opción: «Elfo (50)» */
.bcs-dd-name { flex: 1; min-width: 0; }
.bcs-dd-count { flex: none; font-size: 12px; font-weight: 500; color: #9a9aa0; font-variant-numeric: tabular-nums; }
.bcs-dd-opt.is-on .bcs-dd-count { color: var(--bcs-muted); }

/* Vista completa (ninguna pestaña marcada): las agotadas se ven a color normal. Siguen sin casilla y con «Artículos disponibles: 0». */
.bcs-browse.is-all .bcs-card.is-out img.bcs-img { filter: none; opacity: 1; }
