:root {
    --bg: #0e0b14;
    --card: #1b1526;
    --text: #f5f2fb;
    --muted: #b8adc8;
    --purple: #7b2cbf;
    --orange: #ff9f1c;
    --pink: #e6398b;
    --success: #33d17a;
    --line: rgba(255,255,255,0.08);
    --shadow: 0 12px 30px rgba(0,0,0,.35);
    --gradient: linear-gradient(135deg, var(--orange) 0%, var(--pink) 50%, var(--purple) 100%);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top, #1c1429 0%, var(--bg) 40%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
}

.app {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px clamp(10px, 3vw, 24px) 112px;
}

/* ===== COMMON UI ===== */

.tapable {
    transition: transform .12s ease, opacity .12s ease, filter .12s ease;
}

.tapable:active {
    transform: scale(0.98);
    opacity: 0.94;
    filter: brightness(1.04);
}

.icon-btn,
.lang-btn {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.lang-btn {
    min-width: 56px;
    padding: 0 12px;
    font-size: .86rem;
    gap: 6px;
    white-space: nowrap;
}

.lang-icon {
    font-size: 15px;
    line-height: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
}

.logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

/* ===== ORDER HEADER ===== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: max(8px, env(safe-area-inset-top));
    margin: 0 calc(clamp(12px, 3.5vw, 22px) * -1) 16px;
    padding-left: clamp(12px, 3.5vw, 22px);
    padding-right: clamp(12px, 3.5vw, 22px);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(14, 11, 20, 0.88);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
}

.venue-meta {
    min-width: 0;
    flex: 1;
}

.venue-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.venue-sub {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== LAYOUT / CONTENT ===== */

.stack {
    display: grid;
    gap: 14px;
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.info-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
}

.info-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    padding: 0 16px;
    transform: translateY(-8px);
}

.info-content.is-opening,
.info-content.is-open,
.info-content.is-closing {
    border-top: 1px solid var(--line);
}

.info-content.is-opening {
    transition:
        max-height 620ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 420ms ease-out,
        padding 420ms ease-out,
        transform 420ms ease-out,
        border-color 420ms ease-out;
}

.info-content.is-closing {
    transition:
        max-height 220ms cubic-bezier(0.4, 0, 1, 1),
        opacity 160ms ease-in,
        padding 160ms ease-in,
        transform 160ms ease-in,
        border-color 160ms ease-in;
}

.info-content.is-open,
.info-content.is-opening {
    max-height: 320px;
    opacity: 1;
    padding: 0 16px 16px;
    transform: translateY(0);
}

.info-content.is-closing,
.info-content:not(.is-open):not(.is-opening) {
    max-height: 0;
    opacity: 0;
    padding: 0 16px;
    transform: translateY(-8px);
}

.info-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.info-item small {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    margin-bottom: 2px;
}

.section-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 800;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 2px 2px;
}

.section-head-tight {
    margin-top: 0;
}

.ghost-link {
    color: var(--orange);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

/* ===== QUICK MENU ===== */

.quick-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.quick-btn {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CATEGORY CARDS ===== */

.categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cat-card {
    padding: 14px;
    min-height: 108px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at top right, rgba(255,159,28,0.25), transparent 35%),
        radial-gradient(circle at bottom left, rgba(123,44,191,0.20), transparent 40%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    color: var(--text);
    text-align: left;
}

.cat-icon {
    font-size: 1.35rem;
    margin-bottom: 18px;
    display: block;
}

.cat-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
}

.cat-meta {
    visibility: hidden;
    margin-top: 6px;
    color: var(--muted);
    font-size: .76rem;
}

/* ===== OFFER CARDS ===== */

.offer-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x mandatory;
}

.offer-card {
    scroll-snap-align: start;
    padding: 16px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255,159,28,0.22), transparent 35%),
        radial-gradient(circle at bottom right, rgba(123,44,191,0.22), transparent 36%),
        linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: var(--shadow);
}

.offer-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    background: var(--gradient);
    margin-bottom: 12px;
}

.offer-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 900;
}

.offer-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.offer-toggle-arrow {
    font-size: 1rem;
    opacity: .9;
}

.offer-details {
    margin-top: 10px;
}

.offer-card .price-box {
    margin-top: 4px;
}

.offer-desc {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
}

.offer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
}

/* ===== MENU ===== */

