/* ==========================================================================
   BRAND DIRECTORY — loaded on the "Brand Directory" page template and the
   single-brand taxonomy archive. Ported 1:1 from this session's already-
   approved premium redesign of megamart_brands_v2.html, mechanically
   renamed to mm- prefixed classes. The page's own header/footer/back-to-top
   were retired in favor of the shared sitewide header.php/footer.php.
   ========================================================================== */

/* ── PAGE BANNER ── */
.mm-pg-banner { background: linear-gradient(120deg, #161311 0%, #2D1A1A 45%, #3D1010 100%); padding: 64px 24px 56px; position: relative; overflow: hidden; }
.mm-pg-banner::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .015) 0, rgba(255, 255, 255, .015) 1px, transparent 1px, transparent 50px); pointer-events: none; }
.mm-pg-banner::after { content: ""; position: absolute; right: -80px; top: -100px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(204, 27, 27, .28) 0%, transparent 70%); pointer-events: none; }
.mm-pg-banner-in { max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.mm-pg-bc { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255, 255, 255, .4); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1.5px; }
.mm-pg-bc a { color: rgba(255, 255, 255, .55); transition: color .18s; }
.mm-pg-bc a:hover { color: var(--mm-gold); }
.mm-pg-banner h1 { font-family: var(--mm-fh); font-size: 54px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .5px; line-height: 1; margin-bottom: 14px; }
.mm-pg-banner h1 em { color: var(--mm-gold); font-style: normal; }
.mm-pg-banner-line { width: 52px; height: 4px; background: linear-gradient(90deg, var(--mm-gold), rgba(255, 215, 0, .15)); border-radius: 2px; margin-bottom: 18px; }
.mm-pg-banner p { font-size: 14px; color: rgba(255, 255, 255, .55); line-height: 1.7; max-width: 460px; }
.mm-pg-stats { display: flex; gap: 0; background: rgba(255, 255, 255, .05); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; overflow: hidden; flex-shrink: 0; box-shadow: 0 24px 56px rgba(0, 0, 0, .35); }
.mm-pg-stat { padding: 22px 32px; text-align: center; border-right: 1px solid rgba(255, 255, 255, .09); transition: background .2s; }
.mm-pg-stat:hover { background: rgba(255, 255, 255, .045); }
.mm-pg-stat:last-child { border-right: none; }
.mm-pg-stat strong { display: block; font-family: var(--mm-fh); font-size: 32px; font-weight: 800; color: var(--mm-gold); line-height: 1; }
.mm-pg-stat span { font-size: 10.5px; color: rgba(255, 255, 255, .45); text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; display: block; }
/* Single-brand archive variant (taxonomy-mm_brand.php) — same banner, adds a logo */
.mm-brand-archive-title { display: flex; align-items: center; }
.mm-brand-archive-logo { max-height: 64px; width: auto; display: block; }

