/* Farm directory — horizontal editorial cards (desktop) */

@media (min-width: 1024px) {
  html.b-editorial body.page-app .b-directory-results > .b-farm-list:not([hidden]) {
    gap: 28px;
  }

  html.b-editorial body.page-app .b-directory-results .b-farm-list > .b-farm-card--directory {
    width: 100%;
    max-width: none;
    min-width: 0;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  }
}

/* Directory card base */
html.b-editorial .b-farm-card--directory {
  border: 1.5px solid #000;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}

html.b-editorial .b-farm-card--directory.is-hidden {
  display: none;
}

/* Mobile / default: vertical stack */
html.b-editorial .b-farm-card--directory .b-farm-card__media {
  display: block;
  position: relative;
  border-bottom: 1.5px solid #000;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
}

html.b-editorial .b-farm-card--directory .b-farm-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
}

html.b-editorial .b-farm-card--directory .b-farm-card__image--placeholder {
  aspect-ratio: 16 / 10;
  min-height: 200px;
  background: var(--b-gray-100, #f5f5f5);
  display: grid;
  place-items: center;
  color: #555;
  font-size: 2rem;
}

html.b-editorial .b-farm-card--directory .b-farm-card__content {
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
}

html.b-editorial .b-farm-card--directory .b-farm-card__title {
  margin: 0;
  font-family: var(--b-font-display, inherit);
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  word-break: break-word;
}

html.b-editorial .b-farm-card--directory .b-farm-card__title a {
  color: #000;
  text-decoration: none;
}

html.b-editorial .b-farm-card--directory .b-farm-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

html.b-editorial .b-farm-card--directory .b-farm-card__location {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
}

html.b-editorial .b-farm-card--directory .b-farm-card__location-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

html.b-editorial .b-farm-card--directory .b-farm-card__location-row .b-farm-card__location {
  flex: 1 1 auto;
  min-width: 0;
}

html.b-editorial .b-farm-card--directory .b-farm-card__feature-icons {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 0 0 auto;
}

html.b-editorial .b-farm-card--directory .b-farm-card__feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #000;
  background: #fff;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  font: inherit;
  line-height: 1;
  cursor: default;
  flex-shrink: 0;
}

html.b-editorial .b-farm-card--directory .b-farm-card__feature-icon .ph {
  font-size: 0.95rem;
  line-height: 1;
}

html.b-editorial .b-farm-card--directory .b-farm-card__feature-icon:hover,
html.b-editorial .b-farm-card--directory .b-farm-card__feature-icon:focus-visible {
  background: var(--b-gray-100);
}

html.b-editorial .b-farm-card--directory .b-farm-card__feature-icon:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}


html.b-editorial .b-farm-card--directory .b-farm-card__location-sep {
  opacity: 0.65;
}

/* Scroll rows */
html.b-editorial .b-farm-card--directory .b-farm-card__row {
  min-width: 0;
  margin-top: 22px;
}

html.b-editorial .b-scroll-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

html.b-editorial .b-scroll-row:not(.has-overflow) {
  grid-template-columns: minmax(0, 1fr);
}

html.b-editorial .b-scroll-row:not(.has-overflow) .b-scroll-row__control {
  display: none;
}

