/* Avito-style Modern Design */

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

:root {
    --primary: #0af;
    --primary-dark: #0095da;
    --success: #5cb85c;
    --danger: #d9534f;
    --text: #222;
    --text-secondary: #666;
    --text-light: #999;
    --bg: #f7f7f7;
    --bg-white: #fff;
    --border: #e5e5e5;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 10;
    padding: 12px 16px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: relative;
}

.header-search-container {
    flex: 1;
    margin-right: 6px;
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.telegram-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.telegram-login-btn:hover {
    background: var(--primary-hover, #0088cc);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.telegram-login-btn:active {
    transform: translateY(0);
}

.telegram-login-btn svg {
    flex-shrink: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent; /* Убрать синий фон */
    display: flex; /* Показывать сразу, без задержки */
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    overflow: hidden; /* Предотвратить "сползание" */
    position: relative; /* Для правильного позиционирования */
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.user-avatar.loaded {
    display: flex;
    opacity: 1;
}

/* Убрать синий фон при наличии изображения */
.user-avatar:has(img) {
    background: transparent;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.category-filter-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
    position: relative;
    overflow: visible;
    z-index: 1;
}

.category-filter-btn:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    color: var(--primary);
}

.category-filter-btn:active {
    transform: scale(0.95);
}

.category-filter-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    z-index: 2;
}

.notification-bell {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
    position: relative;
    overflow: visible;
    z-index: 1;
}

.notification-bell:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    color: var(--primary);
}

.notification-bell:active {
    transform: scale(0.95);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    color: white;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--bg-white);
    box-sizing: border-box;
    z-index: 10;
    pointer-events: none;
}


.search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    background: var(--bg);
    border-radius: 16px;
    padding: 4px 8px;
    transition: all 0.3s ease;
    width: 100%;
    height: 36px;
    min-height: 36px;
}

.header-search {
    width: 100%;
}

.header-search-container {
    position: relative;
}

.header-search.search-expanded {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 12px;
    z-index: 1000;
    width: auto;
    background: var(--bg-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: none;
    height: 36px;
    min-height: 36px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 14px;
    height: 14px;
    stroke: var(--text-light);
    stroke-width: 2;
    fill: none;
    pointer-events: none;
    z-index: 1;
}

.search-bar input {
    width: 100%;
    padding: 4px 8px 4px 28px;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    background: transparent;
    transition: all 0.3s ease;
    flex: 1;
    height: 28px;
    min-height: 28px;
    box-sizing: border-box;
    outline: none;
    line-height: 20px;
    margin: 0;
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-bar input:focus {
    outline: none;
}

.header-search.search-expanded input {
    background: transparent;
    border: none;
    box-shadow: none;
    height: 28px;
    min-height: 28px;
    padding: 4px 8px 4px 28px;
    margin: 0;
}

.geolocation-btn {
    flex-shrink: 0;
    width: auto;
    min-width: auto;
    height: 40px;
    padding: 0 12px;
    margin-left: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    color: var(--text-secondary);
    border-left: none;
    box-sizing: border-box;
    line-height: 1;
}

.geolocation-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.geolocation-btn:hover {
    background: var(--bg-white);
    border-color: var(--success);
    color: var(--success);
}

.geolocation-btn.active {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.geolocation-btn svg {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.geolocation-btn.active svg {
    animation: compass-rotate 3s linear infinite;
}

.geolocation-btn.active svg circle:last-child {
    fill: var(--success);
}

.geolocation-btn:active svg {
    transform: rotate(45deg);
}

@keyframes compass-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.geolocation-loading-spinner {
    animation: geolocation-spin 1s linear infinite;
}

@keyframes geolocation-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Categories */

.category-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.category-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
    color: var(--text);
}

.category-modal-item:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

.category-modal-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-modal-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}


.category-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-white);
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.category-chip .category-icon {
    font-size: 16px;
    line-height: 1;
}

.category-chip svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-filter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    margin-left: -4px;
    flex-shrink: 0;
    animation: filterAppear 0.3s ease;
    position: relative;
    z-index: 1;
}

.category-filter-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
}

