/* FOODIKING-style partner storefront */
.fk-app {
    --fk-accent: #FF6B81;
    --fk-accent-soft: rgba(255, 107, 129, 0.12);
    --fk-bg: #F4F5F7;
    --fk-card: #FFFFFF;
    --fk-text: #1A1A2E;
    --fk-muted: #8E8EA9;
    --fk-border: #ECECF2;
    --fk-green: #00B894;
    --fk-green-bg: #E8FFF8;
    --fk-radius: 18px;
    --fk-radius-sm: 14px;
    --fk-pad: 16px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--fk-bg);
    padding-bottom: 100px;
    overflow-x: hidden;
    box-sizing: border-box;
}

body.fk-body { background: var(--fk-bg); padding-bottom: 0 !important; overflow-x: hidden; }
main { display: flex; justify-content: center; width: 100%; overflow-x: hidden; }

/* Header */
.fk-header {
    background: var(--fk-card);
    padding: 16px 16px 12px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.fk-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.fk-logo {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.fk-logo-ph {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--fk-accent-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--fk-accent);
}
.fk-brand { flex: 1; min-width: 0; }
.fk-name {
    font-size: 18px; font-weight: 800;
    color: var(--fk-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.fk-location {
    font-size: 12px; color: var(--fk-muted);
    display: flex; align-items: center; gap: 4px;
    margin-top: 2px;
}
.fk-info-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--fk-border);
    background: var(--fk-card);
    color: var(--fk-muted);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 16px;
}

/* Search */
.fk-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--fk-bg);
    border-radius: var(--fk-radius-sm);
    padding: 0 14px;
    border: 1.5px solid transparent;
    transition: border-color 0.2s;
}
.fk-search:focus-within { border-color: var(--fk-accent); background: #fff; }
.fk-search i { color: var(--fk-muted); font-size: 16px; }
.fk-search input {
    border: none; outline: none; background: transparent;
    padding: 12px 0; font-size: 14px; width: 100%;
    font-family: inherit; color: var(--fk-text);
}
.fk-search input::placeholder { color: var(--fk-muted); }

/* Order modes */
.fk-modes {
    display: flex;
    background: var(--fk-bg);
    border-radius: var(--fk-radius-sm);
    padding: 4px;
    margin: 14px 16px 0;
    gap: 4px;
}
.fk-mode {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 12px; font-weight: 600;
    color: var(--fk-muted);
    text-decoration: none;
    transition: all 0.25s;
    border: none; background: transparent;
    cursor: pointer; font-family: inherit;
}
.fk-mode i { font-size: 15px; }
.fk-mode.active {
    background: var(--fk-card);
    color: var(--fk-text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.fk-mode.active i { color: var(--fk-accent); }

.fk-mode-pill { flex: 1; cursor: pointer; }
.fk-mode-pill .fk-mode-radio { display: none; }
.fk-mode-pill .fk-mode { width: 100%; }

/* Promo */
.fk-promo {
    margin: 10px 16px 0;
    background: var(--fk-green-bg);
    color: var(--fk-green);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.fk-promo i { font-size: 14px; }

/* Table chip */
.fk-table-chip {
    margin: 10px 16px 0;
    background: var(--fk-accent-soft);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 12px; font-weight: 600;
    color: var(--fk-accent);
    display: flex; align-items: center; gap: 8px;
}

/* Menu section */
.fk-menu-head {
    display: flex; align-items: center; gap: 8px;
    padding: 20px 16px 12px;
}
.fk-menu-head h2 {
    font-size: 20px; font-weight: 800;
    color: var(--fk-text); margin: 0;
}
.fk-menu-count {
    background: var(--fk-border);
    color: var(--fk-muted);
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 8px;
}

/* Categories — горизонтальный скролл */
.fk-cats-wrap {
    background: var(--fk-bg);
    position: sticky;
    top: 0;
    z-index: 50;
    padding-bottom: 4px;
}
.fk-cats {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px 14px;
    width: 100%;
    max-width: 100%;
}
.fk-cats::-webkit-scrollbar { display: none; }
.fk-cat {
    flex: 0 0 auto;
    width: 72px;
    min-width: 72px;
    text-align: center;
    text-decoration: none;
    color: var(--fk-muted);
    transition: transform 0.2s;
}
.fk-cat:hover { transform: translateY(-2px); }
.fk-cat-box {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: var(--fk-card);
    border: 1.5px solid var(--fk-border);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 6px;
    transition: all 0.25s;
    overflow: hidden;
}
.fk-cat-ico {
    font-size: 26px;
    line-height: 1;
    color: var(--fk-accent);
    transition: color 0.25s;
}
.fk-cat-emoji {
    font-size: 28px;
    line-height: 1;
    transition: filter 0.25s;
}
.fk-cat.active .fk-cat-box {
    background: var(--fk-accent);
    border-color: var(--fk-accent);
    box-shadow: 0 6px 16px rgba(255,107,129,0.35);
}
.fk-cat.active .fk-cat-ico {
    color: #fff;
}
.fk-cat.active .fk-cat-emoji {
    filter: brightness(1.15);
}
.fk-cat-label {
    font-size: 11px; font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.fk-cat.active .fk-cat-label { color: var(--fk-accent); }

/* Product grid */
.fk-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 var(--fk-pad) 16px;
    width: 100%;
    box-sizing: border-box;
}
.fk-group-title {
    grid-column: 1 / -1;
    font-size: 16px; font-weight: 700;
    color: var(--fk-text);
    margin: 8px 0 4px;
    padding-left: 2px;
}

/* Product card */
.fk-card {
    background: var(--fk-card);
    border-radius: var(--fk-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    display: flex; flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
    width: 100%;
}
.fk-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.fk-card-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 180px;
    background: var(--fk-bg);
    overflow: hidden;
}
.fk-card-img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.fk-card-img-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: var(--fk-muted);
    background: linear-gradient(135deg, var(--fk-accent-soft), var(--fk-bg));
}
.fk-hit {
    position: absolute; top: 8px; left: 8px;
    background: #FF9F43; color: #fff;
    font-size: 9px; font-weight: 800;
    padding: 3px 8px; border-radius: 6px;
    letter-spacing: 0.05em;
}
.fk-meta-row {
    position: absolute; bottom: 8px; left: 8px; right: 8px;
    display: flex; gap: 4px;
}
.fk-meta {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    font-size: 9px; font-weight: 600;
    color: var(--fk-text);
    padding: 3px 7px; border-radius: 6px;
    display: flex; align-items: center; gap: 3px;
}
.fk-meta i { font-size: 10px; color: var(--fk-muted); }
.fk-card-body {
    padding: 10px 10px 12px;
    flex: 1;
    display: flex; flex-direction: column;
}
.fk-card-name {
    font-size: 13px; font-weight: 700;
    color: var(--fk-text);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fk-card-desc {
    font-size: 10px; color: var(--fk-muted);
    line-height: 1.4;
    margin-bottom: 8px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fk-card-foot {
    display: flex; align-items: center; justify-content: space-between;
}
.fk-price {
    font-size: 14px; font-weight: 800;
    color: var(--fk-text);
}
.fk-add {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--fk-bg);
    color: var(--fk-text);
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.fk-add:hover {
    background: var(--fk-accent);
    color: #fff;
    transform: scale(1.08);
}
.fk-qty {
    display: flex; align-items: center;
    background: var(--fk-accent-soft);
    border-radius: 10px;
    overflow: hidden;
}
.fk-qty button {
    width: 28px; height: 28px;
    border: none; background: transparent;
    color: var(--fk-accent); font-size: 14px;
    cursor: pointer;
}
.fk-qty span {
    min-width: 20px; text-align: center;
    font-size: 12px; font-weight: 700;
    color: var(--fk-accent);
}

/* Floating cart */
.fk-cart-bar {
    position: fixed;
    bottom: 16px; left: 50%;
    transform: translateX(-50%) translateY(120px);
    width: calc(100% - 32px);
    max-width: 448px;
    background: var(--fk-accent);
    color: #fff;
    border-radius: var(--fk-radius);
    padding: 14px 20px;
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
    font-weight: 600; font-size: 14px;
    box-shadow: 0 8px 32px rgba(255,107,129,0.4);
    z-index: 900;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.fk-cart-bar.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.fk-cart-bar:hover { color: #fff; filter: brightness(1.05); }
.fk-cart-badge {
    background: #fff; color: var(--fk-accent);
    font-size: 12px; font-weight: 800;
    padding: 2px 8px; border-radius: 8px;
}
.fk-cart-total { margin-left: auto; font-weight: 800; }

/* Modal / bottom sheet */
.fk-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.fk-overlay.open { opacity: 1; pointer-events: all; }
.fk-sheet {
    position: fixed; bottom: 0; left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%; max-width: 480px;
    background: var(--fk-card);
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    padding-bottom: env(safe-area-inset-bottom);
}
.fk-overlay.open + .fk-sheet,
.fk-sheet.open {
    transform: translateX(-50%) translateY(0);
}
.fk-sheet-handle {
    width: 40px; height: 4px;
    background: var(--fk-border);
    border-radius: 2px;
    margin: 12px auto;
}
.fk-sheet-img {
    width: 100%; aspect-ratio: 16/10;
    object-fit: cover;
}
.fk-sheet-body { padding: 16px 20px 24px; }
.fk-sheet-name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.fk-sheet-desc { font-size: 13px; color: var(--fk-muted); margin-bottom: 12px; line-height: 1.5; }
.fk-sheet-meta { display: flex; gap: 12px; margin-bottom: 16px; font-size: 12px; color: var(--fk-muted); }
.fk-sheet-price { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.fk-cross-title { font-size: 14px; font-weight: 700; margin: 20px 0 10px; }
.fk-cross-scroll {
    display: flex; gap: 10px;
    overflow-x: auto; scrollbar-width: none;
    padding-bottom: 4px;
}
.fk-cross-scroll::-webkit-scrollbar { display: none; }
.fk-cross-item {
    flex-shrink: 0; width: 120px;
    background: var(--fk-bg);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none; color: inherit;
}
.fk-cross-item img { width: 100%; height: 80px; object-fit: cover; }
.fk-cross-item-info { padding: 6px 8px; }
.fk-cross-item-name { font-size: 11px; font-weight: 600; line-height: 1.2; }
.fk-cross-item-price { font-size: 11px; font-weight: 700; color: var(--fk-accent); margin-top: 2px; }
.fk-sheet-add {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--fk-radius-sm);
    background: var(--fk-accent);
    color: #fff;
    font-size: 15px; font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
}
.fk-sheet-close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    font-size: 16px;
    z-index: 2;
}

.fk-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--fk-muted);
}

@media (min-width: 481px) {
    .fk-app {
        margin-top: 12px;
        margin-bottom: 12px;
        border-radius: 24px;
        box-shadow: 0 8px 40px rgba(0,0,0,0.08);
        min-height: calc(100vh - 24px);
        width: 100%;
        max-width: 480px;
    }
}

/* ===== Sub-pages: header, sections, forms ===== */
.fk-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--fk-card);
    border-bottom: 1px solid var(--fk-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.fk-back {
    width: 36px; height: 36px;
    border-radius: 12px;
    border: 1.5px solid var(--fk-border);
    background: var(--fk-card);
    display: flex; align-items: center; justify-content: center;
    color: var(--fk-text);
    text-decoration: none;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.fk-back:hover { border-color: var(--fk-accent); color: var(--fk-accent); }
.fk-page-title {
    font-size: 17px; font-weight: 800;
    color: var(--fk-text);
    flex: 1;
}
.fk-page-badge {
    font-size: 11px; font-weight: 700;
    background: var(--fk-accent-soft);
    color: var(--fk-accent);
    padding: 3px 10px;
    border-radius: 8px;
}
.fk-page-body { padding: 16px; padding-bottom: 100px; }

/* Cart items */
.fk-cart-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.fk-cart-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--fk-card);
    border-radius: var(--fk-radius-sm);
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.fk-cart-item-img {
    width: 56px; height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--fk-bg);
}
.fk-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.fk-cart-item-img-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--fk-muted); font-size: 20px;
}
.fk-cart-item-info { flex: 1; min-width: 0; }
.fk-cart-item-name {
    font-size: 13px; font-weight: 700;
    color: var(--fk-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fk-cart-item-each { font-size: 10px; color: var(--fk-muted); margin-top: 2px; }
.fk-cart-item-total {
    font-size: 13px; font-weight: 800;
    color: var(--fk-text);
    white-space: nowrap;
}
.fk-cart-item-del {
    width: 32px; height: 32px;
    border: none; background: transparent;
    color: var(--fk-muted); cursor: pointer;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.fk-cart-item-del:hover { background: #FFE8E8; color: #FF6B6B; }

/* Summary card */
.fk-summary {
    background: var(--fk-card);
    border-radius: var(--fk-radius-sm);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.fk-summary-row {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--fk-muted);
    margin-bottom: 6px;
}
.fk-summary-total {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--fk-accent-soft);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 8px;
}
.fk-summary-total span:first-child { font-size: 14px; font-weight: 700; color: var(--fk-text); }
.fk-summary-total span:last-child { font-size: 18px; font-weight: 800; color: var(--fk-accent); }
.fk-warn {
    background: #FFF8E7; color: #E17055;
    padding: 8px 12px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
    margin: 8px 0;
    display: flex; align-items: center; gap: 6px;
}

/* Buttons */
.fk-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px;
    border: none; border-radius: var(--fk-radius-sm);
    font-size: 14px; font-weight: 700;
    font-family: inherit; cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}
.fk-btn-primary {
    background: var(--fk-accent); color: #fff;
    box-shadow: 0 6px 20px rgba(255,107,129,0.3);
}
.fk-btn-primary:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.fk-btn-outline {
    background: var(--fk-card);
    border: 1.5px solid var(--fk-border);
    color: var(--fk-muted);
}
.fk-btn-outline:hover { border-color: var(--fk-accent); color: var(--fk-accent); }
.fk-link-muted {
    display: block; text-align: center;
    font-size: 12px; color: var(--fk-muted);
    text-decoration: none; margin-top: 10px; font-weight: 500;
}
.fk-link-muted:hover { color: var(--fk-accent); }

/* Checkout sections */
.fk-section {
    background: var(--fk-card);
    border-radius: var(--fk-radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.fk-section-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    font-size: 13px; font-weight: 700;
    color: var(--fk-text);
    border-bottom: 1px solid var(--fk-border);
}
.fk-section-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    background: var(--fk-accent-soft);
    color: var(--fk-accent);
}
.fk-section-body { padding: 14px; }
.fk-label {
    display: block; font-size: 10px; font-weight: 700;
    color: var(--fk-muted); text-transform: uppercase;
    letter-spacing: 0.04em; margin-bottom: 4px;
}
.fk-input {
    width: 100%; padding: 11px 12px;
    border: 1.5px solid var(--fk-border);
    border-radius: 12px;
    font-size: 13px; font-family: inherit;
    color: var(--fk-text); background: var(--fk-bg);
    outline: none; transition: border-color 0.2s;
    margin-bottom: 10px;
}
.fk-input:focus { border-color: var(--fk-accent); background: #fff; }
.fk-input::placeholder { color: var(--fk-muted); }
.fk-input-row { display: flex; gap: 8px; }
.fk-input-row > * { flex: 1; }
.fk-phone-field {
    display: flex;
    align-items: center;
    background: var(--fk-bg);
    border: 1.5px solid var(--fk-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}
.fk-phone-field:focus-within {
    border-color: var(--fk-accent);
    background: #fff;
}
.fk-phone-prefix {
    flex-shrink: 0;
    padding: 12px 0 12px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--fk-text);
    user-select: none;
}
.fk-phone-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding-left: 6px !important;
    min-width: 0;
}
.fk-phone-input:focus { box-shadow: none !important; }

.fk-modes.co-modes { margin: 0; }
.fk-pay-option { cursor: pointer; display: block; margin-bottom: 6px; }
.fk-pay-option input { display: none; }
.fk-pay-content {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--fk-border);
    border-radius: 12px;
    transition: all 0.2s;
}
.fk-pay-option input:checked + .fk-pay-content {
    border-color: var(--fk-accent);
    background: var(--fk-accent-soft);
}
.fk-pay-name { font-size: 12px; font-weight: 700; color: var(--fk-text); }
.fk-pay-desc { font-size: 10px; color: var(--fk-muted); }
.fk-pay-note { line-height: 1.35; margin-top: 2px; }
.fk-kaspi-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 16px 16px;
    padding: 14px 16px;
    background: var(--fk-card);
    border: 1.5px solid var(--fk-border);
    border-radius: 14px;
}
.fk-pay-kaspi { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }

.fk-delivery-block {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}
.fk-delivery-block.visible { max-height: 300px; opacity: 1; }

.fk-mode-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
    margin-bottom: 0;
}
.fk-mode-panel.visible {
    max-height: 600px;
    opacity: 1;
    margin-bottom: 12px;
}

