/* Kamwene — Premium mobile-first digital menu */

:root {
    --km-gold: #C9A962;
    --km-gold-light: #E8D5A3;
    --km-cream: #F7F3ED;
    --km-charcoal: #2C2C2C;
    --km-green: #3D6B4F;
    --km-surface: #FFFFFF;
    --km-muted: #7A756C;
    --km-line: rgba(44, 44, 44, 0.08);
    --km-shadow-sm: 0 2px 12px rgba(44, 44, 44, 0.06);
    --km-shadow: 0 8px 32px rgba(44, 44, 44, 0.1);
    --km-shadow-lg: 0 16px 48px rgba(44, 44, 44, 0.14);
    --km-radius: 20px;
    --km-radius-sm: 14px;
    --km-radius-xs: 10px;
    --km-max: 480px;
    --km-header-h: 0px;
    --km-tabs-h: 52px;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --km-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --km-dur: 0.35s;
}

[data-km-theme="dark"] {
    --km-cream: #1a1917;
    --km-charcoal: #F5F0E8;
    --km-surface: #242220;
    --km-muted: #A39E94;
    --km-line: rgba(245, 240, 232, 0.1);
    --km-shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
    --km-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.km-app {
    margin: 0 auto;
    max-width: var(--km-max);
    min-height: 100dvh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--km-charcoal);
    background: var(--km-cream);
    -webkit-tap-highlight-color: transparent;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Splash */
.km-splash {
    position: fixed;
    inset: 0;
    z-index: 200;
    max-width: var(--km-max);
    margin: 0 auto;
    background: var(--km-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s var(--km-ease), visibility 0.5s;
}

.km-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.km-splash-inner { text-align: center; }

.km-splash-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    box-shadow: var(--km-shadow);
}

.km-splash-mark {
    display: flex;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--km-gold), var(--km-gold-light));
    color: #fff;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
}

.km-splash-text {
    margin: 0;
    font-size: 0.85rem;
    color: var(--km-muted);
    letter-spacing: 0.04em;
}

/* Header */
.km-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--km-cream) 88%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--km-line);
    padding: 0.75rem 1rem 0.65rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top));
}

.km-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.km-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.km-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--km-gold) 40%, transparent);
    flex-shrink: 0;
}

.km-brand-monogram {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--km-gold), var(--km-green));
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
}

.km-brand-text { min-width: 0; }

.km-brand-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.km-brand-tagline {
    margin: 0.15rem 0 0;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--km-muted);
}

.km-header-tools {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.km-tool-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--km-line);
    border-radius: 50%;
    background: var(--km-surface);
    color: var(--km-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: var(--km-shadow-sm);
    transition: transform 0.2s var(--km-ease), box-shadow 0.2s;
}

.km-tool-btn:active { transform: scale(0.94); }

.km-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--km-gold);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.km-cart-badge.bump { animation: km-bump 0.35s ease; }

@keyframes km-bump {
    50% { transform: scale(1.2); }
}

.km-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.km-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--km-surface);
    border: 1px solid var(--km-line);
    font-size: 0.7rem;
    color: var(--km-muted);
}

.km-meta-chip--table {
    color: var(--km-green);
    border-color: color-mix(in srgb, var(--km-green) 25%, transparent);
    background: color-mix(in srgb, var(--km-green) 8%, var(--km-surface));
}

.km-header-extras {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.km-lang { position: relative; }

.km-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--km-line);
    background: var(--km-surface);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--km-charcoal);
}

.km-lang-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--km-surface);
    border-radius: var(--km-radius-xs);
    box-shadow: var(--km-shadow);
    min-width: 120px;
    z-index: 10;
}

.km-lang-menu[hidden] { display: none; }

.km-lang-menu button {
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.km-lang-menu button:hover { background: var(--km-cream); }

.km-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--km-line);
    background: var(--km-surface);
    cursor: pointer;
    font-size: 0.85rem;
}

[data-km-theme="light"] .km-theme-icon--moon,
[data-km-theme="dark"] .km-theme-icon--sun { display: none; }

.km-social-row {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.km-social-link {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--km-muted);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    border: 1px solid var(--km-line);
    transition: color 0.2s, border-color 0.2s;
}

