/*!
 * Algolia Search for PrestaShop - storefront styles.
 * Layered on top of @algolia/autocomplete-theme-classic.
 *
 * @author  Quentin Beillard - Diadems Tech
 * @license AFL-3.0
 */

/* ------------------------------------------------------------------ */
/* Design tokens                                                       */
/* ------------------------------------------------------------------ */
:root {
  --aa-primary-color-rgb: 230, 80, 33;
  --aa-icon-color-rgb: 230, 80, 33;
  --aa-muted-color-rgb: 108, 117, 125;
  --aa-text-color-rgb: 33, 37, 41;
  --aa-input-border-color-rgb: 206, 212, 218;
  --aa-input-background-color-rgb: 255, 255, 255;
  --aa-background-color-rgb: 255, 255, 255;
  --aa-panel-border-color-rgb: 233, 236, 239;
  --aa-selected-color-rgb: 230, 80, 33;
  --aa-selected-color-alpha: 0.06;
  --aa-search-input-height: 46px;
  --aa-input-icon-size: 18px;
  --aa-font-size: 14px;
  --aa-font-family: inherit;
  --aa-spacing-factor: 1;
  --aa-panel-max-height: min(78vh, 780px);
  --aa-panel-shadow: 0 24px 56px rgba(12, 25, 58, 0.16), 0 2px 8px rgba(12, 25, 58, 0.06);
  --aa-base-z-index: 2147483647;
  --aa-detached-modal-max-width: 760px;
  --aa-detached-modal-max-height: 84vh;

  --algolia-navy: #0c193a;
  --algolia-orange: #e65021;
  --algolia-orange-soft: #fdece6;
  --algolia-green: #1f9d55;
  --algolia-amber: #d97706;
  --algolia-red: #c0392b;
  --algolia-line: #eef0f3;
  --algolia-surface: #f7f8fa;
  --algolia-radius: 12px;
}

/* ------------------------------------------------------------------ */
/* Header placement                                                    */
/* ------------------------------------------------------------------ */
#header .header__search--algolia {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding: 0 24px;
  min-width: 0;
}

/* The search takes the remaining width, never the right block's: when that block shrank, its content
   (SAV button, account, cart) overflowed to the left and the SAV button slid under the search field. */
#header .header__right {
  flex-shrink: 0;
  min-width: max-content; /* its automatic width ignores part of the buttons */
}

.algolia-search {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.algolia-search__box {
  width: 100%;
}

/* Neutralise theme rules written for the native search form (form margins, absolute buttons, label margins). */
.algolia-search form,
.algolia-search .aa-Form {
  display: flex;
  align-items: center;
  margin: 0;
}

.algolia-search .aa-Form div {
  position: static;
}

.algolia-search .aa-InputWrapperPrefix,
.algolia-search .aa-InputWrapperSuffix {
  display: flex;
  align-items: center;
  height: var(--aa-search-input-height);
}

.algolia-search .aa-Label,
.algolia-search .aa-LoadingIndicator {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
  position: static;
  vertical-align: baseline;
  color: inherit;
}

.algolia-search .aa-Form div button,
.algolia-search .aa-Form .aa-SubmitButton,
.algolia-search .aa-Form .aa-ClearButton {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  padding: 0;
  color: rgb(var(--aa-icon-color-rgb));
  background: transparent;
  border: 0;
  box-shadow: none;
}

.algolia-search .aa-SubmitIcon,
.algolia-search .aa-ClearIcon {
  width: 18px;
  height: 18px;
}

/* ------------------------------------------------------------------ */
/* Fallback form (before JS, or without JS)                            */
/* ------------------------------------------------------------------ */
.algolia-search__fallback {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--aa-search-input-height);
  background: #fff;
  border: 1px solid rgb(var(--aa-input-border-color-rgb));
  border-radius: 10px;
}

.algolia-search__fallback-icon {
  display: flex;
  align-items: center;
  padding: 0 4px 0 14px;
  color: var(--algolia-orange);
}

.algolia-search__fallback-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  font-size: var(--aa-font-size);
  color: rgb(var(--aa-text-color-rgb));
  background: transparent;
  border: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Belt and braces: never show the fallback next to a mounted autocomplete. */
