.products-page {
  position: relative;
  min-height: calc(100vh - 12rem);
  margin-top: calc(-1 * var(--site-header-height, 7rem));
  padding-top: var(--site-header-height, 7rem);
  background-color: #ebe2f5;
  overflow-x: clip;
}

.products-hero {
  padding: 3.75rem 1.25rem 2.5rem;
  background-color: #ebe2f5;
}

.products-hero__container {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.products-hero__title {
  margin: 0 0 1.35rem;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.35rem, 5vw, 3.35rem);
  font-weight: 600;
  line-height: 1.12;
  color: #8b5a2b;
  letter-spacing: -0.02em;
}

.products-hero__description {
  margin: 0 auto;
  max-width: 34rem;
  color: #756e65;
  font-size: 1.05rem;
  line-height: 1.75;
}

.products-grid-wrap {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.25rem 4.5rem;
  background-color: #ebe2f5;
  box-sizing: border-box;
}

.products-toolbar-panel {
  position: relative;
  z-index: 40;
}

.products-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  width: 100%;
  margin: 0 0 1.75rem;
}

.products-toolbar__search {
  position: relative;
  flex: 1 1 14rem;
  min-width: min(100%, 14rem);
}

.products-toolbar__search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.15rem;
  height: 1.15rem;
  color: #9a8f85;
  pointer-events: none;
}

.products-toolbar__search-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.products-toolbar__search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #4a433c;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid #f0ddd9;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.products-toolbar__search-input::placeholder {
  color: #a39a92;
}

.products-toolbar__search-input:focus {
  outline: none;
  border-color: #e8c4b8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 3px rgba(245, 184, 154, 0.35);
}

.products-toolbar__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex: 0 1 auto;
  margin-left: auto;
}

.products-picker {
  position: relative;
  flex: 0 1 auto;
  min-width: 10.5rem;
}

.products-picker--wide {
  min-width: 12.5rem;
}

.products-picker--wide .products-picker__menu {
  width: max-content;
  min-width: 100%;
  max-width: min(19rem, calc(100vw - 2.5rem));
}

.products-picker--disabled {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.products-picker--disabled .products-picker__trigger {
  cursor: not-allowed;
}

.products-picker__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.products-picker__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  min-width: inherit;
  padding: 0.72rem 1rem 0.72rem 1.05rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
  color: #4a433c;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid #f0ddd9;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.products-picker__trigger:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: #e8c4b8;
}

.products-picker__trigger:focus-visible {
  outline: none;
  border-color: #e8c4b8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 3px rgba(245, 184, 154, 0.35);
}

.products-picker.is-open .products-picker__trigger {
  border-color: #e8c4b8;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 3px rgba(245, 184, 154, 0.28);
}

.products-picker__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-picker__chevron {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.5rem;
  color: #756e65;
  transition: transform 0.2s ease;
}

.products-picker__chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}

.products-picker.is-open .products-picker__chevron {
  transform: rotate(180deg);
}

