.cooperativemaker-page {
  margin: 2rem auto;
}

.cooperativemaker-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 300px));
  justify-content: start;
  align-items: start;
}

/*
 * Home "Les coopératives" section: the theme renders .coop__media as an <a>,
 * which is inline by default, so the theme's `aspect-ratio:3/2.3` is ignored
 * and the image keeps its natural height — it fills the whole card and pushes
 * .coop__body (the name + description) below the card's overflow:hidden edge,
 * hiding the cooperative name. Forcing the media to a block restores the crop.
 */
.coop__media {
  display: block;
}

.cooperativemaker-card {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  max-width: 300px;
}

.cooperativemaker-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.cooperativemaker-card__body {
  padding: 1rem;
}

.cooperativemaker-card__body h2 {
  display: block;
  margin: .75rem 0 .5rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

.cooperativemaker-card__body h2 a {
  color: inherit;
  text-decoration: none;
}

.cooperativemaker-territoire,
.product__coop-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  background: #2f6b45;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .65rem;
}

.product__coop-badge {
  position: absolute;
  left: .75rem;
  bottom: .75rem;
  z-index: 2;
  text-decoration: none;
}

.cooperativemaker-description {
  margin: 1rem 0 2rem;
}

.cooperativemaker-detail__image {
  display: block;
  width: min(100%, 720px);
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.cooperativemaker-products {
  display: grid;
  gap: 1.25rem;
  /* Fixed max track width so a single product never stretches to the full
     row width and upscales its image into a blurry, distorted thumbnail. */
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  justify-content: start;
}

.cooperativemaker-product {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.cooperativemaker-product a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cooperativemaker-product img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f4efe7;
}

.cooperativemaker-product span {
  display: block;
  padding: .8rem;
  font-weight: 600;
}

/* Product page: "made by cooperative" badge under the add-to-cart form */
.cooperativemaker-pbadge {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 1rem 0 0;
  padding: .7rem .9rem;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.cooperativemaker-pbadge:hover {
  border-color: rgba(47, 107, 69, .45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
  transform: translateY(-1px);
}

.cooperativemaker-pbadge__logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #f4efe7;
}

.cooperativemaker-pbadge__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.cooperativemaker-pbadge__label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #2f6b45;
}

.cooperativemaker-pbadge__name {
  font-size: 1rem;
  font-weight: 700;
  color: #2b251e;
}

.cooperativemaker-pbadge__arrow {
  width: 18px;
  height: 18px;
  margin-inline-start: auto;
  flex: 0 0 auto;
  color: #2f6b45;
}
