.master-profile {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.master-profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.master-experience-section {
    margin-top: 0;
}

.master-experience-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(230, 200, 140, 0.12);
    border: 1px solid rgba(230, 200, 140, 0.25);
    border-radius: 12px;
}

.master-experience-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.9;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.master-experience-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.master-experience-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.master-experience-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}

.master-profile-photo.placeholder {
    background: linear-gradient(135deg, rgba(230, 200, 140, 0.15) 0%, rgba(230, 200, 140, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.master-profile-photo.placeholder::before {
    content: '';
    width: 60px;
    height: 60px;
    background: rgba(230, 200, 140, 0.2);
    border-radius: 50%;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
}

.master-profile-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.master-profile-name {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.master-top-badge {
    display: inline-flex;
    align-items: center;
    cursor: help;
    position: relative;
}

.master-top-badge:hover::after {
    content: 'Топ мастер';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    padding: 6px 10px;
    background: rgba(58, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(230, 200, 140, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
}

.master-top-badge:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(230, 200, 140, 0.3);
    z-index: 1001;
}

.master-top-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(90%) sepia(15%) saturate(800%) hue-rotate(15deg) brightness(105%) contrast(95%);
}

/* Услуга и район в стиле опыта работы */
.master-specialization-section,
.master-district-section {
    margin-top: 0;
}

.master-specialization-card,
.master-district-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(230, 200, 140, 0.12);
    border: 1px solid rgba(230, 200, 140, 0.25);
    border-radius: 12px;
}

.master-specialization-icon,
.master-district-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.9;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.master-specialization-content,
.master-district-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.master-specialization-label,
.master-district-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.master-specialization-value,
.master-district-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}

/* Старые стили для обратной совместимости (если используются) */
.master-profile-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.9;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.master-social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.social-link:hover {
    color: var(--accent);
}

.social-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(90%) sepia(15%) saturate(800%) hue-rotate(15deg) brightness(105%) contrast(95%);
}

.social-link .material-symbols-outlined {
    font-size: 20px;
}

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

.booking-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: rgba(230, 200, 140, 0.12);
    border: 1px solid rgba(230, 200, 140, 0.25);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.booking-item:hover {
    background: rgba(230, 200, 140, 0.18);
    border-color: rgba(230, 200, 140, 0.35);
}

.booking-item:active {
    transform: scale(0.98);
}

.booking-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(90%) sepia(15%) saturate(800%) hue-rotate(15deg) brightness(105%) contrast(95%);
}

.booking-item-content .material-symbols-outlined.booking-icon {
    font-size: 24px;
    color: var(--text-secondary);
    filter: none;
}

.booking-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.booking-item-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 500;
}

.booking-item-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.master-portfolio-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portfolio-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 12px;
    background: rgba(230, 200, 140, 0.12);
    border: 1px solid rgba(230, 200, 140, 0.25);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.portfolio-link:hover {
    background: rgba(230, 200, 140, 0.18);
    border-color: rgba(230, 200, 140, 0.35);
}

.portfolio-link:active {
    transform: scale(0.98);
}

.portfolio-link-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(90%) sepia(15%) saturate(800%) hue-rotate(15deg) brightness(105%) contrast(95%);
    transition: filter 0.2s ease;
}

.portfolio-link:hover .portfolio-link-icon {
    filter: brightness(0) saturate(100%) invert(75%) sepia(20%) saturate(1000%) hue-rotate(10deg) brightness(110%) contrast(100%);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.master-works-section,
.master-portfolio-section,
.master-prices-section,
.master-booking-section,
.master-experience-section,
.master-about-section {
    margin-top: 0;
}

.master-works-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 8px;
}

.works-carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    cursor: grab;
}

.works-carousel-track:active {
    cursor: grabbing;
}

.works-carousel-track::-webkit-scrollbar {
    display: none;
}

.work-item {
    flex: 0 0 calc(50% - 6px);
    min-width: calc(50% - 6px);
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transition: transform 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    /* Убираем анимацию изменения размера */
    transition: transform 0.2s ease, flex 0s, min-width 0s;
}