.fk-table-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.fk-table-pick { cursor: pointer; }
.fk-table-radio { display: none; }
.fk-table-pick-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border: 1.5px solid var(--fk-border);
    border-radius: 12px;
    background: var(--fk-bg);
    font-size: 10px;
    color: var(--fk-muted);
    transition: all 0.2s;
    text-align: center;
}
.fk-table-pick-box strong {
    font-size: 14px;
    color: var(--fk-text);
}
.fk-table-radio:checked + .fk-table-pick-box,
.fk-table-pick-box.selected {
    border-color: var(--fk-accent);
    background: var(--fk-accent-soft);
    color: var(--fk-accent);
}
.fk-table-pick-box.selected strong { color: var(--fk-accent); }

.fk-kaspi-direct {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #FFF0EE;
    color: #E03E2D;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid #FFD4CE;
}
.fk-kaspi-direct:hover { color: #E03E2D; filter: brightness(0.97); }

@media (max-width: 480px) {
    .fk-table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fk-table-banner {
    display: flex; align-items: center; gap: 10px;
    background: var(--fk-accent-soft);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 12px; font-weight: 600;
    color: var(--fk-accent);
}

/* Product detail page */
.fk-product-hero {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--fk-bg);
}
.fk-product-hero img { width: 100%; height: 100%; object-fit: cover; }
.fk-product-hero-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: var(--fk-muted);
    background: linear-gradient(135deg, var(--fk-accent-soft), var(--fk-bg));
}
.fk-product-body { padding: 16px 16px 24px; }
.fk-product-name { font-size: 22px; font-weight: 800; margin-bottom: 6px; color: var(--fk-text); }
.fk-product-desc { font-size: 13px; color: var(--fk-muted); line-height: 1.5; margin-bottom: 12px; }
.fk-product-meta { display: flex; gap: 12px; margin-bottom: 16px; font-size: 12px; color: var(--fk-muted); }
.fk-product-price { font-size: 26px; font-weight: 800; color: var(--fk-text); margin-bottom: 16px; }
.fk-product-qty {
    display: flex; align-items: center;
    background: var(--fk-bg); border-radius: 12px;
    overflow: hidden; width: fit-content;
    margin-bottom: 14px;
}
.fk-product-qty button {
    width: 40px; height: 40px; border: none;
    background: transparent; font-size: 18px;
    color: var(--fk-accent); cursor: pointer;
}
.fk-product-qty span {
    min-width: 36px; text-align: center;
    font-size: 15px; font-weight: 700;
}
.fk-related-title { font-size: 14px; font-weight: 700; margin: 20px 16px 10px; color: var(--fk-text); }
.fk-related-scroll {
    display: flex; gap: 10px;
    overflow-x: auto; scrollbar-width: none;
    padding: 0 16px 16px;
}
.fk-related-scroll::-webkit-scrollbar { display: none; }

