/* public/assets/css/profile-public.css */

/* --- SCOPED ROOT --- */
.public-profile-wrapper {
    width: 100%;
    background-color: var(--color-bg-body, #F9FAFB);
    padding-bottom: 80px;
    font-family: 'Manrope', sans-serif;
    color: var(--color-text-main, #1F2937);
    line-height: 1.6;
}

/* Container */
.public-profile-wrapper .pp-container {
    width: 100%;
    max-width: var(--container-width, 1440px);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- GRID LAYOUT --- */
.public-profile-wrapper .pp-grid {
    display: grid;
    /* Сайдбар 340px, контент остальное */
    grid-template-columns: 340px 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 32px;
}

/* --- BREADCRUMBS --- */
.public-profile-wrapper .pp-breadcrumbs {
    padding: 24px 0 0;
    font-size: 0.9rem;
    color: #6B7280;
    font-weight: 500;
}
.public-profile-wrapper .pp-breadcrumbs ol {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    list-style: none; padding: 0; margin: 0;
}
.public-profile-wrapper .pp-breadcrumbs a { color: #6B7280; text-decoration: none; transition: color 0.2s; }
.public-profile-wrapper .pp-breadcrumbs a:hover { color: var(--color-primary); }
.public-profile-wrapper .pp-breadcrumbs i { font-size: 0.8rem; opacity: 0.5; }

/* --- HERO CARD --- */
.public-profile-wrapper .pp-hero-card {
    grid-column: 1 / -1;
    background: #fff;
    border-radius: var(--radius-lg, 16px);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border, #E5E7EB);
    margin-bottom: 8px;
}

.public-profile-wrapper .pp-hero-content {
    display: flex; gap: 40px; align-items: flex-start;
}

.public-profile-wrapper .pp-avatar-wrapper {
    position: relative; flex-shrink: 0;
}

.public-profile-wrapper .pp-avatar {
    width: 160px; height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background-color: #E0E7FF;
}

.public-profile-wrapper .pp-verified-badge {
    position: absolute; bottom: 10px; right: 10px;
    background: #fff; color: #10B981;
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    font-size: 1.4rem; z-index: 2;
}

.public-profile-wrapper .pp-hero-info {
    flex-grow: 1; display: flex; flex-direction: column; justify-content: center;
}

.public-profile-wrapper .pp-badges {
    display: flex; gap: 10px; margin-bottom: 16px;
}

.public-profile-wrapper .pp-badge {
    padding: 6px 12px; border-radius: 8px; font-size: 0.8rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.public-profile-wrapper .pp-badge-role { background: #EEF2FF; color: var(--color-primary); }
.public-profile-wrapper .pp-badge-city { background: #F3F4F6; color: #6B7280; }

.public-profile-wrapper .pp-name {
    font-size: 2.5rem; line-height: 1.1; margin-bottom: 12px;
    color: #111827; font-weight: 800;
}

.public-profile-wrapper .pp-rating-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
    font-size: 1rem; font-weight: 600;
}
.public-profile-wrapper .pp-stars { color: #F59E0B; display: flex; align-items: center; gap: 4px; }
.public-profile-wrapper .pp-dot { color: #E5E7EB; }
.public-profile-wrapper .pp-link { color: var(--color-primary); text-decoration: none; border-bottom: 1px dashed; }
.public-profile-wrapper .text-success { color: #10B981; font-weight: 600; }

.public-profile-wrapper .pp-bio-short {
    font-size: 1.05rem; color: #4B5563; max-width: 750px; margin-bottom: 0;
}

.public-profile-wrapper .pp-hero-actions {
    display: flex; gap: 16px; margin-top: 32px;
}

.public-profile-wrapper .pp-subactions {
    display: flex; gap: 10px;
}

/* --- BUTTONS --- */
.public-profile-wrapper .pp-btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: 10px;
    padding: 12px 24px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; font-size: 1rem; background: none;
    font-family: 'Manrope', sans-serif;
}
.public-profile-wrapper .pp-btn-primary { 
    background: var(--color-primary); color: #fff; 
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}
.public-profile-wrapper .pp-btn-primary:hover { 
    background: var(--color-primary-dark); transform: translateY(-2px);
}

.public-profile-wrapper .pp-btn-outline { 
    background: #fff; border-color: #E5E7EB; color: #374151; 
}
.public-profile-wrapper .pp-btn-outline:hover { 
    border-color: var(--color-primary); color: var(--color-primary); 
}

.public-profile-wrapper .pp-btn-icon { padding: 0; width: 50px; height: 50px; font-size: 1.3rem; }
.public-profile-wrapper .pp-btn-lg { padding: 14px 36px; font-size: 1.1rem; }
.public-profile-wrapper .pp-btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.public-profile-wrapper .pp-btn-block { width: 100%; display: flex; }
.public-profile-wrapper .mt-2 { margin-top: 12px; }

/* --- SIDEBAR --- */
.public-profile-wrapper .pp-sidebar {
    display: flex; flex-direction: column; gap: 24px;
}

.public-profile-wrapper .pp-widget {
    background: #fff; border-radius: 16px; padding: 24px;
    border: 1px solid #E5E7EB; box-shadow: var(--shadow-sm);
}

.public-profile-wrapper .pp-widget h3 {
    font-size: 1.2rem; margin-bottom: 20px; color: #111827; font-weight: 800;
}

/* Digital Soul */
.public-profile-wrapper .pp-soul-score { text-align: center; }
.public-profile-wrapper .pp-soul-score strong { 
    font-size: 2.5rem; display: block; color: var(--color-primary); line-height: 1; font-weight: 800;
}
.public-profile-wrapper .pp-soul-score span { font-size: 0.9rem; color: #6B7280; font-weight: 600; }

/* Phone */
.public-profile-wrapper .pp-phone-wrapper {
    background: #F3F4F6; border-radius: 12px; padding: 20px;
    text-align: center; margin-bottom: 12px; border: 1px dashed #D1D5DB;
}
.public-profile-wrapper .pp-phone-placeholder {
    font-size: 1.2rem; font-weight: 700; color: #1F2937; margin-bottom: 12px;
}

/* --- MAIN CONTENT --- */
.public-profile-wrapper .pp-main-content {
    display: flex; flex-direction: column; gap: 32px; min-width: 0;
}

.public-profile-wrapper .pp-section {
    background: #fff; border-radius: 16px; padding: 40px;
    border: 1px solid #E5E7EB; scroll-margin-top: 120px;
    box-shadow: var(--shadow-sm);
}

.public-profile-wrapper .pp-section h2 { 
    margin-bottom: 24px; font-size: 1.6rem; color: #111827; font-weight: 800; 
}

/* Services (Старый список, можно оставить для совместимости) */
.public-profile-wrapper .pp-service-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; border-bottom: 1px solid #F3F4F6;
}
.public-profile-wrapper .pp-service-item:last-child { border-bottom: none; }

.public-profile-wrapper .pp-service-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: #111827; }
.public-profile-wrapper .pp-service-desc { font-size: 0.95rem; color: #6B7280; margin-bottom: 4px; }
.public-profile-wrapper .pp-service-meta { font-size: 0.9rem; color: #9CA3AF; font-weight: 500; }

.public-profile-wrapper .pp-service-action { text-align: right; margin-left: 24px; flex-shrink: 0; }
.public-profile-wrapper .pp-service-price { 
    font-size: 1.2rem; font-weight: 800; color: var(--color-primary); margin-bottom: 10px; display: block; 
}
.public-profile-wrapper .pp-unit { font-size: 0.9rem; font-weight: 500; color: #6B7280; }

/* Portfolio */
.public-profile-wrapper .pp-portfolio-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.public-profile-wrapper .pp-portfolio-item { 
    margin: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; position: relative;
    border: 1px solid var(--color-border);
}
.public-profile-wrapper .pp-portfolio-item img { 
    width: 100%; height: 220px; object-fit: cover; transition: transform 0.3s; 
    display: block;
}
.public-profile-wrapper .pp-portfolio-item:hover img { transform: scale(1.05); }

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .public-profile-wrapper .pp-grid { grid-template-columns: 1fr; }
    .public-profile-wrapper .pp-sidebar { order: 3; }
    .public-profile-wrapper .pp-main-content { order: 2; }
    .public-profile-wrapper .pp-hero-card { order: 1; }
    
    .public-profile-wrapper .pp-hero-content { flex-direction: column; text-align: center; align-items: center; }
    .public-profile-wrapper .pp-hero-actions { width: 100%; justify-content: center; }
    
    .public-profile-wrapper .pp-service-item { flex-direction: column; align-items: flex-start; gap: 16px; }
    .public-profile-wrapper .pp-service-action { 
        width: 100%; margin-left: 0; display: flex; justify-content: space-between; align-items: center;
        background: #F3F4F6; padding: 16px; border-radius: 12px;
    }
}

/* ==========================================================================
   PUBLIC LIGHTBOX STYLES (REQUIRED FIX)
   ========================================================================== */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Очень темный фон */
    z-index: 10000; /* Должен перекрывать Хедер (обычно z-index: 100) */
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-content {
    position: relative; 
    max-width: 90%; 
    max-height: 90%;
    display: flex; flex-direction: column; align-items: center;
}

.lightbox-content img {
    max-width: 100%; 
    max-height: 85vh; /* Ограничение высоты картинки */
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-caption {
    color: #fff; text-align: center; margin-top: 16px;
    font-size: 1.1rem; font-weight: 500; opacity: 0.9;
}

.lightbox-close {
    position: absolute; top: 30px; right: 30px; 
    font-size: 3rem; color: #fff;
    background: none; border: none; cursor: pointer; 
    transition: transform 0.2s;
    opacity: 0.7; z-index: 10001;
}
.lightbox-close:hover { opacity: 1; transform: rotate(90deg); }

/* ==========================================================================
   PRICELIST STYLES (NEW - ЭТОГО НЕ ХВАТАЛО)
   ========================================================================== */
.pp-pricelist-container {
    margin-top: 16px;
}

.pp-price-category {
    margin-bottom: 40px;
}
.pp-price-category:last-child { margin-bottom: 0; }

.pp-cat-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #EEF2FF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pp-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.pp-price-table th {
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #9CA3AF;
    font-weight: 600;
    padding: 8px 16px 12px 0;
    border-bottom: 1px solid #F3F4F6;
}
.pp-price-table th:last-child { padding-right: 0; }

.pp-price-table td {
    padding: 16px 16px 16px 0;
    vertical-align: top;
    border-bottom: 1px solid #F3F4F6;
}
.pp-price-table tr:last-child td { border-bottom: none; }

.pp-svc-name {
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 4px;
}

.pp-svc-desc {
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.4;
}

.pp-price-val {
    font-weight: 800;
    color: #111827;
    text-align: right;
    white-space: nowrap;
}

.pp-price-unit {
    color: #6B7280;
    font-size: 0.9rem;
    text-align: right;
    padding-right: 0 !important;
}

/* Mobile Pricing */
@media (max-width: 600px) {
    .pp-price-table th { display: none; /* Прячем заголовки на телефоне */ }
    
    .pp-price-table tr {
        display: flex;
        flex-wrap: wrap;
        padding: 16px 0;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .pp-price-table td {
        border: none;
        padding: 0;
    }
    
    .pp-price-table td:first-child {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .pp-price-val {
        text-align: left;
        color: var(--color-primary);
        font-size: 1.1rem;
        margin-right: 8px;
    }
    
    .pp-price-unit {
        text-align: left;
        padding-top: 4px !important;
    }
} 

.ds-widget {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFF 100%);
    border: 2px solid #EEF2FF;
}
.pp-soul-score strong {
    text-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}