.wrapper {
    position: static;
    transform: none;
}

/* Pagination */
.ais-Pagination {
  display: flex;
  justify-content: center;
  margin: 2em 0;
}

.ais-Pagination-list {
  display: flex;
  gap: 0.5em;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ais-Pagination-item {
  transition: background 0.2s, color 0.2s;
}

.ais-Pagination-link {
  display: block;
  padding: 0.5em 0.9em;
  border-radius: 6px;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
  border: 1px solid #e0e0e0;
}

.ais-Pagination-item--selected .ais-Pagination-link {
  background: #312783;
  color: #fff;
  border-color: #312783;
}

.ais-Pagination-item--disabled .ais-Pagination-link {
  color: #bbb;
  background: #fafafa;
  cursor: not-allowed;
  border-color: #e0e0e0;
}

.ais-Pagination-link:hover:not(.ais-Pagination-item--disabled .ais-Pagination-link) {
  background: #e6f0ff;
  color: #312783;
  border-color: #b3d1ff;
}

/* --- SIDEBAR MEILISEARCH ELEMENTS --- */
/* .sidebar {
  background: #f8faff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 82, 204, 0.06);
  padding: 1.5em 1.2em;
  margin-bottom: 2em;
  transition: box-shadow 0.2s;
} */

/* Sort By & Hits Per Page */
.ais-SortBy,
.ais-HitsPerPage {
  margin-bottom: 1.2em;
}
.ais-SortBy-select,
.ais-HitsPerPage-select {
  width: 100%;
  margin-left: -25%;
  margin-top: 2em;
  padding: 0.5em 0.8em;
  border-radius: 6px;
  border: 1px solid #b3d1ff;
  background: #fff;
  font-size: 1em;
  color: #312783;
  /* margin-top: 0.2em; */
  margin-bottom: 0.2em;
  transition: border 0.2s;
}

.ais-SortBy-select:focus,
.ais-HitsPerPage-select:focus {
  border-color: #312783;
  outline: none;
}

/* Clear Refinements Button */
.ais-ClearRefinements-button {
  background: #E7411B;
  color: #fff;
  border: 1px solid #E7411B;
  border-radius: 6px;
  padding: 0.5em 1em;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  margin-bottom: 1em;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}
.ais-ClearRefinements-button:hover:not(:disabled) {
  background: #312783;
  color: #fff;
}

/* Current Refinements */
.ais-CurrentRefinements-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0 0 1em 0;
  padding: 0;
  list-style: none;
}
.ais-CurrentRefinements-category {
  background: #e6f0ff;
  color: #312783;
  border-radius: 6px;
  padding: 0.2em 0.7em 0.2em 0.5em;
  display: inline-flex;
  align-items: center;
  font-size: 0.97em;
  border: 1px solid #b3d1ff;
}
.ais-CurrentRefinements-delete {
  background: none;
  border: none;
  color: #312783;
  font-size: 1em;
  margin-left: 0.5em;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
  padding: 0.1em 0.3em;
}
.ais-CurrentRefinements-delete:hover {
  background: #b3d1ff;
  color: #003580;
}

/* Refinement List (Filters) */
#product-group-filter {
  margin-bottom: 1.5em;
  max-width: 350px;
}
.ais-RefinementList-header {
  font-weight: 700;
  margin-bottom: 0.6em;
  letter-spacing: 0.01em;
}
.ais-RefinementList-searchBox input {
  width: 100%;
  padding: 0.5em 0.8em;
  border-radius: 6px;
  border: 1px solid #b3d1ff;
  background: #fff;
  font-size: 1em;
  margin-bottom: 0.7em;
  transition: border 0.2s;
}
.ais-RefinementList-searchBox input:focus {
  border-color: #312783;
  outline: none;
}
.ais-RefinementList-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ais-RefinementList-item {
  margin-bottom: 0.2em;
}
.ais-RefinementList-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.3em 0.5em;
  border-radius: 6px;
  transition: background 0.15s;
  font-size: 1em;
}
.ais-RefinementList-label:hover {
  background: rgba(49,39,131,0.1);
}
.ais-RefinementList-checkbox {
  margin-right: 0.6em;
  accent-color: #312783;
}
.ais-RefinementList-labelText {
  flex: 1;
  font-size: .875rem;
}
.ais-RefinementList-count {
  background: rgba(49,39,131,0.1);
  color: #312783;
  border-radius: 10px;
  padding: 0.1em 0.5em;
  margin-left: 0.5em;
  font-size: 0.9em;
}
.ais-RefinementList-item--selected .ais-RefinementList-label {
  background: #dbeafe;
  font-weight: 600;
}
.ais-RefinementList-showMore {
  background: #e6f0ff;
  color: #312783;
  border: 1px solid #b3d1ff;
  border-radius: 6px;
  padding: 0.4em 1em;
  font-size: 1em;
  margin-top: 0.7em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ais-RefinementList-showMore:hover {
  background: #312783;
  color: #fff;
}

.wrapper {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.sidebar {
  width: 100%;
  margin-bottom: 2em;
}

/* .main-content {
  width: 100%;
  display: flex;
  flex-direction: column;
} */

/* Desktop layout */
@media (min-width: 900px) {
  .wrapper {
    flex-direction: row;
    align-items: flex-start;
    gap: 3em;
  }
  /* .sidebar {
    width: 320px;
    min-width: 260px;
    max-width: 350px;
    margin-bottom: 0;
  } */
  /* .main-content {
    flex: 1;
  } */
}

/* Optional: Make filter sticky on desktop */
@media (min-width: 900px) {
  /* .sidebar {
    position: sticky;
    top: 2em;
  } */
}

/* Responsive tweaks */
@media (max-width: 899px) {
  /* .sidebar {
    box-shadow: none;
    border-radius: 8px;
    padding: 1em 0.7em;
  } */
  #product-group-filter {
    max-width: 100%;
    padding: 1em 0.5em;
  }
}

#product-group-filter-lvl1 {
  margin-top: 1em;
}

