/*
 * Exsoune USA public polish v8 — WEB-02 / 2026-09-19
 * Product-card containment + image-based language flags.
 * Additive only; loaded after site-polish-v7.css.
 */

/* Header language selector: closed state is a flag only. */
.ex-header .ex-language__button {
  width: 48px;
  min-width: 48px;
  height: 42px;
  padding: 0;
  justify-content: center;
  gap: 0;
  letter-spacing: 0;
  overflow: hidden;
}
.ex-language__flag-image,
.ex-language__option-flag-image,
.ex-mobile-language-flag {
  display: block;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(7,17,31,.10);
}
.ex-language__flag-image { width: 28px; height: 19px; }
.ex-language__menu {
  width: 224px;
  padding: 8px;
}
.ex-language__menu a {
  display: grid !important;
  grid-template-columns: 30px minmax(0,1fr) !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 11px !important;
}
.ex-language__option-flag-image { width: 30px; height: 20px; }
.ex-language__option-copy strong {
  font-size: 13px;
  line-height: 1.2;
  text-transform: none !important;
}
.ex-language__option-copy small {
  font-size: 10.5px;
  line-height: 1.25;
}
.ex-mobile-language-flag { width: 26px; height: 18px; }
.ex-mobile-languages a > img + span { min-width: 0; }

/* Catalog cards: keep every text block inside its card at all viewport sizes. */
.ex-catalog-grid-v5 { align-items: stretch; }
.ex-catalog-card-v5 {
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.ex-catalog-card-v5__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important;
  min-height: 0;
  padding: 16px !important;
  overflow: hidden;
}
.ex-catalog-card-v5__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 16px;
}
.ex-catalog-card-v5__body {
  min-width: 0;
  min-height: 220px;
  padding: 18px 18px 16px !important;
  gap: 10px !important;
  overflow: hidden;
}
.ex-catalog-card-v5__body small,
.ex-catalog-card-v5__body h3,
.ex-catalog-card-v5__body p,
.ex-catalog-card-v5 .ex-card-bottom {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.ex-catalog-card-v5__body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.5em;
  font-size: 17px !important;
  line-height: 1.25 !important;
}
.ex-catalog-card-v5__body > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  max-height: 6.6em;
  line-height: 1.65 !important;
}
.ex-catalog-card-v5 .ex-card-bottom {
  width: 100%;
  gap: 12px;
  margin-top: auto !important;
  padding-top: 10px;
}
.ex-catalog-card-v5 .ex-card-bottom > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}
.ex-catalog-card-v5 .ex-card-code {
  min-width: 0;
  max-width: 68%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Homepage product cards use the same containment contract. */
.ex-product-card {
  min-width: 0;
  overflow: hidden;
}
.ex-product-card__body {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}
.ex-product-card__body h3,
.ex-product-card__body p {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.ex-product-card__body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.ex-product-card__body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.ex-product-card__body > span:last-child { margin-top: auto; }

@media (max-width: 1100px) {
  .ex-catalog-card-v5__body { min-height: 205px; }
}

@media (max-width: 760px) {
  .ex-catalog-card-v5__media { aspect-ratio: 16 / 10; padding: 12px !important; }
  .ex-catalog-card-v5__body { min-height: 0; padding: 17px !important; }
  .ex-catalog-card-v5__body h3 { min-height: 0; font-size: 17px !important; }
  .ex-catalog-card-v5__body > p { -webkit-line-clamp: 3; line-clamp: 3; max-height: 4.95em; }
}
