/* elasticsearch.js opens the search window only when this stylesheet is in (panelStyled()). */
:root { --rsel-css-base: 1; }

/* AbcElasticSearch — narrow centered input; wide results panel below */

/* Theme + header layout: keep search visible (block-top is often height:76px + overflow hidden) */
#header .main-top .block-top,
#header .block-top {
  overflow: visible !important;
  height: auto !important;
  min-height: 76px;
}

/* Top hook: theme green bar — keep native layout (icon | input | button), no flex wrap */
#search_block_top.rsel-search-widget--theme-top {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  overflow: visible !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
  /* .rsel-search-widget { padding:0 } overrides theme pv-5/ph-5 — restore green border */
  padding: 5px !important;
  z-index: 100050;
}

#search_block_top.rsel-search-widget--theme-top.rsel-ac-open {
  z-index: 100060;
}

#header:has(#search_block_top.rsel-search-widget--theme-top.rsel-ac-open),
#header .main-top:has(#search_block_top.rsel-search-widget--theme-top.rsel-ac-open) {
  overflow: visible !important;
}

/* Theme top bar: white skew caps (::before/::after) + white input field — do not use transparent */
#search_block_top.rsel-search-widget--theme-top .search-input {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
  margin-left: 13px;
  margin-right: 13px;
}

#search_block_top.rsel-search-widget--theme-top .search-input::before,
#search_block_top.rsel-search-widget--theme-top .search-input::after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 25px;
  background-color: #fff;
  transform: skewX(20deg);
  z-index: 0;
  pointer-events: none;
}

#search_block_top.rsel-search-widget--theme-top .search-input::before {
  left: -10px;
  border-radius: 5px 2.5px;
}

#search_block_top.rsel-search-widget--theme-top .search-input::after {
  right: -10px;
  border-radius: 2.5px 5px;
}

#search_block_top.rsel-search-widget--theme-top .search-input input,
#search_block_top.rsel-search-widget--theme-top #autocomplete_1 {
  position: relative;
  z-index: 1;
  width: 100%;
  border: none;
  box-sizing: border-box;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  line-height: 1.25;
  height: auto;
  color: #2e2e2e !important;
  background: #fff !important;
}

#search_block_top.rsel-search-widget--theme-top .search-btn {
  flex: 0 0 auto;
  align-self: center;
}

#search_block_top.rsel-search-widget--theme-top .search-input input::placeholder {
  color: #808080;
  opacity: 1;
}

#search_block_top.rsel-search-widget--theme-top #autocomplete_1 {
  anchor-name: --rsel-ac-search;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete {
  right: auto !important;
  width: min(1140px, 85vw) !important;
  max-width: min(1140px, calc(100vw - 48px)) !important;
  min-width: min(320px, calc(100vw - 32px));
  margin: 0 !important;
  z-index: 100052 !important;
  max-height: var(--rsel-ac-max-height, calc(100dvh - 88px));
  overflow: visible !important;
  --rsel-ac-brand: #1d9001;
  --rsel-ac-caret-left: 50%;
}

#search_block_top.rsel-search-widget--theme-top:not(.rsel-ac-open) > .ae_megaautocomplete {
  position: absolute !important;
  top: calc(100% + 16px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

#search_block_top.rsel-search-widget--theme-top.rsel-ac-open > .ae_megaautocomplete {
  position: fixed !important;
  position-anchor: --rsel-ac-search;
  top: calc(anchor(bottom) + 16px) !important;
  left: calc(50vw - min(570px, 42.5vw)) !important;
  transform: none !important;
}

