/* Commercial desktop preview only: mobile keeps the original, full-width menu. */
.menu-phone-preview { display: none; }
/* All category names remain readable on phones, including inside the preview. */
@media (max-width: 899px) {
  /* Section margins already include the full category bar height. */
  html { scroll-padding-top: 0; }
  body #categorie {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 8px !important;
    overflow: visible !important;
    white-space: normal !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50;
  }
  body #categorie a {
    box-sizing: border-box;
    flex: 0 1 auto !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: center !important;
    line-height: 1.4 !important;
    min-height: 44px;
    height: 100%;
    padding: 7px 5px !important;
    border: 1px solid color-mix(in srgb, currentColor 35%, transparent) !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, currentColor 6%, transparent);
    text-decoration: none !important;
    font-weight: 600;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  body #categorie a.active {
    background: var(--red, var(--rust, #365c62)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 5px #0002;
  }
  body #categorie a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
  /* Two-level labels (e.g. Moka7): keep the moment above the category. */
  body #categorie a:has(small) {
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: var(--coffee, inherit);
    min-height: 54px;
  }
  body #categorie a small {
    margin: 0;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: .06em;
    color: inherit;
  }
  body #categorie a:has(small).active {
    background: var(--coffee, #365c62) !important;
  }
  body #categorie a:has(small).active::after { display: none; }
  body .rail:has(#categorie) {
    display: block;
    position: sticky !important;
    top: 0 !important;
    z-index: 50;
  }
  body .rail:has(#categorie) > b {
    display: none;
  }
  body .rail #categorie { position: static !important; }
  body #menu section[id] { scroll-margin-top: calc(var(--menu-category-height, 150px) + 12px); }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  html.menu-phone-preview-active body {
    margin: 0;
    height: 100dvh;
    overflow: hidden;
    background: #eee8de;
  }
  html.menu-phone-preview-active body > :not(.menu-phone-preview):not(.ws-qr-purchase):not(.ws-qr-plan):not(.ws-qr-purchase-error):not(script) {
    display: none !important;
  }
  html.menu-phone-preview-active .menu-phone-preview {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    height: 100dvh;
    padding: 20px;
    background: radial-gradient(ellipse at top, #fffaf1, #e8e0d4);
  }
  .menu-phone-preview__device {
    box-sizing: border-box;
    position: relative;
    width: 414px;
    max-width: 100%;
    height: min(880px, calc(100dvh - 40px));
    padding: 16px 9px 10px;
    border: 3px solid #292622;
    border-radius: 42px;
    background: #171615;
    box-shadow: 0 20px 65px #33200f30;
  }
  .menu-phone-preview__device::before {
    content: '';
    position: absolute;
    top: 5px;
    left: calc(50% - 28px);
    width: 56px;
    height: 4px;
    border-radius: 8px;
    background: #5c5751;
  }
  .menu-phone-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 29px;
    background: #f7f0e3;
  }
}
