/* ═══════════════════════════════════════════════════════════════════
   Gewandhaus Markenfilter — Divi Module CSS v3
   Design: Moderne horizontale Filterleiste, Custom Dropdowns
   Desktop: 4 Spalten | Tablet: 3 | Mobil: 2
═══════════════════════════════════════════════════════════════════ */

.gmf-divi-wrap {
  --gmfd-bg:       #f7f5f2;
  --gmfd-card-bg:  #ffffff;
  --gmfd-border:   #e8e3db;
  --gmfd-accent:   #b5a48a;
  --gmfd-text:     #2c2826;
  --gmfd-muted:    #9a8f87;
  --gmfd-tag-bg:   #f0ede8;
  --gmfd-logo-h:   80px;
  --gmfd-radius:   10px;
  --gmfd-ff:       'Lato', -apple-system, sans-serif;

  font-family: var(--gmfd-ff);
  color: var(--gmfd-text);
  background-color: var(--gmfd-bg);
  padding: 32px 40px 48px;
  border-radius: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   FILTER BAR — horizontale Leiste
═══════════════════════════════════════════════════════════════════ */
.gmfd-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gmfd-border);
}

/* ── Suchfeld ─────────────────────────────────────────────────── */
.gmfd-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--gmfd-card-bg);
  border: 1.5px solid var(--gmfd-border);
  border-radius: 50px;
  padding: 0 14px 0 38px;
  min-width: 200px;
  flex: 1;
  max-width: 300px;
  transition: border-color .2s, box-shadow .2s;
}
.gmfd-search-wrap:focus-within {
  border-color: var(--gmfd-accent);
  box-shadow: 0 0 0 3px rgba(181,164,138,.12);
}
.gmfd-search-icon {
  position: absolute; left: 13px; color: var(--gmfd-muted); pointer-events: none;
}
.gmfd-search-input {
  flex: 1; border: none; background: transparent;
  padding: 10px 0; font-family: var(--gmfd-ff);
  font-size: 13px; color: var(--gmfd-text); outline: none;
}
.gmfd-search-input::placeholder { color: var(--gmfd-muted); }
.gmfd-search-input::-webkit-search-cancel-button { display: none; }
.gmfd-search-clear {
  background: none; border: none; color: var(--gmfd-muted);
  cursor: pointer; font-size: 12px; padding: 3px 6px;
  border-radius: 50%; line-height: 1; flex-shrink: 0;
  transition: all .15s;
}
.gmfd-search-clear:hover { background: var(--gmfd-border); color: var(--gmfd-text); }

/* ── Custom Dropdown ──────────────────────────────────────────── */
.gmfd-dropdown {
  position: relative;
  flex-shrink: 0;
}

