/* ── KOS Kiosk UI — Responsive (portrait & landscape, min 600px) ── */

:root {
    --k-primary:        #2E7D32;
    --k-primary-light:  #4CAF50;
    --k-primary-dark:   #1B5E20;
    --k-primary-text:   #FFFFFF;
    --k-surface:        #FFFFFF;
    --k-background:     #F5F5F5;
    --k-text:           #212121;
    --k-text-muted:     #757575;
    --k-border:         #E0E0E0;
    --k-shadow:         0 4px 20px rgba(0,0,0,.14);
    --k-radius:         16px;
    --k-radius-sm:      8px;
    --k-bottom-bar-h:   clamp(90px, 11vh, 150px);
    --k-header-h:       clamp(64px, 8vh, 100px);
}

/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    min-height: 100dvh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--k-background);
    color: var(--k-text);
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    font-size: clamp(14px, 1.8vw, 18px);
}

/* ── Attract layout (full-screen, no bottom bar) ──────────────────────────── */
.k-attract-layout {
    width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Standard kiosk layout (with fixed bottom bar) ───────────────────────── */
.k-layout {
    width: 100%;
    min-height: 100dvh;
    padding-bottom: var(--k-bottom-bar-h);
}

/* ── Top header bar ───────────────────────────────────────────────────────── */
.k-header {
    width: 100%;
    height: var(--k-header-h);
    background: var(--k-primary);
    color: var(--k-primary-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 40px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.k-header-title {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: .5px;
    text-align: center;
    flex: 1;
}

.k-header-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    border: none;
    color: white;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    padding: 10px 20px;
    border-radius: var(--k-radius-sm);
    cursor: pointer;
    transition: background .15s;
    min-height: 56px;
    min-width: 100px;
    white-space: nowrap;
}
.k-header-back:hover { background: rgba(255,255,255,.25); }

/* ── Bottom bar (cart summary) ─────────────────────────────────────────────── */
.k-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--k-bottom-bar-h);
    background: var(--k-primary-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 40px);
    z-index: 200;
    box-shadow: 0 -4px 16px rgba(0,0,0,.25);
}

.k-bottom-bar-info,
.k-bottom-bar-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.k-powered {
    position: absolute;
    left: 50%;
    bottom: clamp(6px, 1vh, 12px);
    transform: translateX(-50%);
    font-size: clamp(.7rem, 1vw, .85rem);
    opacity: .7;
    letter-spacing: .04em;
    white-space: nowrap;
    pointer-events: none;
}
@media (max-width: 900px) { .k-powered { display: none; } }

.k-bottom-bar-summary {
    font-size: clamp(.9rem, 1.6vw, 1.3rem);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-bottom-bar-lang {
    display: flex;
    gap: 8px;
}

.k-btn-pay {
    background: var(--k-primary-light);
    color: white;
    border: none;
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.8vw, 1.6rem);
    font-weight: 700;
    padding: 0 clamp(20px, 4vw, 60px);
    height: clamp(56px, 7vh, 90px);
    cursor: pointer;
    transition: transform .1s, background .15s;
    min-width: clamp(180px, 25vw, 360px);
    white-space: nowrap;
}
.k-btn-pay:hover  { background: var(--k-primary); }
.k-btn-pay:active { transform: scale(.97); }
.k-btn-pay:disabled { background: #9E9E9E; cursor: default; }

/* ── Attract / idle screen ────────────────────────────────────────────────── */
.k-attract {
    flex: 1;
    background: linear-gradient(160deg, var(--k-primary-dark) 0%, var(--k-primary) 60%, var(--k-primary-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 4vh, 60px);
    cursor: pointer;
    user-select: none;
    padding: clamp(24px, 4vw, 60px);
    min-height: 100dvh;
}

.k-attract-logo {
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 900;
    color: white;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(0,0,0,.3);
    text-align: center;
}

.k-attract-subtitle {
    font-size: clamp(1.1rem, 2.2vw, 2rem);
    color: rgba(255,255,255,.8);
    text-align: center;
}

.k-attract-lang {
    display: flex;
    gap: 16px;
    align-items: center;
}

.k-attract-tap {
    font-size: clamp(1.2rem, 2.5vw, 2.4rem);
    font-weight: 700;
    color: white;
    text-align: center;
    padding: clamp(16px, 2.5vw, 28px) clamp(32px, 6vw, 80px);
    border: 3px solid rgba(255,255,255,.5);
    border-radius: 60px;
    animation: k-pulse 2s ease-in-out infinite;
}

@keyframes k-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.4); }
    50%       { box-shadow: 0 0 0 24px rgba(255,255,255,0); }
}

/* ── New attract screen ───────────────────────────────────────────────────── */
.k-attract-new {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    background: var(--k-background);
    overflow: hidden;
}

.k-attract-media {
    flex: 1 1 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
    background: #111;
}
.k-attract-media img, .k-attract-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slideshow */
.k-slideshow-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}
.k-slideshow-slide.active {
    opacity: 1;
}
.k-slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.k-attract-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.k-attract-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--k-primary-dark, #1B5E20), var(--k-primary, #2E7D32));
    color: #fff;
    gap: 16px;
}
.k-attract-logo-big { font-size: clamp(3rem, 8vw, 7rem); }
.k-attract-store-name { font-size: clamp(1.5rem, 4vw, 3.5rem); font-weight: 700; text-align: center; padding: 0 20px; }

.k-attract-logo-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    height: clamp(40px, 6vh, 80px);
    width: auto;
    z-index: 10;
    border-radius: 8px;
}

/* Store name shown over the media area (bottom-left gradient strip) */
.k-attract-store-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(20px, 4vh, 40px) clamp(16px, 4vw, 40px) clamp(12px, 2vh, 20px);
    background: linear-gradient(transparent, rgba(0,0,0,.72));
    color: #fff;
    font-size: clamp(1.1rem, 2.8vw, 2.2rem);
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    z-index: 5;
    pointer-events: none;
}

