/* Ilumaailm «Top kaubamärgid» band before the footer (components/ilu-top-brands) */
body.world-ilu .ilu-topbrands { background: #fff; border-top: 1px solid #EEE; padding: 40px 0 44px; color: #111; }
/* Martin 21.11 (#10): the content width of .site-main (the band sits in .app-container like it; container-fluid px-md-4 inside) */
body.world-ilu .ilu-topbrands__inner { max-width: var(--site-max, 1800px); margin: 0 auto; padding: 0 24px; }
body.world-ilu .ilu-topbrands__row {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--ilu-tb-n, 6), minmax(0, 1fr)); gap: 24px 32px; align-items: center;
}
/* U652 (Martin 25.11 «liiga laiali, loogilised vahed vastavalt ekraanilaiusest, mahuks rohkem»): one row of equal columns,
   as many as fit (5 to 10 by width), centred with the same 24 px gap; logos past that count are hidden (the server sends
   up to 12, ilu-top-brands.blade.php shuffles them on every load, so each refresh shows another set) */
@media (min-width: 768px) {
  body.world-ilu .ilu-topbrands__row { --ilu-tb-cols: 5; display: flex; flex-wrap: nowrap; justify-content: center; gap: 24px; }
  body.world-ilu .ilu-topbrands__item { flex: 0 0 calc((100% - (var(--ilu-tb-cols) - 1) * 24px) / var(--ilu-tb-cols)); }
  body.world-ilu .ilu-topbrands__item:nth-child(n+6) { display: none; }
}
@media (min-width: 992px) {
  body.world-ilu .ilu-topbrands__row { --ilu-tb-cols: 6; }
  body.world-ilu .ilu-topbrands__item:nth-child(6) { display: flex; }
}
@media (min-width: 1200px) {
  body.world-ilu .ilu-topbrands__row { --ilu-tb-cols: 7; }
  body.world-ilu .ilu-topbrands__item:nth-child(7) { display: flex; }
}
@media (min-width: 1400px) {
  body.world-ilu .ilu-topbrands__row { --ilu-tb-cols: 8; }
  body.world-ilu .ilu-topbrands__item:nth-child(8) { display: flex; }
}
@media (min-width: 1600px) {
  body.world-ilu .ilu-topbrands__row { --ilu-tb-cols: 9; }
  body.world-ilu .ilu-topbrands__item:nth-child(9) { display: flex; }
}
@media (min-width: 1800px) {
  body.world-ilu .ilu-topbrands__row { --ilu-tb-cols: 10; }
  body.world-ilu .ilu-topbrands__item:nth-child(10) { display: flex; }
}
body.world-ilu .ilu-topbrands__item { display: flex; align-items: center; justify-content: center; min-width: 0; }
body.world-ilu .ilu-topbrands__logo {
  display: flex; align-items: center; justify-content: center; max-width: 100%; min-height: 64px; padding: 10px 14px; border-radius: 12px;
  background: var(--ilu-brand-bg, transparent); text-decoration: none; transition: opacity .2s ease, transform .2s ease;
}
body.world-ilu .ilu-topbrands__logo img { display: block; width: auto; height: auto; max-width: min(150px, 100%); max-height: 44px; object-fit: contain; }
body.world-ilu .ilu-topbrands__logo:hover, body.world-ilu .ilu-topbrands__logo:focus-visible { opacity: .82; transform: scale(1.03); }
body.world-ilu .ilu-topbrands__logo:focus-visible { outline: 2px solid #7B3FE4; outline-offset: 2px; }
/* dark theme: page surface */
[data-bs-theme="dark"] body.world-ilu .ilu-topbrands { background: var(--bs-body-bg, #121212); border-top-color: rgba(255, 255, 255, .08); color: #F3E4EC; }
/* U654 (Martin 25.11 «AZZARO pole invertinud», «kaota tumehallid kastid, logod puhtal taustal kõrvuti»): dark theme: no
   tiles, every logo white straight on the page background. That includes a brand with its own tile colour
   (--ilu-brand-bg, e.g. a white tile set in the admin): the tile is a light-theme thing, and every logo file is
   dark ink on a transparent background, so the filter turns all of them white */
[data-bs-theme="dark"] body.world-ilu .ilu-topbrands__logo,
[data-bs-theme="dark"] body.world-ilu .ilu-topbrands__logo--bg { background: transparent; border: 0; }
[data-bs-theme="dark"] body.world-ilu .ilu-topbrands__logo img { filter: brightness(0) invert(1); opacity: .92; }

/* phones: 2 × 3 */
@media (max-width: 767.98px) {
  body.world-ilu .ilu-topbrands { padding: 28px 0 32px; }
  body.world-ilu .ilu-topbrands__inner { padding: 0 16px; }
  body.world-ilu .ilu-topbrands__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  body.world-ilu .ilu-topbrands__item:nth-child(n+7) { display: none; }
  body.world-ilu .ilu-topbrands__logo img { max-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  body.world-ilu .ilu-topbrands__logo { transition: none; }
  body.world-ilu .ilu-topbrands__logo:hover, body.world-ilu .ilu-topbrands__logo:focus-visible { transform: none; }
}