.km-social-link:hover { color: var(--km-gold); border-color: var(--km-gold); }
.km-social-link--wa { color: var(--km-green); }

/* Search */
.km-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem 0.5rem;
    padding: 0.55rem 0.85rem;
    background: var(--km-surface);
    border-radius: 999px;
    border: 1px solid var(--km-line);
    box-shadow: var(--km-shadow-sm);
}

.km-search-bar[hidden] { display: none; }

.km-search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    color: var(--km-charcoal);
    min-width: 0;
}

.km-search-clear {
    border: none;
    background: none;
    font-size: 1.25rem;
    color: var(--km-muted);
    cursor: pointer;
    line-height: 1;
}

/* Promo slider */
.km-promo {
    padding: 0.85rem 1rem 0.25rem;
}

.km-promo-track {
    position: relative;
    min-height: 148px;
}

.km-promo-slide {
    display: none;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0;
    border-radius: var(--km-radius);
    overflow: hidden;
    box-shadow: var(--km-shadow);
    background: var(--km-surface);
    animation: km-fade-in var(--km-dur) var(--km-ease);
}

.km-promo-slide.is-active { display: grid; }

@keyframes km-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.km-promo-slide[data-accent="gold"] .km-promo-copy {
    background: linear-gradient(135deg, var(--km-gold) 0%, var(--km-gold-light) 100%);
    color: #fff;
}

.km-promo-slide[data-accent="green"] .km-promo-copy {
    background: linear-gradient(135deg, var(--km-green) 0%, #5a8f6e 100%);
    color: #fff;
}

.km-promo-slide[data-accent="charcoal"] .km-promo-copy {
    background: linear-gradient(135deg, var(--km-charcoal) 0%, #4a4a4a 100%);
    color: #fff;
}

.km-promo-copy {
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.km-promo-eyebrow {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}

.km-promo-title {
    margin: 0.25rem 0 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.km-promo-sub {
    margin: 0.35rem 0 0.65rem;
    font-size: 0.72rem;
    opacity: 0.9;
    line-height: 1.4;
}

.km-promo-cta {
    align-self: flex-start;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: inherit;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.km-promo-visual {
    min-height: 148px;
    background: var(--km-cream);
}

.km-promo-visual img,
.km-promo-placeholder {
    width: 100%;
    height: 100%;
    min-height: 148px;
    object-fit: cover;
}

.km-promo-placeholder {
    background: linear-gradient(160deg, #f0e6d4 0%, #d4c4a0 50%, #c9a962 100%);
}

.km-promo-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.km-promo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--km-line);
    cursor: pointer;
    transition: width 0.25s, background 0.25s;
}

.km-promo-dot.is-active {
    width: 20px;
    border-radius: 999px;
    background: var(--km-gold);
}

/* Category tabs */
.km-tabs {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0 0.5rem 0.75rem;
    background: color-mix(in srgb, var(--km-cream) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--km-line);
}

.km-tabs-menu {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid var(--km-line);
    border-radius: 10px;
    background: var(--km-surface);
    color: var(--km-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.km-tabs-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-right: 1rem;
}

.km-tabs-scroll::-webkit-scrollbar { display: none; }

.km-tab {
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0.35rem 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--km-muted);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.25s;
}

.km-tab.is-active {
    color: var(--km-gold);
    font-weight: 600;
}

.km-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--km-gold);
    animation: km-tab-line 0.3s var(--km-ease);
}

@keyframes km-tab-line {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Menu grid */
.km-menu { padding: 0 1rem 1rem; }

.km-category {
    scroll-margin-top: calc(var(--km-tabs-h) + 80px);
    padding-top: 1.25rem;
}

.km-category-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.km-category-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
}

.km-category-count {
    font-size: 0.72rem;
    color: var(--km-muted);
}

.km-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.km-food-card {
    background: var(--km-surface);
    border-radius: var(--km-radius);
    overflow: hidden;
    box-shadow: var(--km-shadow-sm);
    border: 1px solid var(--km-line);
    cursor: pointer;
    transition: transform 0.25s var(--km-ease), box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.km-food-card:active { transform: scale(0.98); }

.km-food-card.is-hidden { display: none !important; }

.km-food-media {
    position: relative;
    aspect-ratio: 1 / 0.92;
    overflow: hidden;
}

.km-food-media img,
.km-food-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.km-food-placeholder {
    background: linear-gradient(145deg, #f5efe3, #e8dcc8 40%, #d4c9a8);
}

.km-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: #c0392b;
    z-index: 2;
}

.km-badge--bestseller,
.km-badge--popular { background: var(--km-gold); color: #fff; }
.km-badge--new { background: var(--km-green); }
.km-badge--discount { background: #c0392b; }
.km-badge--signature { background: #8b2942; }

.km-quick-add {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: color-mix(in srgb, var(--km-surface) 92%, transparent);
    backdrop-filter: blur(8px);
    color: var(--km-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--km-shadow-sm);
    z-index: 2;
}

.km-food-body {
    padding: 0.65rem 0.7rem 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.km-food-name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
}

.km-food-desc {
    margin: 0.25rem 0 0;
    font-size: 0.68rem;
    color: var(--km-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.km-food-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.km-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.62rem;
    color: var(--km-muted);
}

.km-meta-item svg { color: var(--km-gold); }

.km-food-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
    gap: 0.35rem;
}

.km-food-price {
    font-size: 0.82rem;
    font-weight: 700;
}

.km-food-price small {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--km-muted);
}

.km-add-btn {
    border: none;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: var(--km-charcoal);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

[data-km-theme="dark"] .km-add-btn {
    background: var(--km-gold);
    color: var(--km-charcoal);
}

.km-view-only {
    font-size: 0.62rem;
    color: var(--km-muted);
}

/* Sheets */
.km-sheet[hidden] { display: none; }

.km-sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    max-width: var(--km-max);
    margin: 0 auto;
    left: 0;
    right: 0;
}

.km-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 16, 0.45);
    animation: km-backdrop-in 0.3s ease;
}

@keyframes km-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.km-sheet-panel {
    position: relative;
    width: 100%;
    max-height: 88vh;
    overflow: auto;
    background: var(--km-surface);
    border-radius: var(--km-radius) var(--km-radius) 0 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    animation: km-sheet-up 0.4s var(--km-ease);
    box-shadow: var(--km-shadow-lg);
}

.km-sheet-panel--side {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    margin-left: auto;
    max-width: 85%;
    animation: km-sheet-side 0.35s var(--km-ease);
}

@keyframes km-sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes km-sheet-side {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.km-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.1rem 1.15rem 0.5rem;
    border-bottom: 1px solid var(--km-line);
}

.km-sheet-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.km-sheet-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--km-cream);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--km-charcoal);
}

