:root {
    --primary-color: #92857A;
    --secondary-color: #816B63;
    --light-bg: #E6E0DA;
    --text-color: #333;
    --border-color: #ddd;
    --max-width: 1400px;
}
body.single-nieruchomosci .description-content ul,
body.single-nieruchomosci .description-content li {
    margin: revert;
    padding: revert;
    list-style: revert;
}
.property-page-wrapper {
    background: #fff;
    padding: 40px 0 60px 0;
}
.description-content {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.property-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.property-left-column {
    flex: 1;
    padding-right: 40px;
}

.property-main-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-bg);
}

.property-gallery-section {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    height: 400px;
}

.mini-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    width: 320px;
    height: 100%;
}

.mini-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.mini-gallery-item.empty {
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.mini-gallery-item.empty:hover {
    transform: none;
}

.empty-photo {
    color: var(--secondary-color);
    font-size: 14px;
}

.mini-gallery-item.more-photos {
    position: relative;
}

.more-photos-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    line-height: 1.4;
}

.main-gallery-image {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    height: 100%;
}

.main-gallery-image:hover {
    transform: scale(1.02);
}

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

.no-main-image {
    width: 100%;
    height: 100%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 18px;
}

.property-details-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 25px 0;
    text-align: center;
    position: relative;
}

.details-grid {
    display: flex;
    gap: 0;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 30px;
}

.details-column {
    flex: 1;
    padding: 0 20px;
}

.details-column:first-child {
    padding-left: 0;
}

.details-column:last-child {
    padding-right: 0;
}

.details-divider {
    width: 1px;
    background: var(--primary-color);
    margin: -10px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.detail-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.detail-value {
    color: #666;
    font-size: 14px;
    text-align: right;
    max-width: 60%;
}

.property-description-section {
    margin-bottom: 40px;
}

.description-content {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 16px;
}

.description-content p {
    margin-bottom: 20px;
}

.description-content .webist-asari-slides-container,
.description-content .webist-asari-dots-container {
    display: none !important;
}

.vertical-separator {
    width: 1px;
    background: var(--primary-color);
    margin: 0 30px;
    align-self: stretch;
}

.property-right-column {
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background: #fff;
    position: sticky;
    top: 16px;
    align-self: start;
}

.agent-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.agent-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin: 0 0 25px 0;
}

.agent-contact-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.agent-phone,
.agent-email {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    word-break: break-all;
}

.agent-phone:hover,
.agent-email:hover {
    color: var(--secondary-color);
}

.agent-more-button {
    display: inline-block;
    width: 100%;
    padding: 12px 30px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(129, 107, 99, 0.3);
}

.agent-more-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(129, 107, 99, 0.4);
}

.agent-license {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.no-agent {
    text-align: center;
    padding: 20px;
}

.no-agent p {
    color: #666;
    margin-bottom: 15px;
}

.contact-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.gallery-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.gallery-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
}

.gallery-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.gallery-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    transition: color 0.3s ease;
}

.gallery-close:hover {
    color: var(--primary-color);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
}

.gallery-nav:hover svg {
    stroke: var(--primary-color);
}

.gallery-nav-prev {
    left: 20px;
}

.gallery-nav-next {
    right: 20px;
}

.gallery-nav svg {
    stroke: white;
    transition: stroke 0.3s ease;
}

.gallery-slider {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.gallery-main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.gallery-main-image img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

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

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow-x: auto;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
}

@media (max-width: 1200px) {
    .property-gallery-section {
        height: 350px;
    }
    
    .mini-gallery {
        width: 280px;
    }
}

@media (max-width: 1024px) {
    .property-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .property-left-column {
        padding-right: 0;
        width: 100%;
    }
    
    .vertical-separator {
        display: none;
    }
    
    .property-right-column {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        border: 2px solid var(--primary-color);
        border-radius: 12px;
    }
    
    .property-gallery-section {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .mini-gallery {
        width: 100%;
        height: 200px;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr;
    }
    
    .main-gallery-image {
        height: 400px;
    }
    
    .gallery-nav {
        width: 50px;
        height: 50px;
    }
    
    .gallery-nav svg {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 768px) {
    .property-main-title {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .details-grid {
        flex-direction: column;
        padding: 20px;
    }
    
    .details-divider {
        display: none;
    }
    
    .details-column {
        padding: 0;
    }
    
    .details-column:first-child {
        padding-bottom: 20px;
        border-bottom: 1px solid var(--primary-color);
        margin-bottom: 20px;
    }
    
    .mini-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        height: 250px;
    }
    
    .main-gallery-image {
        height: 300px;
    }
    
    .gallery-nav {
        width: 45px;
        height: 45px;
    }
    
    .gallery-nav-prev {
        left: 10px;
    }
    
    .gallery-nav-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .property-container {
        padding: 0 15px;
    }
    
    .property-main-title {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .mini-gallery {
        height: 200px;
    }
    
    .agent-photo {
        width: 120px;
        height: 120px;
    }
    
    .agent-name {
        font-size: 18px;
    }
    
    .detail-label,
    .detail-value {
        font-size: 13px;
    }
    
    .gallery-thumbnails {
        padding: 10px;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 60px;
    }
}

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

.gallery-popup.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@media print {
    .property-gallery-section,
    .gallery-popup,
    .agent-more-button,
    .contact-button {
        display: none;
    }
    
    .property-container {
        flex-direction: column;
    }
    
    .vertical-separator {
        display: none;
    }
}
