/* Core Restaurant Menu CSS - v2.8 with Hero Support & Split Layout */

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Screen reader inline label — hidden visually, read by AT in DOM order.
   Uses the same clip technique as .sr-only because clip-path: inset(50%)
   still creates separate TalkBack focus stops on Chrome Android. */
.sr-inline {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   THEME OVERRIDE RESETS
   Prevent WordPress themes from breaking headings in plugin
   panels/modals (e.g. theme sets h2 { display:flex; flex-direction:column })
   Covers the main menu container AND body-appended overlays.
   ============================================================ */
.dot-menu-outer h1,
.dot-frontend-menu h1,
.dot-frontend-menu h2,
.dot-frontend-menu h3,
.dot-frontend-menu h4,
.dot-sr-overlay h2 {
    display: block !important;
    flex-direction: unset !important;
    writing-mode: horizontal-tb !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-align: inherit;
    max-width: none !important;
    width: auto !important;
    white-space: normal !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
}

/* Menu toolbar — holds SR button + language selector side by side */
.dot-menu-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    padding: 0 16px;
}
.dot-menu-toolbar:empty {
    display: none;
}
/* Reset lang toggle/picker margins when inside toolbar (toolbar handles spacing) */
.dot-menu-toolbar .dot-lang-toggle,
.dot-menu-toolbar .dot-lang-picker {
    margin: 0;
}
.dot-menu-toolbar .dot-lang-picker-btn {
    margin: 0;
}
.dot-menu-toolbar .dot-sr-btn {
    margin: 0;
}

/* Business Name Heading (mobile only) */
.dot-business-name {
    display: none;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    padding: 14px 16px 0;
    color: var(--dot-primary, #1a1a2e);
    font-family: var(--dot-heading-font, inherit);
}

.dot-business-location {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 2px;
}

@media (max-width: 1023px) {
    .dot-business-name {
        display: block;
    }
}

/* Hero Banner */
.dot-hero-banner {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}
.dot-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
}
.dot-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.3;
    letter-spacing: normal;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.dot-hero-subtitle {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.5;
    letter-spacing: normal;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
/* Hide hero on mobile if enabled */
@media (max-width: 767px) {
    .dot-hero-hide-mobile {
        display: none;
    }
    /* Hide all images on mobile when setting is enabled */
    .dot-hide-mobile-images .dot-item-image,
    .dot-hide-mobile-images .dot-category-image-wrapper,
    .dot-hide-mobile-images .dot-category-image-column,
    .dot-hide-mobile-images .dot-toggle-image {
        display: none !important;
    }
}

/* Category Navigation */
.dot-category-nav {
    background: var(--dot-nav-bg, #f5f5f5);
    border: 1px solid var(--dot-nav-border, #ddd);
    border-radius: 4px;
    margin-bottom: 16px;
    padding: 16px 20px;
}
.dot-category-nav-title {
    margin: 0 0 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dot-muted, #666);
    text-align: center;
}
.dot-category-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.dot-category-nav-item {
    margin: 0;
}
.dot-category-nav-link {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

/* Outer wrapper — wraps everything the shortcode outputs (h1, toolbar, nav, menu) */
.dot-menu-outer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Main menu container */
.dot-frontend-menu {
    max-width: none;
    margin: 0;
    padding: 0;
}
.dot-frontend-category:last-child {
    margin-bottom: 0;
}
.dot-category-heading {
    box-sizing: border-box;
    text-align: center;
    font-family: var(--dot-heading-font, inherit);
    font-size: 2rem;
    margin: 0 0 40px 0;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    max-width: none;
    overflow-wrap: break-word;
    word-break: normal;
}
.dot-category-heading:focus {
    outline-offset: 4px;
}
.dot-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.dot-menu-item {
    display: block;
    box-sizing: border-box;
    width: 100%;
    font-family: var(--dot-body-font, inherit);
    background: var(--dot-card-bg, transparent);
    border: var(--dot-card-border, none);
    border-radius: var(--dot-card-radius, 0);
    box-shadow: var(--dot-card-shadow, none);
    padding: var(--dot-card-padding, 6px 10px);
}
/* When menu item has an image, use flex layout */
.dot-menu-item:has(.dot-item-image) {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
/* If :has() not supported (older browsers), fallback to always flex if image exists */
@supports not (selector(:has(*))) {
    .dot-menu-item {
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }
}
.dot-item-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}
.dot-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--dot-img-radius, 4px);
}
.dot-item-content {
    flex: 1;
    min-width: 0;
}
.dot-frontend-menu .dot-item-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}
/* Name + Size area. The price block is kept on the right and never wraps.
   JS adds .dot-size-wrap-below when the Size badge cannot fit beside the name. */
.dot-frontend-menu .dot-item-title-area {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 7px;
    row-gap: 3px;
}
.dot-frontend-menu .dot-item-title-area .dot-item-name {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
}
.dot-frontend-menu .dot-item-portion-header {
    flex: 0 0 auto;
    margin: 0;
    transform: translateY(1px);
}
.dot-frontend-menu .dot-item-title-area.dot-size-wrap-below .dot-item-portion-header {
    flex-basis: 100%;
    margin-left: 0;
    transform: none;
}
/* When Size wraps below the name, keep the vertical spacing balanced: the
   gap above and below the badge are intentionally the same. This rule only
   applies to wrapped Size badges, so inline badges are unchanged. */
.dot-frontend-menu .dot-item-header.dot-size-wrap-below .dot-item-title-area {
    row-gap: 9px;
}
.dot-frontend-menu .dot-item-header.dot-size-wrap-below {
    margin-bottom: 9px;
}
.dot-frontend-menu .dot-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dot-name-color, inherit);
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    display: block;
    visibility: visible;
    opacity: 1;
    max-width: none;
    overflow: visible;
    text-indent: 0;
    letter-spacing: normal;
}
/* Badges + Prices wrapper — sits to the right of the title */
.dot-item-badges-prices {
    display: flex;
    align-items: first baseline;
    gap: 12px;
    flex-shrink: 0;
}
/* Label badges (featured/popular/recommended) */
.dot-item-label-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.dot-frontend-menu .dot-item-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.dot-frontend-menu .dot-item-price {
    font-weight: 600;
    white-space: nowrap;
    color: var(--dot-price-color, inherit);
}
.dot-price-amount::after {
    content: '\00A0';
}
.dot-additional-price {
    font-size: 0.9em;
    opacity: 0.85;
}
/* Size & Price Variations — inline rows */
.dot-frontend-menu .dot-item-prices.dot-has-variations {
    gap: 2px;
}
.dot-frontend-menu .dot-item-price-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}
.dot-frontend-menu .dot-item-price-row .dot-item-portion {
    min-width: 50px;
    font-weight: 500;
    font-size: 0.875em;
    opacity: 0.8;
    text-align: right;
}
.dot-frontend-menu .dot-item-price-row .dot-item-price {
    font-weight: 600;
    min-width: 55px;
    text-align: right;
}
.dot-frontend-menu .dot-item-price-row .dot-additional-price {
    font-size: 0.85em;
    opacity: 0.75;
    min-width: 55px;
    text-align: right;
}
.dot-frontend-menu .dot-item-details {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
    margin: 0;
    padding: 0;
}
.dot-frontend-menu .dot-item-description {
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dot-desc-color, inherit);
}
.dot-frontend-menu .dot-item-portion {
    font-weight: 500;
}
.dot-frontend-menu .dot-item-nutrition {
    font-size: 0.85rem;
    color: var(--dot-nutrition-color, #4b5563);
}
.dot-item-details:empty {
    display: none;
}
/* Badges row — sits above header (name/price) */
.dot-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
    justify-content: flex-start;
}
.dot-no-menu {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (min-width: 768px) {
    .dot-hero-banner {
        min-height: 500px;
    }
    .dot-hero-title {
        font-size: 4rem;
    }
    .dot-hero-subtitle {
        font-size: 1.75rem;
    }
    .dot-category-nav {
        padding: 20px;
    }
    .dot-category-nav-list {
        gap: 12px;
    }
    .dot-menu-outer {
        padding: 40px;
    }
    .dot-category-heading {
        font-size: 2.5rem;
        margin-bottom: 50px;
    }
    .dot-menu-item:has(.dot-item-image) {
        gap: 24px;
    }
    .dot-item-image {
        width: 120px;
        height: 120px;
    }
}

/* ============================================================
   MOBILE COLLAPSIBLE MENU STYLES
   ============================================================ */

/* Category Header with Toggle */
.dot-category-header {
    position: relative;
}
.dot-category-toggle {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    border: none;
    padding: 8px 16px !important;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
    color: #fff;
}
.dot-category-toggle:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
    z-index: 1;
}

