/**
 * [rm_menu] frontend styles. Classic and Cards share the same markup
 * conventions (rm-menu-product, rm-menu-product-name, etc.) - only the
 * wrapper/layout rules below actually differ between them.
 *
 * The --rm-menu-* custom properties are deliberate groundwork for a later
 * preset/theme system (see docs/MENU.md "Preset-ready architecture").
 * --rm-menu-columns and --rm-menu-max-width are always set inline per
 * render (Frontend -> Menu -> Layout); the design colors
 * (--rm-menu-category-color, --rm-menu-category-bg,
 * --rm-menu-category-accent, --rm-menu-title-color,
 * --rm-menu-description-color, --rm-menu-price-color,
 * --rm-menu-soldout-color, --rm-menu-soldout-bg - Frontend ->
 * Menu -> Design) are only set inline when actually configured, so an
 * unset color falls through to the plain `inherit`/hardcoded default
 * below rather than an empty/invalid value. There is no Plus icon/
 * background color setting yet - Phase 2 does not render a Plus button;
 * those arrive together with Quick View, not before.
 *
 * --rm-menu-title-font-size, --rm-menu-description-font-size,
 * --rm-menu-price-font-size and --rm-menu-category-font-size (Frontend ->
 * Menu -> Design, Stage E2.5) follow the exact same "only set inline when
 * actually configured" rule as the colors above - a 0/unset size falls
 * through to the plain em-based sizing already below, never an empty/
 * invalid font-size.
 *
 * --rm-menu-nav-bg, --rm-menu-nav-text, --rm-menu-nav-active-bg,
 * --rm-menu-nav-active-text and --rm-menu-nav-arrow-color (Frontend -> Menu
 * -> Navigation, Stage E3) follow the same "only set inline when configured"
 * rule; --rm-menu-nav-offset is always set inline (0 is itself a meaningful
 * value - see the Sticky Category Navigation rules near the end of this
 * file, RM_Menu_Navigation).
 */
.rm-menu {
    --rm-menu-primary: #c8912c;
    /* Text/icon colour on the primary fill (active category, hovered Plus): white on
       this gold is only 2.8:1, the dark ink is 5.7:1. */
    --rm-menu-on-primary: #1d2327;
    --rm-menu-accent: #2c7a3f;
    --rm-menu-bg: #ffffff;
    --rm-menu-text: #1d2327;
    --rm-menu-radius: 8px;
    --rm-menu-gap: 20px;

    color: var(--rm-menu-text);
    /*
     * !important: a real WordPress/theme page proved max-width otherwise
     * loses the cascade to any theme rule with higher selector specificity
     * than this single class (e.g. a common ".entry-content > div /
     * .content-area > *" "full-bleed child" reset, specificity 0,1,1 or
     * higher, beats .rm-menu's bare 0,1,0) - confirmed by reproducing that
     * exact collision in an isolated harness: max-width silently resolved
     * to 100% regardless of the configured value, with zero visual effect
     * at 500/900/1200px, until these three properties were pinned
     * !important. This is theme-independent hardening of RM's own
     * properties, not a fix aimed at any specific theme (see docs/MENU.md
     * "Menu max-width").
     */
    width: 100% !important;
    max-width: var(--rm-menu-max-width, none) !important;
    margin-inline: auto !important;
    /*
     * Stage E3 browser fix: .rm-menu-nav (a direct child of this element)
     * needs position:sticky to actually take effect, which fails silently
     * if ANY ancestor sets overflow to anything but visible (no error, no
     * console warning - it just never sticks). RM does not add overflow to
     * this element itself, but a generic external reset targeting content
     * wrappers could - pinning the one value sticky requires is the same
     * kind of theme-independent hardening as max-width above, applied
     * defensively to the one property that is provably a hard requirement
     * for position:sticky to work at all, not a fix aimed at any specific
     * external rule actually observed.
     */
    overflow: visible !important;
    box-sizing: border-box;
}

.rm-menu-empty {
    padding: 16px 0;
    opacity: .75;
}

/*
 * Stronger visual separation between categories (docs/MENU.md "Category
 * header"): extra spacing before each category, plus the header itself
 * gets internal padding, a subtle background and a clear accent divider -
 * a customer scrolling a long menu sees "this is a new category" without
 * a large/heavy box. The header keeps a plain <h2> and a stable
 * data-rm-menu-category-id on its <section> (unchanged), plus a real anchor
 * id (Stage E3: RM_Menu_Renderer/RM_Menu_Navigation) used as the Sticky
 * Category Navigation scroll target and IntersectionObserver target.
 */
