/*
  IFN Catalog
  Producer listing (legacy IFN look & responsive)
*/

.ifn-producers-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 12px;
}

.ifn-producer-results {
  font-size: 14px;
  color: #555;
  margin: 6px 0 18px;
}

.ifn-producer-list {
  display: block;
}

.ifn-producer-item {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #dcdcdc;
}

.ifn-producer-item:last-child {
  border-bottom: 0;
}

.ifn-producer-thumb {
  flex: 0 0 260px;
}

.ifn-producer-thumb img {
  width: 260px;
  height: 170px;
  object-fit: cover;
  background: #eee;
  border: 6px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  display: block;
}

.ifn-producer-thumb-placeholder {
  display: block;
  width: 260px;
  height: 170px;
  border: 6px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.02) 45%, rgba(0, 0, 0, 0.06) 100%);
}

.ifn-producer-content {
  flex: 1 1 auto;
  min-width: 0;
}

.ifn-producer-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}

.ifn-producer-title a {
  color: #b00000;
  text-decoration: none;
}

.ifn-producer-title a:hover {
  text-decoration: underline;
}

.ifn-producer-meta {
  margin-top: 8px;
  font-size: 13.5px;
  color: #444;
}

.ifn-producer-meta .ifn-meta-label {
  font-weight: 700;
  color: #555;
}

.ifn-producer-meta a {
  color: #b00000;
  text-decoration: none;
}

.ifn-producer-meta a:hover {
  text-decoration: underline;
}

.ifn-producer-desc {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.ifn-producer-more {
  margin-top: 6px;
  font-size: 14px;
}

.ifn-producer-more a {
  color: #b00000;
  text-decoration: none;
  font-weight: 600;
}

.ifn-producer-more a:hover {
  text-decoration: underline;
}

.ifn-producer-badge {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
}

.ifn-producer-badge span {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 3px;
  background: #fff3a6;
  border: 1px solid #e4cc64;
  color: #6b5600;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .ifn-producers-page {
    padding: 12px 10px;
  }

  .ifn-producer-item {
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: 1px solid #dcdcdc;
    margin-bottom: 16px;
    background: #f6f6f6;
  }

  .ifn-producer-item:last-child {
    border-bottom: 1px solid #dcdcdc;
  }

  .ifn-producer-thumb {
    flex: 0 0 auto;
    padding: 12px 12px 0;
    background: #fff;
  }

  .ifn-producer-thumb img,
  .ifn-producer-thumb-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .ifn-producer-content {
    padding: 12px;
  }

  .ifn-producer-badge {
    padding: 0 12px 12px;
    margin-left: 0;
    align-self: flex-end;
  }

  .ifn-producer-desc {
    -webkit-line-clamp: 4;
  }
}

.ifn-page-title {
  margin: 0 0 14px;
}

.ifn-results-range {
  margin: 0 0 22px;
  opacity: .82;
  font-size: 14px;
}

.ifn-category-band {
  position: relative;
  margin: 0 0 28px;
  padding: 28px 0 24px;
}

.ifn-category-band--bleed {
  background: #f3f3f1;
  box-shadow: 0 0 0 100vmax #f3f3f1;
  clip-path: inset(0 -100vmax);
}

.ifn-category-grid {
  --ifn-category-desktop-cols: 5;
  --ifn-category-mobile-cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--ifn-category-desktop-cols), minmax(0, 1fr));
  gap: 20px 28px;
  margin: 0;
  align-items: start;
}

.ifn-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-height: 132px;
  padding: 8px 6px;
}

.ifn-category-card:hover {
  text-decoration: none;
}

.ifn-category-card-media {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 72px;
}

.ifn-category-card-media img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.ifn-category-card-fallback {
  width: 64px;
  height: 64px;
  border: 2px solid #222;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #222;
}

.ifn-category-card-title {
  display: block;
  color: #c54820;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ifn-category-band--producer {
  margin-top: -6px;
}

.ifn-category-band--producer-sub {
  margin-top: -8px;
  padding-top: 0;
}

.ifn-category-card.is-active .ifn-category-card-title {
  color: #5f8450;
}

.ifn-category-card.is-active .ifn-category-card-media {
  transform: scale(1.03);
}

.ifn-product-grid {
  --ifn-product-desktop-cols: 4;
  display: grid;
  grid-template-columns: repeat(var(--ifn-product-desktop-cols), minmax(0, 1fr));
  gap: 34px 30px;
  align-items: start;
}