/* Category Image (Template: category-image) */
.dot-category-image-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--dot-img-radius, 6px);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}
.dot-category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Category Heading in Toggle — inherits color from .dot-category-toggle.
   To customize toggle text, target: .dot-category-toggle { color: #yourcolor; } */
.dot-category-header .dot-category-toggle .dot-category-heading {
    flex: 1 1 0%;
    min-width: 0;
    max-width: none;
    width: auto;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: inherit !important;
    line-height: 1.3;
    text-align: left;
    letter-spacing: normal;
    overflow-wrap: break-word;
    word-break: normal;
}
.dot-category-header .dot-category-toggle .dot-category-count {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 8px;
    color: inherit !important;
}

/* Toggle Icon */
.dot-toggle-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.3s ease;
}
.dot-toggle-icon svg {
    width: 24px;
    height: 24px;
}
.dot-icon-collapse {
    display: none;
}
.dot-category-toggle[aria-expanded="true"] .dot-icon-expand {
    display: none;
}
.dot-category-toggle[aria-expanded="true"] .dot-icon-collapse {
    display: block;
}

/* Category Body — wraps image column + content */
.dot-category-body {
    display: block;
}
/* Carousel nav hidden on mobile (shown via desktop media query) */
.dot-carousel-nav {
    display: none;
}

/* Category Image Column — hidden on mobile, shown on desktop */
.dot-category-image-column {
    display: none;
}
.dot-category-image-large {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Category Content (Items) */
.dot-category-content {
    padding: 8px 16px 16px;
    background: #fff;
}
.dot-category-content[hidden] {
    display: none;
}

/* Back to Categories Link — sticky to viewport bottom on mobile so users
   with motor difficulties don't have to scroll past long item lists to
   reach the escape route. */
.dot-back-to-categories {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}
.dot-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}


