/* ═══════════════════════════════════════════════════════════════
   MIX & MATCH  —  fluid layout, full responsive
════════════════════════════════════════════════════════════════ */

/* ── Page shell ── */
.mm-page {
    background: #fff;
    min-height: 60vh;
    padding-bottom: 80px;
}

.mm-empty {
    padding: 60px 5vw;
    text-align: center;
    color: #888;
}

/* ══════════════════════════════════════════════════
   MAIN 3-COLUMN LAYOUT  —  fluid, no max-width cap
══════════════════════════════════════════════════ */
.mm-layout {
    display: grid;
    grid-template-columns: 3fr 6fr 3fr;
    gap: 18px;
    align-items: start;
    padding: 24px 5vw 0;
    background: #fff;
}

/* ══════════════════════════════════════════════════
   LEFT SIDEBAR
══════════════════════════════════════════════════ */
.mm-sidebar {
    width: 100%;
    box-sizing: border-box;
    background: var(--g-cream, #f4f0eb);
    border: 1px solid #e6e0d8;
    border-radius: 10px;
    padding: 12px 11px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: #e0dbd5 transparent;
}

.mm-sidebar::-webkit-scrollbar { width: 4px; }
.mm-sidebar::-webkit-scrollbar-thumb { background: #e0dbd5; border-radius: 2px; }

.mm-sidebar__ttl {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #bbb;
    margin: 0;
}

.mm-sidebar__sep {
    height: 1px;
    background: #f0ece6;
    margin: 2px 0;
}

/* Category nav */
.mm-cats {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mm-cat {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 12px;
    color: #555;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background .14s, color .14s;
}

.mm-cat:hover { background: #f4f0eb; color: #333; }
.mm-cat.is-active { background: #f4f0eb; color: var(--g-wine, #B08D57); font-weight: 600; }

.mm-cat__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: .6;
}

.mm-cat.is-active .mm-cat__icon { opacity: 1; }

.mm-cat__count {
    margin-left: auto;
    font-size: 10px;
    color: #ccc;
    font-weight: 400;
}

.mm-cat.is-active .mm-cat__count { color: var(--g-wine, #B08D57); opacity: .6; }

/* Filter groups */
.mm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.mm-filter-lbl {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #aaa;
    margin: 0;
}

.mm-color-none {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11px;
    color: #ccc;
    margin: 0;
}

/* Select wrapper */
.mm-sel-wrap { position: relative; }

.mm-filter-sel {
    width: 100%;
    padding: 7px 26px 7px 10px;
    border: 1px solid #e0dbd5;
    border-radius: 7px;
    background: #faf8f5;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 12px;
    color: #555;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}

.mm-filter-sel:focus { border-color: var(--g-wine, #B08D57); }

.mm-sel-arr {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Color pills */
.mm-color-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mm-color-pill {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,.12);
    transition: transform .15s, border-color .15s, box-shadow .15s;
}

.mm-color-pill:hover { transform: scale(1.18); box-shadow: 0 0 0 2px rgba(0,0,0,.18); }
.mm-color-pill.is-on  { border-color: var(--g-wine, #B08D57); transform: scale(1.18); }

/* Reset */
.mm-reset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11px;
    color: #bbb;
    cursor: pointer;
    padding: 2px 0;
    transition: color .15s;
}

.mm-reset-btn:hover { color: var(--g-wine, #B08D57); }

/* ══════════════════════════════════════════════════
   CENTER CANVAS
══════════════════════════════════════════════════ */
.mm-canvas {
    display: flex;
    flex-direction: column;
}

/* Frame: landscape, contains bg + stacked products */
.mm-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #ddd8d0;
    user-select: none;
}

/* Editorial bg */
.mm-frame__bg {
    position: absolute;
    inset: 0;
    background-color: #d6d0c8;
    background-size: cover;
    background-position: center;
    transition: filter .4s;
}

.mm-frame.is-zoomed .mm-frame__bg { filter: brightness(.85); }

/* Products: centered vertical stack */
.mm-frame__products {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px calc(50% - 11%) 52px;
    pointer-events: none;
}

/* Individual product slot */
.mm-frame__slot {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    background: rgba(255,255,255,.08);
    border: 1.5px dashed rgba(255,255,255,.4);
    border-radius: 8px;
    overflow: hidden;
    pointer-events: all;
    transition: border-color .2s, background .2s;
    cursor: pointer;
}

.mm-frame__slot.is-set {
    border-style: solid;
    border-color: rgba(255,255,255,.55);
    background: transparent;
}

.mm-frame__slot:hover { border-color: rgba(255,255,255,.7); }

.mm-frame__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    opacity: 0;
    transition: opacity .4s ease;
}

.mm-frame__img.is-vis { opacity: 1; }

/* Placeholder inside slot */
.mm-frame__ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    text-align: center;
    transition: opacity .2s;
    pointer-events: none;
}

.mm-frame__ph.is-hidden { opacity: 0; }

.mm-frame__ph svg { color: #fff; opacity: .35; }

.mm-frame__ph span {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 9.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
}

/* Inline slot label — bottom-left of each slot */
.mm-slot-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255,255,255,.9);
    background: rgba(0,0,0,.32);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 3px 7px;
    border-radius: 10px;
    pointer-events: none;
    z-index: 4;
    line-height: 1;
}

/* Controls bar inside frame */
.mm-frame__ctrl {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.38) 0%, transparent 100%);
}

.mm-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 20px;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 10.5px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    letter-spacing: .03em;
    transition: background .15s, border-color .15s;
}

.mm-ctrl-btn:hover { background: rgba(255,255,255,.26); border-color: rgba(255,255,255,.5); }
.mm-ctrl-btn.is-active { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.75); }

.mm-ctrl-btn--clear { color: rgba(255,220,220,.9); border-color: rgba(255,200,200,.3); }
.mm-ctrl-btn--clear:hover { background: rgba(200,50,50,.25); border-color: rgba(255,150,150,.5); color: #fff; }

/* ══════════════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════════════ */
.mm-panel {
    width: 100%;
    box-sizing: border-box;
    background: var(--g-cream, #f4f0eb);
    border: 1px solid #e6e0d8;
    border-radius: 10px;
    padding: 14px 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: #e0dbd5 transparent;
}

.mm-panel::-webkit-scrollbar { width: 3px; }
.mm-panel::-webkit-scrollbar-thumb { background: #e0dbd5; border-radius: 2px; }

.mm-panel__hd {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.mm-panel__title {
    font-family: var(--g-font-serif, Georgia, serif);
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.mm-panel__mode {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 10px;
    color: #aaa;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
    margin-top: 4px;
}

.mm-panel__mode:hover { color: var(--g-wine, #B08D57); }

/* Item rows */
.mm-panel__item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #faf8f5;
    border-radius: 9px;
    border: 1px solid #ede8e2;
    transition: border-color .2s, opacity .2s;
}

.mm-panel__item--empty {
    opacity: .55;
    border-style: dashed;
}

.mm-panel__item--empty .mm-del-btn { pointer-events: none; opacity: .3; }

/* Thumbnail */
.mm-panel__thumb {
    width: 44px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    background: #e8e2da;
    flex-shrink: 0;
}

.mm-panel__thumb-img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.mm-panel__thumb-ph {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-panel__thumb-ph svg { width: 18px; height: 18px; }

/* Info */
.mm-panel__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mm-panel__item-name {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11.5px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
}

.mm-panel__item-price {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11px;
    font-weight: 700;
    color: var(--g-wine, #B08D57);
}


/* Delete */
.mm-del-btn {
    width: 26px; height: 26px;
    border: none;
    background: none;
    color: #ccc;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .14s, background .14s;
}

.mm-del-btn:hover { color: #c62828; background: #fdecea; }

/* Summary */
.mm-panel__summary {
    background: #faf8f5;
    border: 1px solid #ede8e2;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mm-panel__sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mm-panel__sum-lbl {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11px;
    color: #999;
}

.mm-panel__sum-val {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
}


/* Main CTA */
.mm-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 13px;
    background: var(--g-wine, #B08D57);
    border: none;
    border-radius: 10px;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .18s;
}

.mm-add-btn:hover:not(:disabled) { background: var(--g-hover, #3B332C); }
.mm-add-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Trust */
.mm-panel__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 10px;
    color: #ccc;
    text-align: center;
}

/* Flash */
.mm-flash {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11.5px;
    text-align: center;
    min-height: 14px;
    margin: 0;
}

/* ══════════════════════════════════════════════════
   BOTTOM SLIDERS  —  side by side, fluid
══════════════════════════════════════════════════ */
.mm-sliders {
    margin-top: 36px;
    padding: 32px 5vw;
    background: #fff;
    border-top: 1px solid #ede8e2;
    border-bottom: 1px solid #ede8e2;
}

.mm-sliders-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.mm-slider-sect {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.mm-slider-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mm-slider-ttl {
    font-family: var(--g-font-serif, Georgia, serif);
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.mm-slider-all {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11px;
    color: #aaa;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}

.mm-slider-all:hover { color: var(--g-wine, #B08D57); }

/* Slider row: arrows + viewport */
.mm-slider-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mm-slider-vp {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.mm-slider-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.mm-slider-track::-webkit-scrollbar { display: none; }

/* Arrow buttons */
.mm-sarr {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid #e0dbd5;
    background: #fff;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .14s, border-color .14s, color .14s;
}

.mm-sarr:hover { background: #f4f0eb; border-color: #c8c1b7; color: #333; }

/* ══════════════════════════════════════════════════
   PRODUCT CARD
══════════════════════════════════════════════════ */
.mm-card {
    flex: 0 0 calc(25% - 8px);
    min-width: 130px;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background: var(--g-cream, #f4f0eb);
    border: 1.5px solid #e6e0d8;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .18s;
    outline: none;
}

.mm-card:hover {
    border-color: #d0c9c0;
    box-shadow: 0 4px 18px rgba(0,0,0,.09);
    transform: translateY(-2px);
}

.mm-card:focus-visible { outline: 2px solid var(--g-wine, #B08D57); outline-offset: 2px; }

.mm-card.is-selected {
    border-color: var(--g-wine, #B08D57);
    box-shadow: 0 0 0 3px rgba(176,141,87,.12);
}

/* Image wrapper */
.mm-card__img-wrap {
    position: relative;
    aspect-ratio: 1/1;
    background: var(--g-cream, #f4f0eb);
    overflow: hidden;
    padding: 6px;
}

.mm-card__img {
    position: absolute;
    inset: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform .3s ease;
}

.mm-card:hover .mm-card__img { transform: scale(1.05); }

/* Icon button overlay */
.mm-card__overlay {
    position: absolute;
    top: 0; right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    opacity: 0;
    transition: opacity .2s;
}

.mm-card:hover .mm-card__overlay,
.mm-card.is-selected .mm-card__overlay { opacity: 1; }

.mm-card__icon-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.88);
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .15s, background .15s, transform .15s;
    flex-shrink: 0;
}

.mm-card__icon-btn:hover { color: #333; background: #fff; transform: scale(1.1); }
.mm-card__icon-btn.active,
.mm-card__icon-btn.js-wish-card.active { color: #e03055; background: #fff; }

/* Card body */
.mm-card__body {
    padding: 8px 9px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mm-card__name {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.mm-card__price {
    font-family: var(--g-font-ui, sans-serif);
    font-size: 11px;
    font-weight: 700;
    color: var(--g-wine, #B08D57);
    margin: 0;
}
.mm-card__per {
    font-weight: 400;
    font-size: 9.5px;
    color: #999;
    margin-left: 1px;
}

.mm-card__sel {
    margin-top: 4px;
    padding: 5px;
    border: 1px solid #e0dbd5;
    border-radius: 5px;
    background: #fff;
    font-family: var(--g-font-ui, sans-serif);
    font-size: 10px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    letter-spacing: .02em;
    transition: background .15s, border-color .15s, color .15s;
}

.mm-card__sel:hover,
.mm-card.is-selected .mm-card__sel {
    background: var(--g-wine, #B08D57);
    border-color: var(--g-wine, #B08D57);
    color: #fff;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════════════ */

/* ── Very large / wide monitor ≥1500px ── */
@media (min-width: 1500px) {
    .mm-layout { grid-template-columns: 2fr 8fr 2fr; gap: 24px; padding: 28px 6vw 0; }
}

/* ── Large desktop 1401–1499px ── */
@media (min-width: 1401px) and (max-width: 1499px) {
    .mm-layout { gap: 22px; padding: 26px 5vw 0; }
}

/* ── Small laptop ≤1300px ── */
@media (max-width: 1300px) {
    .mm-layout { grid-template-columns: 3fr 6fr 4fr; gap: 16px; }
}

/* ── Laptop 1001–1200px ── */
@media (max-width: 1200px) {
    .mm-layout { gap: 14px; padding: 20px 4vw 0; }
    .mm-card { flex: 0 0 calc(33.333% - 8px); }
}

/* ── Tablet landscape 901–1000px ── */
@media (max-width: 1000px) {
    .mm-layout { gap: 12px; padding: 18px 4vw 0; }
    .mm-card { flex: 0 0 calc(40% - 8px); }
}

/* ── Tablet portrait 641–900px — CANVAS full-width top, sidebar | panel below ── */
@media (max-width: 900px) {
    .mm-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "canvas  canvas"
            "sidebar panel";
        gap: 14px;
        padding: 16px 4vw 0;
    }
    .mm-canvas  { grid-area: canvas; }
    .mm-sidebar {
        grid-area: sidebar;
        position: static;
        max-height: 480px;
        overflow-y: auto;
    }
    .mm-panel {
        grid-area: panel;
        position: static;
        top: auto;
        margin-top: 0;
        display: flex;
        flex-direction: column;
    }
    .mm-frame { aspect-ratio: 16 / 9; }
    .mm-sliders-inner { gap: 24px; }
    .mm-card { flex: 0 0 calc(42% - 8px); }
}

/* ── Mobile ≤640px — canvas first (full-bleed), panel, then filter strip above sliders ── */
@media (max-width: 640px) {
    .mm-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "canvas"
            "panel"
            "sidebar";
        padding: 0 4vw 14px;
        gap: 12px;
    }
    .mm-canvas {
        grid-area: canvas;
        margin-left: -4vw;
        margin-right: -4vw;
    }
    .mm-panel {
        grid-area: panel;
        position: static;
        top: auto;
        margin-top: 0;
        display: flex;
        flex-direction: column;
    }
    .mm-sidebar {
        grid-area: sidebar;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        position: static;
        max-height: none;
        border-radius: 10px;
    }
    .mm-sidebar__ttl,
    .mm-sidebar__sep { display: none; }
    .mm-cats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }
    .mm-cat { padding: 5px 10px; font-size: 11.5px; width: auto; }
    .mm-cat__count { display: none; }
    .mm-filter-group { flex: 1; min-width: 110px; }
    .mm-reset-btn { margin-left: auto; }
    .mm-frame { aspect-ratio: 1 / 1; border-radius: 0; }
    .mm-frame__products { padding: 12px 0; }
    .mm-frame__slot { border-radius: 5px; width: 30vw; }
    .mm-frame__ctrl { display: none; }
    .mm-sliders { padding: 20px 4vw; }
    .mm-sliders-inner { grid-template-columns: 1fr; gap: 28px; }
    .mm-card { flex: 0 0 calc(48% - 6px); max-width: none; }
}

/* ── Small mobile ≤480px ── */
@media (max-width: 480px) {
    .mm-layout { padding: 0 3vw 12px; gap: 10px; }
    .mm-canvas { margin-left: -3vw; margin-right: -3vw; }
    .mm-sliders { padding: 18px 3vw; }
    .mm-frame { aspect-ratio: 1 / 1; border-radius: 0; }
    .mm-card { flex: 0 0 calc(46% - 6px); min-width: 110px; }
    .mm-sarr { width: 26px; height: 26px; }
    .mm-panel__item { gap: 6px; }
}
