/* A1 Live Product Search */
:root {
	--a1ls-accent: #c4161c;
	--a1ls-bg: #111;
	--a1ls-surface: #1a1a1a;
	--a1ls-surface-2: #222;
	--a1ls-border: rgba(255, 255, 255, .1);
	--a1ls-text: #f2f2f2;
	--a1ls-muted: #9a9a9a;
	--a1ls-radius: 12px;
	--a1ls-ok: #3ccf6e;
	--a1ls-warn: #f0a63a;
}

/* ---------- Trigger (shortcode) ---------- */
.a1ls-trigger {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background-color .2s, color .2s;
	-webkit-tap-highlight-color: transparent;
}
.a1ls-trigger svg { display: block; width: var(--a1ls-icon, 22px); height: var(--a1ls-icon, 22px); }
.a1ls-trigger:hover { background: rgba(255, 255, 255, .08); color: var(--a1ls-accent); }
.a1ls-trigger:focus-visible { outline: 2px solid var(--a1ls-accent); outline-offset: 2px; }

/* ---------- Overlay ---------- */
html.a1ls-lock, html.a1ls-lock body { overflow: hidden !important; }

.a1ls, .a1ls * { box-sizing: border-box; }
.a1ls[hidden] { display: none !important; }
.a1ls {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 6vh 20px 20px;
	font-size: 15px;
	line-height: 1.45;
	color: var(--a1ls-text);
}
.a1ls__backdrop {
	position: absolute; inset: 0;
	background: rgba(0, 0, 0, .72);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity .25s ease;
}
.a1ls__panel {
	position: relative;
	width: 100%;
	max-width: 1040px;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	background: var(--a1ls-bg);
	border: 1px solid var(--a1ls-border);
	border-top: 3px solid var(--a1ls-accent);
	border-radius: var(--a1ls-radius);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
	overflow: hidden;
	opacity: 0;
	transform: translateY(-16px) scale(.985);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.a1ls.is-open .a1ls__backdrop { opacity: 1; }
.a1ls.is-open .a1ls__panel { opacity: 1; transform: none; }

/* Head / form */
.a1ls__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-bottom: 1px solid var(--a1ls-border);
	background: #0b0b0b;
}
.a1ls__form {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	min-width: 0;
	height: 56px;
	margin: 0;
	padding: 0 6px 0 16px;
	background: var(--a1ls-surface);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 10px;
	transition: border-color .2s, box-shadow .2s;
}
.a1ls__form:focus-within { border-color: var(--a1ls-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a1ls-accent) 25%, transparent); }
.a1ls__form-icon { color: var(--a1ls-muted); display: flex; flex: none; }
.a1ls__form:focus-within .a1ls__form-icon { color: var(--a1ls-accent); }
.a1ls .a1ls__input {
	flex: 1;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0 12px;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: #fff !important;
	font: inherit;
	font-size: 18px;
	-webkit-appearance: none;
	appearance: none;
}
.a1ls .a1ls__input::placeholder { color: #777; opacity: 1; }
.a1ls__input::-webkit-search-cancel-button,
.a1ls__input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.a1ls__clear {
	all: unset;
	display: flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; flex: none;
	border-radius: 8px; cursor: pointer; color: var(--a1ls-muted);
}
.a1ls__clear[hidden] { display: none; }
.a1ls__clear svg { width: 18px; height: 18px; }
.a1ls__clear:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.a1ls__spinner {
	width: 18px; height: 18px; flex: none; margin: 0 6px;
	border: 2px solid rgba(255, 255, 255, .15);
	border-top-color: var(--a1ls-accent);
	border-radius: 50%;
	opacity: 0;
	animation: a1ls-spin .7s linear infinite;
	transition: opacity .15s;
}
.a1ls.is-loading .a1ls__spinner { opacity: 1; }
@keyframes a1ls-spin { to { transform: rotate(360deg); } }

.a1ls__cat-wrap {
	position: relative;
	flex: none;
	height: 40px;
	margin-left: 6px;
	padding-left: 6px;
	border-left: 1px solid rgba(255, 255, 255, .12);
}
.a1ls__cat-wrap::after {
	content: "";
	position: absolute; right: 12px; top: 50%;
	width: 7px; height: 7px; margin-top: -5px;
	border-right: 2px solid var(--a1ls-muted); border-bottom: 2px solid var(--a1ls-muted);
	transform: rotate(45deg); pointer-events: none;
}
.a1ls .a1ls__cat {
	height: 40px;
	max-width: 190px;
	margin: 0;
	padding: 0 32px 0 12px;
	border: 0 !important;
	border-radius: 8px;
	background: transparent !important;
	color: #ddd !important;
	font: inherit; font-size: 14px;
	cursor: pointer;
	-webkit-appearance: none; appearance: none;
	box-shadow: none !important;
}
.a1ls__cat:hover { background: rgba(255, 255, 255, .05) !important; }
.a1ls__cat option { background: #1a1a1a; color: #fff; }

.a1ls__close {
	all: unset;
	display: flex; align-items: center; gap: 6px;
	flex: none; height: 56px; padding: 0 14px;
	border-radius: 10px; cursor: pointer; color: #ccc;
	transition: background .2s, color .2s;
}
.a1ls__close:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.a1ls__close:focus-visible { outline: 2px solid var(--a1ls-accent); }

/* Body */
.a1ls__body {
	flex: 1;
	min-height: 160px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 20px;
	scrollbar-width: thin;
	scrollbar-color: #333 transparent;
}
.a1ls__body::-webkit-scrollbar { width: 8px; }
.a1ls__body::-webkit-scrollbar-thumb { background: #333; border-radius: 8px; }

.a1ls__h {
	display: flex; align-items: center; justify-content: space-between;
	margin: 0 0 12px;
	font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--a1ls-muted);
}
.a1ls__h button { all: unset; cursor: pointer; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--a1ls-muted); }
.a1ls__h button:hover { color: var(--a1ls-accent); }
.a1ls__section + .a1ls__section { margin-top: 26px; }

/* Chips */
.a1ls__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.a1ls__chip {
	all: unset;
	display: inline-flex; align-items: center; gap: 7px;
	padding: 8px 14px;
	border: 1px solid var(--a1ls-border);
	border-radius: 999px;
	background: var(--a1ls-surface);
	color: #ddd; font-size: 14px; cursor: pointer;
	transition: border-color .2s, color .2s, background .2s;
	white-space: nowrap;
}
.a1ls__chip:hover, .a1ls__chip:focus-visible { border-color: var(--a1ls-accent); color: #fff; background: var(--a1ls-surface-2); }
.a1ls__chip svg { width: 14px; height: 14px; opacity: .6; }
.a1ls__chip small { color: var(--a1ls-muted); font-size: 12px; }

/* Category tiles */
.a1ls__tile {
	display: flex; align-items: center; gap: 10px;
	padding: 10px; min-height: 60px;
	border: 1px solid var(--a1ls-border);
	border-radius: 10px;
	background: var(--a1ls-surface);
	color: #eee !important; text-decoration: none !important;
	transition: border-color .2s, transform .2s;
}
.a1ls__tile:hover { border-color: var(--a1ls-accent); transform: translateY(-2px); }
.a1ls__tile img, .a1ls__tile-ph {
	width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; background: #2a2a2a;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; color: var(--a1ls-accent); font-size: 16px;
}
.a1ls__tile span { font-size: 14px; line-height: 1.25; }
.a1ls__tile small { display: block; color: var(--a1ls-muted); font-size: 12px; }

/* Results layout */
.a1ls__grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.a1ls__aside { position: sticky; top: 0; }
.a1ls__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.a1ls__item {
	position: relative;
	display: flex; align-items: center; gap: 14px;
	padding: 10px;
	border: 1px solid var(--a1ls-border);
	border-radius: 10px;
	background: var(--a1ls-surface);
	color: inherit !important; text-decoration: none !important;
	transition: border-color .15s, background .15s;
	animation: a1ls-in .25s ease both;
}
.a1ls__item:hover, .a1ls__item.is-active { border-color: var(--a1ls-accent); background: var(--a1ls-surface-2); }
.a1ls__item:focus-visible { outline: 2px solid var(--a1ls-accent); outline-offset: 1px; }
@keyframes a1ls-in { from { opacity: 0; transform: translateY(4px); } }

.a1ls__thumb {
	position: relative;
	width: 72px; height: 72px; flex: none;
	border-radius: 8px; overflow: hidden; background: #fff;
}
.a1ls__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.a1ls__sale {
	position: absolute; top: 4px; left: 4px;
	padding: 2px 6px; border-radius: 4px;
	background: var(--a1ls-accent); color: #fff;
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.a1ls__info { flex: 1; min-width: 0; }
.a1ls__cat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--a1ls-muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a1ls__title {
	font-size: 15px; font-weight: 600; color: #fff; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.a1ls mark { background: none; color: var(--a1ls-accent); padding: 0; font-weight: inherit; }
.a1ls__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 5px; font-size: 13px; }
.a1ls__price { font-weight: 700; color: #fff; }
.a1ls__price del { color: var(--a1ls-muted); font-weight: 400; margin-right: 4px; }
.a1ls__price ins { text-decoration: none; color: #fff; }
.a1ls__price .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.a1ls__stock { display: inline-flex; align-items: center; gap: 5px; color: var(--a1ls-ok); font-size: 12px; }
.a1ls__stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.a1ls__stock.is-out { color: #ff6b6b; }
.a1ls__stock.is-low { color: var(--a1ls-warn); }

.a1ls__add {
	all: unset;
	flex: none;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	width: 40px; height: 40px; padding: 0;
	border-radius: 8px;
	background: var(--a1ls-accent); color: #fff;
	font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
	cursor: pointer;
	transition: filter .2s, transform .1s;
}
.a1ls__add:hover { filter: brightness(1.15); }
.a1ls__add:active { transform: scale(.96); }
.a1ls__add:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.a1ls__add svg { width: 18px; height: 18px; }
.a1ls__add span { display: none; }
.a1ls__add.is-loading { pointer-events: none; opacity: .7; }
.a1ls__add.is-loading svg { animation: a1ls-spin .7s linear infinite; }
.a1ls__add.is-added { background: #1f8a46; }

/* Aside */
.a1ls__aside-box { padding: 16px; border: 1px solid var(--a1ls-border); border-radius: 10px; background: var(--a1ls-surface); }
.a1ls__aside-box + .a1ls__aside-box { margin-top: 12px; }
.a1ls__aside .a1ls__chips { flex-direction: column; align-items: stretch; }
.a1ls__aside .a1ls__chip { border-radius: 8px; }
.a1ls__aside .a1ls__chip span { flex: 1; text-align: left; }
.a1ls__btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; height: 46px; padding: 0 16px;
	border-radius: 8px;
	background: var(--a1ls-accent); color: #fff !important;
	font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px;
	text-decoration: none !important;
	transition: filter .2s;
}
.a1ls__btn:hover { filter: brightness(1.12); }
.a1ls__count { font-size: 13px; color: var(--a1ls-muted); margin: 10px 0 0; text-align: center; }

/* Empty / message states */
.a1ls__empty { text-align: center; padding: 30px 10px 10px; }
.a1ls__empty-icon {
	width: 64px; height: 64px; margin: 0 auto 14px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--a1ls-surface-2); color: var(--a1ls-accent);
}
.a1ls__empty-icon svg { width: 28px; height: 28px; }
.a1ls__empty h3 { margin: 0 0 6px; font-size: 20px; color: #fff; font-weight: 700; }
.a1ls__empty h3 span { color: var(--a1ls-accent); }
.a1ls__empty p { margin: 0 auto 20px; max-width: 420px; color: var(--a1ls-muted); }
.a1ls__empty .a1ls__chips { justify-content: center; }
.a1ls__hint { color: var(--a1ls-muted); padding: 10px 0; }

/* Skeleton */
.a1ls__skel { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--a1ls-border); border-radius: 10px; background: var(--a1ls-surface); }
.a1ls__skel i { display: block; border-radius: 6px; background: linear-gradient(90deg, #222 0, #2e2e2e 40%, #222 80%); background-size: 300% 100%; animation: a1ls-shimmer 1.2s infinite; }
.a1ls__skel i:first-child { width: 72px; height: 72px; flex: none; border-radius: 8px; }
.a1ls__skel div { flex: 1; display: grid; gap: 8px; }
.a1ls__skel div i:nth-child(1) { height: 10px; width: 30%; }
.a1ls__skel div i:nth-child(2) { height: 14px; width: 85%; }
.a1ls__skel div i:nth-child(3) { height: 12px; width: 45%; }
@keyframes a1ls-shimmer { to { background-position: -150% 0; } }

/* Footer */
.a1ls__foot {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 20px;
	border-top: 1px solid var(--a1ls-border);
	background: #0b0b0b;
	font-size: 12px; color: var(--a1ls-muted);
}
.a1ls__viewall { color: var(--a1ls-accent) !important; font-weight: 700; text-decoration: none !important; font-size: 13px; }
.a1ls__viewall:hover { text-decoration: underline !important; }
.a1ls__viewall[hidden] { display: none; }
.a1ls__foot { justify-content: flex-end; }
.a1ls__foot:has(.a1ls__viewall[hidden]) { display: none; }

.a1ls__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.a1ls__grid { grid-template-columns: 1fr; gap: 16px; }
	.a1ls__aside { position: static; order: -1; }
	.a1ls__aside .a1ls__aside-box { padding: 0; border: 0; background: none; }
	.a1ls__aside .a1ls__chips { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
	.a1ls__aside .a1ls__chips::-webkit-scrollbar { display: none; }
	.a1ls__aside .a1ls__chip { border-radius: 999px; }
	.a1ls__aside-cta { display: none; }
}

@media (max-width: 860px) {
	.a1ls__list { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
	.a1ls { padding: 0; }
	.a1ls__panel {
		max-width: none; max-height: none;
		height: 100%; height: 100dvh;
		border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
		transform: translateY(24px);
	}
	.a1ls__head { padding: 10px; gap: 6px; padding-top: max(10px, env(safe-area-inset-top)); }
	.a1ls__form { height: 50px; padding-left: 12px; padding-right: 4px; }
	.a1ls .a1ls__input { font-size: 16px; padding: 0 8px; } /* 16px stops iOS zoom */
	.a1ls__close { height: 50px; width: 44px; padding: 0; justify-content: center; }
	.a1ls__close kbd { display: none; }
	.a1ls__cat-wrap { height: 36px; margin-left: 2px; }
	.a1ls .a1ls__cat { height: 36px; max-width: 110px; font-size: 13px; padding: 0 26px 0 8px; }
	.a1ls__cat-wrap::after { right: 9px; }
	.a1ls__body { padding: 14px 12px; }
	.a1ls__foot { padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); justify-content: center; }
	.a1ls__viewall {
		display: flex; align-items: center; justify-content: center;
		width: 100%; height: 46px; border-radius: 8px;
		background: var(--a1ls-accent); color: #fff !important; text-transform: uppercase; letter-spacing: .04em;
	}
	.a1ls__thumb { width: 60px; height: 60px; }
	.a1ls__skel i:first-child { width: 60px; height: 60px; }
	.a1ls__item { gap: 12px; padding: 8px; }
	.a1ls__title { font-size: 14px; }
}

@media (max-width: 380px) {
	.a1ls__cat-wrap { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.a1ls *, .a1ls__panel, .a1ls__backdrop { animation: none !important; transition: none !important; }
}
button.a1ls-trigger {
    padding: 0;
    border: none;
    color: #fff;
	background:transparent!important;
}