.k-attract-lang-row {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: clamp(16px, 3vw, 32px);
    padding: clamp(12px, 2vh, 20px) 20px;
    background: var(--k-surface);
    border-bottom: 1px solid var(--k-border);
}

.k-attract-modes {
    display: flex;
    flex: 1;
    gap: clamp(12px, 3vw, 24px);
    padding: clamp(16px, 3vh, 32px) clamp(16px, 5vw, 60px);
    align-items: stretch;
}

.k-mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.5vh, 16px);
    background: var(--k-primary);
    color: var(--k-primary-text);
    border: none;
    border-radius: var(--k-radius);
    cursor: pointer;
    font-family: inherit;
    padding: clamp(16px, 3vh, 36px) 20px;
    transition: opacity .15s, transform .1s;
    box-shadow: var(--k-shadow);
    min-height: clamp(120px, 18vh, 200px);
}
.k-mode-btn:active { transform: scale(.97); opacity: .9; }
.k-mode-btn:disabled { opacity: .6; cursor: not-allowed; }

.k-mode-icon { font-size: clamp(2rem, 5vw, 4rem); }
.k-mode-label { font-size: clamp(1.1rem, 2.5vw, 2.2rem); font-weight: 700; }

.k-attract-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.3);
}

/* Modifier option thumbnail */
.k-modifier-opt-img {
    width: clamp(36px, 5vw, 60px);
    height: clamp(36px, 5vw, 60px);
    object-fit: cover;
    border-radius: var(--k-radius-sm);
    flex-shrink: 0;
}

/* ── Service mode ─────────────────────────────────────────────────────────── */
.k-service-page {
    flex: 1;
    background: var(--k-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 4vh, 60px);
    padding: clamp(24px, 5vw, 80px);
    min-height: 100dvh;
}

.k-service-restaurant-name {
    font-size: clamp(1.5rem, 3.5vw, 3.5rem);
    font-weight: 900;
    color: var(--k-primary);
    text-align: center;
    letter-spacing: 1px;
}

.k-service-title {
    font-size: clamp(1.3rem, 2.8vw, 3rem);
    font-weight: 700;
    color: var(--k-text);
    text-align: center;
}

.k-service-cards {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 4vw, 60px);
    width: 100%;
    justify-content: center;
}

.k-service-card {
    flex: 1;
    min-width: min(280px, 85vw);
    max-width: 420px;
    background: var(--k-surface);
    border: 3px solid var(--k-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vh, 24px);
    padding: clamp(32px, 5vw, 60px) clamp(24px, 4vw, 40px);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .1s;
    box-shadow: var(--k-shadow);
    min-height: clamp(200px, 28vh, 380px);
}
.k-service-card:hover  { border-color: var(--k-primary); box-shadow: 0 8px 32px rgba(46,125,50,.25); }
.k-service-card:active { transform: scale(.97); }

.k-service-card-icon  { font-size: clamp(2.5rem, 6vw, 5rem); }
.k-service-card-label { font-size: clamp(1.3rem, 2.5vw, 2.2rem); font-weight: 700; color: var(--k-text); }
.k-service-card-desc  { font-size: clamp(.9rem, 1.4vw, 1.2rem); color: var(--k-text-muted); text-align: center; }

.k-lang-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.k-lang-btn {
    padding: clamp(10px, 1.5vh, 18px) clamp(20px, 3vw, 40px);
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 600;
    border-radius: var(--k-radius-sm);
    border: 2px solid var(--k-border);
    background: var(--k-surface);
    cursor: pointer;
    transition: .15s;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.k-lang-btn.active {
    background: var(--k-primary);
    color: white;
    border-color: var(--k-primary);
}
.k-lang-btn:hover:not(.active) { border-color: var(--k-primary); }

.k-flag {
    width: 1.5em;
    height: 1em;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.15);
    vertical-align: -0.15em;
    margin-right: .45em;
}
.k-flag-sm { width: 1.4em; height: .95em; margin-right: .35em; }

/* Small lang buttons for bottom bar */
.k-lang-btn-sm {
    padding: 4px 10px;
    font-size: clamp(.8rem, 1.3vw, 1rem);
    min-height: 36px;
    min-width: 50px;
}

/* Attract screen lang buttons are white-bordered on dark bg */
.k-attract .k-lang-btn {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.5);
    color: white;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    min-height: 64px;
    min-width: 80px;
}
.k-attract .k-lang-btn.active {
    background: white;
    color: var(--k-primary);
    border-color: white;
}
.k-attract .k-lang-btn:hover:not(.active) {
    background: rgba(255,255,255,.25);
}

/* Bottom bar lang buttons — dark theme */
.k-bottom-bar .k-lang-btn {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.3);
    color: white;
}
.k-bottom-bar .k-lang-btn.active {
    background: white;
    color: var(--k-primary-dark);
    border-color: white;
}
.k-bottom-bar .k-lang-btn:hover:not(.active) {
    background: rgba(255,255,255,.2);
}

/* ── Page content area ─────────────────────────────────────────────────────── */
.k-page-content {
    padding: clamp(16px, 3vw, 40px);
    width: 100%;
}

/* ── Product list layout: sidebar + grid ─────────────────────────────────── */
.k-products-outer {
    display: flex;
    width: 100%;
    height: calc(100dvh - var(--k-header-h) - var(--k-bottom-bar-h));
    overflow: hidden;
}