/* Desktop: Categories expanded by default, but still collapsible */
@media (min-width: 768px) {
    .dot-category-toggle {
        cursor: pointer;
        padding: 8px 24px;
    }
    .dot-category-toggle .dot-category-heading {
        font-size: 1.5rem;
    }
    .dot-category-image-wrapper {
        width: 80px;
        height: 80px;
    }
    .dot-back-to-categories {
        display: none;
    }

    /* ── Split layout: image left, scrollable items right ── */

    /* Hide the small toggle image on desktop (large column image is shown instead) */
    .dot-has-category-image .dot-toggle-image {
        display: none;
    }

    /* Category body becomes a side-by-side flex row */
    .dot-has-category-image .dot-category-body {
        display: flex;
        gap: 24px;
        align-items: stretch;
        margin-top: 32px;
    }

    /* Left column: category image (stretches to match items height) */
    .dot-has-category-image .dot-category-image-column {
        display: block !important;
        flex: 0 0 40%;
        width: 40%;
        overflow: hidden;
    }

    /* Image fills the column, cropping as needed */
    .dot-has-category-image .dot-category-image-large {
        height: 100%;
        object-fit: cover;
    }

    /* Right column: paginated items (carousel replaces scroll) */
    .dot-has-category-image .dot-category-content {
        flex: 1;
        min-width: 0;
    }

    /* Hide image column when items are collapsed (using :has) */
    .dot-category-body:has(.dot-category-content[hidden]) .dot-category-image-column {
        display: none !important;
    }

    /* ── Image Right layout (category-image template) ── */
    .dot-image-right.dot-has-category-image .dot-category-body {
        flex-direction: row-reverse;
    }
    /* Carousel: hide off-page items (desktop only) */
    .dot-has-category-image .dot-carousel-hidden {
        display: none !important;
    }

    /* ── Carousel navigation (prev / next) ── */
    .dot-carousel-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0 0;
        gap: 12px;
    }
    .dot-carousel-prev,
    .dot-carousel-next {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid #ccc;
        border-radius: 50%;
        background: #fff;
        cursor: pointer;
        color: #555;
        transition: background 0.15s, border-color 0.15s;
        flex-shrink: 0;
    }
    .dot-carousel-prev:hover,
    .dot-carousel-next:hover {
        background: #f0f0f0;
        border-color: #999;
    }
    .dot-carousel-prev:focus-visible,
    .dot-carousel-next:focus-visible {
        outline: 2px solid var(--dot-primary, #8b5a3c);
        outline-offset: 2px;
    }
    .dot-carousel-prev:disabled,
    .dot-carousel-next:disabled {
        opacity: 0.35;
        cursor: default;
    }
    .dot-carousel-prev:disabled:hover,
    .dot-carousel-next:disabled:hover {
        background: #fff;
        border-color: #ccc;
    }
    .dot-carousel-prev svg,
    .dot-carousel-next svg {
        width: 20px;
        height: 20px;
    }
    .dot-carousel-indicator {
        font-size: 0.875rem;
        color: #595959;
        white-space: nowrap;
    }

    /* ── Item-image template: 2-column grid on desktop ── */
    .dot-has-item-images .dot-items-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   ITEM-IMAGE LAYOUT VARIATIONS
   ============================================================ */

/* Image Right — reverse the flex row for each menu item */
.dot-item-image-right .dot-menu-item:has(.dot-item-image) {
    flex-direction: row-reverse;
}
@supports not (selector(:has(*))) {
    .dot-item-image-right .dot-menu-item {
        flex-direction: row-reverse;
    }
}

/* Image Top — stack image above content */
.dot-item-image-top .dot-menu-item:has(.dot-item-image) {
    flex-direction: column;
}
.dot-item-image-top .dot-item-image {
    width: 100%;
    height: 200px;
}
@supports not (selector(:has(*))) {
    .dot-item-image-top .dot-menu-item {
        flex-direction: column;
    }
}

/* === Scheduled Categories — hidden by default, JS adds .dot-schedule-visible === */
.dot-scheduled-category:not(.dot-schedule-visible) { display: none; }
.dot-scheduled-nav-item:not(.dot-schedule-visible) { display: none; }

/* ============================================================
   CATEGORY DESCRIPTIONS (all templates)
   ============================================================ */

.dot-category-description {
    margin: 0;
    padding: 8px 16px 4px;
    font-style: italic;
    font-size: 0.9375rem;
    line-height: 1.5;
    opacity: 0.85;
}

@media (min-width: 768px) {
    .dot-category-description {
        padding: 8px 24px 4px;
        font-size: 1rem;
    }
}

/* ============================================================
   GROUPED TEMPLATE — Navigation
   ============================================================ */

/* Grouped nav: flex-wrap base (mobile + desktop) */
.dot-grouped-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

/* Standalone nav items in grouped nav */
.dot-nav-standalone-item {
    text-align: center;
}

/* "Show all" overflow button (mobile only, hidden on desktop) */
.dot-nav-show-all {
    display: inline-block;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed #aaa;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 400;
    cursor: pointer;
    color: inherit;
    transition: all 0.2s;
}
.dot-nav-show-all:hover,
.dot-nav-show-all:focus-visible {
    background: #f0f0f0;
    border-style: solid;
}
.dot-nav-standalone-item .dot-category-nav-link {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.2s;
}

/* Nav group toggle button */
.dot-nav-group {
    margin-top: 8px;
}
.dot-nav-group-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: inherit;
    font-weight: 500;
    text-align: left;
    gap: 8px;
    transition: background 0.2s;
}
.dot-nav-group-toggle:hover,
.dot-nav-group-toggle:focus-visible {
    background: #e8e8e8;
}
.dot-nav-group-toggle:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}
.dot-nav-group-heading {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    letter-spacing: normal;
}
.dot-nav-group-count {
    font-weight: 400;
    opacity: 0.7;
    font-size: 0.875rem;
}
.dot-nav-toggle-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    line-height: 0;
}
.dot-nav-group-toggle[aria-expanded="true"] .dot-nav-toggle-icon {
    transform: rotate(180deg);
}

/* Nav group subcategory list */
.dot-nav-group-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dot-nav-group-list[hidden] {
    display: none;
}
.dot-nav-subcategory {
    margin: 0;
    padding-left: 16px;
}
.dot-nav-subcategory .dot-category-nav-link {
    display: block;
    padding: 6px 12px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.dot-nav-subcategory .dot-category-nav-link:hover,
.dot-nav-subcategory .dot-category-nav-link:focus-visible {
    background: #e8e8e8;
}

/* Mobile: force [hidden] to actually hide overflow nav items even if a
   host theme has a rule like `[hidden] { display: block }` or sets
   display on .dot-nav-standalone-item with !important. Without this,
   the JS sets hidden=true on items 9+ but they stay on screen. */
@media (max-width: 767px) {
    .dot-nav-overflow .dot-nav-standalone-item[hidden] {
        display: none !important;
    }
}

/* Desktop: Grouped nav */
@media (min-width: 768px) {
    .dot-grouped-nav {
        gap: 12px;
        align-items: flex-start;
    }
    /* Desktop: always show all nav items, hide overflow button.
       Parent is display:flex so `inline` blockifies to `block` — the
       effect is that items render, which is what we want on desktop. */
    .dot-nav-overflow .dot-nav-standalone-item[hidden] {
        display: inline !important;
    }
    .dot-nav-show-all {
        display: none !important;
    }
    .dot-grouped-nav .dot-category-nav-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    .dot-nav-group {
        margin-top: 0;
        position: relative;
    }
    /* Desktop: always show subcategory list, hide toggle icon */
    .dot-nav-group-list,
    .dot-nav-group-list[hidden] {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        margin: 0;
    }
    .dot-nav-toggle-icon {
        display: none;
    }
    .dot-nav-group-toggle {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom: none;
        padding-bottom: 6px;
    }
    .dot-nav-group-list {
        padding: 6px 8px;
        background: #f9f9f9;
        border: 1px solid #ccc;
        border-top: none;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
    }
    .dot-nav-subcategory {
        padding-left: 0;
    }
    .dot-nav-subcategory .dot-category-nav-link {
        font-size: 0.8125rem;
        padding: 4px 10px;
    }
    /* "Jump to Section" title is redundant on desktop — nav is inline */
    .dot-category-nav-title {
        display: none;
    }
}

/* ============================================================
   GROUPED TEMPLATE — Category Group Containers
   ============================================================ */

.dot-category-group {
    margin-bottom: 40px;
}

/* Group header: parent category heading + optional image + description */
.dot-group-header {
    text-align: center;
    padding: 20px 16px 16px;
    margin-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}
.dot-group-image {
    max-width: 100%;
    margin: 0 auto 16px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}
.dot-group-image-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}
.dot-group-heading {
    font-family: var(--dot-heading-font, inherit);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}
