/**
 * Restaurant Menu - Main Stylesheet
 *
 * CSS custom properties, base resets, and foundational styles.
 *
 * @package Restaurant_Menu
 */

/* ==========================================================================
   0. Inter Font
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    /* Colors - Neutral placeholders */
    --rm-color-primary: #2c3e50;
    --rm-color-primary-light: #3d5166;
    --rm-color-primary-dark: #1a252f;
    --rm-color-primary-hover-bg: rgba(44, 62, 80, 0.05);

    --rm-color-accent: #e67e22;
    --rm-color-accent-light: #f39c12;
    --rm-color-accent-dark: #d35400;

    --rm-color-text: #333333;
    --rm-color-text-muted: #6c757d;
    --rm-color-text-light: #999999;

    --rm-color-background: #ffffff;
    --rm-color-background-alt: #f8f9fa;
    --rm-color-background-dark: #e9ecef;

    --rm-color-border: #dee2e6;
    --rm-color-border-light: #e9ecef;

    --rm-color-sale: #dc3545;
    --rm-color-featured: #ffc107;
    --rm-color-success: #28a745;
    --rm-color-warning: #ffc107;
    --rm-color-error: #dc3545;

    /* Badge Colors */
    --rm-badge-standard-bg: #3B82F6;
    --rm-badge-standard-text: #FFFFFF;
    --rm-badge-new-bg: #DCFCE7;
    --rm-badge-new-text: #166534;

    /* Dietary Tag Colors */
    --rm-dietary-vegan-bg: #E8F5E9;
    --rm-dietary-vegan-text: #2E7D32;
    --rm-dietary-vegetarian-bg: #F1F8E9;
    --rm-dietary-vegetarian-text: #558B2F;
    --rm-dietary-gluten-free-bg: #FFF8E1;
    --rm-dietary-gluten-free-text: #F57F17;
    --rm-dietary-dairy-free-bg: #E3F2FD;
    --rm-dietary-dairy-free-text: #1565C0;

    /* Spacing Scale */
    --rm-space-xs: 0.25rem;   /* 4px */
    --rm-space-sm: 0.5rem;    /* 8px */
    --rm-space-md: 1rem;      /* 16px */
    --rm-space-lg: 1.5rem;    /* 24px */
    --rm-space-xl: 2rem;      /* 32px */
    --rm-space-2xl: 3rem;     /* 48px */
    --rm-space-3xl: 4rem;     /* 64px */

    /* Item Card */
    --rm-item-gap: 12px;

    /* Typography */
    --rm-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --rm-font-family-heading: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --rm-font-size-xs: 12px;
    --rm-font-size-sm: 14px;
    --rm-font-size-base: 16px;
    --rm-font-size-lg: 18px;
    --rm-font-size-xl: 20px;
    --rm-font-size-2xl: 24px;
    --rm-font-size-3xl: 32px;

    --rm-font-weight-normal: 400;
    --rm-font-weight-medium: 600;
    --rm-font-weight-semibold: 600;
    --rm-font-weight-bold: 600;

    --rm-line-height-tight: 1.25;
    --rm-line-height-normal: 1.5;
    --rm-line-height-relaxed: 1.75;

    /* Border Radii */
    --rm-radius-sm: 0.25rem;  /* 4px */
    --rm-radius-md: 0.5rem;   /* 8px */
    --rm-radius-lg: 0.75rem;  /* 12px */
    --rm-radius-xl: 1rem;     /* 16px */
    --rm-radius-full: 9999px;

    /* Shadows */
    --rm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --rm-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --rm-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --rm-transition-fast: 150ms ease;
    --rm-transition-normal: 250ms ease;
    --rm-transition-slow: 350ms ease;

    /* Z-index scale */
    --rm-z-dropdown: 100;
    --rm-z-sticky: 200;
    --rm-z-modal: 300;
    --rm-z-tooltip: 400;

    /* Modal */
    --rm-modal-backdrop-bg: rgba(0, 0, 0, 0.5);
    --rm-scrollbar-compensation: 0px;
    --rm-scrollbar-compensation-half: 0px;

    /* Safe area insets (for mobile notches) */
    --rm-safe-area-top: env(safe-area-inset-top, 0px);
    --rm-safe-area-right: env(safe-area-inset-right, 0px);
    --rm-safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --rm-safe-area-left: env(safe-area-inset-left, 0px);
    --rm-filter-bottom-offset: var(--rm-space-lg);
    --rm-filter-end-gap: var(--rm-space-xl);
    --rm-filter-controls-gap: var(--rm-space-sm);

    /* Menu item card */
    --rm-item-padding: 16px;

    /* Menu layout */
    --rm-menu-width: 700px;

    /* Tab navigation specific variables */
    --rm-tab-gap: var(--rm-space-sm);
    --rm-tab-padding: var(--rm-space-md) var(--rm-space-lg);
    --rm-tab-border-radius: var(--rm-radius-md);
    --rm-tab-font-size: var(--rm-font-size-base);
    --rm-tab-font-weight: var(--rm-font-weight-semibold);

    /* Tab container */
    --rm-tab-nav-bg: var(--rm-color-background-alt);
    --rm-tab-nav-border: var(--rm-color-border-light);

    /* Tab active state */
    --rm-tab-active-bg: var(--rm-color-accent);
    --rm-tab-active-text: #ffffff;
    --rm-tab-active-shadow: var(--rm-shadow-sm);

    /* Tab inactive state */
    --rm-tab-inactive-bg: var(--rm-color-background);
    --rm-tab-inactive-text: var(--rm-color-text-muted);

    /* Tab hover state */
    --rm-tab-hover-text: var(--rm-color-text);

    /* Shared item typography (used by both cards and modals) */
    --rm-item-description-size: var(--rm-font-size-sm); /* 14px - shared */
    --rm-item-description-color: rgba(0, 0, 0, 0.65);
    --rm-item-price-size-mobile: var(--rm-font-size-sm); /* 14px - shared */
    --rm-item-price-size-desktop: var(--rm-font-size-base); /* 16px - shared */
}