.work-item:active {
    transform: scale(0.98);
}

.work-item.placeholder {
    background: linear-gradient(135deg, rgba(230, 200, 140, 0.18) 0%, rgba(230, 200, 140, 0.1) 100%);
    border: 1px solid rgba(230, 200, 140, 0.3);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(230, 200, 140, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
    min-width: 8px;
}

.carousel-indicator:hover {
    background: rgba(230, 200, 140, 0.5);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
    transform: scale(1);
}

@media (max-width: 768px) {
    .work-item {
        flex: 0 0 calc(70% - 8px);
        min-width: calc(70% - 8px);
    }
    
    .works-carousel-track {
        gap: 10px;
        padding: 4px;
    }
}

@media (max-width: 420px) {
    .work-item {
        flex: 0 0 calc(85% - 6px);
        min-width: calc(85% - 6px);
    }
}

.works-carousel-track.single {
    gap: 0;
    overflow-x: hidden;
}

.works-carousel-track.single .work-item {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    aspect-ratio: 1;
    /* Убираем анимацию при изменении размера */
    transition: transform 0.2s ease, flex 0s, min-width 0s;
}

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

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(230, 200, 140, 0.12);
    border: 1px solid rgba(230, 200, 140, 0.25);
    border-radius: 12px;
}

.price-item-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.price-item-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.3;
}

.master-about-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 16px;
    background: rgba(230, 200, 140, 0.12);
    border: 1px solid rgba(230, 200, 140, 0.25);
    border-radius: 12px;
}

/* Empty State - креативные сообщения о пустых разделах */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 20px;
    text-align: center;
    background: rgba(230, 200, 140, 0.08);
    border: 1px dashed rgba(230, 200, 140, 0.25);
    border-radius: 12px;
    min-height: 120px;
}

.empty-state-icon {
    font-size: 48px;
    color: var(--text-tertiary);
    opacity: 0.5;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.empty-state-text {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    line-height: 1.4;
    font-weight: 400;
}

.empty-state-works {
    min-height: 200px;
    padding: 40px 20px;
    width: 100%;
    flex: 1 1 100%;
    min-width: 100%;
}

/* Empty state внутри карусели работ должен растягиваться */
.works-carousel-track .empty-state {
    width: 100%;
    flex: 1 1 100%;
    min-width: 100%;
    aspect-ratio: 1;
}

.empty-state-about {
    padding: 32px 20px;
    min-height: 120px;
    background: transparent !important;
    border: none !important;
}

/* Убираем фон и границу у master-about-text, когда внутри empty-state */
.master-about-text .empty-state {
    background: transparent;
    border: none;
    padding: 24px 20px;
}

/* Скелетоны для разделов при загрузке */
.skeleton-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 20px;
    text-align: center;
    background: linear-gradient(90deg, rgba(230, 200, 140, 0.08) 25%, rgba(230, 200, 140, 0.15) 50%, rgba(230, 200, 140, 0.08) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border: 1px dashed rgba(230, 200, 140, 0.25);
    border-radius: 12px;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.skeleton-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(230, 200, 140, 0.08) 25%, rgba(230, 200, 140, 0.2) 50%, rgba(230, 200, 140, 0.08) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    z-index: 0;
}

.skeleton-section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.skeleton-section-icon {
    font-size: 48px;
    color: var(--accent);
    opacity: 0.4;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48;
    animation: skeleton-icon-pulse 2s ease-in-out infinite;
}

@keyframes skeleton-icon-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.skeleton-section-text {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
    letter-spacing: 0.01em;
    max-width: 200px;
}

/* Скелетон для работ */
#worksCarouselTrack .skeleton-section {
    min-height: 200px;
    width: 100%;
    flex: 1 1 100%;
    min-width: 100%;
    aspect-ratio: 1;
}

/* Лоадер для кнопки лайкнуть */
.master-favorite-btn.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.master-favorite-btn.loading .favorites-icon {
    opacity: 0;
}

.master-favorite-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(230, 200, 140, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
