/* ============================================
   KITCHEN MAP — основной CSS
   ============================================ */

.kitchen-map-wrapper {
    display: flex;
    height: calc(100vh - 80px);
    background: #f7f7f5;
    font-family: 'Manrope', -apple-system, sans-serif;
}

#kitchenMap {
    width: 60%;
    height: 100%;
    background: #e8e8e3;
    border-right: 1px solid #eee;
}

#kitchenMap [class*="copyright"] {
    font-size: 10px !important;
}

.kitchen-list-wrapper {
    width: 40%;
    height: 100%;
    overflow-y: auto;
    background: #fff;
    border-left: 1px solid #ebebeb;
}

.kitchen-list {
    padding: 16px;
    scroll-behavior: smooth;
}

.kitchen-list::-webkit-scrollbar {
    width: 6px;
}

.kitchen-list::-webkit-scrollbar-track {
    background: transparent;
}

.kitchen-list::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 3px;
}

.kitchen-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ============================================
   ФИЛЬТРЫ
   ============================================ */

.kitchen-filters {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    position: sticky;
    top: 0;
    z-index: 20;
}

.kitchen-filter {
    flex: 1;
    position: relative;
    min-width: 0;
}

.kitchen-filter label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.kitchen-filter:focus-within label {
    color: #0a0a0a;
}

.kitchen-filter select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #0a0a0a;
    background-color: #f7f7f5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230a0a0a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.kitchen-filter select:hover {
    background-color: #f0f0ec;
    border-color: #e5e5e5;
}

.kitchen-filter select:focus {
    background-color: #fff;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 4px rgba(10, 10, 10, 0.06);
}

.kitchen-filter select.is-active {
    background-color: #fff;
    border-color: #0a0a0a;
    font-weight: 600;
}

/* Чекбоксы */
.kitchen-features {
    display: flex;
    gap: 12px;
    padding: 0 24px 20px;
    flex-wrap: wrap;
}

.kitchen-feature {
    position: relative;
}

.kitchen-feature input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kitchen-feature label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #0a0a0a;
    background: #f7f7f5;
    border: 1.5px solid transparent;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.kitchen-feature label::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border: 1.5px solid #ccc;
    border-radius: 5px;
    background: #fff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.kitchen-feature label:hover {
    background: #f0f0ec;
    border-color: #e5e5e5;
}

.kitchen-feature input:checked + label {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}

.kitchen-feature input:checked + label::before {
    background: #fff;
    border-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%230a0a0a' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Счётчик + сброс */
.kitchen-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #ebebeb;
    background: #fafaf8;
}

.kitchen-counter strong {
    color: #0a0a0a;
    font-weight: 600;
}

.kitchen-reset {
    background: none;
    border: none;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.kitchen-reset:hover {
    background: #f0f0ec;
    color: #0a0a0a;
}

/* ============================================
   КАРТОЧКИ
   ============================================ */

.mapList-item {
    position: relative;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: #fff;
    border: 1.5px solid #ebebeb;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: kitchenCardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.mapList-item:nth-child(1) { animation-delay: 0.02s; }
.mapList-item:nth-child(2) { animation-delay: 0.04s; }
.mapList-item:nth-child(3) { animation-delay: 0.06s; }
.mapList-item:nth-child(4) { animation-delay: 0.08s; }
.mapList-item:nth-child(5) { animation-delay: 0.10s; }
.mapList-item:nth-child(6) { animation-delay: 0.12s; }
.mapList-item:nth-child(7) { animation-delay: 0.14s; }
.mapList-item:nth-child(8) { animation-delay: 0.16s; }
.mapList-item:nth-child(9) { animation-delay: 0.18s; }
.mapList-item:nth-child(10) { animation-delay: 0.20s; }

.mapList-item:hover {
    border-color: #d4d4d4;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.mapList-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background: #ee1623;
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mapList-item h3 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #0a0a0a;
    transition: color 0.2s ease;
}

.mapList-item p {
    margin: 4px 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #666;
    transition: color 0.2s ease;
}

.mapList-item p:first-of-type {
    color: #0a0a0a;
    font-weight: 500;
}

.mapList-item p:last-of-type {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    background: #0a0a0a;
    color: #fff;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
}

/* Фото и ссылка — скрыты, пока не active */
.mapList-item .img,
.mapList-item .link {
    display: none;
}

.mapList-item .img {
    margin: -18px -20px 16px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.mapList-item .img img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.mapList-item .link {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.25s ease;
    width: fit-content;
}

/* ============================================
   АКТИВНАЯ КАРТОЧКА
   ============================================ */

.mapList-item.active {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    padding: 20px;
}

.mapList-item.active::before {
    transform: scaleY(1);
}

.mapList-item.active .img,
.mapList-item.active .link {
    display: block;
}

.mapList-item.active h3 {
    color: #fff;
}

.mapList-item.active p {
    color: #c9c9c9;
}

.mapList-item.active p:first-of-type {
    color: #fff;
}

.mapList-item.active p:last-of-type {
    background: #fff;
    color: #0a0a0a;
}

.mapList-item.active .title {
    color: #9c9c9c;
}

.mapList-item.active .text {
    color: #fff;
}

.mapList-item.active .img {
    margin: -20px -20px 16px;
    border-radius: 14px 14px 0 0;
}

.mapList-item.active:hover .img img {
    transform: scale(1.05);
}

.mapList-item.active .link:hover {
    color: #ee1623;
    border-color: #ee1623;
}

/* Анимация появления */
@keyframes kitchenCardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Пустой список */
.kitchen-empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ============================================
   ПОПАП НА КАРТЕ
   ============================================ */

#kitchenMap [class$="-balloon"] {
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18) !important;
    border: none !important;
    overflow: hidden;
    animation: kitchenBalloonIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#kitchenMap [class$="-balloon__content"] {
    padding: 0 !important;
    font-family: inherit !important;
}

#kitchenMap [class$="-balloon__content-header"] {
    font-family: 'Manrope', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0a0a0a !important;
    padding: 18px 22px 0 !important;
    border-bottom: none !important;
}