.rm-menu-category {
    margin: 0 0 calc(var(--rm-menu-gap) * 2);
}

.rm-menu-category:last-child {
    margin-bottom: 0;
}

.rm-menu-category-title {
    margin: 0 0 var(--rm-menu-gap);
    padding: 10px 14px;
    border-radius: var(--rm-menu-radius);
    background: var(--rm-menu-category-bg, rgba(0, 0, 0, .03));
    border-bottom: 3px solid var(--rm-menu-category-accent, var(--rm-menu-primary));
    font-size: var(--rm-menu-category-font-size, 1.4em);
    color: var(--rm-menu-category-color, inherit);
    text-align: center;
}

/* Category names read in capitals wherever the Menu shows them: the section headings, the
 * sticky navigation links (bar and dropdown) and the mobile selector's label. Presentation
 * only - the WooCommerce category name, slug and order are untouched, the DOM text and
 * therefore screen readers keep the name as written, and product names, descriptions,
 * buttons and option names are deliberately not transformed. Scoped under .rm-menu so a
 * theme's plain h2/a rule cannot undo it. */
.rm-menu .rm-menu-category-title,
.rm-menu .rm-menu-nav-item,
.rm-menu .rm-menu-nav-selector-label {
    text-transform: uppercase;
}

.rm-menu-products {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* A real <button> (RM_Menu_Renderer::name_html()) - reset to read exactly like the
 * plain text it replaces, styled by the same variables as before. */
/*
 * Hardened against theme `button` styles (live browser review: hover
 * rendered as a large black-background/white-text button, because a
 * theme's own `button:hover` (0,1,1) outranked this class's un-pinned
 * hover state). Background/border/shadow are pinned !important at both
 * rest and hover/focus so the title keeps reading as a title, not a
 * generic form button, regardless of the active theme.
 */
.rm-menu-products .rm-menu-product-name {
    display: inline;
    border: 0 !important;
    margin: 0;
    padding: 0;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    font: inherit;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    color: var(--rm-menu-title-color, inherit) !important;
    font-size: var(--rm-menu-title-font-size, inherit);
    overflow-wrap: break-word;
    appearance: none;
    -webkit-appearance: none;
}

.rm-menu-products .rm-menu-product-name:hover,
.rm-menu-products .rm-menu-product-name:focus-visible {
    background: none !important;
    color: var(--rm-menu-title-color, inherit) !important;
    text-decoration: underline;
}

.rm-menu-products .rm-menu-product-name:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--rm-focus, #2563eb) !important;
    border-radius: 2px;
}

.rm-menu-product-description {
    display: block;
    margin: 4px 0 0;
    font-size: var(--rm-menu-description-font-size, .92em);
    opacity: .8;
    color: var(--rm-menu-description-color, inherit);
}

.rm-menu-product-price {
    white-space: nowrap;
    color: var(--rm-menu-price-color, inherit);
    font-size: var(--rm-menu-price-font-size, inherit);
}

/*
 * inline-flex + explicit width:auto + align-self:flex-start/justify-self:start
 * (rather than plain inline-block) - the badge is a direct child of Cards'
 * own body, which is a column flex container with the browser's default
 * align-items:stretch; a flex item's auto cross-size stretches to fill the
 * container's width even when the item's own display is inline-block, so
 * the badge rendered full-width there. These four properties make the
 * badge ignore stretch/grid-fill from ANY parent (Classic's plain block
 * body was never affected, kept identical here for one shared rule/no
 * layout-specific badge CSS) and size to its own content only.
 */
.rm-menu-product-soldout {
    display: inline-flex;
    width: auto;
    align-self: flex-start;
    justify-self: start;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--rm-menu-soldout-bg, #f0f0f1);
    color: var(--rm-menu-soldout-color, #646970);
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.rm-menu-product.is-sold-out .rm-menu-product-name,
.rm-menu-product.is-sold-out .rm-menu-product-price {
    opacity: .55;
}

.rm-menu-product-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--rm-menu-radius);
    object-fit: cover;
}