.algolia-search__box:has(.aa-Autocomplete) .algolia-search__fallback,
.algolia-search__box[data-mounted] .algolia-search__fallback {
  display: none;
}

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

/* ------------------------------------------------------------------ */
/* Input                                                               */
/* ------------------------------------------------------------------ */
.algolia-search .aa-Autocomplete {
  width: 100%;
}

.algolia-search .aa-Form {
  border-radius: 10px;
  border: 1px solid rgb(var(--aa-input-border-color-rgb));
  box-shadow: none;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.algolia-search .aa-Form:focus-within {
  border-color: var(--algolia-orange);
  box-shadow: 0 0 0 3px rgba(230, 80, 33, 0.14);
}

.algolia-search .aa-InputWrapperPrefix {
  order: 0;
}

.algolia-search .aa-Input {
  font-size: var(--aa-font-size);
  color: rgb(var(--aa-text-color-rgb));
}

.algolia-search .aa-Input::placeholder {
  color: rgb(var(--aa-muted-color-rgb));
  opacity: 1;
}

.algolia-search .aa-SubmitButton,
.algolia-search .aa-ClearButton {
  width: 40px;
}

.algolia-search .aa-InputWrapperPrefix {
  padding-left: 6px;
}

/* ------------------------------------------------------------------ */
/* Panel container                                                     */
/* ------------------------------------------------------------------ */
.aa-Panel.algolia-panel-root {
  z-index: 2147483647 !important; /* above every theme overlay (product ribbons, consent tools, chat) */
}

/* Desktop: centered dropdown. The library writes left/right/width inline: every value here must win. */
@media (min-width: 992px) {
  .aa-Panel.algolia-panel-root {
    left: 50% !important;
    right: auto !important;
    width: min(1140px, calc(100vw - 32px)) !important;
    max-width: none !important;
    margin-top: 10px;
    transform: translateX(-50%);
    border-radius: 16px;
    border: 1px solid rgb(var(--aa-panel-border-color-rgb));
    overflow: hidden;
  }
}

/* The scroll container keeps the library behaviour, the grid lives in a wrapper only this file styles. */
.aa-Panel.algolia-panel-root .aa-PanelLayout {
  padding: 0 !important;
  margin: 0 !important;
  scrollbar-width: thin;
}

.algolia-panel {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 28px;
  padding: 22px 26px 26px;
  box-sizing: border-box;
}

.algolia-panel--single {
  grid-template-columns: minmax(0, 1fr);
}

/* .aa-Item is a grid whose child must be allowed to shrink, otherwise long texts overflow the column. */
.algolia-panel .aa-Item {
  grid-template-columns: minmax(0, 1fr);
}

.algolia-panel .aa-Item > * {
  min-width: 0;
}

.algolia-panel__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* Desktop: side titles line up with the icons of their items, a hairline separates the two columns. */
@media (min-width: 992px) {
  .algolia-panel__side {
    padding-right: 20px;
    border-right: 1px solid var(--algolia-line);
  }

  .algolia-panel__side .algolia-section__header {
    padding-left: 10px;
  }
}

.algolia-panel__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.algolia-panel mark {
  padding: 0;
  color: var(--algolia-orange);
  font-weight: inherit;
  background: transparent;
}

/* Reset theme-classic item chrome, each template draws its own. */
.algolia-panel .aa-Source {
  min-width: 0;
}

.algolia-panel .aa-SourceHeader {
  margin: 0;
}

.algolia-panel .aa-Item {
  min-height: 0;
  padding: 0;
  background: transparent;
  border-radius: var(--algolia-radius);
}

.algolia-panel .aa-Item[aria-selected='true'] {
  background: transparent;
}

.algolia-panel .aa-ItemLink {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.algolia-panel .aa-ItemLink:hover,
.algolia-panel .aa-ItemLink:focus {
  color: inherit;
  text-decoration: none;
}

/* Section headers */
.algolia-section__header {
  margin: 0 0 10px;
}

.algolia-section__title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--aa-muted-color-rgb));
}

