.coffee-catalog-controls { display: flex; align-items: center; gap: 8px; }
:is(.coffee-toolbar, #catalog-view .cc-tools):has(.coffee-brand-picker[open]) { position: relative; z-index: 4; }
.coffee-brand-picker { position: relative; color: #253e32; }
.coffee-brand-picker[open] { z-index: 4; }
.coffee-brand-picker > summary {
  display: flex; align-items: center; gap: 7px; min-height: 39px; padding: 6px 11px;
  border: 1px solid #aebda8; border-radius: 8px; background: #fffef8;
  font: 650 .89rem/1.25 var(--sans, system-ui); list-style: none; cursor: pointer;
}
.coffee-brand-picker > summary::-webkit-details-marker { display: none; }
.coffee-brand-picker > summary::after {
  content: ''; flex: 0 0 6px; height: 6px; margin: 0 1px 3px 3px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.coffee-brand-picker[open] > summary, .coffee-brand-picker > summary:hover { background: #eaf1e3; }
.coffee-brand-picker[open] > summary::after { transform: translateY(3px) rotate(225deg); }
.coffee-brand-picker [data-brand-label] { max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #415d46; }
.coffee-brand-label:has(+ [data-brand-label]:not([hidden])) { font-weight: 500; }
.coffee-brand-panel {
  position: absolute; inset: calc(100% + 6px) auto auto 0; width: min(19rem, calc(100vw - 7.5rem));
  max-height: min(25rem, 56dvh); display: flex; flex-direction: column; gap: 6px;
  padding: 8px; border: 1px solid #b8c7b3; border-radius: 12px; background: #fffef9; box-shadow: 0 12px 28px #223b2924;
}
.coffee-brand-panel input {
  width: 100%; min-height: 40px; padding: 6px 9px; border: 1px solid #b8c7b3; border-radius: 7px;
  background: #fff; color: inherit; font: 500 .94rem/1.25 var(--sans, system-ui);
}
.coffee-brand-options { overflow-y: auto; overscroll-behavior: contain; }
.coffee-brand-options [data-brand-option] {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 38px;
  padding: 6px 9px; border: 0; border-radius: 6px; background: transparent;
  color: inherit; font: 550 .9rem/1.25 var(--sans, system-ui); text-align: start; text-decoration: none; cursor: pointer;
}
.coffee-brand-options [data-brand-option][hidden] { display: none; }
.coffee-brand-options [data-brand-option]:hover { background: #f0f4e9; }
.coffee-brand-options :is([aria-current=true], [aria-pressed=true]) { background: #e2edd9; }
.coffee-brand-options small { color: #526b55; font-variant-numeric: tabular-nums; }
.coffee-brand-panel p { margin: 3px 7px 6px; font-size: .85rem; }
.coffee-brand-picker :is(summary, input, a, button):focus-visible { outline: 2px solid #346447; outline-offset: 1px; }

.coffee-toolbar .coffee-catalog-controls .coffee-apply {
  display: inline-flex; align-items: center; gap: 7px; min-height: 39px; padding: 6px 11px;
  border-color: #aebda8; border-radius: 8px; background: #e5ecd8; font: 650 .89rem/1.25 var(--sans, system-ui);
}
.coffee-catalog-controls .coffee-apply svg { width: 17px; height: 17px; }
.coffee-toolbar .coffee-method-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.coffee-method-shortcuts a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; white-space: nowrap;
  border: 1px solid #c1cdbb; border-radius: 99px; background: #fffef9; color: #294432;
  text-decoration: none; font: 600 .85rem/1.25 var(--sans, system-ui);
}
.coffee-method-shortcuts a:hover { background: #eaf1e3; }
.coffee-method-shortcuts a[aria-current] { color: #fff; background: #253e32; border-color: #253e32; }
.coffee-method-shortcuts .coffee-quick-guide, .coffee-toolbar .coffee-method-shortcuts [data-guide-status] { display: none; }
#catalog-view .cc-tools .ar-facets:has(.coffee-brand-picker) { grid-template-columns: max-content max-content; }

@media (max-width: 680px) {
  html[data-v3-coffee] body .top.top-coffee .top-inner { grid-template-areas: 'brand market menu' 'search search search'; }
  .coffee-toolbar .coffee-catalog-controls { margin-bottom: 8px; }
  .coffee-toolbar .coffee-method-shortcuts { flex-wrap: nowrap; overflow-x: auto; padding: 2px; }
  .coffee-method-shortcuts a { flex: none; min-height: 37px; }
  .coffee-method-shortcuts .coffee-quick-guide { display: inline-flex; }
  .coffee-toolbar .coffee-method-shortcuts [data-guide-status]:not([hidden]) { display: inline; }
  #catalog-view .cc-tools .ar-facets:has(.coffee-brand-picker) { width: 100%; }
}