.kitchen-balloon {
    padding: 20px 22px;
    font-family: 'Manrope', -apple-system, sans-serif;
    min-width: 240px;
    max-width: 300px;
}

.kitchen-balloon p {
    margin: 0 0 8px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #0a0a0a;
}

.kitchen-balloon p:first-child {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}

.kitchen-balloon p:last-child {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #0a0a0a;
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
}

.kitchen-balloon a {
    display: inline-block;
    margin: 4px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #0a0a0a;
    text-decoration: none;
    border-bottom: 1.5px solid #e5e5e5;
    padding-bottom: 2px;
    transition: all 0.2s ease;
}

.kitchen-balloon a:hover {
    color: #ee1623;
    border-color: #ee1623;
}

@keyframes kitchenBalloonIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   МОБИЛКА (<1024px)
   ============================================ */

@media (max-width: 1023px) {
    .kitchen-map-wrapper {
        display: block;
        height: auto;
    }

    #kitchenMap {
        width: 100%;
        height: clamp(220px, 40vh, 320px);
        border-right: none;
        border-bottom: 1px solid #ebebeb;
    }

    .kitchen-list-wrapper {
        width: 100%;
        height: auto;
        overflow-y: visible;
        border-left: none;
        padding: 0;
    }

    .kitchen-list {
        padding: 12px;
    }

    .kitchen-filters {
        padding: 14px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .kitchen-filter {
        flex: 1 1 calc(50% - 5px);
    }

    .kitchen-filter label {
        font-size: 9px;
        margin-bottom: 4px;
    }

    .kitchen-filter select {
        padding: 11px 34px 11px 14px;
        font-size: 13px;
        border-radius: 10px;
        background-position: right 12px center;
    }

    .kitchen-features {
        padding: 0 16px 14px;
        gap: 8px;
    }

    .kitchen-feature label {
        padding: 8px 14px;
        font-size: 12px;
    }

    .kitchen-counter {
        padding: 10px 16px;
        font-size: 12px;
    }

    .mapList-item {
        padding: 14px 16px;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .mapList-item h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .mapList-item p {
        font-size: 12.5px;
    }

    .mapList-item p:last-of-type {
        margin-top: 10px;
        padding: 5px 10px;
        font-size: 11.5px;
    }

    .mapList-item.active {
        padding: 16px;
    }

    .mapList-item.active .img {
        margin: -16px -16px 12px;
    }

    .mapList-item.active .img img {
        height: 140px;
    }

    .mapList-item .link {
        margin-top: 12px;
        font-size: 13px;
    }

    .kitchen-balloon {
        min-width: 200px;
        max-width: 260px;
        padding: 16px 18px;
    }
}

/* ============================================
   ОЧЕНЬ УЗКИЕ (<480px)
   ============================================ */

@media (max-width: 479px) {
    #kitchenMap {
        height: clamp(200px, 35vh, 280px);
    }

    .kitchen-list {
        padding: 8px;
    }

    .mapList-item {
        padding: 12px 14px;
    }

    .mapList-item h3 {
        font-size: 14px;
    }
}


/* ============================================
   ТАБЫ — как у Novikov (рамка + чёрная пилюля)
   ============================================ */

.kitchen-tabs {
    position: relative;
    display: inline-flex;
    padding: 4px;

    /* ВНЕШНЯЯ ОБВОДКА — серая рамка */
    border: 1px solid #e5e5e5;
    border-radius: 60px;
    background: #fff;

    isolation: isolate;
}

/* ЧЁРНАЯ ПИЛЮЛЯ — внутри, едет за активным */
.kitchen-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    border-radius: 60px;
    background: #0a0a0a;
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
    pointer-events: none;
}

/* Пилюля едет вправо */
.kitchen-tabs[data-active="1"]::before {
    transform: translateX(100%);
}

.kitchen-tabs[data-active="0"]::before {
    transform: translateX(0);
}

/* ============================================
   ТАБЫ — пилюля с переездом (ссылки)
   ============================================ */

.kitchen-tabs {
    position: relative;
    display: inline-flex;
    padding: 4px;
    border: 1px solid #e5e5e5;
    border-radius: 60px;
    background: #fff;
    isolation: isolate;
}

.kitchen-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    border-radius: 60px;
    background: #0a0a0a;
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
    pointer-events: none;
}

.kitchen-tabs[data-active="1"]::before {
    transform: translateX(100%);
}

.kitchen-tabs[data-active="0"]::before {
    transform: translateX(0);
}

/* ============================================
   САМ ТАБ — теперь это ссылка
   ============================================ */

.kitchen-tab {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 44px;
    min-width: 130px;
    padding: 0 28px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;

    color: #0a0a0a;
    background: none;
    border: none;
    border-radius: 60px;

    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;

    transition: color 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.kitchen-tab:hover {
    color: #ee1623;
    text-decoration: none;
}

.kitchen-tab.active {
    color: #fff;
    cursor: default;
}

.kitchen-tab.active:hover {
    color: #fff;
}

/* Мобилка */
@media (max-width: 767px) {
    .kitchen-tab {
        height: 40px;
        min-width: 110px;
        padding: 0 20px;
        font-size: 12px;
    }
}