:root {
    --ym-primary: #dc2626;
    --ym-primary-dark: #b91c1c;
    --ym-ink: #111111;
    --ym-muted: #6b7280;
    --ym-bg: #ffffff;
    --ym-card: #ffffff;
    --ym-border: #e5e7eb;
    --ym-radius: 6px;
    --ym-radius-sm: 4px;
    --ym-shadow: none;
    --ym-shadow-lg: 0 -4px 16px rgba(0,0,0,0.1);
    font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--ym-bg);
    color: var(--ym-ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body { padding-bottom: 86px; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; touch-action: manipulation; background: none; border: none; }
img { max-width: 100%; display: block; }

/* ---------- Announcement ---------- */
.ym-announcement { background: var(--ym-primary); color: #fff; text-align: center; padding: 8px 32px; font-size: 12.5px; font-weight: 600; position: relative; }
.ym-announcement-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: #fff; font-size: 15px; }

/* ---------- Top bar ---------- */
.ym-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--ym-border); }
.ym-bar-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ym-bar-logo { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.ym-bar-name { font-size: 16px; font-weight: 800; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }

.ym-lang-wrap { position: relative; flex-shrink: 0; }
.ym-icon-btn.ym-lang-toggle { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--ym-muted); font-size: 16px; }
/* z-index MUST stay above .ym-sticky-head (30): the dropdown sits in the
   hero, which precedes the sticky header in the DOM, so an equal value
   makes the search bar paint over the open language list. */
.ym-lang-menu { display: none; position: absolute; top: 110%; right: 0; background: var(--ym-card); border: 1px solid var(--ym-border); border-radius: 6px; padding: 4px; min-width: 130px; z-index: 50; }
.ym-lang-menu.show { display: block; }
.ym-lang-menu a { display: block; padding: 7px 10px; font-size: 13px; font-weight: 600; border-radius: 4px; }
.ym-lang-menu a.active, .ym-lang-menu a:hover { background: #f3f4f6; color: var(--ym-primary); }

/* ---------- Search ---------- */
.ym-search-wrap { padding: 10px 16px; }
.ym-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ym-border); border-radius: var(--ym-radius); padding: 9px 12px; }
.ym-search .bx { color: var(--ym-muted); font-size: 16px; }
.ym-search input { flex: 1; background: none; border: none; outline: none; color: var(--ym-ink); font-size: 14px; }

/* ---------- Category nav ---------- */
.ym-cat-nav { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; -ms-overflow-style: none; scrollbar-width: none; }
.ym-cat-nav::-webkit-scrollbar { display: none; }
.ym-cat-pill { flex-shrink: 0; padding: 6px 13px; border-radius: var(--ym-radius-sm); border: 1px solid var(--ym-border); font-weight: 700; font-size: 12.5px; color: var(--ym-muted); white-space: nowrap; }
.ym-cat-pill.active { background: var(--ym-ink); color: #fff; border-color: var(--ym-ink); }

.ym-empty { text-align: center; color: var(--ym-muted); padding: 50px 20px; font-size: 14px; }
.ym-empty .bx { font-size: 36px; display: block; margin-bottom: 8px; }

/* ---------- Sections / list ---------- */
.ym-section { padding: 0 16px; }
.ym-section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ym-muted); margin: 18px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--ym-ink); }

.ym-list { display: flex; flex-direction: column; }

.ym-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 11px 0;
    border-bottom: 1px solid var(--ym-border);
}
.ym-card.is-sold-out { opacity: 0.45; }
.ym-card-img { width: 44px; height: 44px; border-radius: var(--ym-radius-sm); object-fit: cover; flex-shrink: 0; margin-top: 1px; }
.ym-card-body { flex: 1; min-width: 0; }
.ym-card-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.ym-card-name { font-size: 14.5px; font-weight: 700; margin: 0; line-height: 1.3; }
/* margin-left:auto keeps the price on the right edge when .ym-card-row wraps it
   onto its own line, so the leader dots still point at it instead of leaving it
   orphaned under the name. */
