:root {
    --primary-green: #1aa0d8;
    --secondary-orange: #1b5ca8;
    --text-light: #FFF;
    --text-dark: #12314f;
    --bg-light: #eef6fb;
    --panel-border: rgba(18, 61, 111, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(26,160,216,0.12), transparent 24%),
        radial-gradient(circle at bottom right, rgba(27,92,168,0.08), transparent 28%),
        linear-gradient(180deg, #eef7fd 0%, #f8fbff 100%);
    overflow: hidden;
    height: 100vh;
    color: var(--text-dark);
    -webkit-user-select: none;
    user-select: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
button { cursor: pointer; border: none; font-family: inherit; transition: all 200ms; }

.welcome-screen-professional {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: block;
    background:
        radial-gradient(circle at top left, rgba(26,160,216,0.12), transparent 26%),
        radial-gradient(circle at bottom right, rgba(27,92,168,0.12), transparent 22%),
        linear-gradient(180deg, #edf7ff 0%, #f8fbff 100%);
    overflow: hidden;
}

.welcome-shell {
    position: relative;
    width: 100%;
    height: 100%;
}

.welcome-content-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 28px;
}

.welcome-brand-card,
.welcome-promo-panel {
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(19, 40, 24, 0.12);
    border: 1px solid rgba(18, 61, 111, 0.08);
}

.welcome-brand-card {
    width: min(760px, calc(100vw - 40px));
    min-height: min(82vh, 760px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 28px 40px 32px;
    text-align: center;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(14px);
    border-left: 0;
}

.welcome-media-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: 28px;
}
.welcome-stage-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(6, 24, 10, 0.08), rgba(6, 24, 10, 0.42)),
        radial-gradient(circle at 50% 50%, transparent 0%, rgba(4, 14, 7, 0.22) 78%);
    border-radius: 28px;
}
.welcome-media-placeholder,
.welcome-ad-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 420ms ease;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 24%),
        linear-gradient(180deg, rgba(9, 21, 12, 0.92), rgba(18, 26, 19, 0.96));
}
.welcome-media-placeholder.active,
.welcome-ad-slide.active {
    opacity: 1;
}
.welcome-media-placeholder {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 22%),
        linear-gradient(135deg, #123d6f, #1b5ca8 58%, #1aa0d8 100%);
}
.welcome-media-placeholder-logo {
    width: min(24vw, 250px);
    background: rgba(255,255,255,0.92);
    border-radius: 26px;
    padding: 18px;
    box-shadow: 0 28px 48px rgba(0,0,0,0.24);
}
.welcome-media-placeholder-text {
    margin-top: 18px;
    color: rgba(255,255,255,0.92);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.welcome-ad-slide img,
.welcome-ad-slide video {
    position: absolute;
    left: 50%;
    top: 50%;
    width: auto;
    height: auto;
    max-width: min(calc(100vw - 180px), calc(100% - 120px));
    max-height: min(calc(100vh - 240px), calc(100% - 180px));
    object-fit: contain;
    object-position: center center;
    display: block;
    margin: 0;
    transform: translate(-50%, -50%);
}
.welcome-ad-badge {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 2;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    color: #123d6f;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 12px 26px rgba(0,0,0,0.12);
}
.welcome-ad-caption {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 2;
    max-width: min(560px, calc(100vw - 56px));
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(10, 24, 12, 0.62);
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 32px rgba(0,0,0,0.16);
}
.welcome-ad-caption strong {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}
.welcome-ad-caption span {
    display: block;
    color: rgba(255,255,255,0.84);
    font-size: 14px;
    line-height: 1.45;
}
.menu-showcase-slide {
    padding: 42px 46px;
}
.menu-showcase-slide img,
.menu-showcase-slide video {
    position: static;
    inset: auto;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    transform: none;
}
.menu-showcase-shell {
    position: relative;
    width: min(1380px, calc(100vw - 48px));
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(680px, 1.8fr) minmax(260px, 0.7fr);
    gap: 18px;
    align-items: center;
    min-height: min(82vh, 920px);
}
.menu-showcase-bg {
    position: absolute;
    inset: 2% 4%;
    z-index: 0;
    overflow: hidden;
    border-radius: 40px;
    opacity: 0.7;
}
.menu-showcase-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.14), transparent 26%),
        radial-gradient(circle at 80% 30%, rgba(255,255,255,0.1), transparent 22%),
        linear-gradient(180deg, rgba(8,18,10,0.18), rgba(8,18,10,0.45));
}
.menu-showcase-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(44px) saturate(1.12) brightness(0.92);
    transform: scale(1.22);
}
.menu-showcase-art {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 36px;
    padding: 18px;
    box-shadow: 0 28px 60px rgba(0,0,0,0.24);
    backdrop-filter: blur(6px);
}
.menu-showcase-art img {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: contain;
    object-position: center center;
    border-radius: 28px;
    background: transparent;
}
.menu-showcase-copy {
    position: relative;
    z-index: 1;
    padding: 26px 28px;
    border-radius: 32px;
    background: rgba(10, 24, 12, 0.34);
    color: #fff;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 36px rgba(0,0,0,0.18);
}
.menu-showcase-kicker {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.menu-showcase-copy h3 {
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.05;
    margin-bottom: 14px;
}
.menu-showcase-copy p {
    color: rgba(255,255,255,0.84);
    font-size: 16px;
    line-height: 1.55;
}
.menu-showcase-price {
    margin-top: 18px;
    font-size: 34px;
    font-weight: 900;
    color: #fff;
}

.welcome-logo-container { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 6px; }
.welcome-logo {
    width: min(52vw, 520px);
    max-width: 100%;
    max-height: 58vh;
    object-fit: contain;
    display: block;
}
.logo-animated { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 16px 0; animation: fadeIn 0.8s; }
.logo-green, .logo-orange { font-size: 56px; animation: rotate 0.8s cubic-bezier(0.34,1.56,0.64,1); }
.logo-animated.delay { animation-delay: 0.2s; }
.logo-text-main { display: none; }
.logo-text-sub { font-size: 30px; font-weight: 800; color: #1f1f1f; line-height: 1.15; max-width: 12ch; }
.welcome-copy-block { display: flex; flex-direction: column; gap: 10px; text-align: center; align-items: center; margin-top: 0; }
.welcome-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef7ff;
    color: #123d6f;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.welcome-title { font-size: clamp(34px, 3vw, 48px); color: #1f1f1f; font-weight: 800; line-height: 1.05; }
.welcome-subtitle { font-size: 19px; color: #526152; line-height: 1.55; max-width: 34ch; }
.btn-welcome-start {
    padding: 18px 28px;
    background: linear-gradient(135deg, #1aa0d8, #1b5ca8);
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(18,61,111,0.18);
    width: min(360px, 100%);
}
.btn-welcome-start:active { transform: scale(0.99); }

.welcome-promo-panel {
    position: relative;
    overflow: hidden;
    min-height: 100%;
    border-radius: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 420ms ease;
}

.welcome-screen-professional.screensaver-active .welcome-promo-panel {
    opacity: 1;
}

.welcome-screen-professional.screensaver-active .welcome-brand-card {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

.welcome-watermark {
    position: absolute;
    right: 22px;
    top: 22px;
    bottom: auto;
    left: auto;
    z-index: 3;
    width: min(180px, 20vw);
    padding: 10px;
    border-radius: 22px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 30px rgba(0,0,0,0.18);
}

.welcome-watermark img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.app-container { display: flex; flex-direction: column; height: 100vh; background: transparent; animation: fadeIn 0.5s ease-out; }
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px;
    background: #fff;
    color: var(--text-dark);
    border-bottom: 1px solid rgba(31, 143, 73, 0.1);
    box-shadow: 0 12px 30px rgba(18, 35, 21, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-center { flex: 2; text-align: center; }
.header-brand { display: inline-flex; align-items: center; gap: 12px; }
.header-brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: rgba(255,255,255,0.94);
    border-radius: 18px;
    padding: 6px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.header-brand-copy { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.header-title { font-size: 20px; font-weight: 800; margin: 0; color: #215232; }
.header-subtitle { margin-top: 2px; font-size: 13px; color: #6b786b; }
.btn-back, .btn-cart-toggle {
    position: relative;
    background: #edf6ee;
    color: #215232;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(31, 143, 73, 0.12);
}
.cart-count-badge { position: absolute; top: -8px; right: -8px; background: #D73027; color: white; border-radius: 50%; padding: 4px 8px; font-size: 12px; font-weight: 700; min-width: 20px; text-align: center; }

.search-section { padding: 16px 24px; background: white; border-bottom: 1px solid rgba(31, 143, 73, 0.08); }
.search-box { width: 100%; padding: 12px 16px; border: 2px solid #E0E0E0; border-radius: 8px; font-size: 16px; margin-bottom: 16px; }
.search-box:focus { outline: none; border-color: var(--primary-green); box-shadow: 0 0 0 3px rgba(39,167,69,0.1); }

.category-filter-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.category-tabs-container { display: flex; gap: 8px; min-width: min-content; }
.category-tab { padding: 10px 16px; background: var(--bg-light); border: 1px solid #dde7de; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; color: #4d5a4d; }
.category-tab.active { background: linear-gradient(135deg, var(--primary-green), #20c997); color: white; border-color: transparent; }

.content-wrapper { display: flex; flex: 1; overflow: hidden; gap: 24px; padding: 24px; background: transparent; }
.menu-section { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; }
.product-card-empty { min-height: 220px; justify-content: center; }

.product-card { background: white; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 24px rgba(14, 34, 17, 0.08); transition: all 220ms; display: grid; grid-template-columns: minmax(145px, 168px) minmax(0, 1fr); cursor: pointer; animation: cardFade 0.5s ease-out; border: 1px solid rgba(31,143,73,0.08); min-height: 188px; }
.product-card:active { transform: translateY(-4px); box-shadow: 0 18px 32px rgba(0,0,0,0.14); }
.product-image-container { position: relative; width: 100%; min-height: 100%; overflow: hidden; background: radial-gradient(circle at top left, rgba(31,143,73,0.08), transparent 34%), linear-gradient(180deg, #f4f7f4, #eef4ee); display: flex; align-items: center; justify-content: center; padding: 14px; }
.product-image-container img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.product-category-badge { position: absolute; top: 10px; right: 10px; background: rgba(31, 143, 73, 0.92); color: white; padding: 5px 9px; border-radius: 50px; font-size: 11px; font-weight: 700; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.product-info { padding: 14px 14px 12px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.product-name { font-size: 17px; font-weight: 800; color: var(--text-dark); margin-bottom: 6px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-description { font-size: 13px; color: #666; margin-bottom: 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.product-footer { display: grid; grid-template-columns: auto minmax(120px, 1fr); align-items: center; gap: 10px; margin-top: auto; }
.product-price { font-size: 20px; font-weight: 800; background: linear-gradient(135deg, var(--primary-green), var(--secondary-orange)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; }
.btn-add-to-cart { background: linear-gradient(135deg, var(--primary-green), #1E8449); color: white; padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; width: 100%; }
.btn-add-to-cart:active { transform: scale(0.95); }
.btn-image-zoom {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(255,255,255,0.96);
    color: var(--primary-green);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}

.cart-panel { width: 390px; background: white; border-radius: 24px; box-shadow: 0 18px 40px rgba(14, 34, 17, 0.12); display: flex; flex-direction: column; animation: slideRight 0.3s ease-out; max-height: calc(100vh - 190px); border: 1px solid rgba(31,143,73,0.08); }
.cart-panel.collapsed { display: none; }
@keyframes slideRight { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.cart-header { display: flex; justify-content: space-between; padding: 24px; border-bottom: 1px solid #E0E0E0; background: linear-gradient(135deg, rgba(39,167,69,0.1), rgba(255,107,53,0.1)); }
.cart-header h3 { font-size: 20px; margin: 0; }
.cart-header h2 { font-size: 20px; margin: 0; }
.btn-close-cart { background: none; color: var(--text-dark); font-size: 24px; opacity: 0.6; }
.cart-items-list, .cart-items { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.empty-cart-message { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #999; text-align: center; padding: 24px; gap: 8px; }
.cart-item { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid #E0E0E0; animation: itemAppear 0.3s ease-out; }
.cart-item-image { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; background: var(--bg-light); }
.cart-item-details { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cart-item-name { font-weight: 700; font-size: 16px; }
.cart-item-price { color: var(--primary-green); font-weight: 700; }
.cart-footer { padding: 20px 24px 24px; border-top: 1px solid #E0E0E0; background: linear-gradient(180deg, #fbfdfb, #f3f8f3); }
.cart-total { display: flex; align-items: center; justify-content: space-between; font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.total-amount { color: var(--primary-green); }
.btn-checkout {
    width: 100%;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-green), #145d2f);
    color: white;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(20, 93, 47, 0.18);
}
.item-info { flex: 1; }
.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.quantity-controls button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #edf6ee;
    color: var(--primary-green);
    font-size: 22px;
    font-weight: 700;
}
.quantity-controls span {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
}

.cart-summary-box { padding: 24px; border-top: 2px solid #E0E0E0; background: #FAFAFA; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 16px; }
.summary-row.total-row { font-size: 20px; font-weight: 800; color: var(--primary-green); margin-top: 16px; }
.summary-divider { height: 1px; background: #E0E0E0; margin: 16px 0; }

.payment-methods { padding: 16px; }
.payment-methods h4 { font-size: 16px; margin-bottom: 16px; color: var(--text-dark); }
.payment-method-btn {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 2px solid #dfe9df;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 160ms, box-shadow 160ms, transform 160ms;
}
.payment-method-btn:hover {
    border-color: rgba(31, 143, 73, 0.35);
    box-shadow: 0 12px 20px rgba(31, 143, 73, 0.08);
}
.payment-method-btn input { display: none; }
.payment-method-btn:has(input:checked) {
    border-color: var(--primary-green);
    box-shadow: 0 14px 24px rgba(31, 143, 73, 0.12);
    transform: translateY(-1px);
}
.payment-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(31,143,73,0.12), rgba(214,163,57,0.12));
    font-size: 28px;
}
.payment-info strong { display: block; font-size: 18px; color: var(--text-dark); }
.payment-info span { color: #5d695d; font-size: 14px; }
.radio-label { display: flex; align-items: center; padding: 8px 0; cursor: pointer; gap: 16px; font-size: 16px; }
.radio-label input { display: none; }
.radio-custom { width: 24px; height: 24px; border: 2px solid #E0E0E0; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 200ms; }
.radio-label input:checked + .radio-custom { background: var(--primary-green); border-color: var(--primary-green); }
.radio-custom::after { content: '✓'; color: white; opacity: 0; }
.radio-label input:checked + .radio-custom::after { opacity: 1; }

.btn-confirm-order { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary-green), #1E8449); color: white; font-size: 20px; font-weight: 700; border-radius: 8px; margin: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-confirm-order:disabled { opacity: 0.5; cursor: not-allowed; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 2000; animation: overlayFade 0.2s ease-out; }
.modal-box { background: white; border-radius: 16px; padding: 24px; max-width: 500px; width: 90%; box-shadow: 0 12px 32px rgba(0,0,0,0.25); position: relative; animation: modalUp 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.modal-close-btn { position: absolute; top: 16px; right: 16px; background: none; color: #999; font-size: 28px; opacity: 0.6; }
.modal-header { margin-bottom: 24px; }
.modal-header h2 { font-size: 28px; margin: 0; }
.modal-input { width: 100%; padding: 14px 16px; border: 2px solid #E0E0E0; border-radius: 8px; font-size: 18px; margin-bottom: 24px; }
.modal-input:focus { outline: none; border-color: var(--primary-green); box-shadow: 0 0 0 3px rgba(39,167,69,0.1); }
.modal-footer { display: flex; gap: 16px; margin-top: 24px; }
.btn-modal-primary, .btn-modal-secondary { flex: 1; padding: 14px; border-radius: 8px; font-size: 16px; font-weight: 700; }
.btn-modal-primary { background: linear-gradient(135deg, var(--primary-green), #1E8449); color: white; }
.btn-modal-secondary { background: var(--bg-light); color: var(--text-dark); }
.qr-container { text-align: center; padding: 32px 24px; background: var(--bg-light); border-radius: 8px; margin: 24px 0; }
.qr-image {
    width: min(48vw, 320px);
    max-width: 100%;
    border-radius: 18px;
    border: 10px solid white;
    box-shadow: 0 18px 34px rgba(0,0,0,0.12);
}
.qr-pay-link {
    display: inline-block;
    margin-top: 18px;
    text-decoration: none;
    padding: 14px 22px;
    border-radius: 14px;
}
.qr-help {
    margin-top: 16px;
    color: #4e5b4e;
    line-height: 1.5;
}
.order-details {
    margin: 18px 0 22px;
    padding: 18px;
    border-radius: 16px;
    background: #f5faf5;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}
.detail-row strong { color: var(--primary-green); }

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 24, 12, 0.46);
    backdrop-filter: blur(6px);
    z-index: 2500;
    padding: 28px;
}
.modal-content {
    width: min(92vw, 720px);
    max-height: 92vh;
    overflow-y: auto;
    background: white;
    border-radius: 26px;
    padding: 30px 32px;
    box-shadow: 0 28px 64px rgba(0,0,0,0.18);
}
.image-preview-content {
    width: min(94vw, 980px);
    padding: 20px;
    background: rgba(255,255,255,0.98);
}
.image-preview-img {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 22px;
    background: #f5f5f5;
}
.image-preview-caption {
    margin-top: 14px;
    text-align: center;
    color: #385038;
    font-size: 18px;
    font-weight: 700;
}
.image-preview-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.65);
    color: white;
    z-index: 2;
}
.modal-content h3 {
    font-size: 30px;
    margin-bottom: 8px;
    color: var(--text-dark);
}
.modal-content p {
    color: #5f6b5f;
    line-height: 1.5;
}
.modal-buttons {
    display: flex;
    gap: 14px;
    margin-top: 22px;
}
.btn-primary, .btn-secondary {
    flex: 1;
    padding: 15px 18px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), #145d2f);
    color: white;
}
.btn-secondary {
    background: #eef3ee;
    color: #355135;
}
.form-group { margin-top: 18px; }
.form-group input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #dbe6db;
    border-radius: 16px;
    font-size: 22px;
}
.status-message {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%) translateY(20px);
    min-width: 320px;
    max-width: 80vw;
    padding: 14px 18px;
    border-radius: 14px;
    color: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms, transform 180ms;
    z-index: 3200;
    text-align: center;
    box-shadow: 0 14px 32px rgba(0,0,0,0.16);
}
.status-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.status-message.info { background: rgba(42, 53, 95, 0.95); }
.status-message.success { background: rgba(31, 143, 73, 0.96); }
.status-message.error { background: rgba(176, 51, 51, 0.96); }
.virtual-keyboard {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    width: min(1100px, 96vw);
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    padding: 18px 18px 24px;
    background: rgba(245, 249, 245, 0.98);
    border: 1px solid var(--panel-border);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -18px 42px rgba(0,0,0,0.16);
    transition: transform 220ms ease;
    z-index: 2600;
}
.virtual-keyboard.show {
    transform: translateX(-50%) translateY(0);
}
.key-btn {
    padding: 14px 8px;
    border-radius: 12px;
    background: white;
    border: 1px solid #d9e6da;
    font-size: 18px;
    font-weight: 700;
    color: #294529;
}
.key-btn.delete {
    grid-column: span 2;
    background: #f4ebe0;
}

.header-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.stat-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: #edf6ee;
    color: #215232;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid rgba(31, 143, 73, 0.1);
}

.control-panel {
    background: #fff;
    border-radius: 24px;
    padding: 22px 24px;
    box-shadow: 0 12px 28px rgba(14, 34, 17, 0.08);
    border: 1px solid rgba(31,143,73,0.08);
}

.control-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.control-header h2 {
    color: #215232;
    font-size: 24px;
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.orders-section {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    min-height: 0;
}

.orders-column {
    background: #fff;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(14, 34, 17, 0.08);
    border: 1px solid rgba(31,143,73,0.08);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf3ed;
}

.column-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.column-header h3 {
    font-size: 18px;
    color: #215232;
}

.column-count {
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-green), #20c997);
    color: #fff;
    font-weight: 800;
}

.column-clear-btn {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
}

.orders-container {
    flex: 1;
    overflow-y: auto;
    display: grid;
    gap: 14px;
    align-content: start;
}

.order-card {
    background: #f9fbf9;
    border: 1px solid #e3ece4;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 18px rgba(14, 34, 17, 0.05);
}

.order-card.status-pending { border-left: 6px solid #d6a339; }
.order-card.status-preparing { border-left: 6px solid #1f8f49; }
.order-card.status-ready { border-left: 6px solid #215ed6; }

.order-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.order-number {
    font-size: 21px;
    font-weight: 800;
    color: #1d2b1d;
}

.customer-name,
.order-time {
    color: #677567;
    font-size: 14px;
}

.order-total {
    font-size: 26px;
    font-weight: 800;
    color: #1f8f49;
    margin-bottom: 10px;
}

.payment-status {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.payment-status.pending {
    background: #fff3d7;
    color: #8a6700;
}

.payment-status.success {
    background: #e9f7ec;
    color: #215232;
}

.items-list {
    list-style: none;
    display: grid;
    gap: 8px;
    color: #475547;
    margin: 0;
    padding: 0;
}

.items-list li {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #edf3ed;
}

.notification {
    position: fixed;
    right: 20px;
    bottom: 20px;
}

.btn-close-modal {
    background: #edf6ee;
    color: #215232;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 18px;
}

.kitchen-screen {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.kitchen-screen .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(248,250,248,0.98), rgba(240,244,240,0.98));
    border-bottom: 1px solid rgba(31, 143, 73, 0.08);
}

.kitchen-header-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.kitchen-subtitle {
    font-size: 12px;
    color: #6a786b;
    font-weight: 600;
}

.kitchen-stats {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

.kitchen-layout {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100vh - 84px);
    min-height: calc(100vh - 84px);
    overflow: hidden;
    padding: 10px 12px 12px;
    gap: 10px;
}

.kitchen-layout .control-panel {
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.96);
}

.kitchen-layout .control-header {
    gap: 12px;
}

.kitchen-layout .control-header h2 {
    font-size: 15px;
    color: #4a5b4b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.kitchen-layout .orders-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
    height: 100%;
}

.kitchen-layout .orders-column {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 10px;
    border-radius: 16px;
    min-height: 0;
    height: 100%;
}

.kitchen-layout .column-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    background: transparent;
}

.kitchen-layout .column-header h3 {
    font-size: 15px;
}

.kitchen-layout .column-count {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
}

.kitchen-layout .orders-container {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 143, 73, 0.45) transparent;
}

.kitchen-layout .order-card {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 14px;
}

.kitchen-layout .order-header {
    margin-bottom: 0;
    gap: 8px;
}

.kitchen-layout .order-number {
    font-size: 15px;
    line-height: 1.1;
}

.kitchen-layout .customer-name,
.kitchen-layout .order-time {
    font-size: 11px;
}

.kitchen-layout .order-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.kitchen-layout .order-total {
    font-size: 19px;
    margin-bottom: 0;
    line-height: 1;
}

.kitchen-layout .payment-status {
    padding: 5px 8px;
    font-size: 10px;
    margin-bottom: 0;
    white-space: nowrap;
}

.kitchen-layout .items-list {
    gap: 4px;
}

.kitchen-layout .items-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.15;
}

.kitchen-layout .item-qty {
    font-weight: 800;
    color: #215232;
}

.kitchen-layout .item-name {
    min-width: 0;
}

.kitchen-layout .control-buttons {
    gap: 8px;
}

.kitchen-layout .control-buttons .btn-primary,
.kitchen-layout .control-buttons .btn-secondary,
.kitchen-layout .column-clear-btn,
.kitchen-layout .modal-buttons .btn-primary,
.kitchen-layout .modal-buttons .btn-secondary {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
}

.kitchen-layout .modal-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 2px;
}

.kitchen-layout .modal-buttons .btn-primary:only-child,
.kitchen-layout .modal-buttons .btn-secondary:only-child {
    grid-column: 1 / -1;
}

.kitchen-layout .more-items {
    background: #eef4ee;
    color: #4f5f50;
    font-weight: 700;
}

.ready-notification { position: fixed; bottom: 20px; right: 20px; z-index: 3000; animation: notifSlide 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.ready-notification-content { background: linear-gradient(135deg, var(--primary-green), #1E8449); color: white; padding: 32px; border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,0.25); text-align: center; min-width: 300px; }
.ready-emoji { font-size: 64px; margin-bottom: 16px; animation: jump 0.6s ease-in-out infinite; }
.ready-notification-content h3 { font-size: 28px; margin: 0 0 8px 0; }
.btn-ready-close { background: #FFC107; color: var(--text-dark); padding: 10px 24px; border-radius: 8px; font-weight: 700; margin-top: 16px; }

@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rotate { from { transform: rotate(-15deg) scale(0.8); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes bounce { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes cardFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes itemAppear { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes notifSlide { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes jump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

@media (max-width: 1380px) {
    .welcome-steps { grid-template-columns: 1fr; }
}
@media (max-width: 1280px) {
    .content-wrapper { flex-direction: column; }
    .cart-panel { width: 100%; max-height: 340px; }
    .orders-section { grid-template-columns: 1fr; }
    .kitchen-layout .orders-section {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        overflow-x: auto;
        overflow-y: hidden;
        align-items: start;
        gap: 10px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .kitchen-layout .orders-column {
        min-width: 260px;
        height: auto;
        max-height: none;
        padding: 10px;
    }
}
@media (max-width: 1024px) {
    .content-wrapper { flex-direction: column; }
    .cart-panel { width: 100%; max-height: 300px; }
    .control-header { flex-direction: column; align-items: stretch; }
    .header-stats { justify-content: flex-start; }
    .kitchen-screen .app-header {
        grid-template-columns: 1fr;
    }
    .kitchen-stats {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .kitchen-layout {
        height: calc(100vh - 112px);
        min-height: calc(100vh - 112px);
    }
    .kitchen-layout .orders-section {
        grid-template-columns: repeat(3, minmax(240px, 1fr));
        overflow-x: auto;
    }
    .kitchen-layout .orders-column {
        min-width: 240px;
        height: auto;
    }
}
@media (max-width: 768px) {
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .welcome-screen-professional { padding: 14px; }
    .welcome-brand-card { padding: 22px 20px 26px; gap: 18px; }
    .welcome-watermark { right: 14px; top: 14px; bottom: auto; left: auto; width: min(150px, 28vw); }
    .welcome-ad-caption { right: 14px; bottom: 14px; max-width: min(420px, calc(100vw - 28px)); }
    .menu-showcase-slide { padding: 22px 18px; }
    .menu-showcase-shell { width: min(100%, calc(100vw - 36px)); grid-template-columns: 1fr; gap: 18px; min-height: auto; }
    .menu-showcase-bg { inset: 0; border-radius: 28px; }
    .menu-showcase-copy { padding: 20px; }
    .menu-showcase-copy h3 { font-size: 28px; }
    .welcome-logo { width: min(52vw, 280px); }
    .header-brand-logo { width: 48px; height: 48px; border-radius: 14px; }
    .header-title { font-size: 17px; }
    .app-header { align-items: flex-start; flex-direction: column; }
    .header-center { width: 100%; text-align: left; }
    .btn-back, .btn-cart-toggle { width: 100%; }
    .search-section { padding: 14px; }
    .kitchen-layout .orders-section {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
        overflow-x: auto;
    }
    .kitchen-layout .orders-column {
        min-width: 220px;
    }
}
@media (max-width: 480px) {
    .menu-grid { grid-template-columns: 1fr; gap: 10px; }
    .cart-panel { max-height: 250px; }
    .content-wrapper { padding: 12px; gap: 12px; }
    .product-card { grid-template-columns: 120px minmax(0,1fr); min-height: 156px; }
    .product-info { padding: 10px; }
    .product-name { font-size: 14px; }
    .product-description { font-size: 12px; }
    .btn-add-to-cart { padding: 8px 10px; font-size: 12px; }
    .welcome-title { font-size: 30px; }
    .welcome-subtitle { font-size: 16px; }
    .control-panel, .orders-column { border-radius: 18px; }
}

body.kitchen-screen {
    overflow: hidden;
    height: 100vh;
    min-height: 100vh;
}

/* ========================================
   NOTIFICACIÓN DE PEDIDO LISTO
   ======================================== */
.ready-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    color: white;
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    animation: pulseReady 1s infinite;
}

.ready-notification h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.ready-notification p {
    font-size: 2rem;
    margin: 10px 0;
}

.ready-notification button {
    background: white;
    color: var(--primary);
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

@keyframes pulseReady {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}