@media (min-width: 641px) {
    @supports (scrollbar-gutter: stable) {
        html {
            scrollbar-gutter: stable;
        }
    }
}

/* ==========================================================================
   2. Base Resets (Scoped to .rm-menu)
   ========================================================================== */

.rm-menu {
    box-sizing: border-box;
    font-family: var(--rm-font-family);
    font-size: var(--rm-font-size-base);
    line-height: var(--rm-line-height-normal);
    color: var(--rm-color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rm-menu *,
.rm-menu *::before,
.rm-menu *::after {
    box-sizing: inherit;
}

.rm-menu h1,
.rm-menu h2,
.rm-menu h3,
.rm-menu h4,
.rm-menu h5,
.rm-menu h6 {
    margin: 0 0 var(--rm-space-sm);
    font-family: var(--rm-font-family-heading);
    font-weight: var(--rm-font-weight-bold);
    line-height: var(--rm-line-height-tight);
}

.rm-menu p {
    margin: 0 0 var(--rm-space-md);
}

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

.rm-menu img {
    max-width: 100%;
    height: auto;
    display: block;
}

.rm-menu button {
    cursor: pointer;
    font-family: inherit;
}

/* ==========================================================================
   3. Container Query Setup
   ========================================================================== */

.rm-menu {
    container-type: inline-size;
    container-name: rm-menu;
}

.rm-item {
    container-type: inline-size;
    container-name: rm-item;
}

/* ==========================================================================
   4. Accessibility Utilities
   ========================================================================== */

/* Visually hidden but accessible to screen readers */
.rm-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus visible styles for keyboard navigation */
.rm-menu :focus-visible {
    outline: 2px solid var(--rm-color-primary);
    outline-offset: 2px;
}

.rm-menu :focus:not(:focus-visible) {
    outline: none;
}

/* Skip link for keyboard users */
.rm-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: var(--rm-space-sm) var(--rm-space-md);
    background: var(--rm-color-primary);
    color: var(--rm-color-background);
    z-index: var(--rm-z-tooltip);
    transition: top var(--rm-transition-fast);
}

.rm-skip-link:focus {
    top: 0;
}

/* ==========================================================================
   5. Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .rm-menu *,
    .rm-menu *::before,
    .rm-menu *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   6. Base Component Styles (Placeholder for Stage 0)
   ========================================================================== */

/* Menu wrapper */
.rm-menu {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: var(--rm-menu-width);
    margin-left: auto;
    margin-right: auto;
    padding: var(--rm-space-md);
    padding-left: var(--rm-safe-area-left);
    padding-right: var(--rm-safe-area-right);
}

/* Bricks element wrapper hardening.
 * Prevents width collapse when nested inside flex/grid section/container layouts. */
.rm-bricks-element-menu {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.rm-bricks-element-menu .rm-menu {
    width: 100%;
    min-width: 0;
    max-width: min(100%, var(--rm-menu-width));
}

/* Menu header */
.rm-menu__header {
    margin-bottom: var(--rm-space-xl);
    text-align: center;
}

.rm-menu__description {
    font-size: var(--rm-font-size-lg);
    color: var(--rm-color-text-muted);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

/* Menu content */
.rm-menu__content {
    position: relative; /* Contains absolutely positioned tab panels */
    overflow: hidden;   /* Clips hidden tab panels to prevent scroll height extension */
    margin-bottom: 0;
    background: var(--rm-color-background);
}

.rm-menu__placeholder {
    text-align: center;
    color: var(--rm-color-text-muted);
    font-style: italic;
    padding: var(--rm-space-xl);
    border: 2px dashed var(--rm-color-border);
    border-radius: var(--rm-radius-md);
}

/* Menu footer */
.rm-menu__footer {
    padding-top: var(--rm-space-lg);
    padding-right: var(--rm-item-padding);
    padding-bottom: var(--rm-space-lg);
    padding-left: var(--rm-item-padding);
    border-top: 1px solid var(--rm-color-border-light);
    text-align: center;
    font-size: var(--rm-font-size-sm);
    background: var(--rm-color-background);
}

.rm-menu__dietary-notice {
    font-size: var(--rm-font-size-sm);
    color: var(--rm-color-text-muted);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

/* Error state */
.rm-menu--error {
    padding: var(--rm-space-lg);
    text-align: center;
}

.rm-menu__error-message {
    color: var(--rm-color-error);
    font-size: var(--rm-font-size-sm);
}

/* ==========================================================================
   7. Section Headings & Subheadings (Stage 1)
   ========================================================================== */

.rm-heading {
    margin-top: var(--rm-space-xl);
    margin-bottom: var(--rm-space-md);
    padding-left: var(--rm-item-padding);
    padding-right: var(--rm-item-padding);
}

.rm-heading:first-child {
    margin-top: 0;
}

.rm-heading__title {
    font-size: var(--rm-font-size-2xl);
    font-weight: var(--rm-font-weight-bold);
    margin-bottom: var(--rm-space-xs);
}

.rm-heading__description {
    color: var(--rm-color-text-muted);
    font-size: var(--rm-font-size-sm);
}

/* Empty section message - hidden by default, shown when filtering removes all items */
.rm-heading__empty-message {
    display: none;
    font-style: italic;
    color: var(--rm-color-text-muted);
    font-size: var(--rm-font-size-sm);
    margin-top: var(--rm-space-sm);
}

.rm-heading--empty .rm-heading__empty-message {
    display: block;
}

/* Hide subheadings when parent section is empty from filtering */
.rm-subheading--section-empty {
    display: none;
}

.rm-subheading {
    margin-top: var(--rm-space-lg);
    margin-bottom: var(--rm-space-sm);
    padding-left: var(--rm-item-padding);
    padding-right: var(--rm-item-padding);
}

.rm-subheading__title {
    font-size: var(--rm-font-size-lg);
    font-weight: var(--rm-font-weight-semibold);
    margin-bottom: var(--rm-space-xs);
}

.rm-subheading__description {
    color: var(--rm-color-text-muted);
    font-size: var(--rm-font-size-sm);
}

/* ==========================================================================
   8. Menu Item Card (Stage 1)
   ========================================================================== */

/* Items group container */
.rm-items-group {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Menu item card - Mobile first */
.rm-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: var(--rm-item-gap);
    padding: var(--rm-item-padding);
    position: relative;
}

.rm-items-group .rm-item:first-child {
    border-top: 1px solid var(--rm-color-border);
}

/* Inset divider between items */
.rm-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--rm-item-padding);
    right: var(--rm-item-padding);
    height: 1px;
    background: var(--rm-color-border);
}

/* Hide bottom border on the last item to prevent gap before footer */
.rm-items-group .rm-item:last-child::after {
    display: none;
}

/* ==========================================================================
   Card Hover Lift Effect (Stage 4)
   ========================================================================== */

/* Add transition properties for smooth hover animation */
.rm-item {
    transition: transform var(--rm-transition-fast),
                box-shadow var(--rm-transition-fast);
    cursor: pointer;
    will-change: transform;
}

/* Hover state: subtle lift with shadow (desktop only) */
@media (hover: hover) and (pointer: fine) {
    .rm-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--rm-shadow-md);
    }

    /* Active state: slightly less lift for feedback */
    .rm-item:active {
        transform: translateY(-1px);
        box-shadow: var(--rm-shadow-sm);
    }
}