/* ── Category sidebar ──────────────────────────────────────────────────────── */
.k-category-sidebar {
    width: clamp(120px, 20%, 240px);
    flex-shrink: 0;
    background: var(--k-surface);
    border-right: 2px solid var(--k-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
    padding: 8px 0;
}

.k-sidebar-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: clamp(12px, 2vh, 24px) clamp(6px, 1vw, 12px);
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: background .15s, border-color .15s;
    text-align: center;
}
.k-sidebar-cat:hover { background: #F1F8E9; }
.k-sidebar-cat.active {
    background: color-mix(in srgb, var(--k-primary) 11%, white);
    border-left-color: var(--k-primary);
}

.k-sidebar-cat-icon { font-size: clamp(1.4rem, 2.5vw, 2rem); }
.k-sidebar-cat-name {
    font-size: clamp(.75rem, 1.2vw, .95rem);
    font-weight: 600;
    color: var(--k-text);
    line-height: 1.2;
    word-break: break-word;
}
.k-sidebar-cat.active .k-sidebar-cat-name { color: var(--k-primary); }

/* ── Product grid area ──────────────────────────────────────────────────────── */
.k-products-area {
    flex: 1;
    padding: clamp(12px, 2vw, 28px);
    overflow-y: auto;
    height: 100%;
}

.k-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 45%), 1fr));
    gap: clamp(12px, 2vw, 24px);
}

/* Product card image */
.k-product-img-wrap {
    width: 100%;
    height: clamp(120px, 18vw, 200px);
    overflow: hidden;
    border-radius: var(--k-radius) var(--k-radius) 0 0;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.k-product-img-placeholder {
    font-size: clamp(2.5rem, 5vw, 4rem);
    opacity: 0.35;
    user-select: none;
}

.k-product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.k-product-card:hover .k-product-img { transform: scale(1.04); }

/* ── Product cards ─────────────────────────────────────────────────────────── */
.k-product-card {
    background: var(--k-surface);
    border-radius: var(--k-radius);
    box-shadow: var(--k-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    transition: .12s;
}
.k-product-card:hover { border-color: var(--k-primary-light); }

.k-product-card-body {
    padding: clamp(12px, 2vw, 28px) clamp(12px, 2vw, 28px) clamp(8px, 1vw, 16px);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.k-product-name  { font-size: clamp(1rem, 1.8vw, 1.5rem); font-weight: 700; color: var(--k-text); }
.k-product-desc  { font-size: clamp(.85rem, 1.2vw, 1.05rem); color: var(--k-text-muted); line-height: 1.4; flex: 1; }
.k-product-price { font-size: clamp(1rem, 1.8vw, 1.6rem); font-weight: 700; color: var(--k-primary); }

.k-product-card-footer {
    padding: clamp(8px, 1.5vw, 16px) clamp(12px, 2vw, 28px) clamp(12px, 2vw, 28px);
}

.k-btn-add {
    width: 100%;
    background: var(--k-primary);
    color: white;
    border: none;
    border-radius: var(--k-radius-sm);
    font-size: clamp(.9rem, 1.5vw, 1.3rem);
    font-weight: 600;
    padding: clamp(10px, 1.5vw, 18px);
    cursor: pointer;
    transition: background .15s, transform .1s;
    min-height: 52px;
}
.k-btn-add:hover  { background: var(--k-primary-light); }
.k-btn-add:active { transform: scale(.97); }
.k-btn-add:disabled { background: #BDBDBD; cursor: default; }

/* Quantity stepper on a tile whose product is already on the order. */
.k-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    background: color-mix(in srgb, var(--k-primary) 11%, white);
    border: 2px solid var(--k-primary);
    border-radius: var(--k-radius-sm);
    padding: 4px;
}
.k-stepper-btn {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 44px;
    border: none;
    border-radius: var(--k-radius-sm);
    background: var(--k-primary);
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 800;
    cursor: pointer;
}
.k-stepper-btn:active { transform: scale(.95); }
.k-stepper-btn:disabled { background: #BDBDBD; cursor: default; }
.k-stepper-remove { background: #C62828; font-size: 1.1rem; }
.k-stepper-qty {
    flex: 1 1 auto;
    text-align: center;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 800;
    color: var(--k-primary-dark);
}

.k-btn-add-quick {
    width: 100%;
    margin-top: 8px;
    background: var(--k-primary);
    color: white;
    border: none;
    border-radius: var(--k-radius-sm);
    font-size: clamp(.9rem, 1.5vw, 1.3rem);
    font-weight: 600;
    padding: clamp(10px, 1.5vw, 18px);
    cursor: pointer;
    transition: background .15s, transform .1s;
    min-height: 52px;
}
.k-btn-add-quick:hover  { background: var(--k-primary-light); }
.k-btn-add-quick:active { transform: scale(.97); }
.k-btn-add-quick:disabled { background: #BDBDBD; cursor: default; }

/* Inline spinner inside add button */
.k-btn-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: white;
    border-radius: 50%;
    animation: k-spin .7s linear infinite;
    vertical-align: middle;
}

/* ── Product configurator (kcfg-) ─────────────────────────────────────────── */

/* Product info bar at top of configure area */
.kcfg-product-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    padding: clamp(16px, 2vw, 24px) clamp(16px, 2.5vw, 28px);
    background: var(--k-surface);
    border-bottom: 2px solid var(--k-border);
}
.kcfg-product-bar-img {
    width: clamp(64px, 8vw, 100px);
    height: clamp(64px, 8vw, 100px);
    flex-shrink: 0;
    border-radius: var(--k-radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kcfg-product-bar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.kcfg-product-bar-icon {
    font-size: clamp(2rem, 4vw, 3rem);
    opacity: .5;
}
.kcfg-product-bar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kcfg-product-bar-name {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 700;
    color: var(--k-text);
}
.kcfg-product-bar-desc {
    font-size: clamp(.85rem, 1.2vw, 1.05rem);
    color: var(--k-text-muted);
    line-height: 1.3;
}
.kcfg-product-bar-price {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 700;
    color: var(--k-primary);
    white-space: nowrap;
}

/* Scrollable modifier groups area */
.kcfg-scroll {
    flex: 1;
    overflow-y: auto;
    padding: clamp(12px, 2vw, 24px);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 20px);
    min-height: 0;
}

/* Modifier group card — same card style as product cards */
.kcfg-group-card {
    background: var(--k-surface);
    border-radius: var(--k-radius);
    box-shadow: var(--k-shadow);
    overflow: visible;
    border: 2px solid transparent;
    flex-shrink: 0;
}
.kcfg-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: clamp(14px, 2vw, 22px) clamp(16px, 2.5vw, 28px);
    background: var(--k-primary);
    color: white;
}
.kcfg-group-name {
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 700;
}
.kcfg-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: clamp(.75rem, 1.2vw, .95rem);
    font-weight: 600;
    white-space: nowrap;
}
.kcfg-badge-req {
    background: rgba(255,255,255,.25);
    color: white;
}
.kcfg-badge-opt {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.8);
}

/* Tile grid for options with images */
.kcfg-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(90px, 10vw, 120px), 1fr));
    gap: clamp(8px, 1.2vw, 14px);
    padding: clamp(14px, 2vw, 22px);
}
.kcfg-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: clamp(10px, 1.4vw, 16px) clamp(6px, 1vw, 10px);
    border: 2px solid var(--k-border);
    border-radius: var(--k-radius-sm);
    cursor: pointer;
    background: var(--k-surface);
    position: relative;
    text-align: center;
    transition: border-color .12s, background .12s;
}
.kcfg-tile:hover { border-color: var(--k-primary-light); background: #F1F8E9; }
.kcfg-tile-sel  { border-color: var(--k-primary); background: color-mix(in srgb, var(--k-primary) 11%, white); }
.kcfg-tile-img {
    width: clamp(48px, 6vw, 72px);
    height: clamp(48px, 6vw, 72px);
    object-fit: cover;
    border-radius: 6px;
}
.kcfg-tile-name {
    font-size: clamp(.75rem, 1.1vw, 1rem);
    font-weight: 500;
    line-height: 1.2;
    word-break: break-word;
}
.kcfg-tile-price {
    font-size: clamp(.65rem, 1vw, .85rem);
    color: var(--k-primary);
    font-weight: 600;
}
.kcfg-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: clamp(20px, 2.2vw, 28px);
    height: clamp(20px, 2.2vw, 28px);
    background: var(--k-primary);
    border-radius: 50%;
    color: white;
    font-size: .75rem;
    line-height: clamp(20px, 2.2vw, 28px);
    text-align: center;
}

