#site-popup-overlay *,
#site-popup-overlay *::before,
#site-popup-overlay *::after {
    box-sizing: border-box;
}

#site-popup-overlay button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

/* ===== OVERLAY ===== */
#site-popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

#site-popup-overlay.is-visible {
    display: flex;
    animation: spFadeIn 0.3s ease;
}

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

/* ===== POPUP BOX ===== */
#site-popup {
    position: relative;
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    max-width: 880px;
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: spSlideUp 0.3s ease;
}

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

/* ===== КНОПКА ЗАКРЫТЬ ===== */
#site-popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #222;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

#site-popup-close:hover {
    background: #95C12B;
    color: #fff;
    transform: scale(1.1);
}

/* CSS-крестик */
#site-popup-close::before,
#site-popup-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

#site-popup-close::before { transform: translate(-50%, -50%) rotate(45deg); }
#site-popup-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ===== ЛЕВАЯ ЧАСТЬ: СЛАЙДЕР ===== */
.popup-slider-wrap {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
    min-height: 420px;
    background: #111;
    border-radius: 12px 0 0 12px;
}

.popup-slides {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.popup-slide {
    flex: 0 0 100%;
    height: 100%;
    min-height: 420px;
}

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

/* ===== СТРЕЛКИ СЛАЙДЕРА ===== */
.popup-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: none;
    transition: color 0.2s, transform 0.15s;
}

.popup-slider-btn:hover {
    color: #95C12B;
    transform: translateY(-50%) scale(1.15);
}

.popup-slider-btn.prev { left: 10px; }
.popup-slider-btn.next { right: 10px; }

/* CSS-шеврон */
.popup-slider-btn::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-right: 3px solid currentColor;
    border-top: 3px solid currentColor;
    border-radius: 1px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.popup-slider-btn.prev::before { transform: rotate(-135deg) translate(-2px, 2px); }
.popup-slider-btn.next::before { transform: rotate(45deg) translate(-2px, 2px); }

/* ===== ТОЧКИ ===== */
.popup-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.popup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    display: block;
    transition: background 0.2s, transform 0.2s;
}

.popup-dot.active {
    background: #95C12B;
    transform: scale(1.3);
}

/* ===== ПРАВАЯ ЧАСТЬ: ТЕКСТ ===== */
.popup-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
    background: #fff;
}

.popup-content .popup-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #95C12B;
    margin-bottom: 12px;
}

.popup-content h2 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    margin: 0 0 16px !important;
}

.popup-content p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 32px !important;
}

/* ===== КНОПКА ГАЛЕРЕЯ ===== */
.popup-gallery-btn {
    display: inline-flex !important;
    align-items: center;
    padding: 13px 28px;
    background: #95C12B;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    align-self: flex-start;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(149, 193, 43, 0.4);
}

.popup-gallery-btn:hover {
    background: #7ea821 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(149, 193, 43, 0.5);
    text-decoration: none !important;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 680px) {
    #site-popup {
        flex-direction: column;
        max-height: 88vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    #site-popup-close {
        top: 8px;
        right: 8px;
    }

    .popup-slider-wrap {
        flex: 0 0 auto;
        min-height: 220px;
        border-radius: 12px 12px 0 0;
    }

    .popup-slide { min-height: 220px; }

    .popup-content {
        padding: 28px 22px 32px;
        border-radius: 0 0 12px 12px;
    }

    .popup-content h2 { font-size: 20px; }
}