/* Focus state for keyboard navigation */
.rm-item:focus {
    outline: 2px solid var(--rm-color-primary);
    outline-offset: 2px;
}

/* Disable hover effect for out-of-stock items */
.rm-item--out-of-stock:hover {
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Reduced motion: disable lift animation */
@media (prefers-reduced-motion: reduce) {
    .rm-item {
        transition: none;
        will-change: auto;
    }

    .rm-item:hover {
        transform: none;
    }
}

/* Content column */
.rm-item__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 140px;
}

/* Cards without media - reduced min-height */
.rm-item:not(.rm-item--has-image):not(.rm-item--has-video) .rm-item__content {
    min-height: 80px;
}

/* Media column */
.rm-item__media {
    flex-shrink: 0;
    align-self: flex-start;
}

/* Flair badges */
.rm-item__flair {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.rm-item__flair-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #eef1f4;
    color: #3d4852;
    font-size: var(--rm-font-size-xs);
    font-weight: var(--rm-font-weight-semibold);
    border-radius: var(--rm-radius-sm);
    line-height: 1;
}

/* Standard flair badges (all non-"new" flairs) */
.rm-item__flair-badge--popular,
.rm-item__flair-badge--bestseller,
.rm-item__flair-badge--staff-pick,
.rm-item__flair-badge--chefs-pick,
.rm-item__flair-badge--signature,
.rm-item__flair-badge--chefs-special,
.rm-item__flair-badge--limited-edition,
.rm-item__flair-badge--seasonal,
.rm-item__flair-badge--spicy,
.rm-item__flair-badge--house-special {
    background: var(--rm-badge-standard-bg);
    color: var(--rm-badge-standard-text);
}

/* New badge - distinct color scheme */
.rm-item__flair-badge--new {
    background: var(--rm-badge-new-bg);
    color: var(--rm-badge-new-text);
}

/* Title */
.rm-item__title {
    font-size: 16px;
    font-weight: var(--rm-font-weight-bold);
    margin-bottom: 4px;
    line-height: var(--rm-line-height-tight);
}