/* ------------------------------------------------------------------ */
/* Side column: recent searches & categories                           */
/* ------------------------------------------------------------------ */
.algolia-panel__side .aa-List {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Recent searches (plugin default markup) */
.algolia-panel .aa-Source[data-autocomplete-source-id='recentSearchesPlugin'] .aa-Item {
  padding: 6px 8px;
  border-radius: 8px;
}

.algolia-panel .aa-Source[data-autocomplete-source-id='recentSearchesPlugin'] .aa-Item[aria-selected='true'],
.algolia-panel .aa-Source[data-autocomplete-source-id='recentSearchesPlugin'] .aa-Item:hover {
  background: var(--algolia-surface);
}

.algolia-panel .aa-Source[data-autocomplete-source-id='recentSearchesPlugin'] .aa-ItemIcon {
  width: 28px;
  height: 28px;
  color: rgb(var(--aa-muted-color-rgb));
  background: transparent;
  box-shadow: none;
}

.algolia-panel .aa-Source[data-autocomplete-source-id='recentSearchesPlugin'] .aa-ItemContentTitle {
  font-size: 14px;
  color: rgb(var(--aa-text-color-rgb));
}

.algolia-panel .aa-Source[data-autocomplete-source-id='recentSearchesPlugin'] .aa-ItemActionButton {
  color: rgb(var(--aa-muted-color-rgb));
}

/* Query suggestions */
.algolia-panel .algolia-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.algolia-panel .aa-Item[aria-selected='true'] .algolia-suggestion,
.algolia-suggestion:hover {
  background: var(--algolia-surface);
}

.algolia-suggestion__icon {
  display: flex;
  flex: 0 0 auto;
  color: rgb(var(--aa-muted-color-rgb));
}

.algolia-suggestion__query {
  font-size: 14px;
  color: rgb(var(--aa-text-color-rgb));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Categories */
.algolia-panel .algolia-category {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background-color 0.12s ease;
}

.algolia-panel .aa-Item[aria-selected='true'] .algolia-category,
.algolia-category:hover {
  background: var(--algolia-surface);
}

.algolia-category__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--algolia-orange);
  background: var(--algolia-orange-soft);
  border-radius: 9px;
}

.algolia-category__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.algolia-category__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--algolia-navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.algolia-category__path {
  font-size: 12px;
  color: rgb(var(--aa-muted-color-rgb));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.algolia-category__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: rgb(var(--aa-muted-color-rgb));
}

.algolia-category__meta > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.algolia-category__count {
  flex: 0 0 auto;
  font-weight: 600;
}

.algolia-category__dot {
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ */
/* Products grid                                                       */
/* Every line of a card has a fixed height (empty lines included), so  */
/* brands, names, prices and stock line up across the whole grid.      */
/* ------------------------------------------------------------------ */
.algolia-panel .aa-Source[data-autocomplete-source-id='products'] .aa-List {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.algolia-panel .aa-Source[data-autocomplete-source-id='products'] .aa-Item {
  height: 100%;
}

.algolia-product {
  --algolia-card-pad: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* theme-classic centres .aa-ItemLink children */
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 14px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.algolia-panel .aa-Item[aria-selected='true'] .algolia-product,
.algolia-product:hover {
  border-color: #dfe3ea;
  box-shadow: 0 14px 32px rgba(12, 25, 58, 0.1), 0 2px 6px rgba(12, 25, 58, 0.04);
  transform: translateY(-2px);
}

.algolia-panel .aa-Item[aria-selected='true'] .algolia-product {
  border-color: rgba(230, 80, 33, 0.45);
}

/* Visual: product photos (white backgrounds) melt into a soft grey stage. */
.algolia-product__media {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 132px;
  padding: 14px;
  overflow: hidden;
  background: #f4f5f8;
}

.algolia-product__media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
}

.algolia-product:hover .algolia-product__media img {
  transform: scale(1.04);
}

.algolia-product__media--broken img {
  display: none;
}

.algolia-product__noimage,
.algolia-product__media--broken::before {
  content: '';
  display: block;
  width: 64px;
  height: 64px;
  background: center / 32px no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8bec8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='1.5'/%3E%3Cpath d='m21 16-4.5-4.5L9 19'/%3E%3C/svg%3E");
}

.algolia-product__discount {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--algolia-orange);
  border-radius: 999px;
}

.algolia-product__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 11px var(--algolia-card-pad) 0;
}

