/* Основные стили для интерактивной карты ТЦ */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-light: #e9ecef;
    --gray: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 4px две 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    font-size: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--accent-color);
}

.search-container {
    display: flex;
    gap:147 15px;
    flex: 1;
    max-width: 600px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

#search-input {
    width: 100%;
    padding: CSV 12px 12px 12px 45px;
    border: 2px solid var(--gray-light);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn-location {
    padding: 12px 20px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-location:hover {
    background: #3ab4d9;
    transform: translateY(-2px);
}

/* Основной контент */
.main-content {
    display: flex;
    gap: 30px;
    min-height: 80vh;
}

/* Сайдбар */
.sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.filters {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
    font-size: 1rem;
}

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

.floor-btn {
    padding: 10px 15px;
    background: var(--gray-light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.floor-btn:hover {
    background: #dde1e7;
}

.floor-btn.active {
    background: var(--primary-color);
    color: white;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    padding: 8px 0;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray);
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-reset {
    width: 100%;
    padding: 12px;
    background: var(--gray-light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-reset:hover {
    background: #dde1e7;
}

/* Список магазинов */
.stores-list {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

.stores-list h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#stores-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.stores-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.store-item {
    padding: 15px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
}

.store-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.1);
}

.store-item-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.store-item-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-item-info h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.store-item-category {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Основная область с картой */
.map-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.map-container {
    position: relative;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    flex: 1;
    min-height: 600px;
}

/* Панель детальной информации */
.store-details-panel {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 400px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    z-index: 100;
    max-height: 90%;
    overflow-y: auto;
    transition: var(--transition);
}

.store-details-panel.hidden {
    transform: translateX(500px);
    opacity: 0;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--danger-color);
}

.store-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.store-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.store-info h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.store-category {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-badge, .floor-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.category-badge {
    color: white;
}

.floor-badge {
    background: var(--gray-light);
    color: var(--dark-color);
}

.store-description {
    margin-bottom: 20px;
    line-height: 1.7;
}

.store-contacts {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.store-contacts p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.store-contacts i {
    color: var(--primary-color);
    width: 20px;
}

.opening-hours, .promotions {
    margin-bottom: 20px;
}

.opening-hours h4, .promotions h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
}

.promotion-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--accent-color);
}

.promotion-item h5 {
    margin-bottom: 8px;
    color: var(--dark-color);
}

.promotion-item small {
    color: var(--gray);
}

.store-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-action {
    flex: 1;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-action:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Модальные окна */
.modal {
    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: 1000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow);
}

.modal-content h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-options {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.qr-option {
    flex: 1;
    text-align: center;
    padding: 20px;
    border: 2px dashed var(--gray-light);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.qr-option:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.qr-option i {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.qr-option select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    margin-top: 10px;
}

/* Результаты поиска */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
}

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

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.search-result-item div {
    flex: 1;
}

.search-result-item strong {
    display: block;
    margin-bottom: 5px;
}

.search-result-item small {
    color: var(--gray);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .store-details-panel {
        width: 350px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .btn-location {
        width: 100%;
        justify-content: center;
    }
    
    .map-container {
        min-height: 400px;
    }
    
    .store-details-panel {
        position: fixed;
        right: 10px;
        left: 10px;
        top: 10px;
        width: auto;
        max-height: 80%;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .qr-options {
        flex-direction: column;
    }
    
    /* Мобильное меню */
    .mobile-menu-btn {
        display: block !important;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 12px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.2rem;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        z-index: 1000;
        background: white;
        padding: 20px;
        transition: var(--transition);
        overflow-y: auto;
    }
    
    .sidebar.mobile-visible {
        left: 0;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Приветственное сообщение */
.welcome-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.5s ease;
}

.welcome-content {
    padding: 25px;
    position: relative;
}

.close-welcome {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
}

.welcome-tips {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tip i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.btn-got-it {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-got-it:hover {
    background: var(--secondary-color);
}

/* Баннер акций */
.promotions-banner {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    animation: fadeIn 0.5s ease;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-content i {
    font-size: 1.5rem;
    margin-right: 15px;
}

.close-banner-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: var(--transition);
}

.close-banner-btn:hover {
    opacity: 1;
}

/* Сообщения об ошибках */
.error-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--danger-color);
    color: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    z-index: 2000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.close-error {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: auto;
}

/* Кастомные тултипы */
.custom-tooltip {
    position: fixed;
    background: var(--dark-color);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark-color);
}

/* Легенда карты */
.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 300px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap:18 8px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

/* Утилитарные классы */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}