/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.popup-content {
    background: var(--bg-color, #fff);
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    max-height: 95vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #e74c3c;
}

.popup-gallery {
    background: #111;
}

.gallery-section {
    padding: 15px;
}

.main-image {
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.zoom-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnails {
    display: flex;
    gap: 8px;
    padding: 15px 10px;
    overflow-x: auto;
    background: #1a1a1a;
}

.thumbnails img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.thumbnails img:hover {
    opacity: 1;
    border-color: #3498db;
}

.video-section {
    padding: 15px;
    border-top: 1px solid #333;
}

.video-section h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 16px;
}

.video-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.video-box video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #000;
}

.popup-info {
    padding: 25px;
    background: var(--bg-color, #fff);
}

.popup-info h2 {
    font-size: 22px;
    color: var(--text-primary, #333);
    margin-bottom: 10px;
}

.popup-price {
    font-size: 28px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 20px;
}

.popup-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.spec-item {
    background: var(--bg-secondary, #f5f5f5);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.spec-item span {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.spec-item strong {
    font-size: 14px;
    color: var(--text-primary, #333);
}

.popup-desc {
    background: var(--bg-secondary, #f5f5f5);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.popup-desc h3 {
    font-size: 14px;
    color: var(--text-primary, #333);
    margin-bottom: 8px;
}

.popup-desc p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

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

.popup-actions a {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-call {
    background: #3498db;
    color: #fff;
}

.btn-call:hover {
    background: #2980b9;
}

/* Fullscreen Image/Video */
.fullscreen-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-view img,
.fullscreen-view video {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile */
@media (max-width: 600px) {
    .popup-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .main-image {
        height: 250px;
    }
    
    .popup-specs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .popup-info h2 {
        font-size: 18px;
    }
    
    .popup-price {
        font-size: 24px;
    }
    
    .popup-actions {
        flex-direction: column;
    }
}