/* Description - 2 line clamp */
.rm-item__description {
    font-size: var(--rm-item-description-size);
    font-weight: var(--rm-font-weight-normal);
    color: var(--rm-item-description-color);
    line-height: var(--rm-line-height-normal);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

/* Price */
.rm-item__price {
    font-size: var(--rm-item-price-size-mobile);
    font-weight: var(--rm-font-weight-normal);
    margin-top: auto;
    margin-bottom: 0;
}

.rm-item__price--original {
    text-decoration: line-through;
    color: rgba(0, 0, 0, 0.5);
    margin-right: 8px;
}

.rm-item__price--sale {
    font-weight: var(--rm-font-weight-bold);
    color: var(--rm-color-sale);
}

/* Price variations (e.g., Gls $12 · Btl $48) */
.rm-item__price--variations {
    font-size: var(--rm-font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rm-item__variation-separator {
    margin: 0 4px;
    opacity: 0.5;
}

/* Card dividers (respects padding) */
.rm-item__divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 12px 0;
}

/* Image */
.rm-item__image {
    width: 140px;
    height: 140px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
}

/* Video */
.rm-item__video {
    width: 140px;
    height: 140px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
}

/* ==========================================================================
   9. Dietary Tags - Horizontal Scroll (Stage 1)
   ========================================================================== */

/* Dietary wrapper spans full card width (outside grid) */
.rm-item__dietary-wrapper {
    grid-column: 1 / -1;
    margin-top: var(--rm-item-gap);
}

.rm-item__dietary {
    position: relative;
}

.rm-item__dietary-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-right: 30px;
}

.rm-item__dietary-scroll::-webkit-scrollbar {
    display: none;
}

.rm-item__dietary-tag {
    flex-shrink: 0;
    padding: 4px 8px;
    background: #f5f5f5;
    color: #424242;
    font-size: var(--rm-font-size-xs);
    font-weight: var(--rm-font-weight-medium);
    border-radius: var(--rm-radius-sm);
    line-height: 1;
    white-space: nowrap;
}

/* Dietary tag color variations */
.rm-item__dietary-tag--vegan,
.rm-item__dietary-tag--vegan_available {
    background: var(--rm-dietary-vegan-bg);
    color: var(--rm-dietary-vegan-text);
}

.rm-item__dietary-tag--vegetarian,
.rm-item__dietary-tag--vegetarian_available {
    background: var(--rm-dietary-vegetarian-bg);
    color: var(--rm-dietary-vegetarian-text);
}

.rm-item__dietary-tag--gluten_free,
.rm-item__dietary-tag--gluten_free_available {
    background: var(--rm-dietary-gluten-free-bg);
    color: var(--rm-dietary-gluten-free-text);
}

.rm-item__dietary-tag--dairy_free,
.rm-item__dietary-tag--dairy_free_available {
    background: var(--rm-dietary-dairy-free-bg);
    color: var(--rm-dietary-dairy-free-text);
}

.rm-item__dietary-fade {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, var(--rm-color-background));
    pointer-events: none;
}

/* ==========================================================================
   10. Menu Item States (Stage 1)
   ========================================================================== */

.rm-item--featured {
    /* Optional: add featured highlight styling */
}

.rm-item--on-sale {
    /* On-sale state handled via price styling */
}

.rm-item--out-of-stock {
    opacity: 0.5;
}

.rm-item--hidden {
    display: none;
}

/* ==========================================================================
   12. Content Block Styles (Stage 1)
   ========================================================================== */

/* Text Block */
.rm-text-block {
    margin: var(--rm-space-md) 0;
    padding-left: var(--rm-item-padding);
    padding-right: var(--rm-item-padding);
}

.rm-text-block p {
    margin: 0;
}

.rm-text-block--note {
    font-style: italic;
    font-size: var(--rm-font-size-sm);
    color: var(--rm-color-text-muted);
}

.rm-text-block--highlight {
    background: var(--rm-color-background-alt);
    padding: var(--rm-space-md);
    border-radius: var(--rm-radius-md);
}

.rm-text-block--important {
    font-weight: var(--rm-font-weight-semibold);
}

/* Divider */
.rm-divider {
    border: none;
    margin: 0;
}

.rm-divider--line {
    border-top: 1px solid var(--rm-color-border);
}

.rm-divider--dotted {
    border-top: 1px dotted var(--rm-color-border);
}

.rm-divider--dashed {
    border-top: 1px dashed var(--rm-color-border);
}

.rm-divider--space {
    border: none;
}

.rm-divider--ornament {
    text-align: center;
    border: none;
}

.rm-divider--ornament::before {
    content: "• • •";
    color: var(--rm-color-text-muted);
    font-size: var(--rm-font-size-sm);
}

/* Divider spacing */
.rm-divider--spacing-small {
    margin: var(--rm-space-sm) 0;
}

.rm-divider--spacing-medium {
    margin: var(--rm-space-md) 0;
}

.rm-divider--spacing-large {
    margin: var(--rm-space-lg) 0;
}

/* Image Block */
.rm-image-block {
    margin: var(--rm-space-lg) 0;
}

.rm-image-block__image {
    width: 100%;
    height: auto;
    border-radius: 0;
}

.rm-image-block__caption {
    margin-top: var(--rm-space-sm);
    font-size: var(--rm-font-size-sm);
    color: var(--rm-color-text-muted);
    text-align: center;
}

/* Tab panel */
.rm-tabs__panel {
    /* Stage 1: Panels render sequentially */
}

/* ==========================================================================
   13. Container Queries - Desktop Sizing (Stage 1)
   ========================================================================== */

@container rm-item (min-width: 500px) {
    .rm-item {
        --rm-item-padding: 24px;
        --rm-item-gap: 16px;
    }

    .rm-item__divider {
        margin: 16px 0;
    }

    .rm-item__title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .rm-item__description {
        margin-bottom: 16px;
    }

    .rm-item__content {
        min-height: 170px;
    }

    .rm-item:not(.rm-item--has-image):not(.rm-item--has-video) .rm-item__content {
        min-height: 100px;
    }

    .rm-item__price {
        font-size: var(--rm-item-price-size-desktop);
    }

    .rm-item__image {
        width: 170px;
        height: 170px;
    }

    .rm-item__video {
        width: 170px;
        height: 170px;
    }
}

