
/* Fullscreen Map Background - Under everything for glassmorphism */
.fullscreen-map-background {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    z-index: 1;
    pointer-events: auto;
}

/* Простое отображение выпадающих списков */
.subcategories-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid var(--primary-green);
    border-radius: 10px;
    padding: 0.6rem;
    min-width: 140px;
    box-shadow: 0 6px 20px var(--shadow-green);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10000;
    margin-top: 0.4rem;
    /* Принудительно убираем все ограничения */
    overflow: visible !important;
    max-height: none !important;
    clip: auto !important;
    clip-path: none !important;
    /* Убираем все ограничения по размеру */
    width: auto !important;
    height: auto !important;
}



#fullscreen-map {
    width: 100%;
    height: 100%;
    filter: brightness(1) contrast(1) saturate(1);
    opacity: 1;
    pointer-events: auto;
}

/* Leaflet container should be under panels for backdrop-filter to work */
#fullscreen-map .leaflet-container,
#fullscreen-map .leaflet-pane {
    z-index: 1 !important;
}

/* Ensure Leaflet map containers are under panels for backdrop-filter */
.fullscreen-map-background .leaflet-container,
.fullscreen-map-background .leaflet-pane,
.fullscreen-map-background .leaflet-map-pane,
.fullscreen-map-background .leaflet-tile-pane,
.fullscreen-map-background .leaflet-overlay-pane,
.fullscreen-map-background .leaflet-shadow-pane,
.fullscreen-map-background .leaflet-marker-pane,
.fullscreen-map-background .leaflet-tooltip-pane,
.fullscreen-map-background .leaflet-popup-pane {
    z-index: 1 !important;
}

/* Map should be clickable only in the right area (not under sidebar) */
.fullscreen-map-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 2;
}

/* ===== Map-first layout: left sidebar + map ===== */
.main-content {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.40) !important;
    backdrop-filter: blur(50px) saturate(220%) !important;
    -webkit-backdrop-filter: blur(50px) saturate(220%) !important;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.14);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Скрытие сайдбара при открытии детальной карточки */
.main-content.hidden-by-details {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

/* Place details should be outside main-content overflow */
/* Удалено - теперь place-details находится вне .main-content */

/* Hide similar places section (not needed in sidebar) */
.similar-places {
    display: none;
}

.similar-places.active {
    display: block;
}

/* Categories panel positioning (already defined above, this is a duplicate - keeping for reference) */

/* Places list becomes scrollable area in sidebar */
.places-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    margin: 0;
}

/* Map controls: push to the right of sidebar */
.map-zoom-controls {
    left: calc(var(--sidebar-width) + 24px);
}

.map-styles-button {
    left: calc(var(--sidebar-width) + 18px);
}

/* Badge colors (Polecane) */
.promo-badge.polecane,
.place-card-badge.polecane {
    background: linear-gradient(135deg, #FBBF24, var(--polecane-gold));
    color: #111827;
}

/* ===== Responsive: collapse sidebar on small screens ===== */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
        --categories-height: 80px;
    }

    /* Airbnb-style: карта на весь экран, карточки — горизонтальная лента внизу */
    .main-content {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        height: auto !important;
        max-height: 140px;
        bottom: 10px;
        top: auto;
        border-right: none;
        border-top: none;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none;
        z-index: 300;
        padding: 0;
        overflow: visible;
    }

    .places-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding: 6px 12px 6px 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .places-list::-webkit-scrollbar {
        display: none;
    }

    .fullscreen-map-background {
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
    }

    .categories-panel {
        left: 0;
        padding: 0 10px;
        gap: 0.4rem;
        overflow-x: auto;
        overflow-y: hidden;
        height: auto;
    }

    .filters-button-container {
        flex-shrink: 0;
    }

    .categories-container {
        flex: 1;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .filters-button,
    .category-item,
    .header-search-button,
    .header-show-all-button {
        min-height: 44px;
    }

    #fullscreen-map {
        height: calc(100vh - var(--navbar-height));
    }

    .map-zoom-controls {
        left: 16px;
        bottom: 210px;
    }

    .map-styles-button {
        left: 14px;
        bottom: 140px;
    }

    .styles-toggle {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }

    /* Dropdown стилей — открывается вправо, а не по центру */
    .styles-dropdown {
        bottom: auto;
        top: 50%;
        left: 56px;
        right: auto;
        transform: translateY(-50%);
        min-width: 180px;
    }

    .styles-dropdown::after {
        display: none;
    }

    .map-styles-button:hover .styles-dropdown,
    .styles-dropdown.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%);
    }

    /* place-details: fullscreen overlay на мобильных */
    .place-details {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        top: var(--navbar-height) !important;
        height: calc(100vh - var(--navbar-height)) !important;
    }

    .place-details.active {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        top: var(--navbar-height) !important;
        height: calc(100vh - var(--navbar-height)) !important;
        z-index: 500 !important;
    }

    .main-content.hidden-by-details {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }
}