@keyframes filterAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Distance Filter */
.distance-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.distance-filter::-webkit-scrollbar {
    display: none;
}

.distance-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-white);
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.distance-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.distance-chip.active {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--primary);
}

.tab-icon {
    flex-shrink: 0;
    opacity: 0.8;
    transition: var(--transition);
}

.tab.active .tab-icon {
    opacity: 1;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Tab Content */
.tab-content {
    display: none;
    position: relative;
    min-height: calc(100vh - 280px);
}

.tab-content.active {
    display: block;
}

/* Sub-tabs для раздела "Мои" */
.sub-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 60px;
    z-index: 5;
}

.sub-tab {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sub-tab .count-badge {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.sub-tab.active .count-badge {
    background: rgba(255, 255, 255, 0.3);
}

.sub-tab:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.sub-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

/* Listings */
.listings-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 16px;
    min-height: 200px;
    position: relative;
}

@media (max-width: 640px) {
    .listings-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
        min-height: 200px;
    }
}

@media (max-width: 250px) {
    .listings-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
}

/* Listing Card */
.listing-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

.listing-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.listing-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    background: linear-gradient(135deg, #d5d5d5 0%, #aa91c3 100%);
    overflow: hidden;
}

.listing-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-no-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-no-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
}

.listing-no-photo-placeholder svg {
    width: 80px;
    height: 80px;
    fill: currentColor;
}

.listing-favorite-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.listing-favorite-btn svg {
    width: 18px;
    height: 18px;
}

.listing-favorite-btn:hover {
    transform: scale(1.1);
    background: white;
}

.listing-favorite-btn.active {
    color: #e74c3c;
    animation: heartBeat 0.3s ease;
}

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

.photo-count {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.photo-count svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.photo-count span {
    line-height: 1;
}

.listing-content {
    padding: 10px;
}

.listing-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.listing-brief-info {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.listing-distance {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
    margin-top: 4px;
}

.listing-distance svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
}

.listing-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.4;
    max-height: 2.8em;
}

.listing-city {
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.listing-date {
    font-size: 10px;
    color: var(--text-light);
    white-space: nowrap;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,170,255,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 50;
}

.fab svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 3;
    fill: none;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,170,255,0.5);
}

.fab:active {
    transform: scale(0.95);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    animation: modalFadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    will-change: backdrop-filter;
    animation: overlayBlur 0.2s ease;
}