@container rm-menu (min-width: 640px) {
    .rm-heading {
        margin-top: 40px;
        margin-bottom: 20px;
    }

    .rm-subheading {
        margin-top: var(--rm-space-xl);
        margin-bottom: var(--rm-space-md);
    }
}

/* ==========================================================================
   14. Container Query Fallback (Stage 1)
   ========================================================================== */

@supports not (container-type: inline-size) {
    /* Desktop overrides when container queries not supported */
    @media (min-width: 640px) {
        .rm-item {
            --rm-item-padding: 24px;
            --rm-item-gap: 16px;
        }

        .rm-item__divider {
            margin: 16px 0;
        }

        .rm-item__title {
            font-size: 18px;
            margin-bottom: 6px;
        }

        .rm-item__description {
            margin-bottom: 16px;
        }

        .rm-item__content {
            min-height: 170px;
        }

        .rm-item:not(.rm-item--has-image):not(.rm-item--has-video) .rm-item__content {
            min-height: 100px;
        }

        .rm-item__price {
            font-size: var(--rm-font-size-base);
        }

        .rm-item__image {
            width: 170px;
            height: 170px;
        }

        .rm-item__video {
            width: 170px;
            height: 170px;
        }

        .rm-item__dietary-wrapper {
            padding-top: 16px;
            margin-top: 16px;
        }

        .rm-heading {
            margin-top: 40px;
            margin-bottom: 20px;
        }

        .rm-subheading {
            margin-top: var(--rm-space-xl);
            margin-bottom: var(--rm-space-md);
        }
    }
}

/* ==========================================================================
   15. Print Styles
   ========================================================================== */

@media print {
    .rm-menu {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .rm-menu__placeholder {
        display: none;
    }
}

/* ==========================================================================
   16. Tab Navigation
   ========================================================================== */

/* Tab panel visibility - applies to all styles */
.rm-tabs__panel {
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    /* No CSS transitions - GSAP handles all animations */
    /* Keep content height in flow but invisible */
    position: absolute;
    left: 0;
    right: 0;
}

.rm-tabs__panel--active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    position: relative; /* Override absolute positioning */
    z-index: 1;
}

/* Standard Tile Tab Style */
.rm-tabs__nav--standard {
    display: flex;
    gap: var(--rm-tab-gap);
    padding: var(--rm-space-sm);
    margin-bottom: var(--rm-space-lg);
    background: var(--rm-tab-nav-bg);
    border-bottom: 1px solid var(--rm-tab-nav-border);
    justify-content: center;
}

.rm-tabs__nav--standard .rm-tabs__button {
    /* Equal width distribution */
    flex: 1 1 0%;

    /* Typography */
    font-family: var(--rm-font-family);
    font-size: var(--rm-tab-font-size);
    font-weight: var(--rm-tab-font-weight);
    text-align: center;

    /* Spacing */
    padding: var(--rm-tab-padding);

    /* Appearance */
    background: var(--rm-tab-inactive-bg);
    color: var(--rm-tab-inactive-text);
    border: none;
    border-radius: var(--rm-tab-border-radius);

    /* Interaction */
    cursor: pointer;
    transition: color var(--rm-transition-fast),
                background var(--rm-transition-fast),
                box-shadow var(--rm-transition-fast);
}

.rm-tabs__nav--standard .rm-tabs__button:hover:not(.rm-tabs__button--active) {
    color: var(--rm-tab-hover-text);
}

.rm-tabs__nav--standard .rm-tabs__button--active {
    background: var(--rm-tab-active-bg);
    color: var(--rm-tab-active-text);
    box-shadow: var(--rm-tab-active-shadow);
}

.rm-tabs__nav--standard .rm-tabs__button:focus {
    outline: 2px solid var(--rm-color-accent);
    outline-offset: 2px;
}

/* Container Query Placeholder (future dropdown at >640px) */
/*
@container rm-menu (min-width: 640px) {
    .rm-tabs__nav--standard {
        display: none;
    }
    .rm-tabs__dropdown {
        display: block;
    }
}
*/

/* ==========================================================================
   17. Modal Styles
   ========================================================================== */

/* --- Modal Base Structure --- */

/* Main modal wrapper - hidden by default */
.rm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--rm-z-modal);
    display: none;
}

/* Full-screen overlay backdrop */
.rm-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--rm-z-modal);
    opacity: 0; /* Animated by GSAP in Stage 3d */
}

/* Modal container - Mobile (full-screen) */
.rm-modal__container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rm-color-background);
    z-index: calc(var(--rm-z-modal) + 1);
    overflow-y: auto;
    transform: translateY(100%); /* Animated by GSAP in Stage 3d */

    /* Keep hero flush to top on mobile; close button overlays image */
    padding-top: 0;
    padding-bottom: calc(var(--rm-space-md) + var(--rm-safe-area-bottom));
}

/* --- Close Button --- */

/* Close button - Mobile (top-left) */
.rm-modal__close {
    position: fixed;
    top: calc(var(--rm-space-md) + var(--rm-safe-area-top));
    left: calc(var(--rm-space-md) + var(--rm-safe-area-left));
    width: 40px;
    height: 40px;
    background: var(--rm-color-background);
    border: none;
    border-radius: var(--rm-radius-full);
    box-shadow: var(--rm-shadow-md);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rm-color-text);
    transition: transform var(--rm-transition-fast);
}

.rm-modal__close svg {
    width: 24px;
    height: 24px;
}