.menu-section {
    padding: 16px;
}

.menu-list {
    display: grid;
    gap: 12px;
}

.menu-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    box-shadow: var(--shadow);
}

.submenu-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
}

.submenu-products {
    display: grid;
    gap: 12px;
    padding-left: 18px;
    border-left: 2px solid rgba(255,255,255,0.08);
    margin-left: 14px;
}

.menu-card.product-card {
    grid-template-columns: 40px 1fr 48px;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.045));
    border: 1px solid rgba(255,255,255,0.10);
}

.menu-card.product-card .product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    background:
        radial-gradient(circle at top right, rgba(255,159,28,0.22), transparent 35%),
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
}

.menu-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.menu-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.badge {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.08);
}

.badge.orange {
    background: rgba(255,159,28,0.12);
    color: #ffbc58;
}

.badge.purple {
    background: rgba(123,44,191,0.14);
    color: #d1a7ff;
}

.badge.green {
    background: rgba(51,209,122,0.12);
    color: #86f0b0;
}

.menu-desc {
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.42;
    margin: 0 0 12px;
}

.price {
    font-size: 1rem;
    font-weight: 900;
}

.price small {
    display: block;
    font-size: .74rem;
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 600;
    margin-bottom: 2px;
}

.price-box strong {
    font-size: 1.15rem;
    display: block;
}

.price-box span {
    display: block;
    font-size: .74rem;
    color: var(--muted);
    text-decoration: line-through;
    margin-bottom: 3px;
}

.plus-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 1.1rem;
    display: grid;
    place-items: center;
}

.action-btn {
    min-height: 46px;
    border: none;
    border-radius: 14px;
    padding: 0 16px;
    color: white;
    font-weight: 800;
    background: var(--gradient);
}

/* ===== STICKY CART ===== */

.sticky-cart {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 60;
    max-width: 488px;
    margin: 0 auto;
}

.sticky-cart button {
    width: 100%;
    min-height: 58px;
    border: none;
    border-radius: 20px;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    font-size: .95rem;
    font-weight: 900;
    box-shadow: 0 16px 40px rgba(0,0,0,.42);
}

.sticky-cart small {
    font-size: .75rem;
    opacity: .9;
    display: block;
    font-weight: 700;
}

/* ===== SCROLL OFFSET ===== */

.menu-section,
#companyInfoWrapper,
#headerMenuWrapper {
    scroll-margin-top: 92px;
}

/* ===== WELCOME PAGE ===== */

.welcome-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(123, 44, 191, 0.18), transparent 35%),
        var(--bg);
    color: var(--text);
}

.welcome-page .app {
    padding-bottom: 32px;
}

.welcome-header {
    padding: 16px 0 0;
}

.welcome-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 96px;
}

.logo-welcome-wrap {
    flex: 1;
    min-width: 0;
    max-width: 320px;
    min-height: 84px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.logo-welcome-wrap img {
    display: block;
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    background: transparent;
}

.welcome-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.welcome-header .icon-btn,
.welcome-header .lang-btn {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.welcome-header .icon-btn {
    width: 42px;
    padding: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.welcome-header .lang-btn {
    padding: 0 12px;
    font-size: .86rem;
    gap: 6px;
    white-space: nowrap;
}

.welcome-main {
    min-height: calc(100vh - 88px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 16px 40px; 
}

.welcome-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.welcome-container h1 {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    line-height: 1.1;
    font-weight: 900;
}

.welcome-container p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.scan-cta {
    width: 100%;
    min-height: 62px;
    margin-top: 28px;
    border: none;
    border-radius: 20px;
    background: var(--gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.scan-cta small {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.9;
}

.scan-cta:active {
    transform: scale(0.985);
}

.info-panel {
    position: absolute;
    top: 92px;
    right: 0;

    width: 260px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);

    display: none; /* ← alapból rejtett */
    z-index: 200;
}

.info-panel.active {
    display: block;
}

.info-panel-content {
    padding: 14px;
}

.qbar-info-dropdown {
    margin-top: 8px;
}

#qbarInfoContent {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    transform: translateY(-8px);
    transition:
        max-height 320ms ease,
        opacity 220ms ease,
        transform 220ms ease;
}

#qbarInfoContent.is-open,
#qbarInfoContent.is-opening {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
}

.info-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 16px;
}