@keyframes overlayBlur {
    from {
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease;
}

.modal-content.modal-view {
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-content.modal-view #viewModalBody {
    overflow-y: auto;
    flex: 1;
}

/* Полноэкранное модальное окно для создания/редактирования */
.modal-content.modal-fullscreen {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.modal-content.modal-fullscreen .create-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.modal-content.modal-fullscreen .form-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px;
}

.modal-content.modal-fullscreen .modal-header {
    flex-shrink: 0;
    position: relative;
    z-index: 11;
}

.modal-content.modal-fullscreen .form-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Полноэкранное модальное окно уведомлений на мобильных */
@media (max-width: 768px) {
    .notification-modal-content {
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        position: fixed !important;
        animation: modalSlideUpFull 0.3s ease;
    }
    
    @keyframes modalSlideUpFull {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .modal-content {
        left: 50%;
        transform: translateX(-50%);
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        max-width: 600px;
        border-radius: var(--radius);
        max-height: 80vh;
    }
    
    @keyframes modalSlideUp {
        from {
            opacity: 0;
            transform: translate(-50%, -40%);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%);
        }
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

/* Form */
.create-form {
    padding: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
}

.form-group label {
    position: absolute;
    left: 12px;
    top: 14px;
    color: var(--text-light);
    font-size: 15px;
    pointer-events: none;
    transition: var(--transition);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group input[data-filled] + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 8px;
    font-size: 12px;
    background: var(--bg-white);
    padding: 0 4px;
    color: var(--primary);
}

/* Photo Upload */
.photo-upload {
    margin-bottom: 20px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.photo-add-btn,
.photo-preview {
    aspect-ratio: 1;
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.photo-add-btn:hover {
    border-color: var(--primary);
    background: rgba(0,170,255,0.05);
}

.photo-add-btn svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-light);
    stroke-width: 2;
    fill: none;
    margin-bottom: 6px;
}

.photo-add-btn span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Photo Item (uploaded photos) */
.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.photo-remove-btn:hover {
    background: rgba(217, 83, 79, 0.9);
    transform: scale(1.1);
}

.photo-preview {
    border-style: solid;
    border-color: var(--primary);
    background: none;
    padding: 0;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.photo-preview:hover .photo-remove {
    opacity: 1;
}

.photo-preview.loading {
    background: linear-gradient(135deg, #e0e0e0 0%, #b5a0c9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: photoSpin 0.8s linear infinite;
}

@keyframes photoSpin {
    to {
        transform: rotate(360deg);
    }
}

.photo-counter {
    display: block;
    margin-top: 4px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 500;
}

/* Buttons */
.btn-secondary {
    background: var(--bg-white);
    color: var(--text);
    border: 2px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text-secondary);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,170,255,0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* View Modal */
.modal-view {
    padding: 0;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

/* View Modal для веб-версии (десктоп) - центрирование */
@media (min-width: 768px) {
    .modal-content.modal-view {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 800px;
        height: auto;
        max-height: 90vh;
        border-radius: var(--radius);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
    
    @keyframes modalViewFadeIn {
        from {
            opacity: 0;
            transform: translate(-50%, -45%);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%);
        }
    }
    
    .modal.active .modal-content.modal-view {
        animation: modalViewFadeIn 0.3s ease;
    }
}

/* Шапка модального окна просмотра */
.view-modal-header {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 100;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-modal-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.view-modal-back:hover {
    background: var(--bg);
    transform: scale(1.05);
}

.view-modal-back:active {
    transform: scale(0.95);
}

.view-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-modal-actions .btn-favorite-view,
.view-modal-actions .btn-share {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.view-modal-actions .btn-favorite-view:hover,
.view-modal-actions .btn-share:hover {
    background: var(--bg);
    transform: scale(1.05);
}

.view-modal-actions .btn-favorite-view:active,
.view-modal-actions .btn-share:active {
    transform: scale(0.95);
}

.view-modal-actions .btn-favorite-view.active {
    color: var(--danger);
    background: rgba(244, 67, 54, 0.1);
}

@media (max-width: 768px) {
    .modal-view {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

.view-gallery {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    background: var(--bg);
    overflow: hidden;
}

.view-gallery.swiper {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 66.67%;
    overflow: hidden;
}

.view-gallery .swiper-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.view-gallery-slide {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.view-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.view-gallery-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

.view-no-photo {
    background: linear-gradient(135deg, #d5d5d5 0%, #aa91c3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.view-no-photo-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
}

.view-no-photo-placeholder svg {
    display: block;
    margin: 0 auto 16px auto;
    opacity: 0.9;
    width: 120px;
    height: 120px;
}

.no-photo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Стрелки навигации скрыты на мобильных, показываются только на десктопе */
.view-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: none; /* Скрыты по умолчанию */
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.view-gallery-nav:hover {
    background: rgba(0,0,0,0.7);
}

.view-gallery-prev {
    left: 12px;
}

.view-gallery-next {
    right: 12px;
}

/* Показываем стрелки только на десктопе */
@media (min-width: 769px) {
    .view-gallery-nav {
        display: flex;
    }
    
    /* Стрелки навигации Swiper для галереи в веб-версии */
    .view-gallery .swiper-button-prev,
    .view-gallery .swiper-button-next {
        display: flex !important;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        color: var(--primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: var(--transition);
        z-index: 10;
    }
    
    .view-gallery .swiper-button-prev:hover,
    .view-gallery .swiper-button-next:hover {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transform: scale(1.1);
    }
    
    .view-gallery .swiper-button-prev::after,
    .view-gallery .swiper-button-next::after {
        font-size: 20px;
        font-weight: 700;
    }
    
    .view-gallery .swiper-button-prev {
        left: 16px;
    }
    
    .view-gallery .swiper-button-next {
        right: 16px;
    }
    
    /* Стрелки навигации Swiper для полноэкранного просмотрщика в веб-версии */
    .image-viewer .swiper-button-prev,
    .image-viewer .swiper-button-next {
        display: flex !important;
        width: 48px;
        height: 48px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: var(--transition);
        z-index: 10000;
    }
    
    .image-viewer .swiper-button-prev:hover,
    .image-viewer .swiper-button-next:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.1);
    }
    
    .image-viewer .swiper-button-prev::after,
    .image-viewer .swiper-button-next::after {
        font-size: 24px;
        font-weight: 700;
    }
    
    .image-viewer .swiper-button-prev {
        left: 24px;
    }
    
    .image-viewer .swiper-button-next {
        right: 24px;
    }
}

/* Скрыть стрелки на мобильных устройствах */
@media (max-width: 768px) {
    .view-gallery .swiper-button-prev,
    .view-gallery .swiper-button-next,
    .image-viewer .swiper-button-prev,
    .image-viewer .swiper-button-next {
        display: none !important;
    }
}

.view-thumbnails {
    display: none; /* Убраны превью миниатюр */
}

.view-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.view-thumbnail.active {
    border-color: var(--primary);
}

.view-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-details {
    padding: 20px;
}

.view-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.view-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}

.view-actions-top {
    display: flex;
    gap: 8px;
}

.btn-favorite-view,
.btn-share {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-favorite-view {
    color: #666;
}

.btn-favorite-view.active {
    color: #e74c3c;
    animation: heartBeat 0.3s ease;
}

.btn-favorite-view:hover,
.btn-share:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    transform: scale(1.05);
}

.btn-share:hover {
    background: var(--primary);
    color: white;
}

.btn-favorite-view:active,
.btn-share:active {
    transform: scale(0.95);
}

.view-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.view-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.view-meta-item.full-width {
    flex-basis: 100%;
}

.view-meta-item svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.view-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 16px;
    white-space: pre-wrap;
}

/* Extra Fields */
.listing-extra-fields {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

/* Report Button */
.btn-report {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.btn-report:hover {
    background: var(--bg);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-report svg {
    flex-shrink: 0;
}

/* Report Modal */
/* Report Modal Styles */
.report-modal-content {
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
}

.report-modal-header {
    padding: 24px 20px 20px;
    border-bottom: none;
}

.report-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.report-modal-body {
    padding: 0 20px 20px;
}

.report-reasons-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}

.report-reason-item {
    display: flex;
    align-items: center;
    padding: 7px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.report-reason-item:hover {
    background-color: #fafafa;
}

.report-reason-radio {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 16px;
    cursor: pointer;
    accent-color: #000;
    flex-shrink: 0;
}

.report-reason-label {
    font-size: 16px;
    color: #000;
    flex: 1;
    user-select: none;
}

.report-reason-item:has(.report-reason-radio:checked) .report-reason-label {
    font-weight: 500;
}

.report-description-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.report-description-textarea:focus {
    outline: none;
    border-color: #000;
}

.report-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.btn-report-continue {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    min-width: 120px;
}

.btn-report-continue:hover:not(:disabled) {
    background: #333;
}

.btn-report-continue:active:not(:disabled) {
    background: #000;
}

.btn-report-continue:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.extra-field-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.extra-field-item:last-child {
    border-bottom: none;
}

.extra-field-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.extra-field-value {
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

.view-author-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.view-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.view-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-author-info {
    flex: 1;
}

.view-author-name {
    font-weight: 600;
    color: var(--text);
}

.view-author-username {
    font-size: 13px;
    color: var(--text-secondary);
}

.view-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-message,
.btn-call,
.btn-contact,
.btn-edit,
.btn-delete {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-message {
    background: #0088cc;
    color: white;
}

.btn-message:hover {
    background: #006699;
}

.btn-message svg {
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-call {
    background: #5cb85c;
    color: white;
}

.btn-call:hover {
    background: #449d44;
}

.btn-call svg {
    fill: white;
}

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

.btn-contact:hover {
    background: var(--primary-dark);
}

.btn-edit {
    background: #ff9800;
    color: white;
}

.btn-edit:hover {
    background: #e68a00;
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    background: #c9302c;
}

/* Image Viewer */
.image-viewer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

.image-viewer.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-swiper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.image-viewer-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
}

.image-viewer-close:hover {
    background: rgba(255,255,255,0.2);
}

/* Скрыть стрелки на всех устройствах - используем свайп */
.image-viewer-prev,
.image-viewer-next {
    display: none !important;
}

.image-viewer-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 90%;
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
}

/* Когда контейнер содержит только empty-state, убираем grid */
.listings-container:has(.empty-state:only-child) {
    display: block;
    grid-template-columns: none;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    stroke: var(--text-light);
    stroke-width: 2;
    fill: none;
    margin: 0 auto 16px auto;
    display: block;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-light);
}

/* Loading */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Location Selection */
.location-section {
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.location-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.location-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.location-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.location-btn:active {
    transform: scale(0.98);
}

.location-btn svg {
    flex-shrink: 0;
}

@media (max-width: 400px) {
    .location-buttons {
        grid-template-columns: 1fr;
    }
}

/* Leaflet Map Custom Styles */
.custom-pin {
    background: none;
    border: none;
}

#mapContainer {
    border-radius: 8px;
    overflow: hidden;
}

.leaflet-container {
    font-family: inherit;
}

/* Fixed center marker */
.map-center-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 1000;
    pointer-events: none;
    animation: marker-bounce 0.5s ease-out;
}

@keyframes marker-bounce {
    0% { transform: translate(-50%, -120%); }
    50% { transform: translate(-50%, -95%); }
    100% { transform: translate(-50%, -100%); }
}

/* Filter Map Container */
#filterMapContainer {
    border-radius: 8px;
    overflow: hidden;
}

/* Radius Circle Overlay */
.radius-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0, 200, 83, 0.5);
    border-radius: 50%;
    background: rgba(0, 200, 83, 0.1);
    pointer-events: none;
    z-index: 999;
    transition: width 0.2s ease, height 0.2s ease;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Distance Settings Button */
.distance-chip-settings {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* Notification Categories */
.notification-category {
    margin-bottom: 12px;
    margin-left: 8px;
    margin-right: 8px;
}

.notification-category-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    gap: 0;
}

.category-arrow {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.notification-category-header.expanded .category-arrow {
    transform: rotate(180deg);
}

.notification-category-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 12px;
    flex-shrink: 0;
    cursor: pointer;
}

.notification-category-label {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}

/* Для категорий с подкатегориями (без чекбокса) - label начинается с края */
.notification-category-header.has-subcategories .notification-category-label {
    margin-left: 0;
}

.notification-subcategories {
    padding-left: 48px;
    display: none;
}

.notification-subcategories.active {
    display: block;
}

.notification-subcategory {
    display: flex;
    align-items: center;
}

.notification-subcategory input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.notification-subcategory label {
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

/* Selected Categories Chips */
.selected-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
}

.selected-category-chip svg {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.selected-category-chip svg:hover {
    opacity: 1;
}

.selected-category-chip span {
    flex: 1;
}

/* Notification Save Button */
.notification-save-btn,
.notification-categories-save-btn {
    width: calc(100% - 16px);
    margin: 16px 8px;
}

/* Notification Save Button - Mobile */
@media (max-width: 768px) {
    .notification-modal-content {
        display: flex !important;
        flex-direction: column !important;
    }
    
    #notificationModal .modal-body,
    #notificationCategoriesModal .modal-body {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        padding-bottom: 0 !important;
        overflow-y: auto !important;
    }
    
    .notification-save-btn,
    .notification-categories-save-btn {
        position: sticky !important;
        bottom: 15px !important;
        margin-top: auto !important;
        margin-bottom: 15px !important;
        margin-left: 8px !important;
        margin-right: 8px !important;
        width: calc(100% - 16px) !important;
        flex-shrink: 0 !important;
    }
}

/* Page Selector Modal */
.page-selector-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-selector-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    cursor: pointer;
}

.page-selector-item:first-child {
    border-radius: 0;
}

.page-selector-item:last-child {
    border-bottom: none;
}

.page-selector-item:hover {
    background: var(--bg);
}

.page-selector-item.active {
    background: rgba(0, 170, 255, 0.05);
    border-left: 4px solid var(--primary);
}

.page-selector-item svg:first-child {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.page-selector-item.active svg:first-child {
    color: var(--primary);
}

.page-selector-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-selector-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.page-selector-item.active .page-selector-item-title {
    color: var(--primary);
}

.page-selector-item-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.page-selector-arrow {
    flex-shrink: 0;
    color: var(--text-light);
    opacity: 0.5;
}

.page-selector-item:hover .page-selector-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Organization specific styles */
.rating-stars {
    display: flex;
    gap: 4px;
    align-items: center;
}

.rating-stars .star {
    color: #ffc107;
    font-size: 18px;
}

.rating-stars .star.empty {
    color: #e0e0e0;
}

.rating-number {
    margin-left: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.working-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.working-hours.open {
    color: var(--success);
}

.working-hours.closed {
    color: var(--danger);
}

.org-avatar {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}

.org-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 16px;
}

.org-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.org-card-body {
    padding: 16px;
}

.org-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.org-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 16px;
    font-size: 12px;
    margin-bottom: 8px;
}

.org-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}

.review-item {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.review-author {
    font-weight: 600;
    font-size: 14px;
}

.review-date {
    color: var(--text-light);
    font-size: 12px;
}

.review-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

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

.schedule-day {
    font-weight: 500;
}

.schedule-time {
    color: var(--text-secondary);
}

.star-input {
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.star-input:hover {
    transform: scale(1.2);
}

/* FAB remains at bottom */
.fab {
    bottom: 20px;
}

/* ======================================
   SPECIALISTS PAGE STYLES
   ====================================== */

/* ======================================
   SPECIALIST CARDS - NEW DESIGN
   ====================================== */

.specialist-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    margin-bottom: 16px;
}

.specialist-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Favorite Button in Card */
.specialist-favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: #999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.specialist-favorite-btn svg {
    width: 20px;
    height: 20px;
}

.specialist-favorite-btn:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.specialist-favorite-btn.active {
    color: #e74c3c;
    animation: heartBeat 0.3s ease;
}

.specialist-card-content {
    cursor: pointer;
}

.specialist-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.specialist-avatar, .specialist-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.specialist-avatar-placeholder {
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
}

.specialist-info {
    flex: 1;
}

.specialist-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.verified-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--success);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.specialist-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 16px;
    font-size: 12px;
    margin-bottom: 4px;
}

.specialist-specialization {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.specialist-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.specialist-rating .star {
    color: #ffc107;
    font-size: 16px;
}

.specialist-rating .star.empty {
    color: #e0e0e0;
}

.specialist-rating .rating-number {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 4px;
}

.specialist-experience {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.specialist-location {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.specialist-about {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.specialist-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    position: relative;
}

.specialist-gallery-preview img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-more {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* NEW CARD LAYOUT */
.spec-card-top {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.spec-card-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.spec-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.spec-card-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--border);
}

.spec-verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid var(--bg-white);
}

.spec-card-main {
    flex: 1;
    min-width: 0;
}

.spec-card-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.spec-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spec-card-rating-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
}

.spec-card-category {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 170, 255, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.spec-card-specialization {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spec-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.spec-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.spec-meta-item svg {
    flex-shrink: 0;
}

.spec-card-about {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.spec-card-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 12px;
}

.spec-gallery-thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg);
}

.spec-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spec-gallery-more {
    aspect-ratio: 1;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* Specialist Detail View */
.specialists-container {
    padding: 16px;
}

/* Avatar Preview */
.avatar-preview {
    width: 100%;
    height: 200px;
    background: var(--bg);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px dashed var(--border);
    margin-bottom: 16px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.avatar-preview:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.avatar-preview svg {
    margin-bottom: 8px;
}

.avatar-preview p {
    font-size: 14px;
}

/* Price List */
.price-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.price-service {
    flex: 2;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.price-amount {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.btn-remove-price {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove-price:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.btn-add-price {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-price:hover {
    background: var(--primary);
    color: white;
}

.btn-add-price svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ======================================
   SPECIALIST MODAL - NEW DESIGN
   ====================================== */

/* Header */
.spec-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.spec-modal-avatar-section {
    position: relative;
    margin-bottom: 16px;
}

.spec-modal-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.spec-modal-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 600;
    border: 3px solid var(--primary);
}

.spec-modal-verified {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 3px solid var(--bg-white);
}

.spec-modal-title-section {
    width: 100%;
}

.spec-modal-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.spec-modal-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 170, 255, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.spec-modal-specialization {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Stats Bar */
.spec-modal-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.spec-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.spec-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spec-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.spec-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}

.spec-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Action Buttons Row */
.spec-modal-actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

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

.spec-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.spec-action-btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.spec-action-btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.spec-action-btn-icon.active {
    background: #ffe5e5;
    border-color: #e74c3c;
    color: #e74c3c;
}

/* Sections */
.spec-modal-section {
    margin-bottom: 20px;
}

.spec-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.spec-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.spec-section-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius);
}

/* Modal Gallery */
.spec-modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.spec-modal-gallery-item {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.spec-modal-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.spec-modal-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Price List */
.spec-price-list {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius);
}

.spec-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.spec-price-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-price-service {
    font-size: 14px;
    color: var(--text-secondary);
}

.spec-price-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

/* Reviews */
.spec-reviews-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spec-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.spec-add-review-btn {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.spec-add-review-btn:hover {
    background: var(--primary-dark);
}

/* Report Button */
.spec-report-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.spec-report-btn:hover {
    background: #fff5f5;
    border-color: var(--danger);
    color: var(--danger);
}

/* Owner Actions */
.spec-owner-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.spec-owner-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.spec-edit-btn {
    background: var(--primary);
    color: white;
}

.spec-edit-btn:hover {
    background: var(--primary-dark);
}

.spec-delete-btn {
    background: var(--danger);
    color: white;
}

.spec-delete-btn:hover {
    background: #c0392b;
}

/* Contact Buttons */
.contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.contact-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.contact-btn svg {
    flex-shrink: 0;
}

/* Action Buttons */
.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-action svg {
    flex-shrink: 0;
}

/* Reviews */
.review-item {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.review-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.btn-reply {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reply:hover {
    background: var(--primary);
    color: white;
}

/* Rating Input */
.rating-input {
    display: flex;
    gap: 8px;
    font-size: 32px;
    cursor: pointer;
}

.star-input {
    color: #e0e0e0;
    transition: var(--transition);
    cursor: pointer;
}

.star-input:hover {
    transform: scale(1.2);
}

/* Bottom Navigation - removed duplicate, using styles from line 1748 */

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .specialist-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .specialist-info {
        width: 100%;
    }
    
    .specialist-gallery-preview {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .price-item {
        flex-direction: column;
    }
    
    .price-service, .price-amount {
        width: 100%;
    }
    
    .btn-action {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .specialist-card {
        background: #1e1e1e;
    }
    
    .specialist-avatar-placeholder {
        background: linear-gradient(135deg, #667eea, #764ba2);
    }
    
    .review-item {
        background: #2a2a2a;
    }
    
    .contact-btn, .btn-action, .btn-reply {
        background: #2a2a2a;
        border-color: #404040;
    }
    
    .contact-btn:hover, .btn-action:hover {
        background: var(--primary);
    }
}

/* Стили для опций автомобиля */
.equipment-section {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.equipment-group {
    margin-bottom: 24px;
}

.equipment-group:last-child {
    margin-bottom: 0;
}

.equipment-group-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.equipment-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.equipment-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.equipment-checkbox:hover {
    background: var(--bg);
}

.equipment-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.equipment-checkbox span {
    font-size: 14px;
    color: var(--text);
    user-select: none;
    line-height: 1.4;
}

.equipment-display {
    margin-top: 16px;
    padding-top: 0px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .equipment-items {
        grid-template-columns: 1fr;
    }
    
    .equipment-checkbox {
        padding: 10px;
    }
}

