/* Smart Search: header dropdown, mobile overlay, results-page facets */
.as-search-form { position: relative; }
.as-search-form .as-ac-close { display: none; }

.as-ac {
	position: absolute; left: 0; right: 0; top: calc(100% - 1rem + 2px); z-index: 1060;
	min-width: 320px; max-height: 70vh; overflow-y: auto;
	background: #fff; color: #212529; border: 1px solid #dee2e6; border-radius: .5rem;
	box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .15); padding: .25rem 0; text-align: start;
}
.as-ac[hidden] { display: none; }
.as-ac-head { padding: .5rem .75rem .25rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; }
.as-ac-item { display: flex; align-items: center; gap: .6rem; padding: .4rem .75rem; color: inherit; text-decoration: none; line-height: 1.25; }
.as-ac-item:hover, .as-ac-item.active { background: #f1f3f5; color: inherit; }
.as-ac-item.active { outline: 2px solid #0d6efd; outline-offset: -2px; }
.as-ac-product img { width: 48px; height: 48px; object-fit: contain; flex: 0 0 48px; background: #fff; border-radius: .25rem; }
.as-ac-text { display: flex; flex-direction: column; min-width: 0; }
.as-ac-name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .9rem; }
.as-ac-price { font-size: .85rem; font-weight: 600; margin-top: .15rem; }
.as-ac-new { color: #dc3545; }
.as-ac-old { color: #6c757d; font-weight: 400; }
.as-ac-oos { display: inline-block; font-size: .7rem; font-weight: 600; color: #842029; background: #f8d7da; border-radius: .25rem; padding: 0 .35rem; margin-inline-start: .25rem; }
.as-ac-link i { color: #6c757d; width: 1rem; text-align: center; }
.as-ac-all { justify-content: center; font-weight: 600; color: #0d6efd; border-top: 1px solid #e9ecef; margin-top: .25rem; padding: .6rem .75rem; }
.as-ac-dym, .as-ac-status { padding: .6rem .75rem; font-size: .9rem; color: #495057; }
.as-ac mark { padding: 0; background: #fff3a6; color: inherit; font-weight: 600; }
.as-spinner { display: inline-block; width: 1rem; height: 1rem; margin-inline-end: .5rem; vertical-align: -.15rem; border: 2px solid #ced4da; border-top-color: #495057; border-radius: 50%; animation: as-spin .7s linear infinite; }
.as-loading #search button i { opacity: .5; }
@keyframes as-spin { to { transform: rotate(360deg); } }

/* Mobile: full-screen overlay while searching */
@media (max-width: 767.98px) {
	.as-search-form.as-overlay { position: fixed; inset: 0; z-index: 1080; background: #fff; padding: .75rem 3.25rem .75rem .75rem; overflow: hidden; display: flex; flex-direction: column; }
	.as-search-form.as-overlay #search { margin-bottom: .5rem !important; flex: 0 0 auto; }
	.as-search-form.as-overlay .as-ac-close { display: block; position: absolute; top: .75rem; right: .5rem; width: 2.5rem; height: 3rem; font-size: 1.5rem; line-height: 1; padding: 0; }
	.as-search-form.as-overlay .as-ac { position: static; min-width: 0; max-height: none; flex: 1 1 auto; border: 0; box-shadow: none; border-radius: 0; margin: 0 -3.25rem 0 -.75rem; }
	.as-search-form.as-overlay .as-ac[hidden] { display: none; }
	html.as-noscroll, html.as-noscroll body { overflow: hidden; }
	.as-ac { min-width: 0; }
}

/* Results page facets */
.as-facets > summary { list-style: none; margin-bottom: .5rem; }
.as-facets > summary::-webkit-details-marker { display: none; }
.as-facet { border-bottom: 1px solid #e9ecef; padding: .6rem 0; }
.as-facet:last-child { border-bottom: 0; }
.as-facet-title { font-weight: 600; margin-bottom: .35rem; }
.as-opt { display: flex; align-items: center; gap: .45rem; padding: .15rem 0; color: inherit; text-decoration: none; font-size: .925rem; }
.as-opt:hover { text-decoration: underline; }
.as-opt .as-count { color: #6c757d; font-size: .8rem; margin-inline-start: auto; }
.as-check { flex: 0 0 1rem; width: 1rem; height: 1rem; border: 1px solid #adb5bd; border-radius: .2rem; background: #fff; }
.as-opt.active .as-check { background: #0d6efd; border-color: #0d6efd; box-shadow: inset 0 0 0 2px #fff; }
.as-opt.active { font-weight: 600; }
.as-more > summary { cursor: pointer; color: #0d6efd; font-size: .875rem; padding: .15rem 0; }
.as-chip { margin: 0 .25rem .35rem 0; text-decoration: none; font-weight: 500; }
.as-whatsapp { background: #25d366; border-color: #25d366; }
.as-whatsapp:hover { background: #1ebe5b; border-color: #1ebe5b; }
@media (min-width: 992px) {
	.as-facets > summary { display: none; }
}
