.mmc-categories { width: 100%; max-width: 1920px; margin-inline: auto; padding: 28px clamp(18px,4vw,76px) 20px; box-sizing: border-box; background: #faf6ee; border-top: 1px solid #fff; border-bottom: 1px solid #eadbc2; }
.mmc-categories__grid { display: grid; grid-template-columns: repeat(var(--category-columns), minmax(0,1fr)); }
.mmc-category { display: flex; flex-direction: column; align-items: center; position: relative; min-width: 0; padding: 0 22px; color: #231b14; text-decoration: none; }
.mmc-category + .mmc-category { border-left: 1px solid #d5b47d; }
.mmc-category + .mmc-category::before { content: '❧'; position: absolute; left: -6px; bottom: 24px; color: #c5a06b; font: 16px Georgia,serif; }
.mmc-category__picture { position: relative; width: 100%; aspect-ratio: 1.8; overflow: hidden; margin-bottom: 12px; }
.mmc-category__picture img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.mmc-category__picture--reference img { position: absolute; width: 386.389%; max-width: none; height: auto; left: var(--sprite-x); top: -22.5%;  }
.mmc-category__name { margin: auto 0 0; color: inherit; font: 400 clamp(20px,1.65vw,30px)/1.2 Georgia,'Times New Roman',serif; text-align: center; }
.mmc-category__ornament { display: flex; align-items: center; gap: 7px; width: 130px; max-width: 65%; margin-top: 9px; color: #b58a40; font: 19px/1 Georgia,serif; }
.mmc-category__ornament::before,.mmc-category__ornament::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg,transparent,#bf9655); }
.mmc-category__ornament::after { transform: scaleX(-1); }
.mmc-category:hover { color: #966626; }
.mmc-category:hover img { transform: translateY(-3px); }
.mmc-category:focus-visible { outline: 2px solid #a5762f; outline-offset: 5px; }
@media(max-width: 1024px) {
 .mmc-categories { padding: 26px 18px; }
 .mmc-categories__grid { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 28px; }
 .mmc-category { padding: 0 12px; }
 .mmc-category:nth-child(odd) { border-left: 0; }
 .mmc-category:nth-child(odd)::before { display: none; }
 .mmc-category:last-child:nth-child(odd) { grid-column: 1 / -1; width: 50%; justify-self: center; }
}
@media(max-width: 540px) {
 .mmc-categories__grid { grid-template-columns: 1fr; gap: 0; }
 .mmc-category, .mmc-category:last-child:nth-child(odd) { width: 100%; max-width: 400px; justify-self: center; padding: 22px 8px; border-left: 0; box-sizing: border-box; }
 .mmc-category + .mmc-category { border-left: 0; border-top: 1px solid #dec6a0; }
 .mmc-category + .mmc-category::before { display: none; }
 .mmc-category__name { font-size: 24px; }
}
@media(prefers-reduced-motion: reduce) { .mmc-category__picture img { transition: none; } .mmc-category:hover img { transform: none; } }

.mmc-category__picture--reference { mask-image: linear-gradient(to right,transparent,#000 5%,#000 95%,transparent); }


.mmc-categories__grid { row-gap: 32px; }
.mmc-category__placeholder { display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:#f1e8d8;color:#806746;font-size:16px; }
@media(min-width:1025px) { .mmc-category:nth-child(3n+1) { border-left:0; } .mmc-category:nth-child(3n+1)::before { display:none; } }

/* Single-row category carousel, including touch and keyboard scrolling. */
.mmc-categories__grid { display:flex;flex-wrap:nowrap;overflow-x:auto;gap:0;scroll-snap-type:x mandatory;scroll-padding:2px;padding:6px 2px 16px;scrollbar-width:none;-ms-overflow-style:none; }
.mmc-categories__grid .mmc-category { flex:0 0 33.333333%;width:auto;max-width:none;box-sizing:border-box;scroll-snap-align:start; }
.mmc-categories__grid .mmc-category + .mmc-category { border-left:1px solid #d5b47d;border-top:0; }
.mmc-categories__grid .mmc-category::before { display:none; }
.mmc-categories__controls { display:flex;justify-content:flex-end;gap:10px;margin-bottom:12px; }
.mmc-categories__controls[hidden] { display:none; }
.mmc-categories__controls button { display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid #b58a40;border-radius:50%;background:#990018;color:white;font-size:24px;cursor:pointer; }
.mmc-categories__controls button:disabled { opacity:.35;cursor:default; }
.mmc-categories__controls button:focus-visible,.mmc-categories__grid:focus-visible { outline:2px solid #b58a40;outline-offset:3px; }
@media(max-width:1024px) { .mmc-categories__grid .mmc-category { flex-basis:50%; } }
@media(max-width:540px) { .mmc-categories__grid .mmc-category { flex-basis:90%;padding:12px; } }

.mmc-categories__grid::-webkit-scrollbar { display:none;width:0;height:0; }