.ym-card-price { font-size: 14.5px; font-weight: 800; white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.ym-strike { text-decoration: line-through; color: var(--ym-muted); margin-right: 5px; font-weight: 500; font-size: 12px; }
.ym-card-desc { font-size: 12px; color: var(--ym-muted); margin: 2px 0 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ym-badges { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.ym-badge { font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: #f3f4f6; color: var(--ym-muted); }
.ym-badge.sold-out { background: var(--ym-primary); color: #fff; }

/* ---------- Social / contact / footer ---------- */
.ym-social-row { display: flex; justify-content: center; gap: 16px; padding: 14px 16px; font-size: 17px; color: var(--ym-muted); }
.ym-contact-row { text-align: center; padding: 0 16px 12px; color: var(--ym-muted); font-size: 12.5px; }
.ym-contact-line { margin: 3px 0; }
.ym-footer { text-align: center; padding: 18px; color: var(--ym-muted); font-size: 11px; }
.ym-footer a { color: var(--ym-primary); font-weight: 700; }

/* ---------- Product detail sheet ---------- */
.ym-sheet-backdrop { position: fixed; inset: 0; background: rgba(17,17,17,0.5); z-index: 90; display: none; }
.ym-sheet-backdrop.show { display: block; }
.ym-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; background: var(--ym-card);
    border-radius: 12px 12px 0 0; box-shadow: var(--ym-shadow-lg);
    z-index: 91; max-height: 88vh; overflow-y: auto;
    transform: translateY(100%); transition: transform 0.22s ease;
}
.ym-sheet.show { transform: translateY(0); }
.ym-sheet-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ym-sheet-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(17,17,17,0.5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; z-index: 2; }
.ym-sheet-body { padding: 16px; }
.ym-sheet-title { font-size: 17px; font-weight: 800; margin: 0 0 5px; }
.ym-sheet-price { font-size: 15px; font-weight: 800; color: var(--ym-primary); margin-bottom: 8px; }
.ym-sheet-desc { color: var(--ym-muted); font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.ym-sheet-meta { display: flex; gap: 14px; font-size: 12px; color: var(--ym-muted); margin-bottom: 10px; flex-wrap: wrap; }
.ym-sheet-meta span { display: flex; align-items: center; gap: 4px; }
.ym-sheet-section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--ym-muted); margin: 12px 0 5px; }
.ym-allergen-list { display: flex; flex-wrap: wrap; gap: 5px; }
.ym-allergen-chip { font-size: 11px; padding: 3px 9px; border-radius: 3px; background: #f3f4f6; }

/* ---------- FABs / toast ---------- */
.ym-fab-stack { position: fixed; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.ym-fab { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: var(--ym-radius); background: var(--ym-ink); color: #fff; font-weight: 700; font-size: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.ym-fab.ym-fab-primary { background: var(--ym-primary); }
.ym-fab .bx { font-size: 15px; }

.ym-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ym-ink); color: #fff; padding: 9px 16px; border-radius: var(--ym-radius); font-size: 12.5px; z-index: 100; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; white-space: nowrap; }
.ym-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .ym-sheet, .ym-toast { transition: none; }
}

@media (min-width: 720px) {
    .ym-bar, .ym-search-wrap, .ym-cat-nav, .ym-section { max-width: 680px; margin-left: auto; margin-right: auto; }
}

/* ===== Nutrition tiles + spicy + dietary badges (shared appended block) ===== */
.ym-sheet-meta { display: block; margin-bottom: 14px; }
.ym-nutri-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ym-nutri { flex: 1 1 72px; min-width: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 8px; border-radius: 16px; background: rgba(140,140,140,.08); border: 1px solid rgba(140,140,140,.16); }
.ym-nutri i { font-size: 19px; line-height: 1; }
.ym-nutri b { font-size: 16px; font-weight: 800; color: var(--ym-ink); line-height: 1; letter-spacing: -.01em; display: flex; align-items: baseline; white-space: nowrap; }
.ym-nutri b .u { font-size: 10.5px; font-weight: 600; color: var(--ym-muted); margin-left: 2px; }
.ym-nutri-l { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ym-muted); font-weight: 700; }
.ym-nutri.is-cal { background: rgba(239,91,59,.12); border-color: rgba(239,91,59,.30); }
.ym-nutri.is-cal i { color: #ef5b3b; }
.ym-nutri.is-pro { background: rgba(108,92,231,.12); border-color: rgba(108,92,231,.30); }
.ym-nutri.is-pro i { color: #6c5ce7; }
.ym-nutri.is-carb { background: rgba(224,163,62,.14); border-color: rgba(224,163,62,.32); }
.ym-nutri.is-carb i { color: #e0a33e; }
.ym-nutri.is-fat { background: rgba(234,179,8,.14); border-color: rgba(234,179,8,.34); }
.ym-nutri.is-fat i { color: #eab308; }
.ym-nutri.is-spicy { background: rgba(232,70,43,.12); border-color: rgba(232,70,43,.30); }
.ym-nutri.is-time i { color: var(--ym-muted); }
.ym-chilis { font-size: 17px; line-height: 1; letter-spacing: 2px; }
.ym-chilis .off { opacity: .25; filter: grayscale(1); }
.ym-badge { display: inline-flex; align-items: center; gap: 3px; }
.ym-badge i { font-size: 13px; line-height: 1; }
.ym-badge.veg { background: #e8f7ee; color: #1b8a4f; }
.ym-badge.vegan { background: #def3e6; color: #157a43; }
.ym-badge.halal { background: #e3f6f2; color: #0f8a78; }

/* ===== Card title + dietary badge polish (theme-adaptive) ===== */
.ym-card { color: var(--ym-ink); }
.ym-badge.veg { background: rgba(76,175,110,.15); border: 1px solid rgba(76,175,110,.28); color: var(--ym-ink); }
.ym-badge.vegan { background: rgba(60,170,100,.15); border: 1px solid rgba(60,170,100,.28); color: var(--ym-ink); }
.ym-badge.halal { background: rgba(45,180,160,.15); border: 1px solid rgba(45,180,160,.28); color: var(--ym-ink); }
.ym-badge.veg i { color: #3a9d63; }
.ym-badge.vegan i { color: #2f9457; }
.ym-badge.halal i { color: #2aa392; }

/* Sticky menu header (2026-08-06): the search box + category pills stay
   pinned while the dish list scrolls under them. Uses each template's own
   --ym-bg so nothing shows through, and a small shadow once it detaches
   (added by menu.js via .is-stuck). z-index sits under the cart/sheet
   overlays (which are 100+) but above the list. */
.ym-sticky-head {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--ym-bg);
    transition: box-shadow .2s ease;
}
.ym-sticky-head.is-stuck {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}
/* The pill row already scrolls horizontally; keep its bottom padding so the
   shadow doesn't clip the pills. */
.ym-sticky-head .ym-cat-nav { margin-bottom: 0; padding-bottom: 10px; }

/* The add-to-cart button is absolutely positioned bottom-right of the card.
   On rows with NO description the card is short and the button landed on top
   of the price - reserve the space instead of overlapping it. */
[data-product-id] .ym-card-price,
[data-product-id] .ym-card-leader { padding-right: 42px; }