/* ==================== RESPONSIVE: TABLETS (768px) ==================== */
@media (max-width: 768px) {
    /* Категории — горизонтальный скролл */
    .categories-panel {
        padding: 0.4rem 0.5rem;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        height: auto;
        min-height: auto;
    }

    .categories-container {
        gap: 0.35rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .category-item {
        flex: 0 0 auto;
        min-width: 68px;
        max-width: 85px;
        padding: 0.3rem 0.3rem;
        height: 58px;
    }

    .category-icon i {
        font-size: 1.15rem;
    }

    .category-item span {
        font-size: 0.68rem;
        -webkit-line-clamp: 2;
    }
}

/* ==================== RESPONSIVE: PHONES (480px) ==================== */
@media (max-width: 480px) {
    .navbar {
        padding: 0.3rem 0.5rem;
        min-height: 54px;
        height: 54px;
    }

    :root {
        --navbar-height: 54px;
    }

    .main-content {
        bottom: 8px;
        max-height: 120px;
    }

    .nav-logo img {
        width: 34px;
        height: 34px;
        margin: 0;
    }

    /* Категории — компактные чипсы, горизонтальный скролл */
    .categories-panel {
        padding: 0.3rem 0.4rem;
        gap: 0.3rem;
        height: auto;
        min-height: auto;
    }

    .categories-container {
        gap: 0.25rem;
    }

    .category-item {
        flex: 0 0 auto;
        min-width: 58px;
        max-width: 72px;
        padding: 0.25rem 0.2rem;
        height: 52px;
    }

    .category-icon i {
        font-size: 1rem;
    }

    .category-item span {
        font-size: 0.6rem;
        -webkit-line-clamp: 2;
        max-height: 2.2em;
        min-height: auto;
    }

    /* Кнопки карты — над лентой карточек */
    .map-zoom-controls {
        left: 12px;
        bottom: 185px;
    }

    .map-styles-button {
        left: 12px;
        bottom: 120px;
    }

    .styles-toggle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .styles-dropdown {
        left: 50px;
        min-width: 170px;
        padding: 0.6rem;
        border-radius: 14px;
    }

    .style-option {
        padding: 0.5rem;
        border-radius: 10px;
        gap: 0.5rem;
    }

    .style-name {
        font-size: 0.8rem;
    }

    .style-desc {
        font-size: 0.7rem;
    }

    .styles-toggle {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* Smooth scrolling and animations */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(248, 246, 240, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--primary-green) 100%);
}

/* Focus states for accessibility */
*:focus {
    outline: 2px solid var(--light-green);
    outline-offset: 2px;
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Apply animations to elements */
.content-card {
    animation: fadeInUp 0.6s ease-out;
}

.category-item {
    animation: slideInRight 0.4s ease-out;
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }
.category-item:nth-child(5) { animation-delay: 0.5s; }
.category-item:nth-child(6) { animation-delay: 0.6s; }
.category-item:nth-child(7) { animation-delay: 0.7s; }
.category-item:nth-child(8) { animation-delay: 0.8s; }

/* Стили для панели фильтров */
/* Объединенный блок фильтров */
.filters-unified {
  background: transparent; /* Прозрачный фон, glassmorphism от родителя */
  border-radius: 12px;
  border: none; /* Убираем зеленую рамку */
  backdrop-filter: none; /* Используем эффект от родителя */
  box-shadow: none; /* Убираем тень */
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Разделитель секций */
.filter-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--deep-green);
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--light-green);
  position: relative;
}

.filter-divider:first-child {
  margin-top: 0;
}

.filter-divider i {
  color: var(--primary-green);
  font-size: 0.85rem;
}

/* Обновленные стили для filter-content внутри объединенного блока */
.filters-unified .filter-content {
  margin-bottom: 0;
  padding: 0.3rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Убираем лишние отступы у элементов внутри объединенного блока */
.filters-unified .filter-item {
  margin-bottom: 0.15rem;
}

.filters-unified .filter-checkbox {
  margin-bottom: 0;
}

/* Стили для distance-slider внутри объединенного блока */
.filters-unified .distance-slider {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

/* Улучшенные стили для разделителей */
.filters-unified .filter-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--deep-green);
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--light-green);
  position: relative;
}

.filters-unified .filter-divider:first-child {
  margin-top: 0;
}