/* Order success / track */
.fk-success-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--fk-green);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    margin: 24px auto 12px;
    animation: fkBounce 0.6s ease-out;
}
@keyframes fkBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}
.fk-success-title { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.fk-success-sub { text-align: center; font-size: 12px; color: var(--fk-muted); margin-bottom: 16px; }
.fk-tracking-box {
    margin: 0 16px 16px;
    padding: 16px;
    background: var(--fk-accent-soft);
    border: 1.5px dashed var(--fk-accent);
    border-radius: 14px;
    text-align: center;
}
.fk-tracking-code {
    font-size: 28px; font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--fk-accent);
    font-family: monospace, sans-serif;
}
.fk-status-step {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 0; position: relative;
}
.fk-status-step:not(:last-child)::after {
    content: ''; position: absolute;
    left: 13px; top: 36px;
    width: 2px; height: calc(100% - 12px);
    background: var(--fk-border);
}
.fk-status-step.done:not(:last-child)::after { background: var(--fk-green); }
.fk-status-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid var(--fk-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; flex-shrink: 0; z-index: 1;
    background: var(--fk-card);
}
.fk-status-step.done .fk-status-dot {
    background: var(--fk-green); border-color: var(--fk-green); color: #fff;
}
.fk-status-step.active .fk-status-dot {
    border-color: var(--fk-accent);
    background: var(--fk-accent-soft);
    color: var(--fk-accent);
}
.fk-status-label { font-size: 13px; font-weight: 700; color: var(--fk-text); }
.fk-status-desc { font-size: 10px; color: var(--fk-muted); }
.fk-detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--fk-border);
    font-size: 12px;
}
.fk-detail-row:last-child { border-bottom: none; }
.fk-detail-label { color: var(--fk-muted); }
.fk-detail-value { font-weight: 700; color: var(--fk-text); }
.fk-actions-row { display: flex; gap: 8px; padding: 0 16px 16px; flex-wrap: wrap; }
.fk-actions-row .fk-btn { flex: 1; min-width: 120px; padding: 12px; font-size: 12px; }

