/* Maxmart redesign — remaining pages (Phase 9): brands index, compare, CMS pages, 404 / error,
   reviews list, news. */

/* ---------- Brands index ---------- */
.mm-brands { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; }
.mm-brands__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mm-brands__search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: var(--mm-control-h); margin: 0; padding: 0 14px;
  background: #fff; border: 1px solid var(--mm-border-strong); border-radius: var(--mm-r-btn); color: var(--mm-muted-2);
}
.mm-brands__search:focus-within { border-color: var(--mm-brand); box-shadow: var(--mm-focus); }
.mm-brands__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: var(--mm-fs-base); color: var(--mm-text); }
.mm-brands__sort { display: flex; align-items: stretch; height: var(--mm-control-h); background: #fff; border: 1px solid var(--mm-border-strong); border-radius: var(--mm-r-btn); overflow: hidden; }
.mm-brands__sort label { display: flex; align-items: center; margin: 0; padding: 0 16px; font-weight: 600; font-size: var(--mm-fs-md); cursor: pointer; border-right: 1px solid var(--mm-border); }
.mm-brands__sort input:checked + label { background: var(--mm-brand-soft); color: var(--mm-brand-dark); }
.mm-brands__sort input:focus-visible + label { outline: 2px solid var(--mm-brand); outline-offset: -2px; }
.mm-brands__sort button { width: 48px; border: 0; background: none; color: var(--mm-muted); cursor: pointer; }
.mm-brands__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mm-brand-tile {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 88px; padding: 16px 18px;
  background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-r-card); color: var(--mm-text);
}
.mm-brand-tile:hover { border-color: var(--mm-brand); color: var(--mm-brand-dark); text-decoration: none; }
.mm-brand-tile strong { font-family: var(--mm-font-display); font-size: 18px; font-weight: 800; }
.mm-brand-tile span { font-size: var(--mm-fs-sm); color: var(--mm-muted-2); }

/* ---------- Compare ---------- */
.mm-compare { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; }
.mm-compare__wrap { padding: 0; overflow-x: auto; border-radius: var(--mm-r-xl); }
.mm-compare__table { width: 100%; border-collapse: collapse; font-size: var(--mm-fs-md); }
.mm-compare__table th, .mm-compare__table td { padding: 12px 16px; border-bottom: 1px solid #EEF1F4; vertical-align: top; text-align: left; }
.mm-compare__table tbody tr:last-child th, .mm-compare__table tbody tr:last-child td { border-bottom: 0; }
.mm-compare__table th { position: sticky; left: 0; z-index: 1; width: 200px; min-width: 140px; background: var(--mm-surface-2); color: var(--mm-muted); font-weight: 600; }
.mm-compare__table tbody tr:nth-child(even) td { background: #FAFBFC; }
.mm-compare__product { position: relative; min-width: 200px; }
.mm-compare__product img { display: block; width: 100%; height: 140px; object-fit: contain; margin-bottom: 10px; }
.mm-compare__product strong { display: block; min-height: 40px; line-height: 1.35; }
.mm-compare__price { display: block; margin: 6px 0 10px; font-family: var(--mm-font-display); font-size: 20px; font-weight: 800; }
.mm-compare__product form { margin: 0; }
.mm-compare__remove {
  position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fff; color: var(--mm-muted); box-shadow: var(--mm-shadow-sm); cursor: pointer;
}
.mm-compare__remove:hover { color: #B4232E; }

/* ---------- CMS pages ---------- */
.mm-cms { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; }
.mm-cms__body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.mm-cms__body > .page-content { flex: 999 1 560px; min-width: 0; }
.mm-cms__aside { flex: 1 1 300px; max-width: 380px; position: sticky; top: 96px; }
@media (max-width: 991.98px) { .mm-cms__aside { max-width: none; position: static; } }

/* ---------- 404 / error ---------- */
.mm-error-page { max-width: 640px; margin: 32px auto 48px; }

/* ---------- Reviews (product page panel and the full list) ---------- */
.rating-average { margin: 0; font-family: var(--mm-font-display); font-size: 40px; font-weight: 800; color: var(--mm-text); }
.rating-item { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; font-size: var(--mm-fs-sm); }
.rating-item .progress { flex: 1; height: 8px; border-radius: 4px; background: var(--mm-bg); }
.rating-item .progress-bar.bg-warning { background: var(--mm-accent) !important; }
.review-title { font-weight: 700; color: var(--mm-text); }

/* ---------- News (module views) ---------- */
.news-item { margin-bottom: 20px; padding: 16px; background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-r-card); }
.news-item img, .news-detail img { max-width: 100%; height: auto; border-radius: var(--mm-r-lg); }
.news-item-published-on { font-size: var(--mm-fs-xs); color: var(--mm-muted-2); }
.news-title { font-family: var(--mm-font-display); font-weight: 800; }
.news-detail { padding: 24px; background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-r-xl); line-height: 1.6; }