/* --- Hero Section --- */

/* Hero image container - Mobile */
.rm-modal__hero {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.rm-modal__hero-image-wrapper {
    width: 100%;
    height: 100%;
}

.rm-modal__hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* --- Content Section --- */

/* Main content wrapper - Mobile */
.rm-modal__content {
    padding: var(--rm-space-md);
}

/* --- Typography & Elements --- */

/* Flair badges wrapper */
.rm-modal__flair {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--rm-space-sm);
}

/* Item title */
.rm-modal__title {
    /* Reset theme inheritance */
    font-family: var(--rm-font-family);
    text-transform: none;
    letter-spacing: normal;
    margin-top: 0;
    padding: 0;
    border: none;
    text-decoration: none;

    /* Our styles */
    font-size: var(--rm-font-size-xl);
    font-weight: var(--rm-font-weight-semibold);
    line-height: var(--rm-line-height-tight);
    margin-bottom: var(--rm-space-sm);
    color: var(--rm-color-text);
}

/* Portion size (optional) */
.rm-modal__portion {
    font-size: var(--rm-item-description-size);
    font-weight: var(--rm-font-weight-normal);
    color: var(--rm-color-text-muted);
    margin-bottom: var(--rm-space-md);
}

/* Description text */
.rm-modal__description {
    font-size: var(--rm-item-description-size);
    font-weight: var(--rm-font-weight-normal);
    line-height: var(--rm-line-height-normal);
    color: var(--rm-item-description-color);
    margin-bottom: calc(var(--rm-space-md) + var(--rm-space-xs));
}

/* Price section wrapper */
.rm-modal__price-section {
    margin-bottom: var(--rm-space-lg);
}

/* Price display */
.rm-modal__price {
    font-size: var(--rm-item-price-size-mobile);
    font-weight: var(--rm-font-weight-semibold);
    color: var(--rm-color-text);
    display: flex;
    align-items: center;
    gap: var(--rm-space-sm);
}

/* Original price (strikethrough for sales) */
.rm-modal__price-original {
    font-size: var(--rm-font-size-sm);
    font-weight: var(--rm-font-weight-medium);
    color: var(--rm-color-text-muted);
    text-decoration: line-through;
    opacity: 0.5;
}

/* Sale price */
.rm-modal__price-sale {
    font-size: var(--rm-item-price-size-mobile);
    font-weight: var(--rm-font-weight-semibold);
    color: var(--rm-color-text);
}

/* --- Dietary Tags --- */

/* Dietary tags wrapper */
.rm-modal__dietary {
    margin-bottom: var(--rm-space-lg);
}

/* Dietary tags scrollable container */
.rm-modal__dietary-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* --- Divider --- */

.rm-modal__divider {
    border: none;
    border-top: 1px solid var(--rm-color-border);
    margin: var(--rm-space-lg) 0;
}

/* --- Add-ons Section --- */

/* Add-ons wrapper */
.rm-modal__addons {
    /* No extra margin - spacing from divider above */
}

/* Add-ons title */
.rm-modal__addons-title {
    font-size: var(--rm-font-size-base);
    font-weight: var(--rm-font-weight-semibold);
    color: var(--rm-color-text);
    margin-bottom: var(--rm-space-md);
}

/* Add-ons list */
.rm-modal__addons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Individual add-on item */
.rm-modal__addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--rm-space-sm);
    font-size: var(--rm-font-size-sm);
    font-weight: var(--rm-font-weight-normal);
    color: var(--rm-color-text);
}

/* Add-on name */
.rm-modal__addon-name {
    flex: 1;
}

/* Add-on price */
.rm-modal__addon-price {
    /* Inherits from parent .rm-modal__addon-item */
}

/* --- Hidden State --- */

/* Ensure modal is truly hidden when display: none */
.rm-modal[style*="display: none"] {
    pointer-events: none;
}

/* --- Desktop Overrides --- */

@media (min-width: 641px) {
    /* Modal container - Desktop (centered) */
    .rm-modal__container {
        top: 50%;
        left: calc(50% - var(--rm-scrollbar-compensation-half));
        width: 650px;
        height: auto;
        max-height: 90vh;
        /* Transform fully controlled by GSAP - no CSS transform here */
        border-radius: var(--rm-radius-lg);
        opacity: 0; /* Animated by GSAP in Stage 3d */
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Close button - Desktop (top-right) */
    .rm-modal__close {
        position: absolute;
        top: var(--rm-space-md);
        left: auto;
        right: var(--rm-space-md);
    }

    /* Close button hover effect */
    .rm-modal__close:hover {
        transform: scale(1.1);
    }

    /* Hero - Desktop (no overflow to prevent border-radius clipping) */
    .rm-modal__hero {
        overflow: visible;
    }

    /* Content - Desktop (more padding) */
    .rm-modal__content {
        padding: var(--rm-space-lg);
    }

    /* Typography - Desktop */
    .rm-modal__title {
        font-size: var(--rm-font-size-2xl);
    }

    /* Portion and description stay at 14px on desktop (no override needed) */

    .rm-modal__price {
        font-size: var(--rm-item-price-size-desktop);
    }

    /* Price-original stays at 14px on desktop (no override needed) */

    .rm-modal__price-sale {
        font-size: var(--rm-item-price-size-desktop);
    }

    /* Add-ons title - Desktop */
    .rm-modal__addons-title {
        font-size: 18px;
    }
}

/* ==========================================================================
   FILTER MODAL & TRIGGER
   ========================================================================== */

/* --- Filter Controls Wrapper --- */

.rm-filter-controls {
    position: fixed;
    bottom: calc(var(--rm-filter-bottom-offset) + var(--rm-safe-area-bottom));
    left: calc(50% - var(--rm-scrollbar-compensation-half));
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--rm-filter-controls-gap);
    pointer-events: none;
}