html.b-editorial .b-scroll-row__viewport {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

html.b-editorial .b-scroll-row__viewport::-webkit-scrollbar {
  display: none;
}

html.b-editorial .b-scroll-row__control {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1.5px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

html.b-editorial .b-scroll-row__control:hover:not(:disabled) {
  background: #000;
  color: #fff;
}

html.b-editorial .b-scroll-row__control:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

html.b-editorial .b-scroll-row__control:disabled,
html.b-editorial .b-scroll-row__control.is-disabled {
  opacity: 0.22;
  pointer-events: none;
}

html.b-editorial .b-feature-list {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

html.b-editorial .b-feature-list li {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #000;
  border-radius: var(--b-radius-pill, 999px);
  padding: 0 14px;
  background: #fff;
  color: #000;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

html.b-editorial .b-feature-list .b-icon,
html.b-editorial .b-feature-list .ph {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 16px;
  height: 16px;
  font-size: 1rem;
  line-height: 1;
}

/* KPIs */
html.b-editorial .b-farm-card--directory .b-farm-card__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  margin-top: 24px;
}

html.b-editorial .b-farm-card--directory .b-farm-card__kpis--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.b-editorial .b-farm-card--directory .b-farm-card__kpis--cols-1,
html.b-editorial .b-farm-card--directory .b-farm-card__kpis[data-kpi-count="1"] {
  grid-template-columns: 1fr;
}

html.b-editorial .b-farm-card--directory .b-farm-card__kpis[data-kpi-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.b-editorial .b-kpi {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--b-line-soft, #d8d8d8);
}

html.b-editorial .b-kpi:last-child {
  border-right: 0;
}

html.b-editorial .b-kpi__icon {
  display: block;
  margin-bottom: 14px;
  font-size: 1.35rem;
  line-height: 1;
  color: #000;
}

html.b-editorial .b-kpi__icon .b-svg-icon {
  width: 22px;
  height: 22px;
}

html.b-editorial .b-kpi strong {
  display: block;
  font-size: clamp(1rem, 1.1vw, 1.25rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000;
  word-break: break-word;
}

html.b-editorial .b-kpi__value {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

html.b-editorial .b-kpi__unit {
  font-size: 0.58em;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: baseline;
}

html.b-editorial .b-kpi__label {
  display: block;
  margin-top: 7px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
}

/* Varieties */
html.b-editorial .b-farm-card--directory .b-farm-card__row--varieties {
  margin-top: 22px;
}

html.b-editorial .b-variety-list {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

html.b-editorial .b-variety-list li {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #000;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: #000;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Actions */
html.b-editorial .b-farm-card--directory .b-farm-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

html.b-editorial .b-farm-card--directory .b-farm-card__actions--solo {
  grid-template-columns: 1fr;
}

html.b-editorial .b-farm-card--directory .b-farm-card__actions .b-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  font-size: 0.74rem;
  gap: 10px;
  border-radius: 0;
  text-decoration: none;
}

html.b-editorial .b-farm-card--directory .b-btn--secondary {
  background: #fff;
  color: #000;
  border: 1.5px solid #000;
}

html.b-editorial .b-farm-card--directory .b-btn--secondary:hover {
  background: var(--b-gray-100);
  color: #000;
}

html.b-editorial .b-farm-card--directory .b-btn--primary {
  background: #000;
  color: #fff;
  border: 1.5px solid #000;
  text-decoration: none;
}

html.b-editorial .b-farm-card--directory .b-btn--primary:hover {
  background: #fff;
  color: #000;
}

html.b-editorial .b-farm-card--directory .b-farm-card__save.is-active,
html.b-editorial .b-farm-card--directory .b-farm-card__save.is-added {
  background: #000;
  color: #fff;
}

html.b-editorial .b-farm-card--directory .b-farm-card__save .ph {
  font-size: 1.1rem;
  line-height: 1;
}

/* Override legacy app.css wishlist (opacity:0, position:absolute on .farm__wishlist-btn) */
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  width: auto;
  height: auto;
  min-width: 0;
  opacity: 1;
  transform: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #000;
  border: 1.5px solid #000;
}

html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn:hover:not(.is-added):not(.is-active),
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn:focus-visible:not(.is-added):not(.is-active) {
  background: #000;
  color: #fff;
  border-color: #000;
  outline: 3px solid #000;
  outline-offset: 3px;
}

html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-added:hover,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-active:hover,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-added:focus-visible,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-active:focus-visible {
  background: #000;
  color: #fff;
  border-color: #000;
  outline: 3px solid #000;
  outline-offset: 3px;
}

html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-added .ph-fill.ph-heart,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-active .ph-fill.ph-heart,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-added:hover .ph-fill.ph-heart,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-active:hover .ph-fill.ph-heart,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-added:focus-visible .ph-fill.ph-heart,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-active:focus-visible .ph-fill.ph-heart {
  color: var(--b-wishlist-heart);
}

html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-added,
html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn.is-active {
  opacity: 1;
  transform: none;
  background: #000;
  color: #fff;
}

/* Hide legacy directory card pieces */
html.b-editorial .b-farm-card--directory > .b-farm-card__image,
html.b-editorial .b-farm-card--directory > .b-farm-card__body,
html.b-editorial .b-farm-card--directory .b-farm-card__favorite,
html.b-editorial .b-farm-card--directory .b-farm-card__meta,
html.b-editorial .b-farm-card--directory .b-farm-card__link {
  display: none !important;
}

/* Desktop horizontal layout — card height from content; image fills left column */
@media (min-width: 1024px) {
  html.b-editorial .b-farm-card--directory {
    display: grid;
    grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
    align-items: stretch;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__media {
    position: relative;
    display: block;
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
    border-bottom: 0;
    border-right: 1.5px solid #000;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__media img,
  html.b-editorial .b-farm-card--directory .b-farm-card__image--placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__image--placeholder {
    display: grid;
    place-items: center;
    aspect-ratio: auto;
    min-height: 0;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__content {
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 2.2vw, 36px);
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__title {
    font-size: clamp(2.4rem, 3.8vw, 4.6rem);
    line-height: 0.84;
    letter-spacing: -0.055em;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__feature-icons {
    display: flex;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__actions {
    margin-top: 28px;
  }
}

/* Mobile — kompakte KPI-Zeile (Icon + Wert + Einheit) */
@media (max-width: 1023px) {
  html.b-editorial .b-farm-card--directory .b-farm-card__kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    margin-top: 18px;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis[data-kpi-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis[data-kpi-count="1"] {
    grid-template-columns: 1fr;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi {
    position: relative;
    min-width: 0;
    min-height: 48px;
    padding: 10px 8px;
    border-right: 1px solid var(--b-line-soft, #d8d8d8);
    border-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi:last-child {
    border-right: 0;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    font-size: 1rem;
    line-height: 1;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi__value-wrap,
  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi strong {
    display: inline-flex;
    align-items: baseline;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    font-size: clamp(0.72rem, 3.2vw, 0.9rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    word-break: normal;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi__value,
  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi__unit {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    white-space: nowrap;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    margin-top: 22px;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__actions .b-farm-card__save {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 48px;
    padding: 0;
    gap: 0;
  }

  html.b-editorial body.page-app .b-farm-card--directory .b-farm-card__save.farm__wishlist-btn {
    width: 44px;
    min-width: 44px;
    min-height: 48px;
    padding: 0;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__actions .b-farm-card__save .ph {
    font-size: 1.15rem;
    line-height: 1;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__save-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__actions .b-farm-card__view {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
  }
}

@media (max-width: 380px) {
  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi {
    gap: 4px;
    padding-inline: 5px;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi__icon {
    width: 14px;
    height: 14px;
    font-size: 0.9rem;
  }

  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi__value-wrap,
  html.b-editorial .b-farm-card--directory .b-farm-card__kpis .b-kpi strong {
    font-size: 0.68rem;
  }
}

/* Skeleton */
html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .b-farm-card__media {
  background: var(--b-gray-100, #f0f0f0);
  min-height: 240px;
}

html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .b-farm-card__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .farm-skeleton {
  border-radius: 0;
  background: linear-gradient(90deg, #ececec 0%, #f8f8f8 50%, #ececec 100%);
  background-size: 200% 100%;
  animation: b-farm-skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes b-farm-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .farm-skeleton--title {
  height: 2.8rem;
  width: 72%;
}

html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .farm-skeleton--line {
  height: 0.85rem;
  width: 48%;
}

html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .farm-skeleton--block {
  height: 3.5rem;
  width: 100%;
}

html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .farm-skeleton--actions {
  height: 3.25rem;
  width: 100%;
  margin-top: auto;
}

@media (min-width: 1024px) {
  html.b-editorial .b-farm-card--directory.b-farm-card--skeleton {
    align-items: stretch;
  }

  html.b-editorial .b-farm-card--directory.b-farm-card--skeleton .b-farm-card__media {
    min-height: 0;
    aspect-ratio: auto;
  }
}

html.b-editorial .b-farm-card--directory :focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}