/* Chip list for options without images */
.kcfg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.2vw, 14px);
    padding: clamp(14px, 2vw, 22px);
}
.kcfg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: clamp(10px, 1.5vw, 18px) clamp(16px, 2.5vw, 32px);
    border: 2px solid var(--k-border);
    border-radius: 50px;
    cursor: pointer;
    font-size: clamp(.85rem, 1.4vw, 1.2rem);
    font-weight: 400;
    background: var(--k-surface);
    color: var(--k-text);
    white-space: nowrap;
    user-select: none;
    transition: all .15s;
}
.kcfg-chip:hover { border-color: var(--k-primary-light); color: var(--k-primary); }
.kcfg-chip-sel {
    border-color: var(--k-primary);
    background: color-mix(in srgb, var(--k-primary) 11%, white);
    color: var(--k-primary-dark);
    font-weight: 500;
}
.kcfg-chip-check {
    font-size: clamp(.65rem, 1vw, .9rem);
    color: var(--k-primary);
}
.kcfg-chip-price {
    font-size: .85em;
    color: var(--k-primary);
    opacity: .9;
}

/* Validation error */
.kcfg-error {
    background: #FFEBEE;
    color: #C62828;
    padding: clamp(12px, 2vw, 20px) clamp(16px, 2.5vw, 28px);
    border-radius: var(--k-radius-sm);
    font-size: clamp(.9rem, 1.4vw, 1.15rem);
    font-weight: 500;
}

/* Sticky footer */
.kcfg-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    padding: clamp(16px, 2vw, 24px) clamp(20px, 3vw, 36px);
    background: var(--k-surface);
    border-top: 2px solid var(--k-border);
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}
.kcfg-add-btn {
    flex: 1;
    background: var(--k-primary);
    color: white;
    border: none;
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    font-weight: 700;
    height: clamp(60px, 8vh, 88px);
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.kcfg-add-btn:hover  { background: var(--k-primary-light); }
.kcfg-add-btn:active { transform: scale(.98); }
.kcfg-add-btn:disabled { background: #9E9E9E; cursor: default; }

/* ── Primary / secondary buttons ────────────────────────────────────────────── */
.k-btn-primary {
    background: var(--k-primary);
    color: white;
    border: none;
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.8vw, 1.6rem);
    font-weight: 700;
    padding: 0 clamp(24px, 4vw, 64px);
    height: clamp(60px, 8vh, 90px);
    cursor: pointer;
    transition: background .15s, transform .1s;
    min-width: clamp(180px, 25vw, 360px);
}
.k-btn-primary:hover  { background: var(--k-primary-light); }
.k-btn-primary:active { transform: scale(.97); }
.k-btn-primary:disabled { background: #9E9E9E; cursor: default; }

.k-btn-secondary {
    background: var(--k-surface);
    color: var(--k-text);
    border: 2px solid var(--k-border);
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 600;
    padding: clamp(16px, 2.5vw, 24px) clamp(24px, 4vw, 50px);
    cursor: pointer;
    transition: .15s;
    flex: 1;
    min-height: 64px;
}
.k-btn-secondary:hover { border-color: var(--k-primary); color: var(--k-primary); }

/* ── Cart page ─────────────────────────────────────────────────────────────── */
.k-cart-page { padding: clamp(16px, 3vw, 40px); display: flex; flex-direction: column; gap: clamp(12px, 2vw, 24px); }

.k-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vh, 24px);
    padding: clamp(60px, 12vh, 120px) 40px;
    text-align: center;
}
.k-cart-empty-icon  { font-size: clamp(3rem, 8vw, 6rem); }
.k-cart-empty-title { font-size: clamp(1.2rem, 2.5vw, 2rem); font-weight: 700; color: var(--k-text-muted); }
.k-cart-empty-hint  { font-size: clamp(.9rem, 1.5vw, 1.2rem); color: var(--k-text-muted); }

