.brand-section {
  padding-bottom: 12px;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 18px;
}
.brand-choice {
  position: relative;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 12px 4px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border-radius: 24px;
  transition:
    background-color 0.2s ease,
    top 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .brand-choice:hover {
    background: #ffffff50;
    top: -3px;
  }
}
.brand-choice[aria-current] {
  background: #98c93c20;
  box-shadow: inset 0 0 0 1px #56762c50;
}
.brand-logo {
  width: 100%;
  height: 88px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, #ffffff80, transparent 72%);
}
.brand-logo img {
  width: 100%;
  max-width: 240px;
  height: 88px;
  min-width: 0;
  min-height: 0;
  object-fit: scale-down;
  mix-blend-mode: multiply;
}
.brand-choice[data-brand-id="katimama"] img {
  width: 88px;
  border-radius: 50%;
}
.brand-choice-dark .brand-logo {
  background: #58443b;
  border-radius: 50%;
}
.brand-choice-dark img {
  mix-blend-mode: normal;
  padding: 8px;
}
.brand-choice strong {
  font-size: 0.8rem;
  line-height: 1.3;
}
.brand-choice small {
  color: var(--muted);
  font-size: 0.72rem;
}
.brand-name-mark {
  max-width: 100%;
  overflow-wrap: anywhere;
  font:
    600 1.25rem Georgia,
    serif;
  color: var(--green);
}
.brand-more {
  margin-top: 18px;
}
.brand-grid[hidden] {
  display: none;
}
.brand-toggle {
  width: fit-content;
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 30px;
  cursor: pointer;
  color: var(--green);
  font: inherit;
  font-size: 0.85rem;
  background: #ffffff60;
  border: 0;
}
.catalog-result-summary {
  margin-right: auto;
}
.catalog-result-summary a {
  display: inline-block;
  margin-top: 10px;
  color: var(--green);
  font-size: 0.8rem;
}
.catalog-result-summary a[hidden] {
  display: none;
}
.catalog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0;
}
.catalog-toolbar label {
  display: grid;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.catalog-toolbar select {
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  padding: 12px 36px 12px 16px;
  border: 1px solid #1c3c1c30;
  border-radius: 20px;
  background: transparent;
  max-width: 100%;
}
.catalog-toolbar p {
  margin: 0;
  font-size: 0.9rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 24px;
}
.catalog-product {
  position: relative;
  display: flex;
  flex-direction: column;
  color: inherit;
  min-width: 0;
}
.catalog-product-photo {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, #e8dbc850, transparent 70%);
}
.catalog-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .catalog-product:hover .catalog-product-photo img {
    transform: translateY(-5px);
  }
}
.catalog-product-brand {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 14px 0 8px;
}
.catalog-product h3 {
  font-size: 1rem;
  line-height: 1.45;
  margin: 0 0 14px;
}
.catalog-product-link {
  font-size: 0.78rem;
  margin-top: auto;
  color: var(--green);
}
.catalog-more {
  display: block;
  margin: 36px auto 0;
}
.catalog-more[hidden] {
  display: none;
}
.catalog-product > .favorite-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 1;
}
.catalog-product-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.catalog-dietary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0;
}
.catalog-dietary span {
  font-size: 0.66rem;
  padding: 3px 7px;
  border-radius: 12px;
  color: var(--green);
  background: #98c93c1a;
}
.catalog-preferences {
  margin: 0 0 30px;
  padding: 20px;
  border: 1px solid #1c3c1c20;
  border-radius: 24px;
  background: #ffffff28;
}
.dietary-filters {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.dietary-filters legend {
  font-weight: 600;
  padding: 0 0 12px;
}
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chip {
  position: relative;
  cursor: pointer;
}
.filter-chip input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.filter-chip span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #1c3c1c30;
  border-radius: 24px;
  font-size: 0.85rem;
}
.filter-chip input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.filter-chip input:focus-visible + span {
  outline: 3px solid #67844c;
  outline-offset: 3px;
}
#dietary-help,
#favorites-help {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 0;
}
.favorites-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.favorites-filter-row label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}
.favorites-filter-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.favorites-filter-row button {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
@media (max-width: 900px) {
  .brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .catalog-preferences {
    padding: 14px;
  }
  .brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 6px;
  }
  .brand-logo {
    height: 58px;
  }
  .brand-logo img {
    height: 58px;
  }
  .brand-choice[data-brand-id="katimama"] img {
    width: 58px;
  }
  .brand-choice {
    border-radius: 18px;
    padding: 8px 2px;
  }
  .brand-choice strong {
    font-size: 0.67rem;
  }
  .brand-choice small {
    font-size: 0.65rem;
  }
  .brand-name-mark {
    font-size: 0.85rem;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }
  .catalog-toolbar {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
  .catalog-toolbar label {
    width: 100%;
  }
  .catalog-product h3 {
    font-size: 0.9rem;
  }
  .catalog-product-brand {
    font-size: 0.68rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-choice {
    transition: none;
  }
  .brand-choice:hover {
    top: 0;
  }
  .catalog-product-photo img {
    transition: none;
  }
  .catalog-product:hover .catalog-product-photo img {
    transform: none;
  }
}