.km-sheet-body { padding: 1rem 1.15rem; }

.km-cart-sub {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: var(--km-muted);
}

/* Item sheet */
.km-item-hero {
    height: 200px;
    background: var(--km-cream);
    background-size: cover;
    background-position: center;
}

.km-item-sheet-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.km-item-sheet-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
}

.km-item-sheet-desc {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--km-muted);
}

.km-item-sheet-price {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--km-gold);
    white-space: nowrap;
}

.km-item-meta-row {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0;
    font-size: 0.78rem;
    color: var(--km-muted);
}

.km-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--km-muted);
}

.km-field textarea,
.km-field input {
    width: 100%;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius-sm);
    padding: 0.7rem 0.85rem;
    background: var(--km-cream);
    color: var(--km-charcoal);
    resize: vertical;
}

.km-field textarea:focus,
.km-field input:focus {
    outline: none;
    border-color: var(--km-gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--km-gold) 25%, transparent);
}

.km-extras-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.km-extra-chip {
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--km-line);
    background: var(--km-cream);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.km-extra-chip.is-selected {
    border-color: var(--km-gold);
    background: color-mix(in srgb, var(--km-gold) 15%, var(--km-cream));
}

.km-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
}

.km-qty-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--km-cream);
    border-radius: 999px;
    padding: 0.25rem;
}

.km-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--km-surface);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--km-shadow-sm);
    color: var(--km-charcoal);
}

.km-qty-val {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* Cart */
.km-cart-lines {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.km-cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--km-line);
}

.km-cart-line-name { font-weight: 600; font-size: 0.9rem; margin: 0; }
.km-cart-line-note { font-size: 0.72rem; color: var(--km-muted); margin: 0; grid-column: 1 / -1; }
.km-cart-line-price { font-weight: 700; font-size: 0.85rem; }