.k-cart-item {
    background: var(--k-surface);
    border-radius: var(--k-radius);
    box-shadow: var(--k-shadow);
    padding: clamp(16px, 2.5vw, 32px) clamp(16px, 2.5vw, 36px);
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 28px);
}

.k-cart-item-info   { flex: 1; min-width: 0; }
.k-cart-item-name   { font-size: clamp(1rem, 1.8vw, 1.5rem); font-weight: 700; }
.k-cart-item-mods   { font-size: clamp(.8rem, 1.2vw, 1rem); color: var(--k-text-muted); margin-top: 4px; }
.k-cart-item-price  { font-size: clamp(.9rem, 1.5vw, 1.3rem); color: var(--k-primary); font-weight: 600; margin-top: 4px; }

.k-qty-ctrl {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 16px);
    background: var(--k-background);
    border-radius: var(--k-radius-sm);
    padding: 6px;
}

.k-qty-btn {
    width: clamp(44px, 6vw, 60px);
    height: clamp(44px, 6vw, 60px);
    border-radius: 50%;
    border: 2px solid var(--k-border);
    background: var(--k-surface);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .12s;
}
.k-qty-btn:hover    { border-color: var(--k-primary); color: var(--k-primary); }
.k-qty-btn.danger   { border-color: #EF5350; color: #EF5350; }
.k-qty-btn.danger:hover { background: #EF5350; color: white; }

.k-qty-value { font-size: clamp(1.1rem, 1.8vw, 1.6rem); font-weight: 700; min-width: 32px; text-align: center; }

.k-cart-item-total { font-size: clamp(1.1rem, 2vw, 1.7rem); font-weight: 700; min-width: 80px; text-align: right; }

.k-cart-totals {
    background: var(--k-surface);
    border-radius: var(--k-radius);
    box-shadow: var(--k-shadow);
    padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vh, 16px);
}

.k-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
}
.k-total-row.grand {
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 700;
    border-top: 2px solid var(--k-border);
    padding-top: clamp(10px, 1.5vh, 16px);
    margin-top: 4px;
}
.k-total-row.grand .k-total-amount { color: var(--k-primary); }

/* ── Payment page ──────────────────────────────────────────────────────────── */
.k-payment-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 6vh, 60px);
    padding: clamp(32px, 6vw, 80px);
    min-height: calc(100dvh - var(--k-header-h) - var(--k-bottom-bar-h));
}

.k-payment-total-box {
    background: var(--k-surface);
    border-radius: 24px;
    box-shadow: var(--k-shadow);
    padding: clamp(32px, 5vw, 60px) clamp(40px, 8vw, 100px);
    text-align: center;
}
.k-payment-total-label  { font-size: clamp(1rem, 1.8vw, 1.5rem); color: var(--k-text-muted); margin-bottom: 8px; }
.k-payment-total-amount { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 900; color: var(--k-primary); }

.k-payment-instruction {
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    color: var(--k-text-muted);
    text-align: center;
    max-width: 700px;
}

.k-payment-terminal {
    font-size: clamp(5rem, 12vw, 10rem);
    animation: k-blink 1.8s ease-in-out infinite;
}
@keyframes k-blink { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.k-payment-sim-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 3vw, 40px);
    justify-content: center;
    margin-top: 12px;
}

.k-btn-approve {
    background: var(--k-primary);
    color: white;
    border: none;
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    font-weight: 700;
    padding: clamp(16px, 2.5vw, 28px) clamp(28px, 5vw, 60px);
    cursor: pointer;
    min-width: clamp(160px, 22vw, 280px);
    transition: .15s;
}
.k-btn-approve:hover { background: var(--k-primary-light); }