.rm-filter-controls > * {
    pointer-events: auto;
}

.rm-filter-controls--anchored {
    position: absolute;
    bottom: var(--rm-filter-end-gap);
}

.rm-filter-controls--hidden {
    display: none;
}

/* --- Filter Trigger Button --- */

.rm-filter-trigger {
    position: relative;

    /* Button styling - pill shape */
    height: 56px;
    padding: 0 20px 0 16px;
    border: none;
    border-radius: var(--rm-radius-full);
    background: var(--rm-color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;

    /* Flexbox for icon + label */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rm-space-sm);

    /* Smooth transitions */
    transition: transform var(--rm-transition-normal), box-shadow var(--rm-transition-normal);
}

.rm-filter-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.rm-filter-trigger:active {
    transform: scale(0.95);
}

.rm-filter-trigger__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.rm-filter-trigger__label {
    font-size: var(--rm-font-size-sm);
    font-weight: var(--rm-font-weight-semibold);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge showing active filter count */
.rm-filter-trigger__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--rm-color-accent);
    color: white;
    border-radius: var(--rm-radius-full);
    font-size: var(--rm-font-size-xs);
    font-weight: var(--rm-font-weight-semibold);
    line-height: 20px;
    text-align: center;
}

.rm-filter-trigger__badge[hidden] {
    display: none;
}

/* --- Filter Modal Container --- */

.rm-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none; /* Controlled by GSAP */
}

.rm-filter-modal[hidden] {
    display: none !important;
}

/* Overlay */
.rm-filter-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rm-modal-backdrop-bg);
    opacity: 0; /* Animated by GSAP */
}

/* Modal container - centered bottom sheet */
.rm-filter-modal__container {
    z-index: 100000;
    position: fixed;
    bottom: 0;
    left: calc(50% - var(--rm-scrollbar-compensation-half));
    transform: translateX(-50%); /* Center horizontally, Y animated by GSAP */
    width: 100%;
    max-width: var(--rm-menu-width);
    height: 100%;
    max-height: 100%;
    background: var(--rm-color-background);
    border-radius: 0; /* Fullscreen on mobile - no rounded corners */
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    /* Y position controlled by GSAP (initial set in JS, animated on open/close) */
}

/* --- Header --- */

.rm-filter-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--rm-space-lg) var(--rm-space-lg) var(--rm-space-md);
    border-bottom: 1px solid var(--rm-color-border);
    flex-shrink: 0;
}

.rm-filter-modal__title {
    margin: 0;
    font-size: var(--rm-font-size-lg);
    font-weight: var(--rm-font-weight-semibold);
    color: var(--rm-color-text);
}

.rm-filter-modal__close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--rm-color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--rm-radius-sm);
    transition: background-color 0.2s ease;
}

.rm-filter-modal__close:hover {
    background: var(--rm-color-background);
}

/* --- Scrollable Content --- */

.rm-filter-modal__content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--rm-space-xl);
    background: var(--rm-color-background-alt);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Filter sections */
.rm-filter-section {
    border: none;
    padding: 0;
    margin: 0 0 var(--rm-space-xl) 0;
}

.rm-filter-section:last-child {
    margin-bottom: 0;
}

.rm-filter-section__legend {
    font-size: var(--rm-font-size-sm);
    font-weight: var(--rm-font-weight-semibold);
    color: var(--rm-color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: var(--rm-space-md);
    padding: 0;
}

/* --- Dietary Pills --- */

.rm-filter-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--rm-space-md);
}

.rm-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--rm-space-lg) var(--rm-space-lg);
    border: 2px solid var(--rm-color-border);
    border-radius: 20px;
    background: var(--rm-color-background);
    color: var(--rm-color-text);
    font-size: var(--rm-font-size-sm);
    font-weight: var(--rm-font-weight-medium);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;

    /* Remove button default styles */
    font-family: inherit;
    line-height: 1.4;
}

.rm-filter-pill:hover:not(.rm-filter-pill--disabled) {
    border-color: var(--rm-color-primary);
    background: var(--rm-color-primary-hover-bg);
}

.rm-filter-pill--active,
.rm-filter-pill[aria-pressed="true"] {
    background: var(--rm-color-primary);
    color: var(--rm-color-background);
    border-color: var(--rm-color-primary);
}

/* Checkmark icon for active pills */
.rm-filter-pill--active::before,
.rm-filter-pill[aria-pressed="true"]::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: var(--rm-space-xs);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Hover state for active pills - darker shade */
.rm-filter-pill--active:hover,
.rm-filter-pill[aria-pressed="true"]:hover {
    background: var(--rm-color-primary-dark);
    border-color: var(--rm-color-primary-dark);
}

.rm-filter-pill--disabled,
.rm-filter-pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Allergen Accordion --- */

.rm-filter-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rm-filter-accordion__group {
    border: 1px solid var(--rm-color-border);
    background: var(--rm-color-background);
    overflow: hidden;
}

.rm-filter-accordion__group:first-child {
    border-radius: var(--rm-radius-md) var(--rm-radius-md) 0 0;
}