/* ── LOGO SHOWCASE — 3 rows of infinite scroll ── */
.mm-logo-showcase { background: #fff; padding: 52px 0 56px; border-bottom: 1px solid var(--mm-cream-2); overflow: hidden; }
.mm-logo-panel { max-width: 1280px; margin: 0 auto; padding: 6px 24px; }
.mm-logo-panel-in { border: 1px solid var(--mm-cream-2); border-radius: 18px; box-shadow: var(--mm-sh-sm); overflow: hidden; }
.mm-logo-showcase-hd { max-width: 1280px; margin: 0 auto 32px; padding: 0 24px; display: flex; align-items: flex-end; justify-content: space-between; }
.mm-sh-lbl { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--mm-r); margin-bottom: 4px; }
.mm-sh-tit { font-family: var(--mm-fh); font-size: 32px; font-weight: 800; color: var(--mm-t); text-transform: uppercase; letter-spacing: .5px; line-height: 1; }
.mm-sh-line { width: 44px; height: 4px; background: var(--mm-r); border-radius: 2px; margin-top: 8px; }
.mm-sh-sub { font-size: 13px; color: var(--mm-tm); }
.mm-logo-rows { display: flex; flex-direction: column; gap: 0; }
.mm-logo-row { position: relative; overflow: hidden; padding: 16px 0; border-bottom: 1px solid var(--mm-cream-2); }
.mm-logo-row:last-child { border-bottom: none; }
.mm-logo-row::before,
.mm-logo-row::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.mm-logo-row::before { left: 0; background: linear-gradient(to right, #fff, transparent); }
.mm-logo-row::after { right: 0; background: linear-gradient(to left, #fff, transparent); }
.mm-logo-track { display: flex; align-items: center; gap: 0; width: max-content; }
.mm-logo-track.mm-scroll-right { animation: mm-scroll-right 55s linear infinite; }
.mm-logo-track.mm-scroll-left { animation: mm-scroll-left 60s linear infinite; }
.mm-logo-track:hover { animation-play-state: paused; }
@keyframes mm-scroll-right { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes mm-scroll-left { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }
.mm-logo-card { display: flex; align-items: center; justify-content: center; width: 180px; height: 88px; padding: 14px 24px; flex-shrink: 0; border-right: 1px solid var(--mm-cream-2); position: relative; transition: all .22s; }
.mm-logo-card:hover { background: rgba(204, 27, 27, .04); }
.mm-logo-card img { max-width: 130px; max-height: 52px; width: auto; height: auto; object-fit: contain; display: block; opacity: .6; filter: grayscale(80%); transition: all .25s; }
.mm-logo-card:hover img { opacity: 1; filter: none; transform: scale(1.06); }
.mm-lf { font-family: var(--mm-fh); font-size: 13px; font-weight: 800; color: var(--mm-t); text-transform: uppercase; text-align: center; letter-spacing: .3px; line-height: 1.2; }

/* ── TOOLBAR ── */
.mm-toolbar { background: #fff; border-bottom: 1px solid var(--mm-cream-2); padding: 16px 24px; position: sticky; top: var(--mm-hh); z-index: 90; box-shadow: 0 4px 16px rgba(26, 22, 18, .05); }
.mm-toolbar-in { max-width: 1280px; margin: 0 auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mm-srch-box { display: flex; align-items: center; gap: 9px; background: var(--mm-cream-3); border: 1.5px solid transparent; border-radius: 10px; padding: 11px 15px; flex: 1; min-width: 200px; transition: all .2s; }
.mm-srch-box:focus-within { border-color: var(--mm-r); background: #fff; box-shadow: 0 0 0 4px rgba(204, 27, 27, .08); }
.mm-srch-ic { color: var(--mm-tm); font-size: 14px; }
.mm-srch-box input { flex: 1; border: none; outline: none; font-family: var(--mm-fb); font-size: 13.5px; color: var(--mm-t); background: transparent; }
.mm-srch-box input::placeholder { color: #aaa; }
.mm-cat-sel { padding: 11px 15px; border: 1.5px solid transparent; border-radius: 10px; font-family: var(--mm-fb); font-size: 13.5px; color: var(--mm-t); background: var(--mm-cream-3); outline: none; cursor: pointer; max-width: 210px; transition: all .2s; }
.mm-cat-sel:focus { border-color: var(--mm-r); background: #fff; box-shadow: 0 0 0 4px rgba(204, 27, 27, .08); }
.mm-res-count { font-size: 12px; color: var(--mm-tm); font-weight: 600; white-space: nowrap; }
.mm-clr-btn { padding: 11px 16px; background: var(--mm-t); color: #fff; border: none; border-radius: 10px; font-family: var(--mm-fb); font-size: 12px; font-weight: 700; cursor: pointer; display: none; transition: background .2s; }
.mm-clr-btn.mm-vis { display: block; }
.mm-clr-btn:hover { background: var(--mm-r); }

/* ── ALPHA NAV ── */
.mm-alpha-wrap { background: var(--mm-cream-3); border-bottom: 1px solid var(--mm-cream-2); padding: 12px 24px; position: sticky; top: calc(var(--mm-hh) + 72px); z-index: 80; }
.mm-alpha-in { max-width: 1280px; margin: 0 auto; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.mm-al { min-width: 34px; height: 34px; border: none; border-radius: 8px; background: #fff; font-family: var(--mm-fh); font-size: 14px; font-weight: 700; color: var(--mm-tm); cursor: pointer; transition: all .18s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--mm-sh-sm); }
.mm-al:hover { color: var(--mm-r); box-shadow: var(--mm-sh-md); transform: translateY(-1px); }
.mm-al.is-on { background: linear-gradient(135deg, var(--mm-r), var(--mm-rdd)); color: #fff; box-shadow: 0 6px 16px rgba(204, 27, 27, .35); }
.mm-al.is-dim { opacity: .25; cursor: default; pointer-events: none; box-shadow: none; }

/* ── BRAND DIRECTORY GRID ── */
.mm-dir { padding: 56px 0 72px; background: var(--mm-cream); }
.mm-dir-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.mm-alpha-block { margin-bottom: 48px; scroll-margin-top: 190px; }
.mm-alpha-block-hd { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--mm-mg); }
.mm-alpha-ltr { font-family: var(--mm-fh); font-size: 30px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--mm-r), var(--mm-rdd)); width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--mm-sh-sm); }
.mm-alpha-meta strong { font-family: var(--mm-fh); font-size: 20px; font-weight: 800; color: var(--mm-t); text-transform: uppercase; display: block; }
.mm-alpha-meta span { font-size: 12px; color: var(--mm-tm); }

.mm-brands-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mm-brand-link { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--mm-mg); cursor: pointer; transition: all .2s cubic-bezier(.4, 0, .2, 1); text-decoration: none; color: var(--mm-t); box-shadow: var(--mm-sh-sm); position: relative; overflow: hidden; }
.mm-brand-link[hidden] { display: none; }
.mm-alpha-block[hidden] { display: none; }
.mm-brand-link::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--mm-r), var(--mm-rdd)); opacity: 0; transition: opacity .2s; z-index: 0; }
.mm-brand-link:hover { border-color: transparent; transform: translateY(-3px); box-shadow: var(--mm-sh-md); }
.mm-brand-link:hover::before { opacity: 1; }
.mm-brand-link:hover .mm-bl-name,
.mm-brand-link:hover .mm-bl-cat { color: #fff; }
.mm-brand-link:hover .mm-bl-arrow { opacity: 1; transform: translateX(3px); color: #fff; }
.mm-bl-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.mm-bl-name { font-size: 14px; font-weight: 600; line-height: 1.25; display: block; transition: color .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-bl-cat { font-size: 11px; color: var(--mm-tm); display: block; margin-top: 2px; transition: color .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-bl-arrow { font-size: 13px; opacity: 0; transition: all .2s; flex-shrink: 0; position: relative; z-index: 1; color: var(--mm-r); }
.mm-brand-link.mm-pop { border-left: 3px solid var(--mm-r); border-color: rgba(204, 27, 27, .22); border-left-color: var(--mm-r); }

/* NO RESULTS */
.mm-no-res { text-align: center; padding: 80px 24px; display: none; }
.mm-no-res.mm-show { display: block; }
.mm-no-res-ic { font-size: 48px; margin-bottom: 16px; }
.mm-no-res h3 { font-family: var(--mm-fh); font-size: 26px; font-weight: 800; color: var(--mm-tm); text-transform: uppercase; margin-bottom: 6px; }
.mm-no-res p { font-size: 13px; color: var(--mm-tm); margin-bottom: 16px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
	.mm-brands-grid { grid-template-columns: repeat(3, 1fr); }
	.mm-logo-card { width: 160px; height: 80px; }
}
@media (max-width: 900px) {
	.mm-brands-grid { grid-template-columns: repeat(2, 1fr); }
	.mm-pg-banner h1 { font-size: 38px; }
	.mm-pg-stats { flex-wrap: wrap; }
	.mm-logo-card { width: 140px; height: 72px; }
}
@media (max-width: 768px) {
	.mm-brands-grid { grid-template-columns: repeat(2, 1fr); }
	.mm-pg-banner { padding: 40px 16px 36px; }
	.mm-pg-banner h1 { font-size: 30px; }
	.mm-pg-banner-in { flex-direction: column; align-items: flex-start; }
	.mm-pg-stats { width: 100%; }
	.mm-logo-card { width: 130px; height: 66px; }
	.mm-logo-card img { max-width: 100px; max-height: 44px; }
	.mm-alpha-wrap { padding: 10px 16px; top: calc(var(--mm-hh) + 68px); }
	.mm-al { min-width: 28px; height: 28px; font-size: 12px; }
	.mm-toolbar { padding: 12px 16px; }
	.mm-cat-sel { max-width: 150px; font-size: 12px; }
	.mm-dir-in { padding: 0 16px; }
}
@media (max-width: 600px) {
	.mm-brands-grid { grid-template-columns: 1fr; }
	.mm-pg-banner h1 { font-size: 26px; }
	.mm-logo-card { width: 120px; height: 60px; }
	.mm-logo-showcase-hd { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 480px) {
	.mm-brands-grid { gap: 8px; }
	.mm-brand-link { padding: 12px 14px; }
	.mm-bl-name { font-size: 13px; }
	.mm-bl-cat { display: none; }
	.mm-logo-showcase { padding: 32px 0; }
	.mm-logo-row::before,
	.mm-logo-row::after { width: 60px; }
}
@media (max-width: 375px) {
	.mm-logo-card { width: 110px; height: 56px; }
}
