/**
 * Будинок Затишку — all-manufacturers directory (mockup 4f mobile / 4g
 * desktop). Desktop-first (matches catalog-directory.css/category.css
 * convention); the grid narrows column-count at breakpoints rather than
 * switching card shape (unlike catalog-directory's row/grid swap) --
 * both mockup frames use the same vertical logo-top tile, just 3 columns
 * on mobile vs 6 on desktop.
 */

/* No top padding: the gap under the breadcrumb is the shared 14px (rule: breadcrumb-to-title gap is minimal). */
.bz-mfdir { padding: 0 0 var(--space-6); }

.bz-mfdir__head { margin-bottom: var(--space-5); }
.bz-mfdir__head h1 { margin-bottom: 6px; }
.bz-mfdir__stats { margin: 0; font-size: 14px; color: var(--c-muted); }

.bz-mfdir__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.bz-mfdir__search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 11px 15px;
  font-size: 14px;
  color: var(--c-muted);
}
.bz-mfdir__search input {
  flex: 1;
  border: none;
  background: none;
  font: inherit;
  color: var(--c-text);
  outline: none;
}
.bz-mfdir__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bz-mfdir__pill {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  color: var(--c-text);
  border-radius: var(--radius-lg);
  padding: 10px 15px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.bz-mfdir__pill:hover { border-color: var(--c-coffee); }
.bz-mfdir__pill.is-active {
  background: var(--c-coffee);
  border-color: var(--c-coffee);
  color: var(--c-card);
}

/* Wide container (up to 2400px, same class as category/home) -- auto-fill
   so the grid actually uses the extra width on large monitors instead of
   sitting at a fixed 6 columns with huge gaps, same reasoning as
   category.css's own product grid. Mobile keeps a fixed 3-column tile
   grid (see the max-width:899px override below) since that's a deliberate
   compact-card layout (mockup 4f), not just "narrower auto-fill". */
.bz-mfdir__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: var(--space-5) 0 var(--space-6);
}
.bz-mfdir__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--c-muted);
  font-size: 14px;
  padding: var(--space-5) 0;
}

.bz-mfdir__card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}
.bz-mfdir__card:hover { border-color: var(--c-coffee); }

.bz-mfdir__media {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bz-mfdir__media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.bz-mfdir__media-fallback {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  color: var(--c-line);
}

.bz-mfdir__name { font-family: var(--font-heading); font-weight: 700; font-size: 15px; color: var(--c-text); }
.bz-mfdir__meta { font-size: 11px; color: var(--c-muted); }
.bz-mfdir__cats { font-size: 11.5px; line-height: 1.45; color: var(--c-text); flex: 1; }
.bz-mfdir__cta { font-size: 12px; font-weight: 800; color: var(--c-ginger); }

.bz-mfdir__info {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
/* The text about the factories (Custom modules in the position manufacturers-seo-text): a reading column. */
.bz-mfdir__text { max-width: 860px; font-size: 14.5px; line-height: 1.65; color: var(--c-text); }
.bz-mfdir__text h2 { font-family: var(--font-heading); font-size: 20px; margin: var(--space-6, 32px) 0 var(--space-3); }
.bz-mfdir__text h2:first-child { margin-top: 0; }
.bz-mfdir__text h3 { font-family: var(--font-heading); font-size: 16px; margin: var(--space-5) 0 var(--space-2); }
.bz-mfdir__text p { margin: 0 0 var(--space-3); }
.bz-mfdir__text p:last-child { margin-bottom: 0; }
.bz-mfdir__text a { color: var(--c-ginger); }

@media (max-width: 899px) {
  .bz-mfdir__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bz-mfdir__pills { overflow-x: auto; flex-wrap: nowrap; margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); }
  .bz-mfdir__pill { flex: none; }
}

@media (max-width: 479px) {
  .bz-mfdir__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .bz-mfdir__card { padding: 11px; }
  .bz-mfdir__cats { display: none; } /* mobile tile (4f) drops the specialty line -- no room at 3-col width */
  .bz-mfdir__cta { display: none; }  /* same as above -- 4f's mobile card is media+name+meta only */
  .bz-mfdir__info { padding: var(--space-4); }
}