.k-btn-decline {
    background: #EF5350;
    color: white;
    border: none;
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    font-weight: 700;
    padding: clamp(16px, 2.5vw, 28px) clamp(28px, 5vw, 60px);
    cursor: pointer;
    min-width: clamp(160px, 22vw, 280px);
    transition: .15s;
}
.k-btn-decline:hover { background: #E53935; }

.k-payment-status {
    font-size: clamp(1.2rem, 2.5vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    padding: clamp(16px, 2.5vw, 24px) clamp(28px, 5vw, 60px);
    border-radius: var(--k-radius);
}
.k-payment-status.approved { background: color-mix(in srgb, var(--k-primary) 11%, white); color: var(--k-primary); }
.k-payment-status.declined { background: #FFEBEE; color: #C62828; }

/* ── Card reader at the kiosk ────────────────────────────────────────────── */

/* The total stays small at the top; the card panel takes the rest.
   Sized to the space between the header and the bottom bar, and never more:
   the alternatives at the foot are the point of the screen and must be in
   view without scrolling, in either orientation. */
.k-payment-page-split {
    justify-content: flex-start;
    gap: clamp(10px, 1.8vh, 22px);
    height: calc(100dvh - var(--k-header-h) - var(--k-bottom-bar-h));
    min-height: 0;
    overflow: hidden;
}
.k-payment-page-split .k-payment-total-box { flex: 0 0 auto; }
.k-payment-page-split .k-payment-alternatives { flex: 0 0 auto; }
.k-payment-page-split .k-payment-total-box {
    padding: clamp(14px, 2vw, 24px) clamp(32px, 6vw, 80px);
    display: flex;
    align-items: baseline;
    gap: 18px;
}
.k-payment-page-split .k-payment-total-label { margin: 0; }
.k-payment-page-split .k-payment-total-amount { font-size: clamp(1.8rem, 4.5vw, 3.2rem); }

.k-card-panel {
    flex: 1 1 0;
    min-height: 0;
    /* "safe" so content taller than the panel is pinned to the top and scrolls,
       rather than centred and clipped at both ends. Everything inside is sized
       in vh so this is the exception, not the rule. */
    overflow: hidden;
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    gap: clamp(8px, 1.6vh, 20px);
    padding: clamp(16px, 3vh, 40px) clamp(20px, 4vw, 56px);
    background: var(--k-surface);
    border: 4px solid var(--k-primary);
    border-radius: 32px;
    box-shadow: var(--k-shadow);
    text-align: center;
}
.k-card-panel-choose { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.k-card-panel-choose:active { transform: scale(.985); }

.k-card-icon  { font-size: clamp(2.5rem, 8vh, 6.5rem); line-height: 1; flex: 0 0 auto; }
.k-card-title { font-size: clamp(1.3rem, 3.4vh, 2.8rem); font-weight: 900; color: var(--k-primary); line-height: 1.15; }
.k-card-sub   { font-size: clamp(1rem, 2.2vh, 1.5rem); color: var(--k-text-muted); }
/* Three bouncing dots inline with the subtitle: "working", in one line's height. */
.k-dots { display: inline-flex; gap: .3em; margin-right: .5em; vertical-align: middle; }
.k-dots i {
    width: .45em; height: .45em; border-radius: 50%;
    background: var(--k-primary);
    animation: k-dot 1.2s ease-in-out infinite;
}
.k-dots i:nth-child(2) { animation-delay: .2s; }
.k-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes k-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-.25em); } }

.k-card-failure {
    background: #FFEBEE;
    color: #C62828;
    font-weight: 700;
    font-size: clamp(1rem, 1.9vw, 1.4rem);
    padding: 12px 24px;
    border-radius: var(--k-radius-sm);
}

.k-card-brands {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 1.4vw, 18px);
    margin-top: clamp(8px, 2vh, 20px);
}
.k-card-logo {
    height: clamp(32px, 6vh, 64px);
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.k-card-brand {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: clamp(.9rem, 1.5vw, 1.2rem);
    font-weight: 800;
    letter-spacing: .02em;
    color: #fff;
    background: #37474F;
    border: 2px solid transparent;
}
.k-brand-visa            { background: #1A1F71; }
.k-brand-mastercard      { background: #EB001B; }
.k-brand-maestro         { background: #0099DF; }
.k-brand-vpay            { background: #1A1F71; }
.k-brand-americanexpress { background: #2E77BC; }
.k-brand-applepay        { background: #000; }
.k-brand-googlepay       { background: #fff; color: #3C4043; border-color: #DADCE0; }

.k-payment-alternatives {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vw, 28px);
    width: 100%;
    max-width: 1100px;
}
.k-btn-online {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--k-surface);
    color: var(--k-text);
    border: 2px solid var(--k-border);
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    font-weight: 600;
    padding: clamp(12px, 1.8vw, 20px) clamp(20px, 3vw, 36px);
    cursor: pointer;
}
.k-btn-online:active { background: var(--k-background); }
.k-online-icon { font-size: 1.4em; }
.k-btn-back-order { font-size: clamp(.95rem, 1.5vw, 1.2rem); }

/* Portrait: the panel takes what is left above the alternatives, which stack. */
@media (orientation: portrait) {
    .k-payment-page-split { padding: clamp(12px, 2.5vw, 28px); }
    .k-card-icon { font-size: clamp(3rem, 10vh, 9rem); }
    .k-payment-alternatives { flex-direction: column; gap: 10px; }
    .k-btn-online { width: 100%; justify-content: center; font-size: clamp(1.1rem, 2.6vw, 1.6rem); padding: clamp(14px, 2.2vw, 22px); }
}

/* Landscape: the same panel, wider and shorter, alternatives side by side. */
@media (orientation: landscape) {
    .k-payment-page-split { padding: clamp(10px, 1.6vh, 24px) clamp(24px, 5vw, 80px); }
    .k-card-panel { max-width: 1300px; gap: clamp(6px, 1.4vh, 16px); padding: clamp(14px, 3vh, 36px); }
    .k-card-icon { font-size: clamp(2.6rem, 9vh, 6rem); }
    .k-card-title { font-size: clamp(1.3rem, 4vh, 2.6rem); }
    .k-card-logo { height: clamp(32px, 7vh, 64px); }
    .k-payment-alternatives { flex-direction: row; }
}

/* ── Confirmation screen ───────────────────────────────────────────────────── */
.k-confirmation-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vh, 60px);
    padding: clamp(32px, 5vw, 80px);
    text-align: center;
    min-height: calc(100dvh - var(--k-header-h));
}

.k-confirmation-check { font-size: clamp(5rem, 12vw, 10rem); color: var(--k-primary); }

.k-confirmation-order-box {
    background: var(--k-surface);
    border-radius: 24px;
    box-shadow: var(--k-shadow);
    padding: clamp(32px, 5vw, 60px) clamp(40px, 8vw, 100px);
    border: 4px solid var(--k-primary);
}
.k-confirmation-order-label  { font-size: clamp(1.1rem, 2vw, 1.8rem); color: var(--k-text-muted); }
.k-confirmation-order-number { font-size: clamp(4rem, 10vw, 8rem); font-weight: 900; color: var(--k-primary); line-height: 1; }

.k-confirmation-message { font-size: clamp(1.2rem, 2.5vw, 2rem); font-weight: 700; color: var(--k-text); }
.k-confirmation-sub     { font-size: clamp(.9rem, 1.5vw, 1.3rem); color: var(--k-text-muted); max-width: 600px; }

.k-btn-new-order {
    background: var(--k-primary);
    color: white;
    border: none;
    border-radius: var(--k-radius);
    font-size: clamp(1.1rem, 2.2vw, 1.8rem);
    font-weight: 700;
    padding: clamp(20px, 3vw, 32px) clamp(40px, 7vw, 80px);
    cursor: pointer;
    margin-top: 16px;
    transition: background .15s;
}
.k-btn-new-order:hover { background: var(--k-primary-light); }

/* ── Upsell modal ──────────────────────────────────────────────────────────── */
.k-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 16px;
}

.k-modal {
    background: var(--k-surface);
    border-radius: 24px;
    box-shadow: 0 8px 48px rgba(0,0,0,.3);
    padding: clamp(32px, 5vw, 60px) clamp(32px, 6vw, 70px);
    width: min(840px, 90vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3vh, 40px);
    text-align: center;
}

.k-modal-title { font-size: clamp(1.3rem, 2.8vw, 2.4rem); font-weight: 700; }
.k-modal-body  { font-size: clamp(.9rem, 1.5vw, 1.4rem); color: var(--k-text-muted); }
.k-modal-price { font-size: clamp(1.2rem, 2.2vw, 2rem); font-weight: 700; color: var(--k-primary); }

.k-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 2.5vw, 32px);
    width: 100%;
    justify-content: center;
}

/* ── Error / loading states ─────────────────────────────────────────────────── */
.k-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vh, 32px);
    padding: clamp(60px, 10vh, 120px);
}