@supports not (anchor-name: --rsel-ac-search) {
  #search_block_top.rsel-search-widget--theme-top.rsel-ac-open > .ae_megaautocomplete {
    position: absolute !important;
    top: calc(100% + 16px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin {
  display: none !important;
  flex-direction: column;
  min-height: 0;
  max-height: var(--rsel-ac-max-height, calc(100dvh - 88px));
}

#search_block_top.rsel-search-widget--theme-top.rsel-ac-open > .ae_megaautocomplete.luigi-skin {
  display: flex !important;
  flex-direction: column;
  min-height: min(630px, var(--rsel-ac-max-height, 82vh));
  border-top: none !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14) !important;
  margin-top: 2px;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-connector {
  display: block;
  flex: 0 0 auto;
  position: relative;
  width: 100%;
  height: 8px;
  margin-top: 2px;
  background: var(--rsel-ac-brand, #1d9001);
  z-index: 2;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-connector-arrow {
  position: absolute;
  left: var(--rsel-ac-caret-left, 50%);
  top: -12px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 12px solid var(--rsel-ac-brand, #1d9001);
  pointer-events: none;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-layout {
  border-top: 1px solid #e4e4e4;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-layout {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  height: 100%;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-layout {
  display: flex !important;
  align-items: stretch !important;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-sidebar {
  align-self: stretch !important;
  height: auto !important;
  min-height: 0 !important;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block.ae_c,
#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block.ae_m {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .ae_categories,
#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .ae_links {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .ae_products {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  align-items: start;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-main {
  min-height: 0;
  overflow: visible;
}

#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .rsel-ac-products,
#search_block_top.rsel-search-widget--theme-top > .ae_megaautocomplete.luigi-skin .ae_p {
  overflow: visible;
}

#header .block-top .rsel-search-widget .ac-form.ssa-searchblock-top {
  display: block !important;
  visibility: visible !important;
  clear: both;
  float: none;
  width: 440px;
  max-width: calc(100vw - 32px);
  margin: 10px auto 6px;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) {
  position: relative;
  z-index: 100050;
  display: block;
  width: auto;
  max-width: none;
  margin: 10px auto 0;
  padding: 0;
  float: none;
  clear: both;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) *,
.rsel-search-widget:not(.rsel-search-widget--theme-top) *::before,
.rsel-search-widget:not(.rsel-search-widget--theme-top) *::after {
  box-sizing: border-box;
}

/* —— Grey search bar (fixed width) —— */
#header .rsel-search-widget .ac-form,
.rsel-search-widget .ac-form {
  float: none;
  display: block;
  width: 440px;
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  padding: 0 0 0 12px !important;
  color: #bfc1c1;
  background-color: #5c6060 !important;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.rsel-search-widget .ac-form .search-icon {
  display: none;
  font-family: "FontAwesome" !important;
  font-size: 32px;
  line-height: 1;
  color: #bfc1c1;
  text-align: center;
  cursor: pointer;
}

.rsel-search-widget .ac-form .search-icon::before {
  content: "\f002";
}

.rsel-search-widget .ac-form .search-input-content {
  display: block;
  overflow: hidden;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ssa-search-query-input,
.rsel-search-widget:not(.rsel-search-widget--theme-top) .ac-form .ssa-search-query-input {
  float: left;
  width: calc(100% - 50px);
  height: 45px;
  line-height: 45px;
  padding: 6px;
  margin: 0;
  border: 0;
  font-size: 15px;
  color: #fff !important;
  background: none !important;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ssa-search-query-input::placeholder {
  color: #bfc1c1;
  opacity: 1;
}

.rsel-search-widget .ac-form .ae_icon {
  float: right;
  width: 50px;
  height: 45px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: none !important;
  cursor: pointer;
  line-height: 29px;
  text-align: center;
}

.rsel-search-widget .ac-form .ae_close_icon {
  display: none;
}

.rsel-search-widget .ac-form .ae_icon .fa::before {
  font-size: 25px;
  color: #bcbcbc !important;
}

/* —— Mega panel: wide, centered under the input bar —— */
.rsel-search-widget .ae_megaautocomplete {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 50% !important;
  right: auto !important;
  width: 90vw !important;
  max-width: min(1400px, calc(100vw - 32px)) !important;
  min-width: min(440px, calc(100vw - 32px));
  margin: 0 !important;
  transform: translateX(-50%) !important;
  padding: 8px 10px;
  max-height: var(--rsel-ac-max-height, min(75vh, calc(100dvh - 96px)));
  background-color: #292929 !important;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.55);
  z-index: 100051;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.35;
  color: #fff;
}

#header .rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_megaautocomplete,
#header .block-top .rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_megaautocomplete {
  top: calc(100% + 4px) !important;
  left: 50% !important;
  right: auto !important;
  width: 90vw !important;
  max-width: min(1400px, calc(100vw - 32px)) !important;
  transform: translateX(-50%) !important;
}

/* Legacy elasticsearch / theme rules — scoped off inside our widget */
.rsel-search-widget .ae_megaautocomplete a {
  height: auto !important;
  overflow: visible !important;
  font-weight: 400;
}

.rsel-search-widget .ae_manufacturer {
  flex: 0 0 auto;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  color: #cb0d05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* —— Categories: legacy dark layout only (not theme-top luigi panel) —— */
.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_c {
  flex: 0 0 auto;
  margin: 0 0 6px;
  padding: 0 0 6px;
  border-bottom: 1px solid #3a3a3a;
  background: transparent;
  float: none;
  width: auto;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0;
  padding: 0 0 10px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #555 #292929;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category {
  float: none;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background-color: #171717;
  border-radius: 4px;
  flex: 0 0 auto;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  height: auto;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category a:hover {
  color: #cb0d05;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category span,
.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category .rsel-ac-side-label {
  display: inline;
  height: auto;
  line-height: inherit;
  font-size: inherit;
}

.rsel-search-widget .ae_autocomplete_category a.rsel-ac-mfr-link--stacked {
  align-items: flex-start;
  white-space: normal;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category .material-icons,
.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category .rsel-ac-side-icon {
  font-size: 14px;
  line-height: 1;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_autocomplete_category div {
  float: none;
  margin: 0;
}

.rsel-search-widget .rsel-ac-hints[hidden],
.ae_megaautocomplete .rsel-ac-hints[hidden] {
  display: none !important;
}

.rsel-search-widget .rsel-ac-hints,
.ae_megaautocomplete .rsel-ac-hints {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 10px 6px;
  min-width: 0;
}

.rsel-search-widget .rsel-ac-hints-label,
.ae_megaautocomplete .rsel-ac-hints-label {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: #9a9a9a;
}

.rsel-search-widget .ae_hints,
.ae_megaautocomplete .ae_hints {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
  padding: 0 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #555 #292929;
}

.rsel-search-widget .rsel-ac-hint,
.ae_megaautocomplete .rsel-ac-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 9px;
  border: 0;
  border-radius: 4px;
  background: #171717;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.rsel-search-widget .rsel-ac-hint:hover,
.ae_megaautocomplete .rsel-ac-hint:hover {
  color: #cb0d05;
}

/* —— Manufacturers + products: fit viewport, scroll inside columns —— */

.rsel-search-widget:not(.rsel-search-widget--theme-top) .rsel-ac-mfr,
.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_m {
  display: flex;
  flex-direction: column;
  flex: 0 0 16%;
  width: 16%;
  max-width: 16%;
  min-height: 0;
  margin: 0;
  padding: 0 8px 0 0;
  background: transparent;
  float: none;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_links {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #555 #292929;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_links a,
.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_megaautocomplete .ae_links a {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 26px;
  color: #fff;
  text-decoration: none;
  height: auto;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_links a:hover {
  color: #cb0d05;
}

/* —— Products grid: scroll inside panel when many results —— */
.rsel-search-widget .rsel-ac-products,
.rsel-search-widget .ae_p {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  float: none;
}

.rsel-search-widget .ae_products {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #555 #292929;
}

.rsel-search-widget .ae_product_autocomplete {
  position: relative;
  float: none;
  flex: 0 0 calc(33.333% - 4px);
  width: calc(33.333% - 4px) !important;
  max-width: calc(33.333% - 4px);
  height: auto !important;
  min-height: 86px;
  margin: 0 !important;
  padding: 5px 6px !important;
  background-color: #171717 !important;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.rsel-search-widget .ae_product_autocomplete > a {
  display: block;
  height: auto;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
}

.rsel-search-widget .ae_product_autocomplete > a:hover {
  color: #cb0d05;
}

.rsel-search-widget .product_img {
  float: left;
  width: 28%;
  max-width: 72px;
}

.rsel-search-widget .product_img img {
  display: block;
  width: 100%;
  max-width: 86px;
  height: auto;
  background: #fff;
  border-radius: 3px;
}

.rsel-search-widget .product_name {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-left: 30%;
  min-height: 72px;
  height: auto;
  line-height: 1.35;
  padding-right: 4px;
  overflow: hidden;
}

.rsel-search-widget .product_title,
.rsel-search-widget .product_name > div:first-child {
  flex: 0 1 auto;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.rsel-search-widget .product_desc {
  margin: 0;
  padding: 0;
  color: #bbb;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsel-search-widget .product_price {
  flex: 0 0 auto;
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.rsel-search-widget .product_price.is-loading {
  opacity: 0.55;
}

.rsel-search-widget .rsel-ac-text-flyout {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 100%;
  margin-bottom: 4px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #f2f2f2;
  background: #1a1a1a;
  border: 1px solid #cb0d05;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 30;
  word-break: break-word;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.rsel-search-widget .rsel-ac-flyout-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}

.rsel-search-widget .rsel-ac-flyout-foot:empty {
  display: none;
}

.rsel-search-widget .rsel-ac-flyout-foot .product_price_old {
  font-size: 11px;
  font-weight: 400;
  text-decoration: line-through;
  opacity: 0.7;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-text-flyout {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: none;
  margin: 0;
  padding: 6px 8px;
  font-size: 12px;
  color: #444;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #cfe6c6;
  border-radius: 5px;
  box-shadow: none;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-flyout-foot {
  padding-top: 4px;
  border-top: 1px solid #e6efe3;
  color: #2e2e2e;
}

/* —— Loading: dim existing results while re-searching —— */
.rsel-search-widget .ae_products.rsel-products-pending {
  position: relative;
  pointer-events: none;
}

.rsel-search-widget .ae_products.rsel-products-pending > .ae_product_autocomplete {
  opacity: 0.38;
  filter: grayscale(0.15);
  transition: opacity 0.12s ease, filter 0.12s ease;
}

.rsel-search-widget .ae_products.rsel-products-pending::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  pointer-events: none;
}

.ae_megaautocomplete.luigi-skin .ae_products.rsel-products-pending > .ae_product_autocomplete {
  opacity: 0.5;
  filter: none;
}

.ae_megaautocomplete.luigi-skin .ae_products.rsel-products-pending::after {
  background: rgba(255, 255, 255, 0.65);
}

/* —— Skeleton —— */
.rsel-search-widget .ae_product_skeleton {
  pointer-events: none;
}

.rsel-search-widget:not(.rsel-search-widget--theme-top) .ae_skeleton_block,
.rsel-search-widget .ae_megaautocomplete:not(.luigi-skin) .ae_skeleton_block {
  background: linear-gradient(90deg, #222 0%, #333 50%, #222 100%);
  background-size: 200% 100%;
  animation: rsel-skeleton 1s ease-in-out infinite;
  border-radius: 3px;
}

/* Light panel: grey shimmer placeholders (not black bars) */
.ae_megaautocomplete.luigi-skin .ae_product_autocomplete.ae_product_skeleton {
  background: #ffffff !important;
  border: 1px solid #ebebeb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-height: 68px;
}

.ae_megaautocomplete.luigi-skin .ae_product_skeleton .rsel-ac-skeleton-inner {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.ae_megaautocomplete.luigi-skin .ae_skeleton_block {
  background: linear-gradient(90deg, #f0f0f0 0%, #e4e4e4 45%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: rsel-skeleton 1s ease-in-out infinite;
  border-radius: 4px;
}

.ae_megaautocomplete.luigi-skin .ae_product_skeleton .product_media.ae_skeleton_block {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  max-width: 52px;
}

.ae_megaautocomplete.luigi-skin .ae_product_skeleton .product_name {
  flex: 1 1 auto;
  margin-left: 0;
  min-height: 52px;
  padding-right: 0;
}

.rsel-search-widget .ae_skeleton_line {
  height: 10px;
  margin-bottom: 6px;
}

.rsel-search-widget .ae_skeleton_line.short {
  width: 55%;
}

.rsel-search-widget .product_img.ae_skeleton_block {
  width: 86px;
  height: 70px;
}

@keyframes rsel-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* —— Legacy grid reset —— */

.rsel-search-widget .ae_megaautocomplete #links,
.rsel-search-widget .ae_megaautocomplete #products {
  padding-top: 0;
}

.rsel-search-widget .rsel-ac-footer {
  flex: 0 0 auto;
  margin: 6px 0 0;
  padding: 8px 0 2px;
  border-top: 1px solid #3a3a3a;
  text-align: center;
}

.rsel-search-widget .rsel-ac-show-all-btn {
  display: inline-block;
  min-width: 220px;
  padding: 10px 20px;
  border: 1px solid #cb0d05;
  border-radius: 5px;
  background: #cb0d05;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.rsel-search-widget .rsel-ac-show-all-btn:hover {
  background: #e01008;
  border-color: #e01008;
  color: #fff !important;
}

#header .main-top .block-top,
#header .block-top {
  overflow: visible !important;
  height: auto !important;
  min-height: 76px;
}

#header .block-top .rsel-search-widget:not(.rsel-search-widget--theme-top) {
  display: block !important;
  visibility: visible !important;
  overflow: visible;
  float: none;
  clear: both;
  width: auto;
  margin: 10px auto 4px;
  margin-left: auto;
  margin-right: auto;
}

#header .block-top:has(.rsel-search-widget) {
  min-height: 118px;
}

/* —— Responsive grid: 3 cols → 12 products, 2 cols → 10, 1 col → 10 —— */
@media (max-width: 1100px) {
  .rsel-search-widget .ae_product_autocomplete {
    flex: 0 0 calc(50% - 3px);
    width: calc(50% - 3px) !important;
    max-width: calc(50% - 3px);
  }
}

@media (max-width: 768px) {

  .rsel-search-widget .rsel-ac-mfr,
  .rsel-search-widget .ae_m {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    padding: 0 0 8px;
  }

  .rsel-search-widget .ae_links {
    max-height: 7rem;
  }

  .rsel-search-widget .rsel-ac-products,
  .rsel-search-widget .ae_p {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
  }
}

@media (max-width: 599px) {
  .rsel-search-widget .ae_product_autocomplete {
    flex: 0 0 100%;
    width: 100% !important;
    max-width: 100%;
  }
}

body.rsel-search-overlay-open {
  overflow: hidden;
}

/* Desktop / tablet wide: always show the text field (not icon-only). */
@media (min-width: 992px) {
  .rsel-search-widget .ac-form .search-input-content {
    display: block !important;
  }

  .rsel-search-widget .ac-form .search-icon {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .rsel-search-widget:not(.rsel-search-widget--theme-top):not(.rsel-search-widget--header-nav):not(.rsel-search-active),
  #header .block-top .rsel-search-widget:not(.rsel-search-widget--theme-top):not(.rsel-search-widget--header-nav):not(.rsel-search-active) {
    width: auto;
    max-width: none;
    float: right;
    clear: none;
    margin: 13px 15px 0 0;
  }

  .rsel-search-widget:not(.rsel-search-widget--theme-top):not(.rsel-search-widget--header-nav):not(.rsel-search-active) .ac-form {
    width: 45px;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    background: none !important;
    cursor: pointer;
  }

  .rsel-search-widget:not(.rsel-search-widget--theme-top):not(.rsel-search-widget--header-nav):not(.rsel-search-active) .ac-form .search-icon {
    display: block;
  }

  .rsel-search-widget:not(.rsel-search-widget--theme-top):not(.rsel-search-widget--header-nav):not(.rsel-search-active) .ac-form .search-input-content {
    display: none;
  }

  .rsel-search-widget:not(.rsel-search-widget--theme-top):not(.rsel-search-widget--header-nav):not(.rsel-search-active) .ac-form .ae_close_icon {
    display: none;
  }

  .rsel-search-widget.rsel-search-active {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0));
    float: none;
    clear: both;
    background: rgba(0, 0, 0, 0.94);
    overflow: hidden;
    box-sizing: border-box;
  }

  .rsel-search-widget.rsel-search-active .ac-form {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none !important;
    margin: 0;
    padding: 8px 12px !important;
    background-color: #5c6060 !important;
    cursor: default;
  }

  .rsel-search-widget.rsel-search-active .ac-form .search-icon {
    display: none;
  }

  .rsel-search-widget.rsel-search-active .ac-form .search-input-content {
    display: block !important;
    position: static;
    width: 100%;
    padding: 0;
    background: transparent !important;
  }

  .rsel-search-widget.rsel-search-active .ac-form .ssa-search-query-input {
    width: calc(100% - 50px);
  }

  .rsel-search-widget.rsel-search-active .ac-form .ae_close_icon {
    display: block;
  }

  .rsel-search-widget.rsel-search-active .ae_megaautocomplete,
  #header .rsel-search-widget.rsel-search-active .ae_megaautocomplete,
  #header .block-top .rsel-search-widget.rsel-search-active .ae_megaautocomplete {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: none !important;
    flex: 1 1 auto;
    min-height: 0;
    margin: 8px 0 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .rsel-search-widget.rsel-search-active .ae_products {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rsel-search-widget.rsel-search-active .rsel-ac-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 10px 0 calc(6px + env(safe-area-inset-bottom, 0));
  }
}

.block-top.search-minimalize {
  height: 110px;
}

.block-top.search-minimalize .rsel-search-widget .ac-form .search-input-content {
  position: absolute;
  display: block;
  width: 94%;
  left: 3%;
  top: 64px;
  padding: 0;
  background-color: #5c6060 !important;
}

.block-top.search-minimalize .rsel-search-widget .ac-form .ssa-search-query-input {
  width: 80%;
  height: 36px;
  line-height: 36px;
}

.block-top.search-minimalize .rsel-search-widget .ac-form .ae_search_icon,
.block-top.search-minimalize .rsel-search-widget .ac-form .ae_close_icon {
  width: 36px;
  height: 36px;
}

.block-top.search-minimalize .rsel-search-widget .ac-form .fa-search::before,
.block-top.search-minimalize .rsel-search-widget .ac-form .fa-close::before {
  font-size: 21px;
  color: #bcbcbc !important;
}

/* luigi-skin grey bar — not in header pill (mobile uses theme white bar + overlay) */
.rsel-search-widget--centered.luigi-skin:not(.rsel-search-widget--header-nav) .ac-form {
  background-color: #5c6060 !important;
  border: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  color: #bfc1c1 !important;
}

.rsel-search-widget--centered.luigi-skin:not(.rsel-search-widget--header-nav) .ssa-search-query-input {
  color: #fff !important;
  background: none !important;
}

.rsel-search-widget--centered.luigi-skin:not(.rsel-search-widget--header-nav) .ssa-search-query-input::placeholder {
  color: #bfc1c1 !important;
  opacity: 1;
}

.rsel-search-widget--centered.luigi-skin:not(.rsel-search-widget--header-nav) .ac-form .ae_icon .fa::before {
  color: #bcbcbc !important;
}

.rsel-search-widget .rsel-ac-error {
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid #e57373;
  border-radius: 6px;
  background: #ffebee;
  color: #b71c1c;
  font-size: 13px;
  line-height: 1.4;
}

.rsel-search-widget--header-nav {
  width: 100%;
  max-width: none;
  margin: 0;
}

.rsel-search-widget--header-nav .ac-form {
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.rsel-search-widget--header-nav .ssa-search-query-input {
  width: 100% !important;
  height: auto !important;
  line-height: 1.4 !important;
  color: #333 !important;
  font-size: 12px !important;
}

.rsel-search-widget--header-nav .ac-form .ae_icon {
  display: none;
}

.rsel-search-widget-host {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.ae_megaautocomplete.luigi-skin {
  background: #ffffff !important;
  border: 1px solid #e4e4e4 !important;
  color: #2e2e2e !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16) !important;
  padding: 0 !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-hints {
  padding: 8px 14px 12px;
  background: #fff;
  border-top: 1px solid #eee;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-hints-label {
  color: #666;
  font-size: 12px;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: 0;
}

.ae_megaautocomplete.luigi-skin .ae_hints {
  scrollbar-color: #90bf80 #eef5ec;
  padding-bottom: 10px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-hint {
  background: #f4f4f4;
  color: #2e2e2e;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-hint:hover {
  color: #1d9001;
  border-color: #c8e6c0;
  background: #f4fff0;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-connector {
  display: none;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-layout {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 280px;
  height: 100%;
  max-height: inherit;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-sidebar {
  flex: 0 0 28%;
  min-width: 220px;
  max-width: 300px;
  align-self: stretch;
  min-height: 0;
  height: auto;
  padding: 0;
  border-right: 1px solid #e4e4e4;
  background: linear-gradient(180deg, #fafdfa 0%, #f6f6f6 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block {
  box-sizing: border-box;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100% !important;
  max-width: none !important;
  overflow: hidden;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block.ae_c {
  padding: 12px 10px 6px 14px;
  border-bottom: 1px solid #e0e8de;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block.ae_m {
  padding: 10px 10px 12px 14px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block .ae_manufacturer {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-heading,
.ae_megaautocomplete.luigi-skin .ae_manufacturer,
.ae_megaautocomplete.luigi-skin .rsel-ac-products-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px !important;
  padding: 0 0 6px !important;
  border: 0 !important;
  border-bottom: 2px solid #1d9001 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #1a1a1a !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  letter-spacing: 0.05em;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-heading-icon {
  font-size: 18px !important;
  line-height: 1;
  color: #1d9001;
}

.ae_megaautocomplete.luigi-skin .ae_categories {
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap !important;
  flex: 1 1 0;
  width: 100% !important;
  min-height: 0;
  max-height: none !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 4px !important;
  padding: 0 2px 0 0 !important;
  margin: 0 !important;
  scrollbar-width: thin;
  scrollbar-color: #90bf80 #eef5ec;
  -webkit-overflow-scrolling: touch;
}

.ae_megaautocomplete.luigi-skin .ae_autocomplete_category {
  display: block !important;
  flex: 0 0 auto;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-mfr-link {
  flex: 0 0 auto;
}

.ae_megaautocomplete.luigi-skin .ae_autocomplete_category a,
.ae_megaautocomplete.luigi-skin .rsel-ac-mfr-link {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px 8px !important;
  color: #2e2e2e !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #fff !important;
  text-decoration: none !important;
  overflow: hidden;
  height: auto !important;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ae_megaautocomplete.luigi-skin .ae_autocomplete_category a:hover,
.ae_megaautocomplete.luigi-skin .rsel-ac-mfr-link:hover {
  color: #1d9001 !important;
  border-color: #c8e6c0 !important;
  background: #f4fff0 !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-mfr-link--featured,
.ae_megaautocomplete.luigi-skin .ae_autocomplete_category a.rsel-ac-mfr-link--featured {
  font-weight: 700 !important;
  color: #1a5c00 !important;
  border-color: #b8deb0 !important;
  background: #f0fbe8 !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-mfr-link--featured:hover,
.ae_megaautocomplete.luigi-skin .ae_autocomplete_category a.rsel-ac-mfr-link--featured:hover {
  color: #145000 !important;
  border-color: #8bc34a !important;
  background: #e8f7df !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-mfr-link--featured .rsel-ac-side-icon,
.ae_megaautocomplete.luigi-skin .ae_autocomplete_category a.rsel-ac-mfr-link--featured .rsel-ac-side-icon {
  color: #2e7d32 !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-side-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 17px !important;
  line-height: 1;
  color: #ff7c00;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-side-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ae_megaautocomplete.luigi-skin .ae_autocomplete_category a.rsel-ac-mfr-link--stacked {
  align-items: flex-start;
}

.rsel-search-widget .rsel-ac-side-label.is-marquee {
  text-overflow: clip;
}

.rsel-search-widget .rsel-ac-side-label.is-marquee > .rsel-ac-marquee {
  display: inline-block;
  animation: rsel-ac-marquee var(--rsel-marquee-duration, 3s) ease-in-out 0.35s infinite;
  will-change: transform;
}

@keyframes rsel-ac-marquee {
  0%, 12% { transform: translateX(0); }
  45%, 60% { transform: translateX(var(--rsel-marquee-shift, 0)); }
  92%, 100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .rsel-search-widget .rsel-ac-side-label.is-marquee > .rsel-ac-marquee {
    animation: none;
  }
}

.ae_megaautocomplete.luigi-skin .ae_links {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 0;
  align-content: flex-start;
  align-items: stretch;
  justify-content: flex-start;
  width: 100% !important;
  min-width: 0;
  min-height: 0;
  max-height: none !important;
  gap: 4px;
  margin: 0 !important;
  padding: 0 2px 0 0 !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #90bf80 #eef5ec;
  -webkit-overflow-scrolling: touch;
}

.ae_megaautocomplete.luigi-skin .ae_categories::-webkit-scrollbar,
.ae_megaautocomplete.luigi-skin .ae_links::-webkit-scrollbar {
  width: 7px;
}

.ae_megaautocomplete.luigi-skin .ae_categories::-webkit-scrollbar-track,
.ae_megaautocomplete.luigi-skin .ae_links::-webkit-scrollbar-track {
  background: #eef5ec;
  border-radius: 4px;
}

.ae_megaautocomplete.luigi-skin .ae_categories::-webkit-scrollbar-thumb,
.ae_megaautocomplete.luigi-skin .ae_links::-webkit-scrollbar-thumb {
  background: #90bf80;
  border-radius: 4px;
  border: 1px solid #eef5ec;
}

.ae_megaautocomplete.luigi-skin .ae_categories::-webkit-scrollbar-thumb:hover,
.ae_megaautocomplete.luigi-skin .ae_links::-webkit-scrollbar-thumb:hover {
  background: #1d9001;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 10px;
  background: #fff;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-products-head {
  flex: 0 0 auto;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-products,
.ae_megaautocomplete.luigi-skin .ae_p {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ae_megaautocomplete.luigi-skin .ae_products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px !important;
  align-content: start;
  align-items: start;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  max-height: min(400px, 52vh);
  scrollbar-color: #c7c7c7 #fff;
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete {
  position: relative;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  min-height: 0;
  margin: 0 !important;
  padding: 6px 7px !important;
  background: #ffffff !important;
  border: 1px solid #ebebeb !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete:hover {
  border-color: #90bf80 !important;
  box-shadow:
    inset 0 0 0 1px #90bf80,
    0 1px 2px rgba(0, 0, 0, 0.04);
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete--variants .product_name {
  padding-right: 42px !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 31;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid #b7deb0;
  border-radius: 999px;
  background: #f3fbee;
  color: #1a5c00;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-btn .material-icons {
  font-size: 14px;
  line-height: 1;
}

/* Variants: stacked-cards icon + count in the bottom-right corner, never over the title. */
.ae_megaautocomplete.luigi-skin .rsel-ac-variants-btn {
  top: auto;
  bottom: 6px;
  right: 7px;
  height: 22px;
  padding: 0 7px 0 6px;
  gap: 4px;
  background: #fff;
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete--variants .product_name {
  padding-right: 0 !important;
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete--variants .product_name > :last-child {
  margin-right: 52px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-btn:hover {
  background: #e3f6d8;
  border-color: #7fbf6a;
}

.ae_megaautocomplete.luigi-skin .ae_products.rsel-ac-variants-open {
  display: block !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  border: 1px solid #cfe6c6;
  border-radius: 10px;
  background: #f7fcf4;
  overflow: hidden;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 12px;
  background: #1a5c00;
  color: #fff;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-heading-img {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-heading-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cdeec0;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-kicker .material-icons {
  font-size: 14px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-back,
.ae_megaautocomplete.luigi-skin .rsel-ac-variants-close {
  flex: 0 0 auto;
  gap: 4px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d5e8cf;
  border-radius: 8px;
  background: #fff;
  color: #1a5c00;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-back:hover,
.ae_megaautocomplete.luigi-skin .rsel-ac-variants-close:hover {
  background: #f3fbee;
  border-color: #7fbf6a;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-back .material-icons,
.ae_megaautocomplete.luigi-skin .rsel-ac-variants-close .material-icons {
  font-size: 18px;
  line-height: 1;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-back {
  padding: 0 10px 0 6px;
  font-size: 12px;
  font-weight: 700;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variants-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  padding: 10px;
  overflow: auto;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #dfe9db;
  border-radius: 8px;
  background: #fff;
  color: #2e2e2e !important;
  text-decoration: none !important;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row:hover {
  border-color: #7fbf6a;
  box-shadow: 0 2px 8px rgba(26, 92, 0, 0.12);
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row.is-current {
  border: 2px solid #1a5c00;
  background: #f3fbee;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row--skeleton {
  background: linear-gradient(90deg, #f1f4ef 25%, #e6ece3 50%, #f1f4ef 75%);
  background-size: 200% 100%;
  animation: rsel-ac-variant-shimmer 1.2s linear infinite;
}

@keyframes rsel-ac-variant-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-thumb {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-label {
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e3f6d8;
  color: #1a5c00;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-group + .rsel-ac-variant-group {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed #cfe6c6;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-group-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1a5c00;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row.is-sold-out {
  background: #fafafa;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row.is-sold-out .rsel-ac-variant-thumb,
.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row.is-sold-out .rsel-ac-variant-label,
.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row.is-sold-out .product_price {
  opacity: 0.55;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-soldout {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #fdecea;
  color: #cb0d05;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-soldout .material-icons {
  font-size: 13px;
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete.is-sold-out .product_media img {
  opacity: 0.6;
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete .rsel-ac-soldout {
  margin-top: 3px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-current {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1a5c00;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row .product_price {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-row .product_price_old {
  font-size: 11px;
  font-weight: 400;
  color: #888;
  text-decoration: line-through;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-variant-go {
  flex: 0 0 auto;
  color: #7fbf6a;
  font-size: 22px;
}

.ae_megaautocomplete.luigi-skin .ae_product_autocomplete > a {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
  color: #2e2e2e !important;
  height: auto;
}

.ae_megaautocomplete.luigi-skin .product_media,
.ae_megaautocomplete.luigi-skin .product_img {
  flex: 0 0 52px;
  width: 52px !important;
  max-width: 52px;
  float: none !important;
  margin: 0 !important;
  align-self: flex-start;
}

.ae_megaautocomplete.luigi-skin .product_media img,
.ae_megaautocomplete.luigi-skin .product_img img {
  display: block;
  width: 52px !important;
  height: auto !important;
  max-width: 52px;
  max-height: 64px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.ae_megaautocomplete.luigi-skin .product_media--empty {
  width: 52px;
  min-height: 52px;
  max-height: 64px;
  background: #f3f3f3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23bbb'%3E%3Cpath d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") center/24px no-repeat;
  border: 0;
  border-radius: 0;
}

.ae_megaautocomplete.luigi-skin .product_name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  margin-left: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ae_megaautocomplete.luigi-skin .product_title {
  color: #2e2e2e !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.38 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ae_megaautocomplete.luigi-skin .product_desc {
  margin: 0 !important;
  padding: 0;
  color: #555 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsel-search-widget .rsel-ac-highlight,
.ae_megaautocomplete.luigi-skin .rsel-ac-highlight {
  display: inline;
  margin: 0;
  padding: 0;
  background-color: #ffcc80 !important;
  color: #2e2e2e !important;
  font-weight: inherit;
  border-radius: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.ae_megaautocomplete.luigi-skin .product_price {
  display: block;
  min-height: 0;
  margin: 0 !important;
  padding-top: 1px;
  font-size: 13px !important;
  line-height: 1.3;
}

.ae_megaautocomplete.luigi-skin .product_price.is-loading {
  color: #999 !important;
  opacity: 1;
}

.ae_megaautocomplete.luigi-skin .product_price_old {
  margin-right: 5px;
  color: #888 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  text-decoration: line-through;
}

.ae_megaautocomplete.luigi-skin .product_price_new {
  color: #1d9001 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-footer {
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 4px;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-show-all-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 4px;
  background: #1d9001 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.ae_megaautocomplete.luigi-skin .rsel-ac-show-all-btn:hover {
  background: #ff7c00 !important;
}

@media (max-width: 1100px) {
  .ae_megaautocomplete.luigi-skin .ae_products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .ae_megaautocomplete.luigi-skin .rsel-ac-layout {
    flex-direction: column;
  }

  .ae_megaautocomplete.luigi-skin .rsel-ac-sidebar {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #ececec;
    height: min(320px, 42vh);
    min-height: 220px;
    max-height: min(320px, 42vh);
    flex-direction: column;
  }

  .ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block.ae_c,
  .ae_megaautocomplete.luigi-skin .rsel-ac-sidebar-block.ae_m {
    flex: 1 1 0;
    min-height: 0;
  }

  .ae_megaautocomplete.luigi-skin .ae_products {
    grid-template-columns: 1fr;
  }
}

/* Other modules' content under the dropdown results (hook abcElasticSearchExtra). */
.rsel-search-widget .rsel-ac-extra {
  flex: 0 0 auto;
  margin: 4px 0 0;
}

.rsel-search-widget .rsel-ac-extra:empty {
  display: none;
}
