#mrc-menu, .mrc-menu-layout { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; box-sizing: border-box; max-width: 100%; }
.mrc-menu-layout *, .mrc-menu-layout *::before, .mrc-menu-layout *::after { box-sizing: border-box; }

.mrc-menu-layout {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    max-width: 1200px;
    margin: 24px auto 40px;
    width: 100%;
}
.mrc-menu-main { flex: 1; min-width: 0; width: 100%; }

/* --- Onglets de catégories (pastilles, défilement horizontal, collante en haut) --- */
.mrc-menu-tabs-sticky {
    position: sticky;
    top: 0;
    z-index: 500;
    background: #FFFDFB;
    margin-bottom: 28px;
    border-bottom: 1px solid #eee0e1;
}
.mrc-menu-tabs-wrap {
    padding: 14px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.mrc-menu-tabs { display: flex; flex-wrap: nowrap; gap: 10px; padding: 0 2px; width: max-content; margin: 0 auto; }
.mrc-menu-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e5d5d7;
    color: #5b4b4d;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.92em;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

@media (max-width: 480px) {
    .mrc-menu-tabs { margin: 0; }
    .mrc-menu-tab { padding: 8px 14px; font-size: 0.86em; }
}
.mrc-tab-icon { font-size: 1.05em; }
.mrc-menu-tab:hover { border-color: #E16973; }
.mrc-menu-tab.is-active { background: #22303C; color: #ffffff; border-color: #22303C; }

/* --- En-tête de catégorie --- */
.mrc-menu-category { display: none; }
.mrc-menu-category.is-active { display: block; }
.mrc-menu-category-header { margin-bottom: 18px; }
.mrc-menu-category-title { margin: 0 0 4px; color: #22303C; font-size: 1.4em; font-weight: 700; }
.mrc-menu-category-subtitle { margin: 0; color: #8a7c7e; font-size: 0.9em; }

/* --- Liste de produits --- */
.mrc-menu-list { display: flex; flex-direction: column; gap: 14px; }
.mrc-product-row {
    background: #ffffff;
    border: 1px solid #f0e4e5;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.mrc-product-info { flex: 1; min-width: 0; }
.mrc-product-title { margin: 0 0 4px; font-size: 1.08em; font-weight: 700; color: #22303C; }
.mrc-product-desc { margin: 0 0 10px; color: #857678; font-size: 0.87em; line-height: 1.45; }
.mrc-product-price { font-weight: 700; color: #22303C; font-size: 1.02em; }

.mrc-product-image { position: relative; flex-shrink: 0; width: 96px; height: 96px; }
.mrc-product-image img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; display: block; }

.mrc-add-to-cart {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E16973;
    color: #ffffff !important;
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.mrc-add-to-cart:hover { background: #c9505b; }
.mrc-add-to-cart.loading { opacity: 0.55; pointer-events: none; }
.mrc-add-to-cart.added span::before { content: '✓'; }
.mrc-add-to-cart-noimg { position: static; box-shadow: none; flex-shrink: 0; }

/* ================= PANIER FIXE ================= */
.mrc-cart-widget {
    background: #ffffff;
    border: 1px solid #f0e4e5;
    border-radius: 14px;
    overflow: hidden;
}
.mrc-cart-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #22303C;
    color: #fff;
    border: none;
    padding: 16px 18px;
    font-weight: 700;
    cursor: pointer;
}
.mrc-cart-toggle-left { display: flex; align-items: center; gap: 8px; }
.mrc-cart-toggle-count {
    background: #E16973;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78em;
    padding: 0 4px;
}
.mrc-cart-widget-inner { padding: 18px; }
.mrc-cart-items { list-style: none; margin: 0 0 14px; padding: 0; }
.mrc-cart-item { display: flex; align-items: baseline; gap: 6px; font-size: 0.9em; padding: 6px 0; border-bottom: 1px dashed #f0e4e5; }
.mrc-cart-item-qty { color: #E16973; font-weight: 700; }
.mrc-cart-item-name { flex: 1; color: #22303C; }
.mrc-cart-item-price { color: #767676; white-space: nowrap; }
.mrc-cart-item-remove {
    background: none;
    border: none;
    color: #b5a7a9;
    font-size: 1.2em;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 4px;
    flex-shrink: 0;
}
.mrc-cart-item-remove:hover { color: #E16973; }
.mrc-cart-item-remove:disabled { opacity: 0.4; cursor: default; }
.mrc-cart-empty { color: #8a7c7e; font-size: 0.92em; margin: 0 0 14px; }
.mrc-cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.05em; margin-bottom: 14px; color: #22303C; }
.mrc-cart-checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #E16973;
    color: #ffffff !important;
    border-radius: 999px;
    padding: 12px;
    font-weight: 700;
    text-decoration: none !important;
}
.mrc-cart-checkout-btn:hover { background: #c9505b; }

/* Ordinateur : panier en colonne fixe (sticky) à droite */
@media (min-width: 900px) {
    .mrc-cart-widget { width: 300px; flex-shrink: 0; position: sticky; top: 20px; }
    .mrc-cart-toggle { cursor: default; }
    .mrc-cart-widget-inner { max-height: none !important; overflow: visible !important; }
}

/* Mobile : panier fixé en bas de l'écran, se déplie vers le haut */
@media (max-width: 899px) {
    .mrc-menu-layout { flex-direction: column; margin-bottom: 90px; }
    .mrc-cart-widget {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99999;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
        border: none;
    }
    .mrc-cart-widget-inner { max-height: 0; overflow: hidden; padding: 0 18px; transition: max-height .25s ease, padding .25s ease; }
    .mrc-cart-widget.is-open .mrc-cart-widget-inner { max-height: 55vh; overflow-y: auto; padding: 16px 18px; }
}

/* ================= POPUP DE CHOIX D'OPTIONS ================= */
body.mrc-modal-open { overflow: hidden; }
.mrc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(34, 48, 60, 0.55);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.mrc-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.mrc-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    z-index: 2;
}
.mrc-modal-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.mrc-modal-body { padding: 20px; }
.mrc-modal-title { margin: 0 0 8px; color: #22303C; font-size: 1.25em; }
.mrc-modal-desc { margin: 0 0 16px; color: #767676; font-size: 0.9em; line-height: 1.5; }
.mrc-modal-field { margin-bottom: 14px; }
.mrc-modal-field label { display: block; font-weight: 700; color: #22303C; margin-bottom: 6px; font-size: 0.92em; }
.mrc-modal-field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5d5d7;
    background: #fff;
    font-size: 0.95em;
}
.mrc-modal-group { margin-bottom: 16px; }
.mrc-modal-group-title { margin: 0 0 8px; color: #22303C; font-size: 1em; font-weight: 700; }
.mrc-modal-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f5eaeb;
    font-size: 0.92em;
    color: #3d3436;
    cursor: pointer;
}
.mrc-modal-option:last-child { border-bottom: none; }
.mrc-modal-option input[type="checkbox"],
.mrc-modal-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #E16973;
    flex-shrink: 0;
}
.mrc-modal-price { font-weight: 700; color: #E16973; font-size: 1.15em; margin: 10px 0 16px; }
.mrc-modal-qty { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.mrc-qty-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid #e5d5d7;
    background: #fff;
    font-size: 1.1em;
    cursor: pointer;
}
.mrc-qty-input { width: 50px; text-align: center; border: 1px solid #e5d5d7; border-radius: 8px; padding: 8px 4px; font-size: 1em; }
.mrc-modal-add-btn {
    width: 100%;
    background: #E16973;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
}
.mrc-modal-add-btn:disabled { background: #d8cdce; cursor: not-allowed; }