.dot-group-description {
    margin: 0;
    font-style: italic;
    font-size: 0.9375rem;
    line-height: 1.5;
    opacity: 0.85;
}

/* Subcategory sections within a group */
.dot-subcategory .dot-subcategory-heading {
    font-size: 1.25rem;
    line-height: 1.3;
    letter-spacing: normal;
}

@media (min-width: 768px) {
    .dot-group-header {
        padding: 24px 24px 20px;
    }
    .dot-group-image-img {
        max-height: 300px;
    }
    .dot-group-heading {
        font-size: 2.25rem;
    }
    .dot-group-description {
        font-size: 1rem;
    }
    .dot-subcategory .dot-subcategory-heading {
        font-size: 1.5rem;
    }
    /* Subcategories within a group also get 2-column item grid */
    .dot-subcategory.dot-has-item-images .dot-items-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .dot-category-nav-link,
    .dot-category-toggle,
    .dot-toggle-icon,
    .dot-back-link,
    .dot-nav-standalone-item .dot-category-nav-link,
    .dot-nav-group-toggle,
    .dot-nav-toggle-icon,
    .dot-nav-subcategory .dot-category-nav-link {
        transition: none !important;
    }
    .dot-nav-group-toggle[aria-expanded="true"] .dot-nav-toggle-icon {
        transition: none !important;
    }
    .dot-carousel-prev,
    .dot-carousel-next {
        transition: none !important;
    }
}

/* ============================================================
   86 FEATURE — UNAVAILABLE ITEMS
   ============================================================ */
.dot-item-unavailable {
    opacity: 0.5;
}

.dot-item-unavailable-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 3px 8px;
    border-radius: 4px;
    background: #d32f2f;
    color: #fff;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ============================================================
   FEATURED / DAILY SPECIAL
   ============================================================ */
.dot-item-featured {
    border-left: 3px solid var(--dot-primary, #c8a97e);
}
.dot-item-featured-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--dot-primary, #c8a97e);
    color: #fff;
    vertical-align: middle;
}

/* Old + current price wrapper — display:contents so it doesn't
   break the flex layout of dot-item-prices */
.dot-price-group {
    display: contents;
}
/* Strikethrough original price — del element reset + styling */
del.dot-price-original,
.dot-price-original {
    text-decoration: line-through;
    opacity: 0.75;
    font-weight: 400;
}
/* Current / featured price — ins element reset + styling */
ins.dot-price-featured,
.dot-price-featured {
    color: var(--dot-primary, #c8a97e);
    font-weight: 700;
    text-decoration: none;
}

/* ============================================================
   POPULAR / RECOMMENDED BADGES
   ============================================================ */
.dot-item-popular-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 3px 8px;
    border-radius: 4px;
    background: #bf4400;
    color: #fff;
    vertical-align: middle;
}
.dot-item-recommended-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 3px 8px;
    border-radius: 4px;
    background: #2e7d32;
    color: #fff;
    vertical-align: middle;
}

/* Allergen / Dietary Badges */
.dot-frontend-menu .dot-item-allergens {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 0 -7px;
    padding: 0;
    width: calc(100% + 7px);
    justify-content: flex-start;
}
.dot-allergen-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    white-space: nowrap;
}

/* ----- Allergen Filter Bar ----- */
.dot-allergen-filters[hidden] {
    display: none;
}
.dot-allergen-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
    align-items: center;
}
.dot-allergen-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
    line-height: 1.3;
    padding: 5px 10px;
    border-radius: 16px;
    background: #f5f5f5;
    color: #444;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    min-height: 32px;
}
.dot-allergen-chip:hover,
.dot-allergen-chip:focus-visible {
    background: #eee;
    border-color: #bbb;
}
.dot-allergen-chip:focus-visible {
    outline: 2px solid var(--dot-primary, #8b5a3c);
    outline-offset: 2px;
}
/* Active = allergen being excluded */
.dot-allergen-chip-active {
    background: #b71c1c;
    border-color: #b71c1c;
    color: #fff;
    text-decoration: line-through;
    opacity: 0.8;
}
.dot-allergen-chip-active:hover {
    background: #c62828;
}
/* Clear button chip */
.dot-allergen-clear {
    background: transparent;
    border: 1px dashed #aaa;
    color: #888;
    font-size: 0.75rem;
    text-decoration: none;
}
.dot-allergen-clear:hover {
    background: #f0f0f0;
    color: #555;
}
/* Filter note */
.dot-filter-note {
    font-size: 0.78rem;
    color: #888;
    font-style: italic;
    margin: 0 0 8px;
    padding: 0 4px;
}
/* ----- Allergen Filter Toggle ----- */
.dot-allergen-filter-wrapper {
    margin: 8px 0;
    padding: 0 16px;
}
.dot-allergen-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    background: none;
    font-family: inherit;
    user-select: none;
}
.dot-filter-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform 0.2s;
}
.dot-allergen-filter-toggle[aria-expanded="true"] .dot-filter-arrow {
    transform: rotate(90deg);
}
.dot-allergen-filter-toggle:hover {
    background: #f5f5f5;
}
.dot-allergen-filter-toggle:focus-visible {
    outline: 2px solid var(--dot-primary, #8b5a3c);
    outline-offset: 2px;
}
.dot-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #b71c1c;
    color: #fff;
    border-radius: 9px;
    padding: 0 5px;
}
.dot-filter-count[hidden] {
    display: none;
}