.products-picker__menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  min-width: 100%;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #f0ddd9;
  border-radius: 1.15rem;
  box-shadow:
    0 12px 32px rgba(74, 55, 40, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  max-height: min(16.5rem, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.products-picker__menu[hidden] {
  display: none;
}

.products-picker__option {
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #4a433c;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.products-picker__option:hover,
.products-picker__option:focus-visible {
  outline: none;
  background: rgba(245, 184, 154, 0.22);
  color: #5c4330;
}

.products-picker__option.is-selected {
  font-weight: 600;
  color: #8b5a2b;
  background: rgba(235, 226, 245, 0.85);
}

.products-picker__option.is-selected:hover,
.products-picker__option.is-selected:focus-visible {
  background: rgba(235, 226, 245, 1);
}

.products-grid__empty {
  max-width: 1200px;
  margin: 0 auto 1rem;
  text-align: center;
  font-size: 1rem;
  color: #756e65;
}

.products-grid__empty.is-hidden {
  display: none;
}

.products-grid__item.is-hidden {
  display: none;
}

.products-grid.is-empty {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .products-toolbar__controls {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .products-picker,
  .products-picker--wide {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.products-grid__item {
  display: flex;
  min-width: 0;
}

.product-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 100%;
  padding: 1.15rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.42);
  border: 2px solid #f0ddd9;
  border-radius: 2.35rem;
  box-shadow:
    0 4px 24px rgba(139, 90, 43, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  transition:
    border-width 0.3s ease,
    box-shadow 0.3s ease;
}

.product-card:has(
  .product-card__title-link:hover,
  .product-card__title-link:focus-visible,
  .product-card__cta:hover,
  .product-card__cta:focus-visible
) {
  border-width: 3px;
  animation: product-card-border-shift 2.8s linear infinite;
  box-shadow:
    0 8px 28px rgba(139, 90, 43, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.product-card:has(
  .product-card__title-link:hover,
  .product-card__title-link:focus-visible,
  .product-card__cta:hover,
  .product-card__cta:focus-visible
) .product-card__image {
  transform: scale(1.07);
}

@keyframes product-card-border-shift {
  0% {
    border-color: #f5b89a;
  }

  25% {
    border-color: #e8c4f0;
  }

  50% {
    border-color: #f5d76e;
  }

  75% {
    border-color: #b8c48a;
  }

  100% {
    border-color: #f5b89a;
  }
}

.product-card__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.product-card__image-wrap {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  padding: 8px;
  border-radius: 1.65rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: #faf6f2;
}

.product-card__category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  margin-top: 0.55rem;
  padding: 0.32rem 0.62rem 0.32rem 0.42rem;
  background: rgba(251, 232, 220, 0.96);
  border: 1px solid rgba(245, 184, 154, 0.55);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(139, 90, 43, 0.1);
}

.product-card__category-badge-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
}

.product-card__category-badge-text {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: #3d3833;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card__title {
  margin: 0 0 0.95rem;
  font-family: "Fredoka", sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  min-height: calc(1.8rem * 1.3 * 2);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.product-card__media-link,
.product-card__title-link {
  color: inherit;
  text-decoration: none;
}

.product-card__media-link {
  display: block;
  width: 100%;
}

.product-card__title-link:hover,
.product-card__title-link:focus-visible {
  text-decoration: underline;
}

.product-card__ingredients {
  flex: 0 1 auto;
  margin: 0 0 2.85rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #7a7268;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

.product-card__ingredients-label {
  font-weight: 700;
  color: #6b635a;
}

.product-card__ingredients-accent {
  font-size: 1.12em;
  font-weight: 700;
  color: #e3a008;
}

.product-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-top: auto;
  min-width: 8.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  background-color: #f5b89a;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-card__cta:hover,
.product-card__cta:focus-visible {
  background-color: #f0a684;
  color: #ffffff;
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .product-card:has(
    .product-card__title-link:hover,
    .product-card__title-link:focus-visible,
    .product-card__cta:hover,
    .product-card__cta:focus-visible
  ) {
    animation: none;
    border-color: #f5b89a;
  }

  .product-card__image {
    transition: none;
  }
}

@media (max-width: 991.98px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .products-hero {
    padding: 2.75rem 1.25rem 2rem;
  }

  .products-hero__description {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    max-width: none;
    gap: 1.1rem;
  }

  .product-card {
    flex-direction: row;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem;
    text-align: left;
  }

  .product-card__media {
    flex: 0 0 36%;
    max-width: 8.5rem;
    margin-bottom: 0;
    align-self: center;
  }

  .product-card__image-wrap {
    border-radius: 1.25rem;
    aspect-ratio: 1;
  }

  .product-card__category-badge {
    margin-top: 0.4rem;
    padding: 0.25rem 0.5rem 0.25rem 0.35rem;
  }

  .product-card__category-badge-text {
    font-size: 0.68rem;
  }

  .product-card__body {
    justify-content: flex-start;
    padding: 0.15rem 0;
  }

  .product-card__title {
    font-size: 1.28rem;
    min-height: 0;
    margin-bottom: 0.5rem;
    text-align: left;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .product-card__ingredients {
    margin-bottom: 0.65rem;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: left;
  }

  .product-card__cta {
    align-self: flex-start;
    margin-top: auto;
    min-width: 0;
    padding: 0.55rem 1.1rem;
    font-size: 0.82rem;
  }
}
