:root {
    --radius: 12px;
    --bg: #ffffff; /* Белые карточки */
    --secondary-bg: #E9EEF5; /* Фирменный фон */
    --text: #333333;
    --hint: #888888;
    --link: #3F5CA9; 
    --button: #3F5CA9; /* Фирменный синий */
    --button-text: #ffffff;
    --accent: #F48C5B; /* Фирменный оранжевый */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--secondary-bg);
    background-image: url('/image/back.webp');
    background-repeat: repeat;
    background-size: 150px;
    background-attachment: fixed;
    color: var(--text);
    padding: 16px;
    margin: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

h2 { font-size: 22px; font-weight: 700; margin-bottom: 20px; color: var(--button); }
h3 { font-size: 18px; font-weight: 600; margin-top: 24px; color: var(--button); }

/* Фирменная шапка с логотипом */
.brand-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.brand-logo {
    width: 56px;
    height: 56px;
    background: var(--bg);
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(63, 92, 169, 0.15); /* Синяя тень */
    background-color: var(--bg);
}
.brand-text h1 {
    margin: 0 0 2px 0;
    font-size: 22px;
    color: var(--accent);
    font-weight: 800;
}
.brand-text span { color: var(--button); font-size: 14px; font-weight: 600; }

/* Плавная и естественная анимация появления окон */
.section { animation: smoothEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes smoothEnter { 
    0% { opacity: 0; transform: translateY(15px); } 
    100% { opacity: 1; transform: translateY(0); } 
}

.location-card {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.1s;
}
.location-card:active { transform: scale(0.98); }
.location-card b { display: block; font-size: 17px; margin-bottom: 4px; }
.location-card span { color: var(--hint); font-size: 14px; }
.location-card.disabled { opacity: 0.6; cursor: not-allowed; grayscale: 1; }
.location-card.disabled .status-tag { color: #eb5757; }

.category-pill {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--button);
    border: 1px solid var(--button);
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
}

.menu-header-wrapper {
    position: sticky; top: 0; background: var(--secondary-bg); z-index: 10; padding: 10px 0; margin-bottom: 16px;
    display: flex; gap: 8px; align-items: center;
}

.categories-scroll {
    display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
    flex-grow: 1; padding: 0 15px;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.search-btn {
    background: var(--bg); color: var(--button); border: 1px solid var(--button);
    border-radius: 20px; height: 32px; padding: 0 14px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; font-size: 14px; font-weight: 600; transition: all 0.15s ease; margin: 0;
}

.search-input-wrapper { display: none; flex-grow: 1; align-items: center; }
.search-input-wrapper.active { display: flex; }
.search-input-pill {
    width: 100%; height: 32px; border: 1px solid var(--button); border-radius: 20px; padding: 0 14px;
    outline: none; background: var(--bg); color: var(--text); font-family: inherit; font-size: 14px; margin: 0; box-sizing: border-box;
}
.close-search-btn { background: none; border: none; color: var(--hint); font-size: 18px; margin-left: 8px; padding: 0 4px; cursor: pointer; }

.category-section { margin-bottom: 24px; scroll-margin-top: 60px; }
.category-section h3 { margin-top: 0; margin-bottom: 12px; }
.items-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.item-card {
    background: var(--bg);
    padding: 8px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    margin: 0;
}
.item-image { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; background: var(--secondary-bg); }
.item-info { flex-grow: 1; display: flex; flex-direction: column; width: 100%; align-items: center; justify-content: flex-start; margin-bottom: 6px; }
.item-info h4 { margin: 0; font-size: 11px; line-height: 1.2; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }

.price-btn {
    background: var(--secondary-bg);
    color: var(--button);
    border: 1px solid var(--button);
    border-radius: 8px;
    padding: 4px 0;
    width: 100%;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: auto;
}
.price-btn:active { transform: scale(0.94); background: var(--button); color: var(--button-text); }

.cart-item-btn { background: none; border: none; color: var(--hint); font-size: 18px; cursor: pointer; padding: 4px 10px; }
.cart-item-btn:active { transform: scale(0.94); opacity: 0.8; }
.cart-item {
    background: var(--secondary-bg);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back {
    background: none;
    border: none;
    color: var(--link);
    font-weight: 500;
    padding: 8px 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.card-section {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hidden { display: none !important; }

input, textarea {
    width: 100%;
    padding: 12px;
    background: var(--secondary-bg);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 1000; overflow-y: auto; padding: 20px; }
.modal-btn { width: 100%; padding: 16px; background: var(--button); color: var(--button-text); border: none; border-radius: var(--radius); font-size: 16px; font-weight: 600; margin-top: 12px; cursor: pointer; transition: all 0.15s ease; }
.cancel-btn { background: var(--hint); margin-top: 10px; }

/* Стили для новых боксов добавок */
.addon-grid { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.addon-box {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border: 1px solid #ddd; border-radius: var(--radius);
    background: var(--bg); transition: all 0.2s ease; cursor: pointer;
}
.addon-box.selected { background: #dbe4f0; border-color: var(--button); }
.addon-box input { display: none; }
.addon-name { font-weight: 600; font-size: 14px; color: var(--text); }
.addon-price { font-weight: 700; font-size: 14px; color: var(--button); }

/* Эффекты пульсации и отклика при нажатии на кнопки */
.category-pill:active, .modal-btn:active, .btn-back:active, .search-btn:active {
    transform: scale(0.94);
    opacity: 0.8;
}