.algolia-product__brand,
.algolia-product__ref {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.algolia-product__brand {
  height: 14px;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a93a3;
}

.algolia-product__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  height: 38px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
  color: var(--algolia-navy);
  white-space: normal;
  word-break: break-word;
}

.algolia-product__ref {
  height: 16px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 16px;
  color: #8a93a3;
}

.algolia-product__variant {
  font-weight: 600;
  color: #4b5568;
}

.algolia-product__variant + span::before {
  content: '\00b7';
  margin: 0 6px;
}

.algolia-product__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 11px var(--algolia-card-pad) 0;
  padding: 10px 0 13px;
  border-top: 1px solid #eef0f4;
}

/* Prices: struck regular price, tax excluded price, tax included price - one fixed row each. */
.algolia-product__price {
  display: grid;
  grid-template-areas:
    'regular'
    'current'
    'incl';
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 15px 23px 17px;
  align-items: center;
}

.algolia-product__price > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.algolia-product__price small {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.algolia-product__price-current {
  grid-area: current;
  font-size: 18px;
  font-weight: 800;
  line-height: 23px;
  letter-spacing: -0.01em;
  color: var(--algolia-navy);
  font-variant-numeric: tabular-nums;
}

.algolia-product__price-current small {
  color: #8a93a3;
}

.algolia-product__price-regular {
  grid-area: regular;
  font-size: 12px;
  line-height: 15px;
  color: #9aa2b1;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.algolia-product__price-incl {
  grid-area: incl;
  font-size: 13px;
  font-weight: 700;
  line-height: 17px;
  color: var(--algolia-orange);
  font-variant-numeric: tabular-nums;
}

.algolia-product__stock {
  display: flex;
  align-items: center;
  height: 16px;
}

/* Stock badge */
.algolia-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: rgb(var(--aa-muted-color-rgb));
}

.algolia-stock i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.algolia-stock--in {
  color: var(--algolia-green);
}

.algolia-stock--in i {
  box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.15);
}

.algolia-stock--order {
  color: var(--algolia-amber);
}

.algolia-stock--order i {
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.algolia-stock--out {
  color: var(--algolia-red);
}

.algolia-stock--out i {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

/* ------------------------------------------------------------------ */
/* Footer CTA & empty state                                            */
/* ------------------------------------------------------------------ */
.algolia-panel__footer {
  display: flex;
  justify-content: center;
}

/* Desktop: the button stays in view at the bottom of the panel while the products scroll. */
@media (min-width: 992px) {
  .algolia-panel__footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: -6px 0 -26px;
    padding: 22px 0 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 22px);
  }
}

.algolia-panel__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 700;
  color: #fff !important;
  background: var(--algolia-orange);
  border-radius: 10px;
  text-decoration: none !important;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.algolia-panel__more:hover,
.algolia-panel__more:focus {
  background: #cf4419;
  transform: translateY(-1px);
}

.algolia-panel--empty {
  display: block;
  padding: 40px 28px 44px;
}

.algolia-panel--empty {
  display: block;
}

.algolia-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}

.algolia-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  color: var(--algolia-orange);
  background: var(--algolia-orange-soft);
  border-radius: 50%;
}

.algolia-empty__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--algolia-navy);
  word-break: break-word;
}

.algolia-empty__hint {
  margin: 0 0 12px;
  font-size: 14px;
  color: rgb(var(--aa-muted-color-rgb));
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1199.98px) {
  .algolia-panel {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 24px 24px;
  }

  .algolia-panel .aa-Source[data-autocomplete-source-id='products'] .aa-List {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Tablet & mobile: the search bar takes its own row under the logo, with breathing room. */
@media (max-width: 991.98px) {
  #header .header__search--algolia {
    order: 5;
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    padding: 16px 0 12px;
  }

  .algolia-search {
    max-width: none;
  }

  /* Top row: logo, account, cart. The theme lets the cart stretch; keep every control compact. */
  #header .header__contact {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
  }

  #header .header__account-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0 8px 0 0;
    padding: 0;
    background: #f3f3f4;
    border-radius: 6px;
  }

  #header .header__account-mobile svg {
    width: 22px;
    height: 22px;
  }

  #header .header__account-mobile svg path {
    fill: #444;
  }

  #header .header__right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }

  #header .header__right .shopping-cart a {
    width: auto;
    min-width: 46px;
    height: 46px;
    padding: 0 10px;
    border-radius: 6px;
  }
}