/* ---------------------------------------------------------------------
 * Classic: a compact row per product, image (when present) shown small
 * and inline. --rm-menu-columns applies here too (Stage E1) - the row's
 * own internal layout (image/name/price/description) is unchanged; only
 * the outer list becomes a multi-column grid instead of a single column.
 * ------------------------------------------------------------------ */
.rm-menu-layout-classic .rm-menu-products-classic {
    display: grid;
    grid-template-columns: repeat(var(--rm-menu-columns, 1), minmax(0, 1fr));
    gap: var(--rm-menu-gap);
}

.rm-menu-layout-classic .rm-menu-product-classic {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: var(--rm-menu-gap);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.rm-menu-layout-classic .rm-menu-product-classic:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.rm-menu-layout-classic .rm-menu-product-image {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
}

.rm-menu-layout-classic .rm-menu-product-body {
    flex: 1 1 auto;
    min-width: 0;
}

/*
 * "Price position in Classic" (docs/MENU.md "Price position in Classic"):
 * one of three deterministic row layouts, chosen by the admin setting, not
 * by viewport width - each must look right at every width on its own, so
 * there is no separate mobile-only override for any of them any more (the
 * old implicit flex-wrap-only row was exactly the "fragile" behavior this
 * replaces). min-width:0 lets the name itself shrink/wrap in every mode
 * instead of forcing the row wider than its column; --rm-menu-product-price
 * already has white-space:nowrap above, so the price itself never breaks
 * internally in any of the three modes.
 */
.rm-menu-layout-classic .rm-menu-product-row > .rm-menu-product-name {
    min-width: 0;
}

/* Same line: CSS grid, not flex-wrap - the title column (minmax(0,1fr))
 * always takes exactly the remaining width and wraps internally rather
 * than shrinking the price/Plus columns; price and the Plus trigger
 * (docs/QUICK_VIEW.md "Menu action") each get their own auto column, sized
 * to their own (nowrap) content and sitting flush right. Deterministic at
 * any width, unlike the old flex+flex-wrap approach. */
.rm-menu-layout-classic .rm-menu-product-row.rm-menu-price-same-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 4px 10px;
}

/* Second line: title on its own row, price+Plus right-aligned together
 * below as one small group - applies at every width once selected (not a
 * mobile breakpoint), which is also this setting's default. */