.ifn-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.ifn-product-card__media-link,
.ifn-product-card__title a,
.ifn-product-card__button {
  text-decoration: none;
}

.ifn-product-card__media-link {
  display: block;
  width: 100%;
}

.ifn-product-card__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  margin-bottom: 14px;
}

.ifn-product-card__media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.ifn-product-card__placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .03));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5f8450;
  font-size: 42px;
  font-weight: 700;
}

.ifn-product-card__body {
  width: 100%;
}

.ifn-product-card__title {
  margin: 0;
  color: #5f8450;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.ifn-product-card__title a {
  color: inherit;
}

.ifn-product-card__summary {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #555;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 65px;
}

.ifn-product-card__actions {
  margin-top: 16px;
}

.ifn-product-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 2px 14px;
  border-radius: 999px;
  background: #5f8450;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ifn-product-card__button:hover,
.ifn-product-card__button:focus-visible,
.ifn-product-card__title a:hover,
.ifn-product-card__title a:focus-visible {
  color: inherit;
  text-decoration: none;
}

.ifn-pagination {
  margin-top: 28px;
}

@media (max-width: 767.98px) {
  .ifn-category-band {
    margin: 0 0 18px;
    padding: 16px 0 12px;
  }

  .ifn-category-grid {
    grid-template-columns: repeat(var(--ifn-category-mobile-cols), minmax(0, 1fr));
    gap: 10px 8px;
  }

  .ifn-category-card {
    min-height: 92px;
    gap: 6px;
    padding: 2px 2px 4px;
  }

  .ifn-category-card-media {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
  }

  .ifn-category-card-media img {
    width: 46px;
    height: 46px;
  }

  .ifn-category-card-fallback {
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 12px;
  }

  .ifn-category-card-title {
    font-size: 11px;
    line-height: 1.16;
  }

  .ifn-product-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ifn-product-card {
    display: grid;
    grid-template-columns: minmax(108px, 36%) minmax(0, 1fr);
    gap: 0 16px;
    align-items: start;
    text-align: left;
    padding: 18px 0;
    border-bottom: 1px solid #d8d8cd;
  }

  .ifn-product-card__media-link {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .ifn-product-card__media {
    aspect-ratio: auto;
    height: 148px;
    padding: 0 6px 0 0;
    margin-bottom: 0;
    justify-content: center;
    align-items: center;
  }

  .ifn-product-card__media img {
    width: auto;
    max-width: 100%;
    max-height: 148px;
  }

  .ifn-product-card__placeholder {
    width: 88px;
    height: 88px;
    font-size: 32px;
  }

  .ifn-product-card__body {
    grid-column: 2;
    grid-row: 1;
    padding-top: 4px;
  }

  .ifn-product-card__title {
    font-size: 16px;
    line-height: 1.22;
  }

  .ifn-product-card__summary {
    min-height: 0;
    -webkit-line-clamp: 3;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
  }

  .ifn-product-card__actions {
    margin-top: 12px;
  }

  .ifn-product-card__button {
    min-height: 34px;
    padding: 1px 11px;
    font-size: 12px;
    letter-spacing: .04em;
  }
}

@media (max-width: 479.98px) {
  .ifn-product-card {
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    gap: 0 14px;
  }

  .ifn-product-card__media {
    height: 136px;
    padding-right: 4px;
  }

  .ifn-product-card__media img {
    max-height: 136px;
  }

  .ifn-product-card__title {
    font-size: 15px;
  }

  .ifn-product-card__summary {
    font-size: 12px;
    line-height: 1.4;
  }
}


/* Product detail page */
.ifn-product-page {
  max-width: 1180px;
}

.ifn-product-detail {
  display: grid;
  grid-template-columns: minmax(300px, 44%) minmax(0, 1fr);
  grid-template-areas:
    "media title"
    "media aside";
  gap: 20px 38px;
  align-items: start;
}

.ifn-product-detail__titlewrap {
  grid-area: title;
}

.ifn-product-detail__title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.ifn-product-detail__media {
  grid-area: media;
  min-height: 360px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.ifn-product-detail__media img {
  max-width: 100%;
  max-height: 620px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ifn-product-detail__placeholder {
  width: 100%;
  min-height: 360px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: #f7f7f7;
}

.ifn-product-detail__aside {
  grid-area: aside;
}

.ifn-product-detail__summary {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(0,0,0,.78);
}

.ifn-product-detail__sku {
  margin: 0 0 26px;
  font-size: .98rem;
  line-height: 1.45;
}

.ifn-product-detail__producer-wrap {
  margin: 0 0 20px;
}

.ifn-product-detail__producer {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.ifn-product-detail__producer-logo {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ifn-product-detail__producer-logo img {
  max-width: 84%;
  max-height: 84%;
  object-fit: contain;
  display: block;
}

.ifn-product-detail__producer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ifn-product-detail__producer-label {
  font-size: .82rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(0,0,0,.56);
}

.ifn-product-detail__producer-name {
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
}

.ifn-product-detail__actions {
  margin-top: 4px;
}

.ifn-product-detail__contact-button {
  min-width: min(100%, 340px);
  min-height: 48px;
  padding: 10px 24px;
  border: 2px solid #799549;
  border-radius: 0;
  background: #fff;
  color: #799549;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.ifn-product-detail__contact-button:hover,
.ifn-product-detail__contact-button:focus-visible,
.ifn-product-detail__producer:hover .ifn-product-detail__producer-name,
.ifn-product-detail__producer:focus-visible .ifn-product-detail__producer-name {
  color: #5f7738;
  text-decoration: none;
}

.ifn-product-detail__description {
  margin-top: 42px;
}

.ifn-product-detail__description-title {
  margin: 0 0 14px;
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
}

.ifn-product-detail__description-body {
  max-width: 1120px;
  font-size: 1rem;
  line-height: 1.8;
}

.ifn-product-contact-modal .modal-content {
  border-radius: 18px;
}

.ifn-product-contact-modal .modal-header,
.ifn-product-contact-modal .modal-body {
  padding: 20px 22px;
}

@media (max-width: 991.98px) {
  .ifn-product-detail {
    gap: 18px 28px;
    grid-template-columns: minmax(240px, 42%) minmax(0, 1fr);
  }

  .ifn-product-detail__title {
    font-size: clamp(1.85rem, 4vw, 2.6rem);
  }

  .ifn-product-detail__media img {
    max-height: 520px;
  }
}

@media (max-width: 767.98px) {
  .ifn-product-detail {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "media"
      "aside";
    gap: 18px;
  }

  .ifn-product-detail__title {
    font-size: clamp(1.7rem, 9vw, 2.3rem);
  }

  .ifn-product-detail__media {
    min-height: 0;
    justify-content: flex-start;
  }

  .ifn-product-detail__media img {
    max-width: min(100%, 360px);
    max-height: none;
  }

  .ifn-product-detail__summary {
    margin-bottom: 14px;
    font-size: 1rem;
    line-height: 1.7;
  }

  .ifn-product-detail__sku {
    margin-bottom: 20px;
  }

  .ifn-product-detail__producer-logo {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .ifn-product-detail__contact-button {
    width: 100%;
    min-width: 0;
  }

  .ifn-product-detail__description {
    margin-top: 28px;
  }

  .ifn-product-detail__description-title {
    font-size: 1.35rem;
  }

  .ifn-product-contact-modal .modal-header,
  .ifn-product-contact-modal .modal-body {
    padding: 16px;
  }
}


.ifn-producercatalog-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  height: 170px;
  max-height: 170px;
  overflow: hidden;
}

.ifn-producercatalog-hero__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.ifn-producercatalog-hero__brand {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ifn-producercatalog-hero__logo {
  width: min(180px, 100%);
  min-height: 100px;
  max-height: 116px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ifn-producercatalog-hero__logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90px;
  padding: 5px;
  box-sizing: border-box;
  background: #fff;
  object-fit: contain;
}

.ifn-producercatalog-hero__logo--text {
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  color: #2b2b2b;
}

.ifn-producercatalog-hero__back {
  border-radius: 0;
  font-weight: 750;
  padding-inline: 14px;
}

@media (max-width: 767.98px) {
  .ifn-producercatalog-hero {
    height: 140px;
    max-height: 140px;
  }

  .ifn-producercatalog-hero__inner {
    justify-content: flex-end;
  }

  .ifn-producercatalog-hero__brand {
    gap: 8px;
  }

  .ifn-producercatalog-hero__logo {
    width: min(132px, 100%);
    min-height: 78px;
    max-height: 92px;
    padding: 0;
    background: transparent;
  }

  .ifn-producercatalog-hero__logo img {
    max-height: 78px;
    padding: 5px;
    background: #fff;
    box-sizing: border-box;
  }

  .ifn-producercatalog-hero__back {
    font-size: .82rem;
    padding-inline: 11px;
  }
}