/* ------------------------------------------------------------------ */
/* Mobile sheet: panel pinned under the header input, full width/height */
/* ------------------------------------------------------------------ */
@media (max-width: 991.98px) {
  html.algolia-sheet-open,
  html.algolia-sheet-open body {
    overflow: hidden;
    height: 100%;
  }

  .aa-Panel.algolia-panel-root {
    position: fixed !important;
    top: var(--algolia-sheet-top, 120px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    border: 0;
    border-top: 1px solid var(--algolia-line);
    border-radius: 0;
    box-shadow: none;
  }

  .aa-Panel.algolia-panel-root .aa-PanelLayout {
    max-height: none !important;
    height: 100% !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .algolia-sheet__close {
    position: sticky;
    top: 0;
    z-index: 3;
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 16px !important;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    color: var(--algolia-orange);
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--algolia-line);
  }

  .algolia-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 18px 16px 32px;
  }

  .algolia-panel--single {
    display: flex;
  }

  .algolia-panel__side {
    gap: 20px;
  }

  /* Categories as chips: quick to scan, thumb friendly. */
  .aa-Source[data-autocomplete-source-id='suggestions'] .aa-List,
  .aa-Source[data-autocomplete-source-id='categories'] .aa-List {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .algolia-panel .algolia-suggestion {
    padding: 7px 12px;
    background: var(--algolia-surface);
    border-radius: 999px;
  }

  .algolia-panel .algolia-category {
    gap: 8px;
    padding: 8px 12px;
    background: var(--algolia-surface);
    border-radius: 999px;
  }

  .algolia-category__icon,
  .algolia-category__path,
  .algolia-category__dot {
    display: none;
  }

  .algolia-category__body {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .algolia-category__name {
    font-size: 13px;
  }

  .algolia-category__count {
    font-weight: 500;
  }

  .algolia-panel .aa-Source[data-autocomplete-source-id='products'] .aa-List {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .algolia-panel__more {
    width: 100%;
  }

  .algolia-search .aa-Input {
    font-size: 16px; /* prevents iOS from zooming into the field */
  }
}

/* Categories become chips on small screens: quick to scan, thumb friendly. */
.algolia-sheet-legacy .aa-List {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Phones: horizontal cards, one per row. */
@media (max-width: 575.98px) {
  .algolia-panel .aa-Source[data-autocomplete-source-id='products'] .aa-List {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .algolia-panel .aa-ItemLink.algolia-product {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      'media body'
      'media footer';
    grid-template-rows: auto 1fr;
    column-gap: 14px;
    padding: 12px;
  }

  .algolia-product__media {
    grid-area: media;
    align-self: start;
    height: 104px;
    padding: 10px;
    border-radius: 10px;
  }

  .algolia-product__body {
    grid-area: body;
    padding: 0;
  }

  .algolia-product__brand {
    margin-bottom: 2px;
  }

  .algolia-product__name {
    font-size: 13.5px;
  }

  .algolia-product__ref {
    margin-top: 2px;
  }

  .algolia-product__footer {
    grid-area: footer;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    border-top: 0;
  }

  /* Price HT and struck price on one line, TTC below. */
  .algolia-product__price {
    grid-template-areas:
      'current regular'
      'incl incl';
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 22px 18px;
    column-gap: 8px;
    align-items: baseline;
  }

  .algolia-product__price-current {
    font-size: 16px;
    line-height: 22px;
  }


  .algolia-product__discount {
    top: 6px;
    left: 6px;
    padding: 0 6px;
    font-size: 10px;
    line-height: 18px;
  }

  .algolia-panel--empty {
    padding: 32px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .algolia-product,
  .algolia-panel__more,
  .algolia-search .aa-Form {
    transition: none;
  }

  .algolia-product:hover,
  .algolia-panel__more:hover {
    transform: none;
  }
}
