/* Body Nutrition - pagina marca; soltanto body#manufacturer. */
body#manufacturer .bn-brand-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: 28px;
  min-height: 210px;
  margin: 0 0 18px;
  padding: 28px 32px;
  overflow: hidden;
  background: linear-gradient(110deg, #eaf8f2 0%, #f5fcf8 63%, #f9fdfb 100%);
  border: 1px solid #dbece4;
  border-radius: 11px;
  box-shadow: 0 4px 16px rgba(38, 55, 70, .05);
}

body#manufacturer .bn-brand-hero__copy { min-width: 0; }

body#manufacturer .bn-brand-hero__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #239b69;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body#manufacturer .bn-brand-hero__title {
  margin: 0 0 10px;
  color: #263746;
  font-family: inherit;
  font-size: clamp(25px, 2.4vw, 33px);
  line-height: 1.13;
  font-weight: 800;
  letter-spacing: -.015em;
}

body#manufacturer .bn-brand-hero__intro {
  max-width: 680px;
  margin: 0;
  color: #52646c;
  font-size: 13px;
  line-height: 1.6;
}

body#manufacturer .bn-brand-hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 126px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e2eee8;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(36, 76, 59, .08);
  color: #263746;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

body#manufacturer .bn-brand-hero__logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
}

body#manufacturer .bn-brand-products-heading {
  margin: 15px 0 11px;
}

body#manufacturer .bn-brand-products-heading h2 {
  margin: 0;
  color: #263746;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

/* Stili soltanto ai controlli: non colorare il wrapper se non contiene i filtri. */
body#manufacturer #af_form .af_filter select,
body#manufacturer #af_form .af_filter .select-title,
body#manufacturer #af_form .af_filter .af_filter_title {
  min-height: 40px;
  color: #263746;
  background: #fff;
  border: 1px solid #d7e6de;
  border-radius: 6px;
  font-size: 12px;
}

body#manufacturer #js-product-list-top {
  margin-bottom: 10px;
}

body#manufacturer .products-selection {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e7efea;
  border-radius: 8px;
}

/* Salvaguardie delle card marca spostate dal Custom CSS.
   Le card del layout nuovo, più specifiche sotto #products, restano prioritarie. */
body#manufacturer .product-miniature,
body.page-manufacturer .product-miniature {
  height: auto !important;
  overflow: visible !important;
}

body#manufacturer .product-miniature .thumbnail-container,
body.page-manufacturer .product-miniature .thumbnail-container {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body#manufacturer .product-miniature .product-thumbnail,
body.page-manufacturer .product-miniature .product-thumbnail {
  display: flex !important;
  align-items: center;
  justify-content: center;
  aspect-ratio: 236 / 305;
  background: #fff;
  overflow: hidden;
}

body#manufacturer .product-miniature .product-thumbnail img,
body.page-manufacturer .product-miniature .product-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

body#manufacturer .product-miniature .product-title,
body.page-manufacturer .product-miniature .product-title {
  min-height: 48px;
}

body#manufacturer .product-miniature .product-description-short,
body.page-manufacturer .product-miniature .product-description-short {
  min-height: 54px;
  overflow: visible !important;
}

body#manufacturer .product-miniature .product-price-and-shipping,
body.page-manufacturer .product-miniature .product-price-and-shipping {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 34px;
  overflow: visible !important;
  margin-top: 6px;
}

@media (max-width: 767px) {
  body#manufacturer .product-miniature .product-title,
  body.page-manufacturer .product-miniature .product-title {
    min-height: 44px;
  }

  body#manufacturer .product-miniature .product-description-short,
  body.page-manufacturer .product-description-short {
    min-height: 54px;
  }
}

/* Card catalogo allineate alla gerarchia della pagina categoria. */
body#manufacturer #products .products {
  margin-right: -5px;
  margin-left: -5px;
}

body#manufacturer #products .js-product-miniature-wrapper:not(.product-carousel) {
  margin-bottom: 10px;
  padding-right: 5px;
  padding-left: 5px;
}

body#manufacturer #products .product-miniature-grid {
  height: 100% !important;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8efeb;
  border-radius: 9px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body#manufacturer #products .product-miniature-grid:hover {
  transform: translateY(-2px);
  border-color: #cfe5d9;
  box-shadow: 0 8px 20px rgba(38, 55, 70, .08);
}