.rm-menu-layout-classic .rm-menu-product-row.rm-menu-price-second-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.rm-menu-price-plus-group {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Last line: this row carries the title alone (the price moves out to
 * .rm-menu-product-footer below) - default block layout is enough, title
 * reads left-aligned like any other block text. */
.rm-menu-layout-classic .rm-menu-product-row.rm-menu-price-last-line {
    display: block;
}

/* The Classic action/footer row (docs/MENU.md "Price position in Classic",
 * docs/QUICK_VIEW.md "Menu action") - price left, Quick View's Plus action
 * right. Cards reuses the same class/rule for its own price+Plus row. */
.rm-menu-product-footer {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Icon-only Quick View trigger - the button's own aria-label carries the
 * accessible name (RM_Menu_Renderer::plus_button_html()), never the icon
 * alone. Sized to stay a clear, easy tap target on mobile. */
/* Hardened against theme `button` styles - same floor as .rm-menu-product-name above. */
.rm-menu-product-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--rm-menu-plus-color, var(--rm-menu-primary, currentColor)) !important;
    border-radius: 999px;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--rm-menu-plus-icon, var(--rm-menu-on-primary, #1d2327)) !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

/* Colours: "Add button color" (--rm-menu-plus-color) owns the border and the hover fill;
   unset it is the Menu primary (gold). The plus sign is --rm-menu-plus-icon at rest and
   --rm-menu-plus-on on the fill, both derived from that colour by RM_Menu_Renderer so they
   stay readable; unset, both are the dark ink. The focus ring below is the shared focus
   token, not part of the Menu palette. */
.rm-menu-product-plus:hover,
.rm-menu-product-plus:focus-visible {
    background: var(--rm-menu-plus-color, var(--rm-menu-primary, currentColor)) !important;
    color: var(--rm-menu-plus-on, var(--rm-menu-on-primary, #1d2327)) !important;
    outline: none;
}

.rm-menu-product-plus:focus-visible {
    box-shadow: 0 0 0 2px var(--rm-focus, #2563eb) !important;
}

/* Touch: the two Quick View triggers reach RM's 44px target (docs/FRONTEND.md
   "Interaction baseline"; 32px / the bare text line on a fine pointer keep the row
   compact). The Plus grows like every other RM control. The product name stays a
   text title: it gains a tap area above and below the line through padding that a
   matching negative margin takes back, so the rows do not move - only the hit box
   grows. inline-block is what lets the padding count vertically. */
@media (pointer: coarse) {
    .rm-menu-product-plus {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .rm-menu-products .rm-menu-product-name {
        display: inline-block;
        box-sizing: border-box;
        padding: 10px 0;
        margin: -10px 0;
        min-height: 44px;
        vertical-align: baseline;
    }
}

.rm-menu-product-plus-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
}

.rm-menu-product.is-sold-out .rm-menu-product-plus {
    opacity: .55;
}

/* ---------------------------------------------------------------------
 * Cards: a responsive grid. --rm-menu-columns is set per-instance from the
 * backend "Desktop columns" setting (1-4) - always 1 column on phones, 2
 * on tablets, never forced narrow to match the desktop count.
 * ------------------------------------------------------------------ */
.rm-menu-products-cards {
    display: grid;
    grid-template-columns: repeat(var(--rm-menu-columns, 1), minmax(0, 1fr));
    gap: var(--rm-menu-gap);
}

.rm-menu-product-cards {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--rm-menu-radius);
    background: var(--rm-menu-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.rm-menu-product-cards .rm-menu-product-image {
    aspect-ratio: 4 / 3;
    border-radius: 0;
}

.rm-menu-product-cards .rm-menu-product-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

@media (max-width: 900px) {
    .rm-menu-products-cards,
    .rm-menu-layout-classic .rm-menu-products-classic {
        grid-template-columns: repeat(min(2, var(--rm-menu-columns, 1)), minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .rm-menu-products-cards,
    .rm-menu-layout-classic .rm-menu-products-classic {
        grid-template-columns: 1fr;
    }

    .rm-menu-layout-classic .rm-menu-product-classic {
        flex-wrap: wrap;
    }
}

/* ---------------------------------------------------------------------
 * Sticky Category Navigation (docs/MENU.md "Navigation", Stage E3).
 * RM_Menu_Navigation always renders the horizontal bar; the selector
 * trigger/panel exists in the DOM only when the Mobile navigation style
 * setting is "selector" (.rm-menu-nav-mobile-selector on the <nav>).
 * Above the 900px breakpoint the bar is always shown regardless of that
 * setting - desktop has one fixed style. This breakpoint is deliberately
 * the same 900px already used for the grid-column collapse above, but the
 * two are independent concerns (each is its own @media block, not a shared
 * variable) - a horizontal list of category names gets cramped at a wider
 * viewport than a product grid needs before collapsing a column, they just
 * happen to share the same reused number rather than a new magic one.
 * --rm-menu-nav-offset is always emitted inline (0 is itself a meaningful
 * value); the five --rm-menu-nav-* colors follow the same "only emitted
 * when configured" rule as every other Design color in this file.
 *
 * Live browser fix (Stage E3 browser fix round): position/top pinned
 * !important - same theme-independent hardening as .rm-menu's own
 * width/max-width/margin-inline above, and required for the exact same
 * reason (a bare single-class selector, specificity 0,1,0, can lose the
 * cascade to any external rule with higher specificity - see .rm-menu's
 * own comment above for the reproduced precedent). Without this, Sticky
 * offset can appear to have no effect at all: if position/top never
 * actually apply, the element never becomes sticky in the first place, so
 * no offset value could ever be visible - the offset variable itself was
 * always correctly emitted and read (proven by the existing F20/AM36-42
 * tests), the missing piece was making sure position:sticky/top actually
 * win the cascade.
 * ------------------------------------------------------------------ */
/*
 * Geometry-neutral overlay model (live browser review round - replaces the
 * earlier negative-margin collapse mechanism, which produced three linked
 * bugs: an initial blank strip above the first category, a visible flash
 * as the collapse margin animated in, and a show/hide oscillation right
 * at the scroll threshold. Root cause: toggling .is-visible changed the
 * nav's OWN flow footprint (margin-bottom), which moved the sentinel that
 * decides .is-visible in the first place - a feedback loop.
 *
 * Fixed by making visibility changes carry NO layout consequence at all:
 * height:0 (content still renders via the default overflow:visible, never
 * clipped) means this element reserves zero flow space whether hidden or
 * visible, stuck or not - nothing before the trigger line ever needs to
 * account for it, and nothing after the trigger line ever gets pushed by
 * it. Once .is-visible and actually stuck (top: offset), the bar overlays
 * the content scrolling underneath it rather than pushing that content
 * down - the accepted trade-off (docs/MENU.md "Navigation"): no layout
 * jump, ever, in exchange for a brief overlay instead of push-down.
 *
 * No JS-measured height variable is needed any more to collapse this
 * element (menu-nav.js no longer sets --rm-menu-nav-height for this
 * purpose) - height:0 is unconditional, not computed.
 */
.rm-menu-nav {
    position: sticky !important;
    top: var(--rm-menu-nav-offset, 0px) !important;
    z-index: 5;
    height: 0;
    overflow: visible;
    margin: 0;
    background: var(--rm-menu-nav-bg, transparent);
    color: var(--rm-menu-nav-text, inherit);
    /*
     * Hidden means unreachable, not just transparent: visibility:hidden takes
     * the links and buttons out of the Tab order and the accessibility tree
     * (opacity/pointer-events alone left them focusable and announced while
     * invisible). It keeps the element's layout box, so the height:0 geometry
     * and the bar measurements are unchanged. The visibility switch waits for
     * the fade-out on the way out and is immediate on the way in.
     */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease-in-out, visibility 0s linear .15s;
}

.rm-menu-nav.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .15s ease-in-out, visibility 0s;
}

/*
 * Startup-flash fix: until menu-nav.js has made its first visibility
 * decision against settled layout (.is-ready), the nav stays fully hidden
 * with no transition - whatever .is-visible does underneath. Paint-only
 * properties: nothing here changes the height:0 geometry above, so the
 * ready switch can never move the sentinel or any content.
 */
.rm-menu-nav:not(.is-ready) {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .rm-menu-nav,
    .rm-menu-nav.is-visible {
        transition: none;
    }
}

/*
 * Keep the sticky bar off the target: a category reached by a #fragment, and any
 * control the browser scrolls into view for keyboard focus, land below the bar.
 * --rm-menu-nav-clearance is the bar's live height plus the sticky offset,
 * written by assets/menu-nav.js; without it (no JS, one category, no nav) it is 0.
 */
.rm-menu .rm-menu-category,
.rm-menu :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    scroll-margin-top: var(--rm-menu-nav-clearance, 0px);
}

/* GAP-10: a zero-height marker, never rendered visually - assets/menu-nav.js's own visibility observer targets this, not the nav itself. */
.rm-menu-nav-sentinel {
    display: block;
    height: 0;
    margin: 0;
    padding: 0;
}

/* ---------------------------------------------------------------------
 * Design B - "Faner med understrek" (tabs with an underline indicator).
 * Replaces the earlier bordered box grid. One row on every viewport (the
 * track scrolls horizontally; menu-nav.js already centres the active item
 * and toggles the arrows at any width), a solid bar with a soft shadow so
 * the overlaid content never shows through, and an underline - not a fill -
 * as the active indicator. Same markup, same JS, same five
 * --rm-menu-nav-* settings: Active background colours the underline,
 * Active text colours the active label.
 * ------------------------------------------------------------------ */
.rm-menu-nav-bar {
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 0 8px;
    background: var(--rm-menu-nav-bg, #ffffff);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 8px 16px -12px rgba(0, 0, 0, .35);
}

.rm-menu-nav-track {
    /* GAP-09: the track must stay its items' offsetParent (scrollTrackToItem()). */
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rm-menu-nav-track::-webkit-scrollbar {
    display: none;
}

/* Normal case for the tabs (overrides the shared uppercase rule near the top
   of this file; delete this rule to get capitals back). */
.rm-menu .rm-menu-nav-item {
    text-transform: none;
}

.rm-menu-nav-item {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 14px;
    border: 0;
    background: transparent;
    color: var(--rm-menu-nav-text, #4b5563);
    font-weight: 600;
    font-size: .95em;
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s ease;
}

.rm-menu-nav-item::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
    transition: background-color .15s ease;
}

.rm-menu-nav-item:hover,
.rm-menu-nav-item.is-active {
    color: var(--rm-menu-nav-active-text, var(--rm-menu-text));
}

.rm-menu-nav-item.is-active::after {
    background: var(--rm-menu-nav-active-bg, var(--rm-menu-primary));
}

/* Keyboard focus on a category: an inset outline (the track scrolls and clips
   an outer one). */
.rm-menu-nav-item:focus-visible {
    outline: 2px solid var(--rm-focus, #2563eb);
    outline-offset: -4px;
}

/*
 * Arrows: round buttons on desktop (mouse users cannot swipe), hidden on
 * mobile below (swipe). They still keep their space while visible -
 * menu-nav.js toggles the native `disabled` attribute, never `hidden`.
 * Hardened against theme `button` styles - same floor as .rm-menu-product-name.
 */
.rm-menu-nav-arrow {
    display: inline-flex;
    align-self: center;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .12) !important;
    background: var(--rm-menu-nav-bg, #ffffff) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1) !important;
    font-size: 1.15em;
    line-height: 1;
    color: var(--rm-menu-nav-arrow-color, var(--rm-menu-text)) !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.rm-menu-nav-arrow:hover,
.rm-menu-nav-arrow:focus-visible {
    background: var(--rm-menu-nav-bg, #ffffff) !important;
    color: var(--rm-menu-nav-arrow-color, var(--rm-menu-text)) !important;
}

.rm-menu-nav-arrow:focus-visible {
    outline: 2px solid var(--rm-focus, #2563eb);
    outline-offset: 2px;
}

.rm-menu-nav-arrow:disabled {
    opacity: .3;
    cursor: default;
    box-shadow: none !important;
}

.rm-menu-nav-selector {
    display: none;
    position: relative;
}

.rm-menu-nav-selector-trigger {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    border: 0 !important;
    box-shadow: none !important;
    padding: 10px 14px;
    background: var(--rm-menu-nav-bg, #ffffff) !important;
    color: var(--rm-menu-nav-text, inherit) !important;
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.rm-menu-nav-selector-trigger:hover,
.rm-menu-nav-selector-trigger:focus-visible {
    background: var(--rm-menu-nav-bg, #ffffff) !important;
    color: var(--rm-menu-nav-text, inherit) !important;
}

/* The outline was removed with no replacement: keyboard focus was invisible. */
.rm-menu-nav-selector-trigger:focus-visible {
    outline: 2px solid var(--rm-focus, #2563eb);
    outline-offset: -2px;
}

.rm-menu-nav-selector-caret {
    color: var(--rm-menu-nav-arrow-color, inherit);
}

/*
 * Compact dropdown, not a full-screen menu: detached from document flow
 * (position:absolute, anchored to .rm-menu-nav-selector's own
 * position:relative above) so opening it never pushes page content down
 * or changes the sticky trigger's own position - it floats directly below
 * the trigger instead. Capped height with internal scrolling handles a
 * restaurant with many categories without the panel itself ever growing
 * past a reasonable share of the viewport.
 */
.rm-menu-nav-panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 6;
    background: var(--rm-menu-nav-bg, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/*
 * Root cause of "the panel always looks open": an author stylesheet's
 * `display` declaration always wins over the browser's own built-in
 * `[hidden] { display: none; }` user-agent rule, regardless of selector
 * specificity - origin/importance is resolved before specificity in the
 * CSS cascade, and author-normal always beats user-agent-normal. Setting
 * `display: flex` above therefore silently defeated the `hidden` attribute
 * every time, whether menu-nav.js had just set it or removed it. This rule
 * (specificity 0,2,0, higher than the plain 0,1,0 class rule above) makes
 * the hidden state actually win again, closed by default exactly as
 * RM_Menu_Navigation already renders it.
 */
.rm-menu-nav-panel[hidden] {
    display: none;
}

.rm-menu-nav-panel .rm-menu-nav-item {
    text-align: left;
}

.rm-menu-nav-panel .rm-menu-nav-item.is-active {
    font-weight: 600;
}

/* Design B in the Selector panel: a plain vertical list, no underline - the
   active category gets a light tint and a primary-coloured left marker. */
.rm-menu-nav-panel .rm-menu-nav-item {
    padding: 12px 16px;
}

.rm-menu-nav-panel .rm-menu-nav-item::after {
    display: none;
}

.rm-menu-nav-panel .rm-menu-nav-item.is-active {
    background: rgba(0, 0, 0, .04);
    box-shadow: inset 3px 0 0 var(--rm-menu-nav-active-bg, var(--rm-menu-primary));
}

.rm-menu-nav-selector-trigger {
    border-bottom: 1px solid rgba(0, 0, 0, .08) !important;
    box-shadow: 0 8px 16px -12px rgba(0, 0, 0, .35) !important;
    font-weight: 600;
}

@media (max-width: 900px) {
    .rm-menu-nav-arrow {
        display: none;
    }

    .rm-menu-nav-bar {
        padding: 0 4px;
    }

    .rm-menu-nav-item {
        padding: 13px 12px;
    }

    .rm-menu-nav-item::after {
        left: 12px;
        right: 12px;
    }

    /*
     * End spacer: the last tab can be scrolled fully into view with room to spare. A real
     * flex item (not padding-right, which Safari leaves out of a flex scroll container's
     * scrollable width), so scrollWidth always includes it. Phones only: above 900px the
     * track wraps and centres instead of scrolling, where an extra item would add an empty cell.
     */
    .rm-menu-nav-track::after {
        content: "";
        flex: 0 0 16px;
    }

    .rm-menu-nav-mobile-selector .rm-menu-nav-bar {
        display: none;
    }

    .rm-menu-nav-mobile-selector .rm-menu-nav-selector {
        display: block;
    }
}

/* =====================================================================
 * Design 2 - appended at the END of menu.css (overrides only).
 * Same markup, same JS, same backend settings: every colour still reads
 * the existing --rm-menu-* variables; unset values fall back as before.
 * ===================================================================== */

/* --- Navigation: mobile keeps the one-row tabs; labels always use the
 *     normal nav text colour (an "Active text" picked for a filled box,
 *     e.g. white, must never land on the white tab bar). --------------- */
.rm-menu-nav-item:hover,
.rm-menu-nav-item.is-active {
    color: var(--rm-menu-nav-text, var(--rm-menu-text));
}

/* --- Navigation, desktop: centred box grid (like the reference site) -- */
@media (min-width: 901px) {
    .rm-menu-nav-bar {
        justify-content: center;
        padding: 12px 16px;
    }

    .rm-menu-nav-arrow {
        display: none;
    }

    .rm-menu-nav-track {
        flex: 0 1 auto;
        flex-wrap: wrap;
        justify-content: center;
        overflow: visible;
        gap: 0;
        padding: 1px 0 0 1px;
    }

    .rm-menu .rm-menu-nav-item {
        text-transform: uppercase;
    }

    .rm-menu-nav-item {
        margin: -1px 0 0 -1px;            /* shared 1px borders, no double lines */
        padding: 11px 18px;
        border: 1px solid rgba(0, 0, 0, .14);
        background: var(--rm-menu-nav-bg, #ffffff);
        color: var(--rm-menu-nav-text, var(--rm-menu-text));
        font-weight: 700;
        font-size: .9em;
        letter-spacing: .03em;
        transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
    }

    .rm-menu-nav-item::after {
        display: none;
    }

    .rm-menu-nav-item:hover {
        box-shadow: inset 0 -3px 0 var(--rm-menu-nav-active-bg, var(--rm-menu-primary));
    }

    .rm-menu-nav-item.is-active {
        z-index: 1;
        background: var(--rm-menu-nav-active-bg, var(--rm-menu-primary));
        border-color: var(--rm-menu-nav-active-bg, var(--rm-menu-primary));
        color: var(--rm-menu-nav-active-text, var(--rm-menu-on-primary));
        box-shadow: none;
    }

    .rm-menu-nav-item:focus-visible {
        z-index: 2;
        outline-offset: -3px;
    }
}

/* --- Category heading: big centred title between two accent lines ---- */
.rm-menu-category {
    margin-bottom: calc(var(--rm-menu-gap) * 2.5);
}

.rm-menu-category-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 calc(var(--rm-menu-gap) * 1.1);
    padding: 6px 0;
    border: 0;
    border-radius: var(--rm-menu-radius);
    background: var(--rm-menu-category-bg, transparent);
    font-size: var(--rm-menu-category-font-size, 1.75em);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .02em;
    color: var(--rm-menu-category-color, inherit);
    text-align: center;
}

.rm-menu-category-title::before,
.rm-menu-category-title::after {
    content: "";
    flex: 1 1 0;
    min-width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--rm-menu-category-accent, var(--rm-menu-primary));
}

@media (max-width: 560px) {
    .rm-menu-category-title {
        gap: 12px;
        font-size: var(--rm-menu-category-font-size, 1.4em);
    }
}

/* --- Shared product typography --------------------------------------- */
.rm-menu-products .rm-menu-product-name {
    font-size: var(--rm-menu-title-font-size, 1.08em);
    font-weight: 600;
    line-height: 1.3;
}

.rm-menu-product-description {
    margin-top: 6px;
    opacity: 1;
    line-height: 1.45;
    color: var(--rm-menu-description-color, #5b616b);
}

.rm-menu-product-price {
    font-weight: 700;
    color: var(--rm-menu-price-color, var(--rm-menu-text));
}

.rm-menu-product-plus {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
    border-width: 1.5px !important;
    transition: background-color .15s ease, color .15s ease;
}

/* --- Classic: "menu card" rows with a dashed divider ----------------- */
.rm-menu-layout-classic .rm-menu-products-classic {
    gap: 0 calc(var(--rm-menu-gap) * 1.6);
}

.rm-menu-layout-classic .rm-menu-product-classic,
.rm-menu-layout-classic .rm-menu-product-classic:last-child {
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, .16);
}

.rm-menu-layout-classic .rm-menu-product-image {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border-radius: 10px;
}

.rm-menu-layout-classic .rm-menu-product-row.rm-menu-price-same-line {
    align-items: start;
    gap: 4px 12px;
}

/* Phones: keep the picture beside the text (the base file wraps it onto
   its own line below 560px). */
@media (max-width: 560px) {
    .rm-menu-layout-classic .rm-menu-product-classic {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .rm-menu-layout-classic .rm-menu-product-image {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }
}

/* --- Cards: soft bordered card, price + round filled Add button ------ */
.rm-menu-products-cards {
    gap: calc(var(--rm-menu-gap) * 1.1);
}

.rm-menu-product-cards {
    position: relative;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: calc(var(--rm-menu-radius) + 6px);
    background: var(--rm-menu-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: box-shadow .2s ease, transform .2s ease;
}

.rm-menu-product-cards:hover {
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .28);
    transform: translateY(-2px);
}

.rm-menu-product-cards .rm-menu-product-image {
    aspect-ratio: 16 / 10;
}

.rm-menu-product-cards .rm-menu-product-body {
    flex: 1 1 auto;
    gap: 4px;
    padding: 14px 16px 16px;
}

.rm-menu-product-cards .rm-menu-product-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.rm-menu-product-cards .rm-menu-product-footer {
    margin-top: auto;
    padding-top: 10px;
}

.rm-menu-product-cards .rm-menu-product-price {
    font-size: var(--rm-menu-price-font-size, 1.05em);
}

.rm-menu-product-cards .rm-menu-product-plus {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 999px;
    background: var(--rm-menu-plus-color, var(--rm-menu-primary)) !important;
    color: var(--rm-menu-plus-on, var(--rm-menu-on-primary)) !important;
}

.rm-menu-product-cards .rm-menu-product-plus:hover,
.rm-menu-product-cards .rm-menu-product-plus:focus-visible {
    filter: brightness(.92);
}

/* Phones: the card turns into a compact row, picture on the right. */
@media (max-width: 560px) {
    .rm-menu-product-cards {
        flex-direction: row-reverse;
        align-items: stretch;
    }

    .rm-menu-product-cards:hover {
        transform: none;
    }

    .rm-menu-product-cards .rm-menu-product-image {
        width: 108px;
        height: 108px;
        flex: 0 0 108px;
        aspect-ratio: auto;
        align-self: center;
        margin: 12px 12px 12px 0;
        border-radius: 10px;
    }

    .rm-menu-product-cards .rm-menu-product-body {
        min-width: 0;
        padding: 12px 14px;
    }
}

/* Touch: keep the 44px tap target (re-stated after the sizes above). */
@media (pointer: coarse) {
    .rm-menu-product-plus,
    .rm-menu-product-cards .rm-menu-product-plus {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-menu-product-cards,
    .rm-menu-product-plus {
        transition: none;
    }

    .rm-menu-product-cards:hover {
        transform: none;
    }
}