.gmfd-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--gmfd-card-bg);
  border: 1.5px solid var(--gmfd-border);
  border-radius: 50px;
  font-family: var(--gmfd-ff);
  font-size: 13px;
  font-weight: 600;
  color: var(--gmfd-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  min-width: 180px;
  justify-content: space-between;
}
.gmfd-dropdown-trigger:hover {
  border-color: var(--gmfd-accent);
  color: var(--gmfd-text);
}
.gmfd-dropdown-trigger.open,
.gmfd-dropdown-trigger.has-value {
  border-color: var(--gmfd-accent);
}
.gmfd-dropdown-trigger.has-value .gmfd-dropdown-label,
.gmfd-dropdown-trigger.open .gmfd-dropdown-label {
  color: var(--gmfd-text);
  font-weight: 700;
}
.gmfd-dropdown-label {
  font-weight: 600;
  flex: 1;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Standort-Icon im Dropdown-Trigger */
.gmfd-dropdown[data-filter="standort"] .gmfd-dropdown-label::before {
  content: '';
  display: inline-flex; flex-shrink: 0;
  width: 13px; height: 13px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
}

/* Abteilung-Icon im Dropdown-Trigger: Shirt/Kleidung-Icon */
.gmfd-dropdown[data-filter="abteilung"] .gmfd-dropdown-label::before {
  content: '';
  display: inline-flex; flex-shrink: 0;
  width: 13px; height: 13px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.57a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.57a2 2 0 0 0-1.34-2.23z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.57a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.57a2 2 0 0 0-1.34-2.23z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
}

.gmfd-dropdown-chevron {
  color: var(--gmfd-muted);
  flex-shrink: 0;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.gmfd-dropdown-trigger.open .gmfd-dropdown-chevron {
  transform: rotate(180deg);
}
.gmfd-dropdown-trigger.has-value .gmfd-dropdown-chevron {
  color: var(--gmfd-accent);
}

/* Dropdown Panel */
.gmfd-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background: var(--gmfd-card-bg);
  border: 1.5px solid var(--gmfd-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  z-index: 9999;
  overflow: hidden;
  animation: gmfd-dropdown-in .18s cubic-bezier(.4,0,.2,1);
}
.gmfd-dropdown-panel.open {
  display: block;
}
@keyframes gmfd-dropdown-in {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.gmfd-option-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 6px !important;
}
.gmfd-option-list li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.gmfd-option-list li::before,
.gmfd-option-list li::after,
.gmfd-option-list li::marker { display: none !important; content: none !important; }

.gmfd-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: none;
  background: transparent;
  font-family: var(--gmfd-ff);
  font-size: 13px;
  color: var(--gmfd-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all .15s;
}
.gmfd-option:hover {
  background: var(--gmfd-tag-bg);
  color: var(--gmfd-text);
}
.gmfd-option.active {
  background: var(--gmfd-tag-bg);
  color: var(--gmfd-text);
  font-weight: 700;
}
.gmfd-option.active::before { display: none; } /* remove old left-bar */

/* Active checkmark */
.gmfd-option.active .gmfd-option-check { opacity: 1; }
.gmfd-option-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.gmfd-option-check {
  opacity: 0;
  color: var(--gmfd-accent);
  font-size: 12px;
  transition: opacity .15s;
}

/* ── Filter clear button ──────────────────────────────────────── */
.gmfd-filter-clear {
  display: none;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--gmfd-border);
  border-radius: 50px;
  padding: 8px 14px;
  font-family: var(--gmfd-ff);
  font-size: 12px;
  color: var(--gmfd-muted);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.gmfd-filter-clear.visible { display: flex; }
.gmfd-filter-clear:hover { border-color: #c0392b; color: #c0392b; }

/* ── Mobile: Dropdowns volle Breite, eigene Zeile ────────────── */
@media (max-width: 667px) {
  .gmf-divi-wrap { padding: 20px 16px 32px; }
  .gmfd-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .gmfd-search-wrap {
    max-width: none;
    width: 100%;
  }
  .gmfd-dropdown {
    width: 100%;
  }
  .gmfd-dropdown-trigger {
    width: 100%;
    min-width: 0;
  }
  .gmfd-dropdown-panel {
    width: 100%;
    left: 0;
    right: 0;
  }
  .gmfd-filter-clear {
    align-self: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESULTS HEADER
═══════════════════════════════════════════════════════════════════ */
.gmfd-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.gmfd-results-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gmfd-muted);
}
.gmfd-results-count {
  font-size: 11px;
  color: var(--gmfd-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   BRAND GRID
═══════════════════════════════════════════════════════════════════ */
.gmfd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 980px) {
  .gmfd-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 667px) {
  .gmfd-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 400px) {
  .gmfd-grid { grid-template-columns: 1fr; }
}

/* ── Brand Card ───────────────────────────────────────────────── */
.gmfd-card {
  background: var(--gmfd-card-bg);
  border: 1.5px solid var(--gmfd-border);
  border-radius: var(--gmfd-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .25s, transform .25s, border-color .2s;
  animation: gmfd-in .35s ease both;
  position: relative;
}
@keyframes gmfd-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.gmfd-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.11);
  transform: translateY(-3px);
  border-color: var(--gmfd-accent);
}
.gmfd-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gmfd-accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s ease;
}
.gmfd-card:hover::before { transform: scaleX(1); }

.gmfd-card-logo {
  height: var(--gmfd-logo-h);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: var(--gmfd-card-bg);
  border-bottom: 1px solid var(--gmfd-border);
}
.gmfd-card-logo img {
  max-height: calc(var(--gmfd-logo-h) - 24px);
  max-width: 100%;
  object-fit: contain;
  transition: transform .3s;
}
.gmfd-card:hover .gmfd-card-logo img { transform: scale(1.05); }

.gmfd-card-placeholder {
  font-size: 13px; font-weight: 700; color: #ccc;
  letter-spacing: .04em; text-align: center;
}

.gmfd-card-body {
  padding: 10px 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--gmfd-card-bg);
}
.gmfd-card-name {
  font-size: 13px; font-weight: 700; color: #2c2826;
  line-height: 1.2; margin-bottom: 4px;
}

/* Tag lines — Standorte + Abteilungen als separate Zeilen */
.gmfd-card-meta { display: flex; flex-direction: column; gap: 3px; }
.gmfd-card-meta-line { font-size: 10px; line-height: 1.4; }

.gmfd-meta-standorte {
  display: flex; align-items: center; gap: 4px;
  font-weight: 600; color: #2c2826;
}
/* Standort-Icon (Pin) */
.gmfd-meta-standorte::before {
  content: '';
  display: inline-flex; flex-shrink: 0;
  width: 10px; height: 10px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
  opacity: .6;
}

.gmfd-meta-abteilungen {
  display: flex; align-items: center; gap: 4px;
  font-weight: 400; color: #9a8f87;
  padding-left: 14px; /* indent to align with standort text */
}
/* Shirt-Icon vor Abteilung */
.gmfd-meta-abteilungen::before {
  content: '';
  display: inline-flex; flex-shrink: 0;
  width: 10px; height: 10px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.57a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.57a2 2 0 0 0-1.34-2.23z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.57a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.57a2 2 0 0 0-1.34-2.23z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
  opacity: .6;
  margin-left: -14px; /* remove the padding-left indent since we have icon now */
}

/* Keep .gmfd-card-tags for backwards compatibility but hide chips style */
.gmfd-card-tags { display: none; }
.gmfd-tag { display: none; }

/* ═══════════════════════════════════════════════════════════════════
   STATES
═══════════════════════════════════════════════════════════════════ */
.gmfd-loader {
  grid-column: 1 / -1;
  display: flex; justify-content: center; align-items: center;
  padding: 80px;
}
.gmfd-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--gmfd-border);
  border-top-color: var(--gmfd-accent);
  border-radius: 50%;
  animation: gmfd-spin .7s linear infinite;
}
@keyframes gmfd-spin { to { transform: rotate(360deg); } }

.gmfd-no-results {
  grid-column: 1 / -1; text-align: center;
  padding: 80px 20px; color: var(--gmfd-muted); font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   LOAD MORE
═══════════════════════════════════════════════════════════════════ */
.gmfd-load-more-wrap { text-align: center; margin-top: 32px; }
.gmfd-load-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 36px;
  border: 1.5px solid var(--gmfd-border); border-radius: 50px;
  background: transparent; font-family: var(--gmfd-ff);
  font-size: 13px; font-weight: 600; color: var(--gmfd-muted);
  cursor: pointer; letter-spacing: .05em; transition: all .22s;
}
.gmfd-load-more-btn:hover {
  border-color: var(--gmfd-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  filter: brightness(1.08);
}
.gmfd-load-more-btn:disabled { opacity: .4; cursor: default; }
