/* Стили шапки и общих элементов — вынесены из header.php */
/* Общий фон страницы */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #efebe6; /* бежевый фон как в макете AYVO */
}

/* Toast notifications */
.max-toast-container {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}
.max-toast {
    background: #111827;
    color: #f9fafb;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
    opacity: 0;
    transform: translateY(10px);
    animation: max-toast-in .2s forwards;
}
.max-toast-success {
    border-left: 3px solid #22c55e;
}
.max-toast-remove {
    border-left: 3px solid #f97316;
}
@keyframes max-toast-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes max-toast-out {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

/* ===== ХЭДЕР В СТИЛЕ AYVO ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    padding: 16px 0 10px;
}
.header-top {
    
    margin: 0 20px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;

    background: #fdfaf3; /* кремовая плашка */
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}
.burger:hover {
    background: #ffffff;
}
.burger:active {
    transform: scale(0.97);
}
.burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #0f3b36;
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ЛОГОТИП */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img,
.logo-svg {
    display: block;
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: none;
}

/* Кнопка выбора города */
.city-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(19, 78, 74, 0.12);
    background: #f6f1e9;
    color: #0f3b36;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.1s;
    flex-shrink: 0;
}
.city-btn:hover {
    background: #f1e7da;
    border-color: rgba(19, 78, 74, 0.25);
}
.city-btn:active {
    transform: scale(0.97);
}
.city-btn-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e3d6c5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.city-btn-label {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== НАВИГАЦИЯ В ШАПКЕ ===== */
.nav { 
    display: flex; 
    gap: 8px; 
    margin-left: auto; 
}
.nav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #0f3b36;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.nav-btn:hover { background: rgba(12, 53, 47, 0.06); }
.nav-icon { font-size: 22px; line-height: 1; }

.nav-icon-svg,
.bottom-nav-btn-icon-svg {
    width: 22px;
    height: 22px;
    display: block;
}
.bottom-nav-btn-icon-svg {
    width: 20px;
    height: 20px;
}

/* перекрашиваем stroke у иконок шапки */
.nav-icon-svg path,
.nav-icon-svg circle {
    stroke: #0f3b36;
}

body.menu-open { overflow: hidden; }
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 200;
}
.overlay.show { opacity: 1; visibility: visible; }

/* ===== НИЖНЯЯ НАВИГАЦИЯ (МОБИЛЬНАЯ) ===== */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: none;
    padding: 6px 6px env(safe-area-inset-bottom, 6px);
}
.bottom-nav-inner {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 4px;
}
.bottom-nav-btn {
    position: relative;
    flex: 1;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: #6B7280;
    cursor: pointer;
}
.bottom-nav-btn-icon {
    font-size: 20px;
    line-height: 1;
}
.bottom-nav-btn.active { color: #7c3aed; }

/* ===== БЕЙДЖИ СЧЁТЧИКОВ ===== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f43f5e;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    pointer-events: none;
}
.badge-nav {
    position: absolute;
    top: 4px;
    right: 6px;
    transform: translate(50%, -50%);
}
.badge-bottom {
    position: absolute;
    top: 2px;
    right: 16px;
    transform: translate(50%, -50%);
    font-size: 10px;
    min-width: 16px;
}
/* Скрываем бейдж, если в нём 0 */
.badge[data-count="0"] {
    display: none;
}

@media (max-width: 768px) {
    .header-top { flex-wrap: wrap; }
    .city-btn { order: 2; }

    .nav { display: none; }
    .burger { display: none; }

    .bottom-nav { display: block; }
    body { padding-bottom: 64px; }
}
