/* moto365 — список брендов (/brands). Префикс m365l-. Брейкпоинты: 900px, 560px. */

.m365l {
  --o: #F26522; --ink: #0F1115; --text: #4A4842; --muted: #6B6963; --faint: #8B8880;
  --panel: #F6F6F4; --line: #EEEEEA; --empty: #C9C4B8;
  --sticky-top: 76px;
  max-width: 1440px; margin: 0 auto; padding: 20px 24px 64px;
  display: flex; flex-direction: column; gap: 24px;
  font-family: 'Onest', system-ui, -apple-system, sans-serif; color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
/* clearance под fixed-header сайта */
main.m365l { padding-top: calc(76px + 16px); }
.m365l *, .m365l *::before, .m365l *::after { box-sizing: border-box; }
.m365l a { color: var(--o); }

.m365l-crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--faint); }
.m365l .m365l-crumbs a { color: var(--faint); text-decoration: none; }
.m365l .m365l-crumbs a:hover { color: var(--o); }
.m365l-crumbs .is-current { color: var(--ink); }
.m365l-h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }

/* hero */
.m365l-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 56px; color: #fff; background: linear-gradient(135deg, #0F1115 0%, #1a1512 60%, #2a1810 100%); }
.m365l-hero__glow { position: absolute; right: -140px; top: -160px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(242,101,34,.28) 0%, transparent 70%); pointer-events: none; }
.m365l-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.m365l-hero__main { display: flex; flex-direction: column; gap: 18px; }
.m365l-pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.8); white-space: nowrap; }
.m365l-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--o); }
.m365l-hero__title { margin: 0; font-size: 68px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.m365l-search { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; background: #fff; border-radius: 16px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); cursor: text; }
.m365l-search svg { flex: 0 0 auto; }
.m365l-search input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.m365l-search input::placeholder { color: #A8A396; }

/* популярные */
.m365l-popular { display: flex; flex-direction: column; gap: 16px; }
.m365l-popular__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.m365l .m365l-popular__grid a { height: 84px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 0 12px; text-align: center; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; transition: border-color .15s, color .15s; }
.m365l .m365l-popular__grid a:hover { border-color: var(--o); color: var(--o); }

/* панель */
.m365l-bar { position: sticky; top: var(--sticky-top); z-index: 5; background: #fff; padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.m365l-bar__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.m365l-seg { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.m365l-seg button { padding: 8px 14px; border: 0; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: transparent; color: var(--muted); }
.m365l-seg button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.m365l-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
.m365l-check input { width: 18px; height: 18px; accent-color: var(--o); margin: 0; }
.m365l-letters { display: flex; flex-wrap: wrap; gap: 4px; }
.m365l-letters[hidden] { display: none; }
.m365l-letters a, .m365l-letters span { flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; text-decoration: none; }
.m365l .m365l-letters a { color: var(--ink); background: var(--panel); transition: background .15s, color .15s; }
.m365l .m365l-letters a:hover { background: var(--o); color: #fff; }
.m365l-letters .is-empty { color: var(--empty); font-weight: 600; background: transparent; pointer-events: none; }

/* пусто */
.m365l-empty { padding: 48px 24px; text-align: center; background: var(--panel); border-radius: 20px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.m365l-empty[hidden] { display: none; }
.m365l-empty__title { font-size: 18px; font-weight: 700; }
.m365l-empty__text { font-size: 14px; color: var(--muted); }

/* группы */
.m365l-groups { display: flex; flex-direction: column; gap: 12px; }
.m365l-group { scroll-margin-top: calc(var(--sticky-top) + 150px); display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.m365l-group[hidden] { display: none; }
.m365l-group__head { display: flex; flex-direction: column; gap: 4px; }
.m365l-group__letter { font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--o); }
.m365l-group__count { font-size: 12px; color: var(--faint); }
.m365l-group__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 24px; align-content: start; }
.m365l .m365l-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; transition: background .15s, color .15s; }
.m365l-brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m365l a.m365l-brand::after { content: "→"; flex: 0 0 auto; color: var(--o); font-size: 14px; }
.m365l a.m365l-brand:hover { background: var(--panel); color: var(--o); }
.m365l .m365l-brand.is-nopage { color: var(--faint); font-weight: 400; margin: 0; padding: 8px 0; }
.m365l-brand[hidden] { display: none; }

.m365l-more { align-self: center; height: 52px; padding: 0 28px; background: transparent; border: 1.5px solid var(--ink); color: var(--ink); border-radius: 14px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.m365l-more:hover { background: var(--ink); color: #fff; }

/* ===== ПЛАНШЕТ ===== */
@media (max-width: 1100px) {
  main.m365l { padding-top: calc(132px + 12px); }
  .m365l { --sticky-top: 132px; }
}
@media (max-width: 900px) {
  .m365l-hero { padding: 36px 28px; }
  .m365l-hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .m365l-hero__title { font-size: 52px; }
}

/* ===== ТЕЛЕФОН ===== */
@media (max-width: 560px) {
  main.m365l { padding-top: calc(124px + 12px); }
  .m365l { padding: 14px 16px 40px; gap: 20px; --sticky-top: 124px; }
  .m365l-hero { border-radius: 22px; padding: 24px 20px; }
  .m365l-hero__title { font-size: 36px; }
  .m365l-search { height: 52px; padding: 0 16px; border-radius: 14px; }
  .m365l-search input { font-size: 15px; }
  .m365l-h2 { font-size: 20px; }
  .m365l-popular__grid { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .m365l-popular__grid::-webkit-scrollbar, .m365l-letters::-webkit-scrollbar { display: none; }
  .m365l .m365l-popular__grid a { flex: 0 0 auto; min-width: 120px; height: 64px; border-radius: 14px; white-space: nowrap; }
  .m365l-bar { padding: 10px 0; }
  .m365l-letters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .m365l-group { scroll-margin-top: calc(var(--sticky-top) + 120px); display: flex; flex-direction: column; gap: 10px; padding: 20px 0; }
  .m365l-group__head { flex-direction: row; align-items: baseline; gap: 10px; }
  .m365l-group__letter { font-size: 32px; }
  .m365l-group__list { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .m365l .m365l-brand { padding: 10px 8px; margin: 0 -8px; font-size: 14px; }
  .m365l .m365l-brand.is-nopage { padding: 10px 0; margin: 0; }
  .m365l-more { width: 100%; padding: 0 20px; }
}