.rm-filter-accordion__group:last-child {
    border-radius: 0 0 var(--rm-radius-md) var(--rm-radius-md);
}

.rm-filter-accordion__group:not(:last-child) {
    border-bottom: none;
}

/* Only one group - fully rounded */
.rm-filter-accordion__group:only-child {
    border-radius: var(--rm-radius-md);
}

.rm-filter-accordion__header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: var(--rm-space-lg);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background-color 0.2s ease;
}

.rm-filter-accordion__header:hover {
    background: var(--rm-color-background);
}

.rm-filter-accordion__title {
    flex: 1;
    font-size: var(--rm-font-size-base);
    font-weight: var(--rm-font-weight-medium);
    color: var(--rm-color-text);
}

.rm-filter-accordion__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 var(--rm-space-sm);
    margin-right: var(--rm-space-sm);
    background: var(--rm-color-primary);
    color: white;
    border-radius: 12px;
    font-size: var(--rm-font-size-xs);
    font-weight: var(--rm-font-weight-semibold);
}

.rm-filter-accordion__badge[hidden] {
    display: none;
}

.rm-filter-accordion__chevron {
    flex-shrink: 0;
    color: var(--rm-color-text-secondary);
}

.rm-filter-accordion__content {
    overflow: hidden;
}

.rm-filter-accordion__content[hidden] {
    display: none;
}

.rm-filter-accordion__content:not([hidden]) {
    padding: 0 var(--rm-space-md) var(--rm-space-md);
}

/* Allergen pills within accordion */
.rm-filter-pills--allergens {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rm-space-xs);
}

.rm-filter-pills--allergens .rm-filter-pill {
    flex: 0 0 auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* --- Footer --- */

.rm-filter-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--rm-color-border);
    padding: var(--rm-space-md) var(--rm-space-lg);
    flex-shrink: 0;
    background: var(--rm-color-background);
}

.rm-filter-modal__button {
    padding: 0;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: var(--rm-font-weight-semibold);
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-family: inherit;
}

/* Clear button - text link style */
.rm-filter-modal__button--clear {
    color: var(--rm-color-text-muted);
}

.rm-filter-modal__button--clear:hover {
    opacity: 0.7;
}

/* Apply button - pill style */
.rm-filter-modal__button--apply {
    background: var(--rm-color-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--rm-radius-full);
}

.rm-filter-modal__button--apply:hover {
    background: var(--rm-color-primary-dark);
}

.rm-filter-modal__divider {
    display: none;
}

/* --- Active Filters Display --- */

.rm-active-filters {
    /* Flexbox layout */
    display: flex;
    flex-wrap: wrap;
    gap: var(--rm-space-xs);
    align-items: center;
    justify-content: center;

    /* Styling */
    max-width: min(600px, calc(100vw - 32px));
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.rm-active-filters[hidden] {
    display: none;
}

.rm-active-filters__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px 12px;
    background: var(--rm-color-primary);
    color: white;
    border-radius: 16px;
    font-size: 13px;
    font-weight: var(--rm-font-weight-medium);
}

.rm-active-filters__remove {
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.rm-active-filters__remove:hover {
    background: rgba(255, 255, 255, 0.3);
}

.rm-active-filters__clear {
    padding: 4px 12px;
    border: 1px solid var(--rm-color-border);
    background: white;
    color: var(--rm-color-text);
    border-radius: 16px;
    font-size: 13px;
    font-weight: var(--rm-font-weight-medium);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.rm-active-filters__clear:hover {
    background: var(--rm-color-background);
    border-color: var(--rm-color-text);
}

/* Hide floating filter controls whenever any RM modal is open */
body[data-rm-modal-open="true"] .rm-filter-controls,
body[data-rm-modal-open="true"] .rm-filter-trigger,
body[data-rm-modal-open="true"] .rm-active-filters {
    display: none !important;
}

/* --- Filtered Out Items --- */

.rm-item--filtered-out {
    display: none;
}

/* --- Desktop Overrides --- */

@media (min-width: 641px) {
    /* Filter trigger - Desktop */
    .rm-filter-trigger {
        height: 60px;
        padding: 0 24px 0 20px;
        border-radius: var(--rm-radius-full);
        gap: 10px;
    }

    .rm-filter-trigger__icon {
        width: 26px;
        height: 26px;
    }

    .rm-filter-trigger__label {
        font-size: 15px;
    }

    /* Modal container - Desktop */
    .rm-filter-modal__container {
        height: auto;
        max-height: 80vh;
        border-radius: var(--rm-radius-lg);
    }

    /* Close button hover effect - Desktop */
    .rm-filter-modal__close:hover {
        transform: scale(1.1);
    }

    /* Dietary pills - Desktop (keep 2 columns but wider) */
    .rm-filter-pills {
        gap: var(--rm-space-sm);
    }

    .rm-filter-pill {
        padding: var(--rm-space-lg) var(--rm-space-lg);
        font-size: var(--rm-font-size-base);
    }

    /* Allergen checkboxes - Desktop (3 columns for better use of space) */
    .rm-filter-checkboxes {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--rm-space-sm);
    }

    .rm-filter-checkbox {
        padding: var(--rm-space-sm);
    }

    /* Active filters - Desktop */
    .rm-active-filters {
        max-width: min(600px, calc(100vw - 32px));
    }

    /* Overlay clickable on desktop to close modal */
    .rm-filter-modal__overlay {
        cursor: pointer;
    }
}
