/* ─────────────────────────────────────────────────────────────────────────────
   supermarket-logo-badge.css
   Badge logo supermercato: sull'immagine (home + griglia), inline (lista), volantini.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Badge assoluto sull'immagine (OfferCard home + ProductCard griglia) ───── */
.offer-card__logo-badge,
.product-card__logo-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 4px;
  line-height: 0;
}

/* Home offerte + search griglia: logo 40×40 */
.offer-card__logo-badge .supermarket-logo__img,
.product-card__logo-badge .supermarket-logo__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.offer-card__logo-badge .supermarket-logo__avatar,
.product-card__logo-badge .supermarket-logo__avatar {
  width: 40px !important;
  height: 40px !important;
}

/* ── Immagine logo reale ─────────────────────────────────────────────────────── */
.supermarket-logo__img {
  display: block;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Avatar testuale di fallback (dimensioni anche da CSS per lista) ────────────── */
.supermarket-logo__avatar {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 4px;
}

/* ── Inline logo accanto al nome supermercato (ProductCard lista) ────────────── */
.product-card__store--with-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  min-width: 0;
}

.product-card__store--with-logo .supermarket-logo__img,
.product-card__store--with-logo .supermarket-logo__avatar {
  width: 36px !important;
  height: 36px !important;
  flex-shrink: 0;
}

.product-card__store--with-logo {
  gap: 8px;
}

.product-card__store--with-logo > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ── Logo nella media del toggle impostazioni (36×36 in box 40×40) ──────────── */
.supermarket-toggle__media--has-logo {
  background: #fff !important;
}

.supermarket-toggle__media--has-logo .supermarket-logo__img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
}

.supermarket-toggle__media--has-logo .supermarket-logo__avatar {
  width: 36px !important;
  height: 36px !important;
}

/* ── Disclaimer legale marchi (usato in home, search, settings) ──────────────── */
.brand-disclaimer {
  margin-block-start: var(--space-2);
  font-size: 0.62rem;
  color: var(--color-text-faint);
  text-align: center;
  opacity: 0.75;
}

/* Volantino PDF: logo 56×56 in box bianco centrato sul banner */
.flyer-card__logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 120px;
}

.flyer-card__logo-fallback .supermarket-logo__img,
.flyer-card__logo-fallback .supermarket-logo__avatar {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain;
  box-sizing: border-box;
  padding: 6px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

[data-theme='dark'] .flyer-card__logo-fallback .supermarket-logo__img,
[data-theme='dark'] .flyer-card__logo-fallback .supermarket-logo__avatar {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* ── Confronto carrello (#compare): logo + nome supermercato ──────────────── */
.compare-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.compare-card__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  padding: 4px;
  background: #fff;
  border-radius: 6px;
}

.compare-card__logo-wrap .supermarket-logo__img,
.compare-card__logo-wrap .supermarket-logo__avatar {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain;
}

.compare-card__title-row .compare-card__store-name {
  flex: 1;
  min-width: 0;
}