.km-cart-line-qty {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
}

.km-cart-line-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--km-line);
    border-radius: 8px;
    background: var(--km-cream);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.km-cart-summary { margin-bottom: 1rem; }

.km-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--km-muted);
    padding: 0.25rem 0;
}

.km-summary-row--total {
    font-size: 1rem;
    color: var(--km-charcoal);
    font-weight: 600;
    padding-top: 0.5rem;
    border-top: 1px solid var(--km-line);
    margin-top: 0.35rem;
}

.km-summary-row--total strong { color: var(--km-gold); font-size: 1.15rem; }

.km-pay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.km-field-help {
    display: block;
    margin-top: 0.3rem;
    color: var(--km-muted);
    font-size: 0.68rem;
    line-height: 1.35;
}

.km-pay-fieldset {
    border: none;
    margin: 0 0 1rem;
    padding: 0;
}

.km-pay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    padding: 0.65rem 0.35rem;
    border: 2px solid var(--km-line);
    border-radius: var(--km-radius-sm);
    background: var(--km-cream);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.km-pay-card.is-selected {
    border-color: var(--km-gold);
    background: color-mix(in srgb, var(--km-gold) 12%, var(--km-cream));
}

.km-pay-icon {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #fff;
    color: var(--km-green);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.km-pay-name { font-size: 0.68rem; font-weight: 700; }
.km-pay-hint { font-size: 0.55rem; color: var(--km-muted); line-height: 1.2; }

.km-payment-choice,
.km-checkout-status {
    margin: -0.35rem 0 0.85rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius-sm);
    background: color-mix(in srgb, var(--km-green) 7%, var(--km-cream));
    color: var(--km-charcoal);
    font-size: 0.75rem;
    line-height: 1.35;
}

.km-checkout-status {
    margin: 0.75rem 0 0;
    background: color-mix(in srgb, var(--km-gold) 12%, var(--km-cream));
}

.km-checkout-status.is-error {
    background: #fff2f2;
    border-color: #ffc5c5;
    color: #8a1f1f;
}

.km-secure-note {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--km-muted);
    margin: 0 0 0.85rem;
}

.km-btn {
    border: none;
    border-radius: var(--km-radius-sm);
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.km-btn:active { transform: scale(0.98); }
.km-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.km-btn-primary {
    background: linear-gradient(135deg, var(--km-gold), color-mix(in srgb, var(--km-gold) 70%, var(--km-green)));
    color: #fff;
}

.km-btn-block { width: 100%; }

.km-cart-empty {
    text-align: center;
    color: var(--km-muted);
    font-size: 0.85rem;
    padding: 1.5rem 0;
}

/* Timeline */
.km-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.km-timeline-step {
    display: flex;
    gap: 0.85rem;
    padding-bottom: 1.25rem;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.4s;
}

.km-timeline-step::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: var(--km-line);
}

.km-timeline-step:last-child::before { display: none; }

.km-timeline-step.is-done,
.km-timeline-step.is-active {
    opacity: 1;
}

.km-timeline-step.is-active .km-timeline-dot {
    background: var(--km-gold);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--km-gold) 30%, transparent);
    animation: km-pulse 1.5s ease infinite;
}

@keyframes km-pulse {
    50% { box-shadow: 0 0 0 10px transparent; }
}

.km-timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--km-line);
    flex-shrink: 0;
    margin-top: 2px;
    z-index: 1;
}

.km-timeline-step.is-done .km-timeline-dot {
    background: var(--km-green);
}

.km-timeline-step strong {
    display: block;
    font-size: 0.9rem;
}

.km-timeline-step p {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--km-muted);
}

.km-tracking-hint {
    font-size: 0.78rem;
    color: var(--km-muted);
    text-align: center;
}

/* Footer */
.km-footer {
    margin: 2rem 1rem 1rem;
    padding: 1.25rem;
    border-radius: var(--km-radius);
    background: var(--km-surface);
    border: 1px solid var(--km-line);
    text-align: center;
}

.km-footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--km-gold);
}

.km-footer-tag {
    margin: 0.2rem 0 1rem;
    font-size: 0.72rem;
    color: var(--km-muted);
}