.k-spinner {
    width: clamp(48px, 7vw, 80px);
    height: clamp(48px, 7vw, 80px);
    border: 6px solid var(--k-border);
    border-top-color: var(--k-primary);
    border-radius: 50%;
    animation: k-spin .8s linear infinite;
}
@keyframes k-spin { to { transform: rotate(360deg); } }

.k-loading-text { font-size: clamp(1rem, 1.8vw, 1.5rem); color: var(--k-text-muted); }

/* ── Inactivity warning overlay ─────────────────────────────────────────────── */
.k-inactivity-warning {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 4vh, 36px);
    z-index: 999;
    text-align: center;
    color: white;
    padding: 32px;
}
.k-inactivity-countdown { font-size: clamp(5rem, 14vw, 9rem); font-weight: 900; }
.k-inactivity-msg       { font-size: clamp(1.3rem, 2.8vw, 2.2rem); }
.k-basket-icon { font-size: 1.25em; margin-right: .4em; vertical-align: -0.1em; }
.k-start-over-sub       { font-size: clamp(1rem, 1.8vw, 1.3rem); opacity: .85; margin-top: -8px; }

/* Start over: sits in the header's right-hand spacer, above the page. */
.k-start-over {
    position: fixed;
    top: calc((var(--k-header-h) - 44px) / 2);
    right: clamp(10px, 1.5vw, 20px);
    z-index: 500;   /* above the sticky page header (100), below the overlays (9999) */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 22px;
    background: rgba(0,0,0,.18);
    color: var(--k-primary-text);
    font-size: clamp(.9rem, 1.4vw, 1.05rem);
    font-weight: 600;
    cursor: pointer;
}
.k-start-over span:first-child { font-size: 1.3em; line-height: 1; }
.k-start-over:active { background: rgba(0,0,0,.32); }
@media (max-width: 700px) { .k-start-over-label { display: none; } .k-start-over { padding: 0 12px; } }

.k-inactivity-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 3vw, 28px);
    justify-content: center;
}

.k-btn-still-here {
    min-width: clamp(180px, 28vw, 320px);
}

.k-btn-startover {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,.6);
    border-radius: var(--k-radius);
    font-size: clamp(1rem, 1.8vw, 1.6rem);
    font-weight: 700;
    padding: 0 clamp(24px, 4vw, 64px);
    height: clamp(60px, 8vh, 90px);
    cursor: pointer;
    transition: background .15s, border-color .15s;
    min-width: clamp(180px, 28vw, 320px);
}
.k-btn-startover:hover { background: rgba(255,255,255,.12); border-color: white; }