.parent-refinement .sub-refinement-list {
  display: none;
}
.parent-refinement.expanded .sub-refinement-list {
  display: block;
}
/* Optionally, style the parent when expanded */
.parent-refinement.expanded > .ais-RefinementList-label {
  background: rgba(49,39,131,0.1);
}


.ais-Hits-list {
  position: static !important;
  width: 100%;
  display: block;
}
.ais-Hits-item {
  /* position: static !important; */
}

.ais-Hits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ais-Hits-item {
  flex: 1 1 calc(33.333% - 2em);
  max-width: calc(33.333% - 2em);
  box-sizing: border-box;
  display: flex;
}

/* Make sure product cards fill their container */
.product.result {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Responsive: 2 per row on medium screens, 1 per row on small screens */
@media (max-width: 1100px) {
  .ais-Hits-item {
    flex: 1 1 calc(50% - 2em);
    max-width: calc(50% - 2em);
  }
}
@media (max-width: 700px) {
  .ais-Hits-item {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
.ais-Hits-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.ais-Hits-item > .product.result {
  width: 100% !important;
  flex: 1 1 auto !important;
  max-width: 100% !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.products-overview .products-list {
    padding-left: 2em;
}

.products-overview .products-list .product .inner {
    margin-left: 0 !important;
}

#hits {
    width: 100%;
}

/* --- Custom Pagination: Old Style --- */
.ais-Pagination {
  display: flex;
  justify-content: flex-start;
  margin: 2em 0 1.5em 0;
  font-size: 1.1em;
  gap: 0;
}

.ais-Pagination-list {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ais-Pagination-item {
  margin: 0 0.12em;
}

.ais-Pagination-link {
  display: block;
  min-width: 2em;
  text-align: center;
  padding: 0.18em 0.7em;
  border-radius: 0;
  background: none;
  color: #312783;
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
  border: none;
  box-shadow: none;
  transition: color 0.15s, border-bottom 0.15s, background 0.15s;
  border-bottom: 2px solid transparent;
  line-height: 1.7;
}

.ais-Pagination-link:hover:not(.ais-Pagination-item--disabled .ais-Pagination-link) {
  color: #003580;
  border-bottom: 2px solid #312783;
  background: none;
}

.ais-Pagination-item--selected .ais-Pagination-link {
  color: #fff;
  background: #312783;
  border-radius: 4px;
  border-bottom: 2px solid #312783;
  font-weight: 700;
}

.ais-Pagination-item--disabled .ais-Pagination-link {
  color: #bbb;
  background: none;
  cursor: not-allowed;
  border-bottom: 2px solid transparent;
  opacity: 0.6;
}

/* Hide double arrows for first/last page for a simpler look */
.ais-Pagination-item--firstPage,
.ais-Pagination-item--lastPage {
  display: none;
}

/* Optional: Make prev/next arrows look like text links */
.ais-Pagination-item--previousPage .ais-Pagination-link,
.ais-Pagination-item--nextPage .ais-Pagination-link {
  font-weight: 400;
  color: #312783;
  background: none;
  border-radius: 0;
  border: none;
  font-size: 1em;
  padding: 0.18em 0.7em;
}

.ais-Pagination-item--previousPage .ais-Pagination-link:hover,
.ais-Pagination-item--nextPage .ais-Pagination-link:hover {
  text-decoration: underline;
  background: none;
  color: #003580;
}

/* --- Search Box Styling --- */
#searchbox {
  width: 100%;
  margin-bottom: 2em;
  display: flex;
  justify-content: center;
}

.ais-SearchBox {
  width: 100%;
  max-width: 400px;
}

.ais-SearchBox-form {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #b3d1ff;
  border-radius: 8px;
  padding: 0.2em 0.5em;
  box-shadow: 0 2px 8px rgba(49,39,131,0.04);
  transition: border 0.2s;
}

.ais-SearchBox-form:focus-within {
  border-color: #312783;
}

.ais-SearchBox-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.8em;
  padding: 0.5em 0.4em;
  color: #312783;
}

.ais-SearchBox-submit,
.ais-SearchBox-reset {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3em 0.5em;
  display: flex;
  align-items: center;
  color: #312783;
  transition: color 0.15s;
}

.ais-SearchBox-submit:hover,
.ais-SearchBox-reset:hover {
  color: #003580;
}

.ais-SearchBox-submitIcon,
.ais-SearchBox-resetIcon {
  display: block;
}

.ais-SearchBox-loadingIndicator {
  margin-left: 0.5em;
}

.pagination-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  margin-top: 2em;
  margin-bottom: 2em;
  width: 100%;
}

#pagination {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  width: 100%;
}

#hits-per-page {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}