/* Menu Search */
.dot-menu-search {
    position: relative;
    margin: 12px 0;
    padding: 0 16px;
}
.dot-search-input {
    display: block;
    width: 100%;
    padding: 10px 36px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10px center no-repeat;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
/* Hide browser native clear button — we use a custom .dot-search-clear */
.dot-search-input::-webkit-search-cancel-button,
.dot-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}
.dot-search-input::-ms-clear {
    display: none;
}
.dot-search-input:focus {
    border-color: var(--dot-primary, #8b5a3c);
    box-shadow: 0 0 0 2px rgba(139, 90, 60, 0.15);
}
.dot-search-clear {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dot-search-clear:hover,
.dot-search-clear:focus {
    color: #333;
}
.dot-search-no-results {
    text-align: center;
    padding: 24px 16px;
    color: #888;
    font-size: 1rem;
}


/* ============================================================
   DARK THEME
   ============================================================ */
@media (prefers-color-scheme: dark) {
    /* Outer wrapper dark background — covers h1, toolbar, nav and menu */
    .dot-menu-outer {
        background: #121212;
        color: #e0e0e0;
    }

    /* Reset theme customization variables for dark mode to prevent contrast issues */
    .dot-frontend-menu {
        --dot-card-bg: initial;
        --dot-card-border: initial;
        --dot-card-shadow: initial;
        --dot-card-padding: initial;
        --dot-name-color: initial;
        --dot-desc-color: initial;
        --dot-price-color: initial;
        --dot-nav-bg: initial;
        --dot-nav-link: initial;
        --dot-nav-border: initial;
    }

    /* Business name heading */
    .dot-business-name {
        color: #e0e0e0;
    }
    .dot-business-location {
        opacity: 0.6;
    }

    /* Hero banner text shadow needs more contrast on dark */
    .dot-hero-title,
    .dot-hero-subtitle {
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    }

    /* Toolbar (SR button, language switcher) */
    .dot-menu-toolbar {
        color: #e0e0e0;
    }

    /* Category navigation */
    .dot-category-nav {
        background: #1e1e1e;
        border-color: #444;
    }
    .dot-category-nav-title {
        color: #999;
    }
    .dot-category-nav-link {
        background: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }
    .dot-category-nav-link:hover,
    .dot-category-nav-link:focus-visible {
        background: #3a3a3a;
        color: #fff;
    }

    /* Menu container & items */
    .dot-frontend-menu {
        background: #121212;
        color: #e0e0e0;
    }
    .dot-menu-item {
        background: #1e1e1e;
        border-color: #333;
    }
    .dot-frontend-menu .dot-item-name {
        color: #f0f0f0;
    }
    .dot-frontend-menu .dot-item-description {
        color: #b0b0b0;
    }
    .dot-frontend-menu .dot-item-price {
        color: #e0e0e0;
    }
    .dot-frontend-menu .dot-item-portion {
        color: #999;
    }
    .dot-frontend-menu .dot-item-allergens {
        color: #999;
    }
    .dot-frontend-menu .dot-item-nutrition {
        color: #888;
    }
    .dot-category-heading {
        color: #f0f0f0;
    }
    .dot-no-menu {
        color: #999;
    }
    .dot-additional-price {
        opacity: 0.85;
    }

    /* Category content area */
    .dot-category-content {
        background: #1a1a1a;
    }

    /* Back to categories */
    .dot-back-to-categories {
        background: #1e1e1e;
        border-top-color: #444;
    }
    .dot-back-link {
        background: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }
    .dot-back-link:hover,
    .dot-back-link:focus-visible {
        background: #3a3a3a;
        color: #fff;
    }
    /* Toggle button – keeps its colored background, but adjust fallback */
    .dot-category-toggle:focus {
        outline-color: #66aaff;
    }

    /* Category image wrapper fallback bg */
    .dot-category-image-wrapper {
        background: rgba(255, 255, 255, 0.05);
    }

    /* Scrollbar in split layout */
    .dot-has-category-image .dot-category-content::-webkit-scrollbar-track {
        background: #2a2a2a;
    }
    .dot-has-category-image .dot-category-content::-webkit-scrollbar-thumb {
        background: #555;
    }
    .dot-has-category-image .dot-category-content::-webkit-scrollbar-thumb:hover {
        background: #777;
    }
    .dot-has-category-image .dot-category-content {
        scrollbar-color: #555 #2a2a2a;
    }

    /* Category description */
    .dot-category-description {
        opacity: 0.8;
    }

    /* Grouped template – nav */
    .dot-nav-standalone-item .dot-category-nav-link {
        background: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }
    .dot-nav-show-all {
        border-color: #666;
        color: #ccc;
    }
    .dot-nav-show-all:hover,
    .dot-nav-show-all:focus-visible {
        background: #333;
    }
    .dot-nav-group-toggle {
        background: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }
    .dot-nav-group-toggle:hover,
    .dot-nav-group-toggle:focus-visible {
        background: #3a3a3a;
    }
    .dot-nav-subcategory .dot-category-nav-link {
        background: #252525;
        border-color: #444;
        color: #d0d0d0;
    }
    .dot-nav-subcategory .dot-category-nav-link:hover,
    .dot-nav-subcategory .dot-category-nav-link:focus-visible {
        background: #3a3a3a;
        color: #fff;
    }

    /* Grouped template – group header */
    .dot-group-header {
        border-bottom-color: #444;
    }
    .dot-group-description {
        opacity: 0.8;
    }

    /* 86 feature: unavailable badge in dark mode */
    .dot-item-unavailable {
        opacity: 0.4;
    }
    .dot-item-unavailable-badge {
        background: #ef5350;
        color: #fff;
    }

    /* Featured / Daily Special in dark mode */
    .dot-item-featured {
        border-left-color: var(--dot-primary, #d4b896);
    }
    .dot-item-featured-badge {
        background: var(--dot-primary, #d4b896);
        color: #fff;
        font-weight: 700;
    }
    .dot-item-popular-badge {
        background: #ff6d00;
        color: #fff;
    }
    .dot-item-recommended-badge {
        background: #388e3c;
        color: #fff;
    }
    .dot-price-featured {
        color: var(--dot-primary, #d4b896);
    }

    /* Allergen badges in dark mode */
    .dot-allergen-badge {
        background: #333;
        color: #ddd;
        border-color: #555;
    }

    /* Allergen filter bar in dark mode */
    .dot-allergen-chip {
        background: #2a2a2a;
        color: #ccc;
        border-color: #444;
    }
    .dot-allergen-chip:hover,
    .dot-allergen-chip:focus-visible {
        background: #333;
        border-color: #666;
    }
    .dot-allergen-chip-active {
        background: #b71c1c;
        border-color: #d32f2f;
        color: #fff;
    }
    .dot-allergen-chip-active:hover {
        background: #c62828;
    }
    .dot-allergen-clear {
        border-color: #555;
        color: #999;
    }
    .dot-allergen-clear:hover {
        background: #333;
        color: #ccc;
    }
    .dot-filter-note {
        color: #777;
    }
    .dot-allergen-filter-toggle {
        color: #aaa;
    }
    .dot-allergen-filter-toggle:hover {
        background: #2a2a2a;
    }
    .dot-filter-count {
        background: #d32f2f;
    }

    /* Search input in dark mode */
    .dot-search-input {
        background-color: #2a2a2a;
        border-color: #555;
        color: #eee;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    }
    .dot-search-input:focus {
        border-color: var(--dot-primary, #d4b896);
        box-shadow: 0 0 0 2px rgba(212, 184, 150, 0.2);
    }
    .dot-search-clear {
        color: #888;
    }
    .dot-search-clear:hover,
    .dot-search-clear:focus {
        color: #ddd;
    }

    /* Carousel nav in dark mode */
    .dot-carousel-prev,
    .dot-carousel-next {
        background: #2a2a2a;
        border-color: #555;
        color: #ccc;
    }
    .dot-carousel-prev:hover,
    .dot-carousel-next:hover {
        background: #333;
        border-color: #777;
    }
    .dot-carousel-prev:disabled:hover,
    .dot-carousel-next:disabled:hover {
        background: #2a2a2a;
        border-color: #555;
    }
    .dot-carousel-indicator {
        color: #999;
    }

    .dot-search-no-results {
        color: #999;
    }

}

/* Desktop dark scrollbar + nav group list */
@media (min-width: 768px) and (prefers-color-scheme: dark) {
    .dot-nav-group-list {
        background: #222;
        border-color: #555;
    }
}

/* ============================================================
   HIGH CONTRAST
   ============================================================ */
@media (prefers-contrast: more) {
    /* Navigation links */
    .dot-category-nav {
        border-width: 2px;
    }
    .dot-category-nav-link {
        border-width: 2px;
    }

    /* Toggle button */
    .dot-category-toggle:focus {
        outline-width: 3px;
    }

    /* Back link */
    .dot-back-link {
        border-width: 2px;
    }

    /* Grouped nav */
    .dot-nav-group-toggle {
        border-width: 2px;
    }
    .dot-nav-group-toggle:focus-visible {
        outline-width: 3px;
    }
    .dot-nav-subcategory .dot-category-nav-link {
        border-width: 2px;
    }

    /* Group header separator */
    .dot-group-header {
        border-bottom-width: 3px;
    }

    /* Category description and group description — full opacity */
    .dot-category-description,
    .dot-group-description {
        opacity: 1;
    }
    .dot-additional-price {
        opacity: 1;
    }
    .dot-nav-group-count {
        opacity: 1;
    }
    .dot-category-header .dot-category-toggle .dot-category-count {
        opacity: 1;
    }

    /* Item images get visible border */
    .dot-item-image img {
        border: 2px solid;
    }

    /* 86 feature: unavailable items at full opacity for readability, stronger badge */
    .dot-item-unavailable {
        opacity: 0.7;
    }
    .dot-item-unavailable-badge {
        border: 2px solid #000;
    }

    /* Featured / Daily Special — stronger border, full opacity on strikethrough */
    .dot-item-featured {
        border-left-width: 4px;
    }
    .dot-item-featured-badge {
        border: 2px solid #000;
    }
    .dot-price-original {
        opacity: 0.85;
    }
}

/* ============================================================
   FORCED COLORS (Windows High Contrast)
   ============================================================ */
@media (forced-colors: active) {
    /* Navigation */
    .dot-category-nav {
        border: 1px solid ButtonText;
    }
    .dot-category-nav-link {
        border: 1px solid ButtonText;
        color: LinkText;
    }
    .dot-category-nav-link:hover,
    .dot-category-nav-link:focus-visible {
        outline: 2px solid Highlight;
    }

    /* Toggle button */
    .dot-category-toggle {
        border: 1px solid ButtonText;
        color: ButtonText;
        forced-color-adjust: none;
        background: ButtonFace;
    }
    .dot-category-toggle:focus {
        outline: 3px solid Highlight;
    }
    .dot-toggle-icon {
        color: ButtonText;
    }

    /* Back link */
    .dot-back-to-categories {
        border-top: 1px solid ButtonText;
    }
    .dot-back-link {
        border: 1px solid ButtonText;
        color: LinkText;
    }

    /* Grouped nav */
    .dot-nav-group-toggle {
        border: 1px solid ButtonText;
        color: ButtonText;
        background: ButtonFace;
    }
    .dot-nav-group-toggle:focus-visible {
        outline: 3px solid Highlight;
    }
    .dot-nav-subcategory .dot-category-nav-link {
        border: 1px solid ButtonText;
        color: LinkText;
    }

    /* Group header */
    .dot-group-header {
        border-bottom: 2px solid ButtonText;
    }

    /* Hero text */
    .dot-hero-title,
    .dot-hero-subtitle {
        text-shadow: none;
        color: CanvasText;
    }

    /* Item images */
    .dot-item-image img {
        border: 1px solid CanvasText;
    }
    .dot-category-image-large {
        border: 1px solid CanvasText;
    }

    /* 86 feature: unavailable badge in forced colors */
    .dot-item-unavailable-badge {
        forced-color-adjust: none;
        background: Mark;
        color: MarkText;
        border: 1px solid CanvasText;
    }

    /* Featured / Daily Special in forced colors */
    .dot-item-featured {
        border-left: 3px solid Highlight;
    }
    .dot-item-featured-badge {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
        border: 1px solid CanvasText;
    }
    .dot-price-original {
        text-decoration: line-through;
        opacity: 1;
    }
    .dot-price-featured {
        color: Highlight;
    }

    /* Allergen badges in forced colors */
    .dot-allergen-badge {
        forced-color-adjust: none;
        border: 1px solid ButtonText;
        background: ButtonFace;
        color: ButtonText;
    }

    /* Allergen filter chips in forced colors */
    .dot-allergen-chip {
        forced-color-adjust: none;
        border: 1px solid ButtonText;
        background: ButtonFace;
        color: ButtonText;
    }
    .dot-allergen-chip:focus-visible {
        outline: 3px solid Highlight;
    }
    .dot-allergen-chip-active {
        border: 2px solid Highlight;
        color: Highlight;
    }
    .dot-allergen-filter-toggle {
        forced-color-adjust: none;
        color: ButtonText;
        border: 1px solid ButtonText;
    }
    .dot-allergen-filter-toggle:focus-visible {
        outline: 3px solid Highlight;
    }
    .dot-filter-count {
        forced-color-adjust: none;
        border: 1px solid Highlight;
        background: Highlight;
        color: HighlightText;
    }

    /* Search input in forced colors */
    .dot-search-input {
        border: 2px solid ButtonText;
        background-color: Field;
        color: FieldText;
    }
    .dot-search-input:focus {
        outline: 3px solid Highlight;
    }
    .dot-search-clear {
        color: ButtonText;
    }
}

/* ============================================================
   MOBILE: badges + prices stack vertically, right-aligned
   ============================================================ */
@media (max-width: 767px) {
    .dot-item-badges-prices {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        flex-shrink: 0;
    }

    .dot-frontend-menu .dot-item-header {
        flex-wrap: nowrap;
    }
}

/* ============================================================
   320px REFLOW (400% zoom support)
   ============================================================ */
@media (max-width: 320px) {
    .dot-hero-banner {
        min-height: 200px;
        margin-bottom: 20px;
    }
    .dot-hero-content {
        padding: 20px 12px;
    }
    .dot-hero-title {
        font-size: 1.75rem;
    }
    .dot-hero-subtitle {
        font-size: 1rem;
    }

    /* Category navigation */
    .dot-category-nav {
        padding: 10px 12px;
        margin-bottom: 20px;
    }
    .dot-category-nav-link {
        padding: 6px 10px;
        font-size: 0.875rem;
    }

    /* Menu container */
    .dot-menu-outer {
        padding: 10px;
    }
    .dot-category-heading {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    /* Items: stack image above content at very small sizes */
    .dot-menu-item:has(.dot-item-image) {
        flex-direction: column;
    }
    .dot-item-image {
        width: 100%;
        height: 150px;
    }

    /* Item header: keep price at the right; name + Size may wrap within the left area. */
    .dot-frontend-menu .dot-item-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }
    .dot-frontend-menu .dot-item-title-area {
        flex: 1 1 auto;
        min-width: 0;
    }
    .dot-item-badges-prices {
        align-self: flex-start;
        align-items: flex-start;
        flex-shrink: 0;
    }
    .dot-frontend-menu .dot-item-prices {
        align-items: flex-end;
    }

    /* Toggle buttons */
    .dot-category-toggle {
        padding: 12px 10px !important;
        gap: 8px;
    }
    .dot-category-image-wrapper {
        width: 48px;
        height: 48px;
    }
    .dot-category-header .dot-category-toggle .dot-category-heading {
        font-size: 1.125rem;
    }

    /* Back link */
    .dot-back-to-categories {
        padding: 10px;
    }
    .dot-back-link {
        padding: 6px 8px;
        font-size: 0.875rem;
    }

    /* Grouped nav */
    .dot-nav-group-toggle {
        padding: 8px 10px;
        font-size: 0.875rem;
    }
    .dot-nav-subcategory {
        padding-left: 10px;
    }
    .dot-nav-subcategory .dot-category-nav-link {
        padding: 5px 8px;
        font-size: 0.8125rem;
    }

    /* Category group */
    .dot-category-group {
        margin-bottom: 20px;
    }
    .dot-group-header {
        padding: 12px 10px 10px;
    }
    .dot-group-heading {
        font-size: 1.375rem;
    }
    .dot-group-description {
        font-size: 0.875rem;
    }
    .dot-category-description {
        padding: 6px 10px 4px;
        font-size: 0.875rem;
    }

    /* Allow prices and portions to wrap at very narrow widths */
    .dot-frontend-menu .dot-item-price,
    .dot-frontend-menu .dot-item-portion,
    .dot-frontend-menu .dot-item-nutrition {
        white-space: normal;
        word-break: break-word;
    }
    .dot-allergen-badge {
        white-space: normal;
    }
}

/* ============================================================
   BILINGUAL LANGUAGE TOGGLE
   Uses body class so it works for modal (appended to body) too
   ============================================================ */
.dot-lang2 { display: none; }
body.dot-show-lang2 .dot-lang1 { display: none; }
body.dot-show-lang2 .dot-lang2 { display: inline; }

/* Toggle button styling */
.dot-lang-toggle {
    display: block;
    margin: 12px auto;
    padding: 8px 20px;
    border: 2px solid var(--dot-primary, #8b5a3c);
    border-radius: 0;
    background: transparent;
    color: var(--dot-primary, #8b5a3c);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.dot-lang-toggle:hover,
.dot-lang-toggle:focus {
    background: var(--dot-primary, #8b5a3c);
    color: #fff;
    outline: 2px solid var(--dot-primary, #8b5a3c);
    outline-offset: 2px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .dot-lang-toggle {
        border-color: var(--dot-primary, #c4956a);
        color: var(--dot-primary, #c4956a);
    }
    .dot-lang-toggle:hover,
    .dot-lang-toggle:focus {
        background: var(--dot-primary, #c4956a);
        color: #1a1a1a;
        outline-color: var(--dot-primary, #c4956a);
    }
}

/* High contrast */
@media (prefers-contrast: more) {
    .dot-lang-toggle {
        border-width: 3px;
    }
}

/* Forced colors */
@media (forced-colors: active) {
    .dot-lang-toggle {
        border: 2px solid ButtonText;
        color: ButtonText;
        background: ButtonFace;
    }
    .dot-lang-toggle:hover,
    .dot-lang-toggle:focus {
        background: Highlight;
        color: HighlightText;
        outline: 2px solid Highlight;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dot-lang-toggle {
        transition: none;
    }
}

/* ============================================================
   MULTI-LANGUAGE SUPPORT (3+ languages)
   JS injects a <style> tag showing only the active language spans.
   By default all language spans are hidden; JS unhides the active one.
   ============================================================ */
body.dot-multilang [class*="dot-lang-"]:not(.dot-lang-picker):not(.dot-lang-picker-btn):not(.dot-lang-picker-list):not(.dot-lang-live) {
    display: none;
}
/* RTL isolation for mixed-direction content */
[dir="rtl"] {
    unicode-bidi: isolate;
}

/* Language picker dropdown (custom button + list, replaces toggle when >2 langs) */
.dot-lang-picker {
    position: relative;
    display: inline-block;
    margin: 12px auto;
}
.dot-lang-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid var(--dot-primary, #8b5a3c);
    border-radius: 0;
    background: transparent;
    color: var(--dot-primary, #8b5a3c);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.dot-lang-picker-btn::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b5a3c' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}
.dot-lang-picker-btn:hover,
.dot-lang-picker-btn:focus {
    background: var(--dot-primary, #8b5a3c);
    color: #fff;
    outline: 2px solid var(--dot-primary, #8b5a3c);
    outline-offset: 2px;
}
.dot-lang-picker-btn:hover::after,
.dot-lang-picker-btn:focus::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}
.dot-lang-picker-list {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    margin: 4px 0 0;
    padding: 4px 0;
    min-width: 100%;
    background: #fff;
    border: 2px solid var(--dot-primary, #8b5a3c);
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}
.dot-lang-picker-list[hidden] {
    display: none;
}
.dot-lang-picker-list [role="menuitemradio"] {
    padding: 8px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--dot-primary, #8b5a3c);
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dot-lang-picker-list [role="menuitemradio"]:hover,
.dot-lang-picker-list [role="menuitemradio"]:focus {
    background: var(--dot-primary, #8b5a3c);
    color: #fff;
    outline: none;
}
.dot-lang-picker-list [role="menuitemradio"][aria-checked="true"] {
    font-weight: 700;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .dot-lang-picker-btn {
        border-color: #d4bfa6;
        color: #d4bfa6;
    }
    .dot-lang-picker-btn::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23d4bfa6' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    }
    .dot-lang-picker-btn:hover,
    .dot-lang-picker-btn:focus {
        background: #d4bfa6;
        color: #1a1a1a;
        outline-color: #d4bfa6;
    }
    .dot-lang-picker-btn:hover::after,
    .dot-lang-picker-btn:focus::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231a1a1a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    }
    .dot-lang-picker-list {
        background: #2a2a2a;
        border-color: #d4bfa6;
    }
    .dot-lang-picker-list [role="menuitemradio"] {
        color: #d4bfa6;
    }
    .dot-lang-picker-list [role="menuitemradio"]:hover {
        background: #d4bfa6;
        color: #1a1a1a;
    }
}

/* High contrast */
@media (prefers-contrast: more) {
    .dot-lang-picker-btn {
        border-width: 3px;
    }
}

/* Forced colors (Windows High Contrast) */
@media (forced-colors: active) {
    .dot-lang-picker-btn {
        border: 2px solid ButtonText;
        color: ButtonText;
        background: ButtonFace;
    }
    .dot-lang-picker-btn:hover,
    .dot-lang-picker-btn:focus {
        background: Highlight;
        color: HighlightText;
        outline: 2px solid Highlight;
    }
    .dot-lang-picker-list {
        border: 2px solid ButtonText;
        background: ButtonFace;
    }
    .dot-lang-picker-list [role="menuitemradio"] {
        color: ButtonText;
    }
    .dot-lang-picker-list [role="menuitemradio"]:hover {
        background: Highlight;
        color: HighlightText;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dot-lang-picker-btn {
        transition: none;
    }
    .dot-lang-picker-list [role="menuitemradio"] {
        transition: none;
    }
}

/* Language switch live announcement (screen readers) */
.dot-lang-live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   TABLE ANNOUNCEMENT BADGE
   ============================================================ */

.dot-table-announcement {
    text-align: center;
    margin-bottom: 20px;
}
.dot-table-badge {
    display: inline-block;
    background: var(--dot-primary, #8b5a3c);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 20px;
}
@media (max-width: 600px) {
    .dot-table-badge {
        font-size: 0.875rem;
        padding: 5px 14px;
    }
}

/* Per-item extras / additions — compact block below the description */
.dot-item-extras {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}
.dot-item-extras-title {
    margin: 0 0 3px;
    font-size: .72em;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #d72f50;
}
.dot-item-extra-row {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 14px;
    padding: 1px 0;
    line-height: 1.25;
}
.dot-item-extra-name {
    color: inherit;
    font-size: .88em;
    font-weight: 400;
}
.dot-item-extra-price {
    color: #d72f50;
    font-size: .82em;
    font-weight: 500;
    white-space: nowrap;
}


/* ============================================================
   DINE ON TAP 3.0.18 — SIZE LABELS STABLE
   Page 7780: the quantity badge always stays immediately below
   the item name. No JS measurement/repositioning is used.
   This prevents category open/close operations from moving
   badges that are already rendered.
   ============================================================ */
.page-id-7780 .dot-frontend-menu .dot-item-title-area {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    min-width: 0 !important;
    width: auto !important;
}

.page-id-7780 .dot-frontend-menu .dot-item-title-area .dot-item-name {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

.page-id-7780 .dot-frontend-menu .dot-item-title-area .dot-item-portion-header {
    position: static !important;
    flex: 0 0 auto !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
    align-self: flex-start !important;
    box-sizing: border-box !important;
}

.page-id-7780 .dot-frontend-menu .dot-item-title-area.dot-size-wrap-below {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    row-gap: 3px !important;
}

.page-id-7780 .dot-frontend-menu .dot-item-header.dot-size-wrap-below {
    margin-bottom: 4px !important;
}