.km-footer-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--km-muted);
    margin: 0 0 0.5rem;
}

.km-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.75rem;
}

.km-footer-links a {
    font-size: 0.78rem;
    color: var(--km-charcoal);
    text-decoration: none;
    font-weight: 500;
}

.km-footer-wa { color: var(--km-green) !important; }

.km-footer-copy {
    margin: 1rem 0 0;
    font-size: 0.68rem;
    color: var(--km-muted);
}

.km-float-wa {
    position: fixed;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    right: max(1rem, calc(50% - var(--km-max) / 2 + 1rem));
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--km-shadow);
    z-index: 40;
    text-decoration: none;
}

/* FAB cart — centered pill, responsive mobile + desktop */
.km-fab-cart {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 45;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--km-charcoal);
    color: #fff;
    box-shadow: var(--km-shadow-lg);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transform: translateX(-50%);
    width: auto;
    min-width: min(11.25rem, calc(100vw - 1.5rem));
    max-width: min(20rem, calc(100vw - 1.5rem), calc(var(--km-max) - 1.5rem));
    animation: km-fab-in 0.4s var(--km-ease);
}

.km-fab-cart[hidden] { display: none; }

.km-fab-cart__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.72rem 1rem;
    font-weight: 700;
    font-size: clamp(0.8125rem, 2.8vw, 0.9375rem);
    line-height: 1.2;
}

.km-fab-cart__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.km-fab-cart__icon svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.km-fab-cart__text {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
    justify-content: center;
}

.km-fab-cart__label {
    font-weight: 600;
    opacity: 0.92;
    white-space: nowrap;
}

.km-fab-total {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
}

.km-fab-cart.is-bump .km-fab-cart__inner {
    animation: km-fab-bump 0.35s var(--km-ease);
}

@keyframes km-fab-in {
    from { transform: translateX(-50%) translateY(100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes km-fab-bump {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.05); }
}

[data-km-theme="dark"] .km-fab-cart {
    background: var(--km-gold);
    color: var(--km-charcoal);
}

/* Align FAB with centered menu column on wide screens */
@media (min-width: 520px) {
    body.km-app:not(.km-book-mode) .km-fab-cart {
        left: 50%;
        max-width: min(18rem, calc(var(--km-max) - 1.5rem));
    }
}

@media (min-width: 768px) {
    .km-fab-cart {
        bottom: calc(1.15rem + env(safe-area-inset-bottom));
        max-width: 17.5rem;
    }

    .km-fab-cart__inner {
        padding: 0.78rem 1.2rem;
        gap: 0.65rem;
    }

    .km-fab-total { max-width: 11rem; }
}

@media (max-width: 359px) {
    .km-fab-cart__label { display: none; }

    .km-fab-cart__inner {
        padding: 0.65rem 0.85rem;
        gap: 0.45rem;
    }
}

/* Empty states */
.km-empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
}

.km-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.km-empty-state h2 { font-family: var(--font-display); margin: 0 0 0.5rem; }
.km-empty-state p { color: var(--km-muted); margin: 0; }
.km-empty-panel { text-align: center; color: var(--km-muted); font-size: 0.85rem; padding: 1rem; }

/* Payment return */
body.km-return {
    background: var(--km-cream);
    color: var(--km-charcoal);
    min-height: 100dvh;
    padding: 1.5rem 1rem;
}

.km-return-wrap {
    max-width: var(--km-max);
    margin: 0 auto;
}

.km-return-hero {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.km-return-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: color-mix(in srgb, var(--km-green) 15%, var(--km-surface));
    color: var(--km-green);
}

.km-return-icon--pending {
    background: color-mix(in srgb, var(--km-gold) 20%, var(--km-surface));
    color: var(--km-gold);
}

.km-return h1 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    margin: 0 0 0.35rem;
}

.km-return-meta {
    color: var(--km-muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.km-profile-desc { font-size: 0.9rem; color: var(--km-muted); line-height: 1.5; }
.km-profile-list { list-style: none; padding: 0; margin: 1rem 0; }
.km-profile-list a { color: var(--km-gold); }
.km-profile-powered { font-size: 0.78rem; color: var(--km-muted); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