/* ── Utility ────────────────────────────────────────────────────────────────── */
.k-tag {
    display: inline-block;
    background: color-mix(in srgb, var(--k-primary) 11%, white);
    color: var(--k-primary);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: clamp(.8rem, 1.2vw, .95rem);
    font-weight: 600;
}
.k-tag.required { background: #FFF3E0; color: #E65100; }
.k-tag.optional { background: #F3E5F5; color: #7B1FA2; }

.k-section-title {
    font-size: clamp(.9rem, 1.5vw, 1.5rem);
    font-weight: 700;
    color: var(--k-text-muted);
    padding: 8px 0 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.k-unavailable { opacity: .45; pointer-events: none; }

/* ── Blazor error UI ────────────────────────────────────────────────────────── */
#blazor-error-ui {
    background: #ffb300;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; }

/* ── Landscape adjustments ──────────────────────────────────────────────────── */
@media (orientation: landscape) and (max-height: 600px) {
    .k-attract {
        gap: 16px;
        padding: 16px;
    }
    .k-attract-logo { font-size: clamp(1.5rem, 4vw, 3rem); }
    .k-service-page { gap: 16px; padding: 16px; }
    .k-service-card { min-height: 140px; padding: 20px; }
    .k-payment-page { gap: 20px; padding: 20px; }
    .k-confirmation-page { gap: 16px; padding: 20px; }
}

/* ── Small screen adjustments ────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .k-product-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Maintenance overlay ─────────────────────────────────── */
.k-maintenance-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex; align-items: center; justify-content: center;
}
.k-maintenance-content {
    text-align: center; color: #fff; padding: 40px;
}
.k-maintenance-icon { font-size: clamp(4rem, 8vw, 6rem); margin-bottom: 20px; }
.k-maintenance-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; margin-bottom: 12px; }
.k-maintenance-msg { font-size: clamp(1rem, 2vw, 1.4rem); color: #ccc; line-height: 1.6; }

/* ── Identify screen ─────────────────────────────────────────────────── */
.k-identify-page {
    display: flex; flex-direction: column; align-items: center;
    padding: clamp(20px, 5vw, 60px); gap: 20px;
}
.k-identify-title {
    font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700;
    text-align: center; color: #1b5e20;
}
.k-identify-input {
    width: 100%; max-width: 320px; font-size: 2rem; font-weight: 700;
    text-align: center; padding: 12px; border: 3px solid #2e7d32;
    border-radius: 10px; background: #f8fff8; color: #1b5e20;
}
.k-numpad {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 12px; max-width: 300px; width: 100%;
}
.k-numpad-btn {
    padding: 20px; font-size: 1.5rem; font-weight: 700;
    border: none; border-radius: 10px; cursor: pointer;
    background: #e8f5e9; color: #1b5e20; transition: background .15s;
}
.k-numpad-btn:hover { background: #c8e6c9; }
.k-numpad-btn.confirm { background: #2e7d32; color: #fff; }
.k-numpad-btn.confirm:hover { background: #1b5e20; }
.k-numpad-btn.back { background: #ffebee; color: #c62828; }
.k-numpad-btn:disabled { opacity: .4; cursor: default; }
.k-keyboard-row {
    display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.k-keyboard-btn {
    padding: 14px 18px; font-size: 1.1rem; font-weight: 600;
    border: none; border-radius: 8px; cursor: pointer;
    background: #e8f5e9; color: #1b5e20; min-width: 44px;
}
.k-keyboard-btn.confirm { background: #2e7d32; color: #fff; }
.k-keyboard-btn.back { background: #ffebee; color: #c62828; }
.k-keyboard-btn:disabled { opacity: .4; cursor: default; }
.k-identify-skip {
    color: #888; font-size: .9rem; background: none; border: none;
    cursor: pointer; text-decoration: underline; margin-top: 8px;
}

/* ── Store logo on the attract screen ───────────────────────────────────────
 *
 * `contain`, never `cover`. A logo is a wordmark: cropping it to fill a banner
 * leaves a fragment of a letterform, which reads as a broken image rather than
 * as branding. The photographic slideshow above still uses `cover`, because a
 * photo genuinely should fill its frame.
 *
 * The plate behind it comes from the store's own palette rather than being a
 * fixed white: --k-primary-text is the colour that store already declares its
 * logo-side artwork sits against, so a dark wordmark stays legible on a dark
 * brand colour without anything being hardcoded here.
 */

.k-attract-logo-hero {
    /* Bounded on both axes so the wordmark stays whole whatever its aspect
       ratio, and never grows past the media area it sits in. */
    max-width: min(70%, 640px);
    max-height: 55%;
    width: auto;
    height: auto;
    object-fit: contain;

    background: var(--k-primary-text, #fff);
    border-radius: 14px;
    padding: clamp(12px, 2.5vh, 28px) clamp(18px, 3vw, 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
}

/* The small top-left mark, when media is playing behind it. Same rule: contain,
   and a plate so a dark logo is not lost against a dark photograph. */
.k-attract-logo-overlay {
    object-fit: contain;
    /* A corner mark, not a second hero: the generic media-image rule would
       otherwise stretch it to the media area's height. */
    height: clamp(56px, 12vh, 120px) !important;
    width: auto !important;
    max-width: 30vw;
    background: var(--k-primary-text, #fff);
    padding: 5px 9px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

/* The fallback panel itself carries the brand colour, so a store with no
   attract media still looks like itself rather than like a default gradient. */
.k-attract-fallback {
    background: var(--k-primary, #2E7D32);
}

/* One start button instead of two mode buttons, for a store with no seating.
   Wider rather than merely alone, so the row still reads as deliberate. */
.k-attract-modes-single { justify-content: center; }

.k-mode-btn-start {
    min-width: min(78vw, 760px);
    min-height: clamp(150px, 24vh, 260px);
    gap: clamp(4px, 1vh, 10px);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    background: linear-gradient(160deg, var(--k-primary-light), var(--k-primary-dark));
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
    animation: k-pulse 2.2s ease-in-out infinite;
}
.k-mode-btn-start .k-mode-label { font-size: clamp(1.6rem, 4.2vw, 3rem); }
.k-start-icon { font-size: clamp(2rem, 5vh, 3.6rem); line-height: 1; }
.k-start-others {
    font-size: clamp(.85rem, 1.6vw, 1.15rem);
    font-weight: 500;
    opacity: .85;
    text-align: center;
    padding: 0 16px;
}
@keyframes k-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 12px 40px rgba(0,0,0,.22); }
    50% { transform: scale(1.025); box-shadow: 0 16px 48px rgba(0,0,0,.3); }
}
.k-mode-btn-start:active { animation: none; transform: scale(.97); }

/* ── The receipt question on the confirmation screen ──────────────────────────
   Buttons sized for a standing customer tapping with one hand while holding a
   tray: the 96px minimum is the same target the order-type buttons use, and the
   two are set apart in colour so "no" is not the accidental tap. */
.k-receipt-ask {
    margin: 24px 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.k-receipt-question {
    font-size: 2rem;
    font-weight: 700;
    color: #33691E;
}

.k-receipt-buttons {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.k-receipt-btn {
    min-width: 220px;
    min-height: 96px;
    padding: 0 40px;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 16px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform .08s ease, filter .12s ease;
}

.k-receipt-btn:active { transform: scale(.97); }
.k-receipt-btn:disabled { opacity: .6; cursor: default; }

.k-receipt-btn-yes {
    background: var(--k-primary, #2E7D32);
    color: var(--k-primary-text, #FFFFFF);
}

/* Outlined rather than filled: declining is the common answer and should be
   easy, but it should not look like the thing the screen is pushing. */
.k-receipt-btn-no {
    background: #FFFFFF;
    color: #33691E;
    border-color: #A5D6A7;
}