body#manufacturer #products .product-miniature-grid .thumbnail-container {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body#manufacturer #products .product-miniature-grid .product-thumbnail {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 158px;
  overflow: hidden;
  aspect-ratio: auto !important;
}

body#manufacturer #products .product-miniature-grid .product-thumbnail img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 150px !important;
  object-fit: contain !important;
}

body#manufacturer #products .product-miniature-grid .product-description {
  padding: 10px 12px 14px;
  text-align: center;
}

body#manufacturer #products .product-miniature-grid .product-title {
  display: -webkit-box;
  min-height: 2.8em;
  margin-bottom: 5px;
  overflow: hidden;
  color: #263746;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body#manufacturer #products .product-miniature-grid .product-title a { color: #263746; }
body#manufacturer #products .product-miniature-grid .product-title a:hover { color: #239b69; }

body#manufacturer #products .product-miniature-grid .product-brand {
  margin-bottom: 3px;
  color: #738189;
  font-size: 10px;
}

body#manufacturer #products .product-miniature-grid .product-price-and-shipping {
  display: block !important;
  min-height: 28px;
  margin-top: 3px;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body#manufacturer #products .product-miniature-grid .product-price {
  color: #249b6d;
  font-size: 15px;
  font-weight: 800;
}

body#manufacturer #products .product-miniature-grid .product-description-short {
  display: none !important;
}

/* La descrizione originale rimane disponibile integralmente e senza JS. */
body#manufacturer .bn-brand-story {
  margin: 28px 0 6px;
  background: linear-gradient(110deg, #eaf8f2, #f9fcfa);
  border: 1px solid #dbece4;
  border-radius: 11px;
}

body#manufacturer .bn-brand-story__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
}

body#manufacturer .bn-brand-story__summary::-webkit-details-marker { display: none; }

body#manufacturer .bn-brand-story__heading {
  color: #263746;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

body#manufacturer .bn-brand-story__toggle {
  flex: 0 0 auto;
  color: #238b60;
  font-size: 12px;
  font-weight: 700;
}

body#manufacturer .bn-brand-story__toggle i { margin-left: 7px; transition: transform .2s ease; }
body#manufacturer .bn-brand-story__details[open] .bn-brand-story__toggle i { transform: rotate(180deg); }

body#manufacturer .bn-brand-story__content {
  padding: 0 26px 25px;
  color: #52646c;
  font-size: 13px;
  line-height: 1.65;
}

body#manufacturer .bn-brand-story__content > :last-child { margin-bottom: 0; }
body#manufacturer .bn-brand-story__content h2,
body#manufacturer .bn-brand-story__content h3 { color: #263746; }

@media (min-width: 1200px) {
  body#manufacturer #products .products .js-product-miniature-wrapper:not(.product-carousel) {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  body#manufacturer #products .products .js-product-miniature-wrapper:not(.product-carousel) {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (max-width: 767px) {
  body#manufacturer .bn-brand-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 20px;
  }
  body#manufacturer .bn-brand-hero__logo {
    grid-row: 1;
    width: min(100%, 178px);
    min-height: 82px;
    padding: 12px;
  }
  body#manufacturer .bn-brand-hero__logo img { max-height: 58px; }
  body#manufacturer .bn-brand-hero__title { font-size: 26px; }
  body#manufacturer .bn-brand-products-heading h2 { font-size: 17px; }
  body#manufacturer .bn-brand-story__summary { padding: 18px; }
  body#manufacturer .bn-brand-story__heading { font-size: 17px; }
  body#manufacturer .bn-brand-story__content { padding: 0 18px 20px; }
}

@media (min-width: 421px) and (max-width: 767px) {
  body#manufacturer #products .products .js-product-miniature-wrapper:not(.product-carousel) {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 420px) {
  body#manufacturer .bn-brand-hero { padding: 17px; }
  body#manufacturer #products .product-miniature-grid .product-thumbnail { height: 125px; }
  body#manufacturer #products .product-miniature-grid .product-thumbnail img { max-height: 117px !important; }
  body#manufacturer #products .product-miniature-grid .product-description { padding: 8px 9px 12px; }
  body#manufacturer #products .product-miniature-grid .product-title { font-size: 11px; }
  body#manufacturer .bn-brand-story__summary { align-items: flex-start; flex-direction: column; gap: 7px; }
}