.filters-unified .filter-divider i {
  color: var(--primary-green);
  font-size: 0.8rem;
}

/* Анимация при наведении на разделитель */
.filters-unified .filter-divider:hover {
  color: var(--deep-green);
  border-bottom-color: var(--medium-green);
}

.filters-unified .filter-divider:hover i {
  color: var(--deep-green);
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.filter-section {
  margin-bottom: 0.8rem; /* Уменьшили с 1.5rem */
  padding: 0.8rem; /* Уменьшили с 1.2rem */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 255, 240, 0.9) 100%);
  border-radius: 12px; /* Уменьшили с 15px */
  border: 2px solid var(--light-green);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(34, 139, 34, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--light-green), var(--medium-green), var(--deep-green));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.filter-section:hover::before {
  transform: scaleX(1);
}

.filter-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(34, 139, 34, 0.15);
  border-color: var(--medium-green);
}

.filter-title {
  font-size: 1.1rem; /* Уменьшили с 1.2rem */
  font-weight: 700;
  color: var(--deep-green);
  margin-bottom: 0.6rem; /* Уменьшили с 1rem */
  padding-bottom: 0.6rem; /* Уменьшили с 0.8rem */
  border-bottom: 2px solid var(--light-green); /* Уменьшили с 3px */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.filter-title i:first-child {
  color: var(--primary-green);
  font-size: 1rem;
  margin-right: 0.3rem;
}

.filter-title span {
  flex: 1;
}

.filter-section-toggle {
  background: none;
  border: none;
  color: var(--deep-green);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.filter-section-toggle:hover {
  background: rgba(34, 139, 34, 0.1);
  transform: scale(1.1);
}

.filter-section.collapsed .filter-section-toggle i {
  transform: rotate(-90deg);
}

.filter-section.collapsed .filter-content {
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.filter-section:not(.collapsed) .filter-content {
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.filter-section:not(.collapsed) .filter-section-toggle i {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.filter-section:not(.collapsed) .filter-content {
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.filter-section.collapsed .filter-section-toggle i {
  transform: rotate(-90deg);
}

.filter-section:not(.collapsed) .filter-section-toggle i {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

/* Иконки уже добавлены в HTML, удаляем старые псевдоэлементы */

.filter-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem; /* Сильно уменьшили для компактности */
}

.filter-item {
  margin-bottom: 0.15rem; /* Сильно уменьшили */
  position: relative;
}

/* Стили для чекбоксов - компактный вариант */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem; /* Уменьшили gap */
  cursor: pointer;
  font-size: 0.85rem; /* Уменьшили размер шрифта */
  color: var(--text-dark);
  transition: all 0.2s ease;
  padding: 0.35rem 0.4rem; /* Уменьшили padding */
  border-radius: 6px;
  position: relative;
  line-height: 1.3;
}

.filter-label {
  flex: 1;
}

/* Иконка категории в фильтрах - простые иконки как в админ-панели */
.filter-checkbox .category-icon {
  display: inline-block;
  color: var(--text-medium); /* Серый цвет как в админ-панели */
  font-size: 0.9rem;
  flex-shrink: 0;
  width: auto; /* Убираем фиксированную ширину */
  height: auto; /* Убираем фиксированную высоту */
  text-align: center;
  line-height: 1;
  transition: color 0.2s ease;
  /* Убираем все стили от базового .category-icon */
  background: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.filter-checkbox:hover .category-icon {
  color: var(--primary-green);
}

.filter-checkbox:has(input:checked) .category-icon {
  color: var(--primary-green);
}

/* Индикатор подкатегорий */
.subcategory-indicator {
  font-size: 0.75rem;
  color: var(--text-medium);
  margin-left: auto;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.filter-checkbox.has-subcategories:hover .subcategory-indicator {
  color: var(--primary-green);
  transform: translateX(3px);
}

.filter-checkbox:has(input:checked) .subcategory-indicator {
  transform: rotate(90deg);
  color: var(--primary-green);
}

.filter-checkbox:hover {
  color: var(--deep-green);
  background: rgba(34, 139, 34, 0.05);
  transform: translateX(5px);
}

.filter-checkbox.sub {
  font-size: 0.8rem; /* Уменьшили с 0.9rem */
  color: var(--text-medium);
  margin-left: 1rem; /* Уменьшили отступ */
  padding: 0.25rem 0.4rem; /* Уменьшили padding */
  border-radius: 4px;
  transition: all 0.2s ease;
}

.filter-checkbox.sub:hover {
  background: rgba(34, 139, 34, 0.08);
  color: var(--deep-green);
  transform: translateX(3px);
}

.filter-checkbox input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 16px; /* Уменьшили с 20px */
  height: 16px; /* Уменьшили с 20px */
  border: 2px solid var(--medium-green);
  border-radius: 4px; /* Уменьшили с 6px */
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: white;
  box-shadow: 0 1px 4px rgba(34, 139, 34, 0.1);
}

.filter-checkbox:hover .checkmark {
  border-color: var(--deep-green);
  box-shadow: 0 4px 12px rgba(34, 139, 34, 0.2);
  transform: scale(1.1);
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark {
  background: linear-gradient(135deg, var(--deep-green), var(--primary-green));
  border-color: var(--deep-green);
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(34, 139, 34, 0.3);
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 11px; /* Уменьшили с 14px */
  font-weight: bold;
  animation: checkmarkAppear 0.2s ease;
}

@keyframes checkmarkAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Подкатегории с анимацией - компактный вариант */
.subcategories {
  margin-left: 1rem; /* Уменьшили отступ */
  margin-top: 0.3rem; /* Уменьшили */
  padding-left: 0.8rem; /* Уменьшили */
  border-left: 2px solid var(--light-green);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease, margin 0.2s ease, padding 0.2s ease;
  opacity: 0;
  transform: translateX(-5px); /* Уменьшили смещение */
}

/* Показываем подкатегории когда родительский чекбокс отмечен */
.filter-checkbox:has(input:checked) ~ .subcategories,
.filter-item:has(.filter-checkbox input:checked) .subcategories {
  max-height: 1000px;
  opacity: 1;
  transform: translateX(0);
  margin-top: 0.3rem; /* Уменьшили */
  padding-top: 0.2rem; /* Уменьшили */
  padding-bottom: 0.2rem; /* Уменьшили */
}

/* Слайдер расстояния - компактный вариант */
.distance-slider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0;
  padding: 0.6rem 0.8rem;
  background: transparent; /* Убрали зеленоватый фон */
  border-radius: 8px;
  border: none; /* Убрали зеленую рамку */
  box-shadow: none; /* Убрали тень */
  transition: opacity 0.3s ease;
}

.distance-slider.disabled {
  opacity: 0.4; /* Тусклый вид когда отключен */
  pointer-events: none;
}

.distance-slider span {
  font-size: 0.8rem;
  color: var(--deep-green);
  min-width: 30px;
  font-weight: 600;
  text-align: center;
  transition: color 0.3s ease;
}

.distance-slider.disabled span {
  color: var(--text-medium); /* Тусклый цвет текста */
  opacity: 0.5;
}

.slider {
  flex: 1;
  height: 6px; /* Уменьшили с 8px */
  border-radius: 3px; /* Уменьшили с 4px */
  background: linear-gradient(90deg, var(--light-green), var(--medium-green));
  outline: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08); /* Уменьшили тень */
  transition: all 0.3s ease;
  cursor: pointer;
}

.slider:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  opacity: 0.4; /* Еще более тусклый */
}

/* Ползунок внутри отключенного контейнера */
.distance-slider.disabled .slider {
  background: #d1d5db !important;
  opacity: 0.5;
  cursor: not-allowed;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; /* Уменьшили с 24px */
  height: 18px; /* Уменьшили с 24px */
  border-radius: 50%;
  background: linear-gradient(135deg, var(--deep-green), var(--primary-green));
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(34, 139, 34, 0.25); /* Уменьшили тень */
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15); /* Уменьшили с 1.2 */
  box-shadow: 0 3px 10px rgba(34, 139, 34, 0.35); /* Уменьшили тень */
}

/* Компактный блок Sezon - 2 колонки (внутри объединенного блока) */
.filters-unified .filter-content.season-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  padding: 0.2rem 0;
}

.filters-unified .season-checkbox {
  padding: 0.25rem 0.3rem;
  font-size: 0.8rem;
  margin: 0;
}

.filters-unified .season-checkbox .checkmark {
  width: 14px;
  height: 14px;
}

.filters-unified .season-checkbox .checkmark::after {
  font-size: 10px;
}

/* Обновляем стили для season-content внутри объединенного блока */
.filters-unified .filter-content.season-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  padding: 0.2rem 0;
}

.slider::-moz-range-thumb {
  width: 18px; /* Уменьшили с 24px */
  height: 18px; /* Уменьшили с 24px */
  border-radius: 50%;
  background: linear-gradient(135deg, var(--deep-green), var(--primary-green));
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(34, 139, 34, 0.25); /* Уменьшили тень */
}

/* Поле выбора даты */
.date-picker {
  padding: 0.8rem;
  border: 2px solid var(--light-green);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: white;
  outline: none;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 0.8rem;
  box-shadow: 0 2px 8px rgba(34, 139, 34, 0.1);
}

.date-picker:focus {
  border-color: var(--deep-green);
  box-shadow: 0 4px 16px rgba(34, 139, 34, 0.2);
  transform: translateY(-2px);
}

/* Кнопки действий */
.filter-actions {
  display: flex;
  gap: 1.2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 3px solid var(--light-green);
}

.apply-filters,
.clear-filters {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.apply-filters {
  background: linear-gradient(135deg, var(--deep-green), var(--primary-green));
  color: white;
  box-shadow: 0 4px 16px rgba(34, 139, 34, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.apply-filters .filter-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: filterCountPulse 2s infinite;
}

@keyframes filterCountPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.apply-filters:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(34, 139, 34, 0.4);
}

.apply-filters:active {
  transform: translateY(-1px);
}

.clear-filters {
  background: linear-gradient(135deg, var(--light-green), var(--medium-green));
  color: var(--deep-green);
  box-shadow: 0 4px 16px rgba(34, 139, 34, 0.2);
}

.clear-filters:hover {
  background: linear-gradient(135deg, var(--medium-green), var(--deep-green));
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(34, 139, 34, 0.3);
}

/* Счетчик выбранных фильтров */
.filter-counter {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--deep-green);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  animation: counterPulse 0.3s ease;
}

@keyframes counterPulse {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Адаптивность */
@media (max-width: 768px) {
  .filter-section {
    padding: 1rem;
    margin-bottom: 1.2rem;
  }
  
  .filter-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .distance-slider {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .subcategories {
    margin-left: 1.5rem;
  }
  
  .filter-checkbox {
    padding: 0.4rem;
  }
}

@media (max-width: 480px) {
  .filter-section {
    padding: 0.8rem;
    border-radius: 12px;
  }
  
  .filter-title {
    font-size: 1.1rem;
  }
  
  .filter-checkbox {
    font-size: 0.9rem;
    padding: 0.3rem;
  }
  
  .apply-filters,
  .clear-filters {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* Стили для поисковой строки - без фона (удалены дублирующиеся стили) */

/* ПРИНУДИТЕЛЬНОЕ ВЫРАВНИВАНИЕ ШАПКИ - ДОЛЖНО БЫТЬ В КОНЦЕ ФАЙЛА */
.navbar .nav-container {
    display: grid !important;
    grid-template-columns: auto auto 1fr auto !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.navbar .nav-logo {
    justify-self: start !important;
}

.navbar .header-search-container {
    justify-self: start !important;
    max-width: 350px !important;
    width: auto !important;
}

.navbar .header-spacer {
    justify-self: stretch !important;
}

.navbar .header-actions {
    justify-self: end !important;
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

.header-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: white;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.header-search-input:focus {
  background: rgba(255, 255, 255, 0.15);
}

.header-search-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.header-search-button,
.header-show-all-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-button:hover,
.header-show-all-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

/* Подсказки поиска */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--light-green);
  border-top: none;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 8px 25px rgba(34, 139, 34, 0.15);
  z-index: 10050 !important; /* Выше панели категорий (200) и шапки (10000) */
  max-height: 300px;
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--light-green);
  position: relative;
}

.search-suggestion:last-child {
  border-bottom: none;
}

.search-suggestion:hover {
  background: rgba(34, 139, 34, 0.08);
  transform: translateX(5px);
}

.search-suggestion i {
  color: var(--deep-green);
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.search-suggestion span {
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
}

.search-suggestion small {
  color: var(--text-medium);
  font-size: 0.8rem;
  background: var(--light-green);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-weight: 500;
}

/* Анимации для результатов поиска */
@keyframes searchMarkerPulse {
  0% { 
    transform: scale(1); 
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4); 
  }
  50% { 
    transform: scale(1.1); 
    box-shadow: 0 6px 20px rgba(34, 139, 34, 0.6); 
  }
  100% { 
    transform: scale(1); 
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4); 
  }
}

@keyframes slideInSearchResults {
  0% { transform: translateX(100%); }
  100% { transform: translateX(0); }
}

/* Уведомления о результатах поиска */
.search-notification {
  position: fixed;
  top: 120px;
  right: 20px;
  background: linear-gradient(135deg, var(--deep-green), var(--primary-green));
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(34, 139, 34, 0.3);
  font-weight: 600;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.5s ease;
  animation: slideInSearchResults 0.5s ease forwards;
}

/* Адаптивность для поиска - подсказки под навбаром на мобильных */
@media (max-width: 768px) {
  .search-suggestions {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    width: 100%;
    max-height: 50vh;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
}