.fk-fixed-bottom {
    position: sticky;
    bottom: 0;
    padding: 12px var(--fk-pad) calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--fk-bg) 80%, transparent);
}

/* ===== Mobile phones ===== */
@media (max-width: 480px) {
    html { -webkit-text-size-adjust: 100%; }

    body.fk-body {
        width: 100%;
        min-height: 100dvh;
    }

    main { display: block; }

    .fk-app {
        --fk-pad: 14px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        min-height: 100dvh;
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .fk-header {
        padding: max(10px, env(safe-area-inset-top, 0px)) var(--fk-pad) 12px;
        border-radius: 0 0 20px 20px;
    }

    .fk-modes,
    .fk-promo,
    .fk-table-chip {
        margin-left: var(--fk-pad);
        margin-right: var(--fk-pad);
    }

    .fk-menu-head {
        padding: 16px var(--fk-pad) 10px;
    }

    .fk-cats {
        padding: 0 var(--fk-pad) 12px;
        gap: 8px;
        scroll-padding-inline: var(--fk-pad);
    }

    .fk-cat {
        width: 62px;
        min-width: 62px;
    }

    .fk-cat-box {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

    .fk-cat-ico { font-size: 22px; }
    .fk-cat-emoji { font-size: 24px; }

    .fk-cat-label {
        font-size: 9px;
        line-height: 1.15;
    }

    .fk-grid {
        gap: 10px;
        padding: 0 var(--fk-pad) 16px;
    }

    .fk-card-img-wrap {
        aspect-ratio: 1 / 1;
        max-height: none;
    }

    .fk-card-body { padding: 8px 8px 10px; }
    .fk-card-name { font-size: 12px; }
    .fk-card-desc { font-size: 9px; }
    .fk-price { font-size: 13px; }
    .fk-add { width: 30px; height: 30px; font-size: 16px; }

    .fk-mode {
        font-size: 10px;
        padding: 9px 4px;
        gap: 4px;
    }
    .fk-mode i { font-size: 14px; }

    .fk-cart-bar {
        left: var(--fk-pad);
        right: var(--fk-pad);
        width: auto;
        max-width: none;
        transform: translateY(120px);
        bottom: max(10px, env(safe-area-inset-bottom, 0px));
        padding: 13px 16px;
    }
    .fk-cart-bar.visible {
        transform: translateY(0);
    }

    .fk-sheet {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
    }
    .fk-overlay.open + .fk-sheet,
    .fk-sheet.open {
        transform: translateY(0);
    }

    .fk-page-header {
        padding: max(12px, env(safe-area-inset-top, 0px)) var(--fk-pad) 12px;
    }

    .fk-page-body {
        padding: var(--fk-pad);
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .fk-input-row { flex-direction: column; }
    .fk-product-body { padding: var(--fk-pad); }
    .fk-related-scroll { padding: 0 var(--fk-pad) 16px; }
    .fk-related-title { margin-left: var(--fk-pad); margin-right: var(--fk-pad); }
    .fk-actions-row { padding: 0 var(--fk-pad) 16px; }
    .fk-tracking-box { margin-left: var(--fk-pad); margin-right: var(--fk-pad); }
}
